BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => 0.5.x Custom/Unofficial Modules => Topic started by: Temar on March 14, 2008, 04:59:40 am

Title: 0.4_Support for latest 0.5
Post by: Temar on March 14, 2008, 04:59:40 am
Over last few Months alot of changes have happened to SVN 0.5
Making Nearly all Old Modules even those that were made for 0.5 before this update
no longer work

This Module Will Update the modules as it loads it

I will post update to this module as needed

This module will load ALL modules in the /custom/04/ folder

And now load All custom directoreis you set in the .conf file eg u set it to load

  $core_directories = "./Leetboss/core";   // optional additional core directories

it will load anything in ./Leetboss/core/04

So basicly "04" inside Extra Folders you set.

if like me you have removed the check for $this -> bot -> commpre with message from the 0.4 module you need to add this line in the constructor or readd the prefix
Code: [Select]
$this -> dontuseprefix = TRUE;
Title: Re: 0.4_Support for latest 0.5
Post by: Dracutza on March 28, 2008, 01:55:18 am
using your lastest 0.5.0 zip

Fatal error: Call to undefined method Bot::get_module() in P:\bot\main\99_0.4
_Support.php on line 261
Title: Re: 0.4_Support for latest 0.5
Post by: Blueeagle on March 28, 2008, 02:08:04 am
$this->bot->get_module() is now called $this->bot->core()
Title: Re: 0.4_Support for latest 0.5
Post by: Temar on March 28, 2008, 02:50:41 am
sorry had already altered it but forgot to post update
Title: Re: 0.4_Support for latest 0.5
Post by: Temar on April 04, 2008, 03:12:54 am
Fixed Broken Redirects and the Whois Section
Title: Re: 0.4_Support for latest 0.5
Post by: Temar on May 06, 2008, 05:46:07 am
Done load of Changes and Improvments

And now load All custom directoreis you set in the .conf file eg u set it to load

  $core_directories = "./Leetboss/core";   // optional additional core directories

it will load anything in ./Leetboss/core/04

So basicly "04" inside Extra Folders you set.
Title: Re: 0.4_Support for latest 0.5.1
Post by: Temar on May 08, 2008, 07:04:27 pm
Posted Update to work with 0.5.1

0.5.0 users need to update Bot.php
Title: Re: 0.4_Support for latest 0.5.1
Post by: Dracutza on May 10, 2008, 07:54:52 pm
older versions were called 99_0.4_Support and stored in /main

where should this get placed now?
Title: Re: 0.4_Support for latest 0.5.1
Post by: Dracutza on May 10, 2008, 08:01:51 pm
nevermind

/custom/core seems to work fine
Title: Re: 0.4_Support for latest 0.5.1
Post by: Dracutza on May 10, 2008, 08:03:26 pm
sadly though this still doesn't work for 0.4 mods that contain whitespaces in their command.

!apf set now
!quote add

still don't work :(
Title: Re: 0.4_Support for latest 0.5.1
Post by: Temar on May 10, 2008, 08:39:58 pm
commands can only be 1 word so im not sure what you mean
Title: Re: 0.4_Support for latest 0.5.1
Post by: Nytridr on May 10, 2008, 08:45:56 pm
sadly though this still doesn't work for 0.4 mods that contain whitespaces in their command.

!apf set now
!quote add

still don't work :(

Not sure what you mean Drac, I know if you parse the comamnds in the scripts you can have more then one argument to the commands.  If you are making a script give us an example of what you are trying to do.
Title: Re: 0.4_Support for latest 0.5.1
Post by: Dracutza on May 10, 2008, 10:30:57 pm
same thing I've mentioned in each mods respective thread.

!quote add <quote> - Adds <quote> to database

To [bot]: !quote add no it does not
bot: #293 - Shadynator: do you realise how hard it is to target a tiny jumping leet after 8 beers [Contributed by: Ferryd]

!apf set now - Sets the timer. Use when Gatekeeper shouts "I'm opening the gates now!

To [bot]: apf set now
bot: The Outzone gates will open in 6 hours, 40 minutes, and 13 seconds.

Those are the only two 0.4 modules I use, and it seems like neither get past the initial command.  !quote add blah , !quote del 293, !quote beers all result in a quote being displayed.  !apf set now, !apf set web, !apf set 04:00:00 all result in just the displaying of the timer.
Title: Re: 0.4_Support for latest 0.5.1
Post by: Dracutza on May 10, 2008, 10:34:55 pm
and I'm not complaining or anything... was just wishful thinking, that's all.
Title: Re: 0.4_Support for latest 0.5.1
Post by: Temar on May 11, 2008, 12:38:57 am
the Issue was to do with Prefix, it should now Modify the 0.4 modules to correct that

but if like me you have removed the check for $this -> bot -> commpre with message from the 0.4 module you need to add this line in the constructor or readd the prefix
Code: [Select]
$this -> dontuseprefix = TRUE;

Dracutza im happy you are telling me these issues , i cant fix problems if people dont tell me :p
Title: Re: 0.4_Support for latest 0.5.1
Post by: Dracutza on May 11, 2008, 04:06:05 am
Close for quote...

[2008-05-11 02:06:33]    [TELL]  [INC]   Dracutza: !quote add hi hi hi

Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource
 in P:\botsys\custom\core\0.4_Support.php(31) : eval()'d code on line 260
[2008-05-11 02:06:33]    [TELL]  [OUT]   -> Dracutza: Thank you, your quo
te has been added as id #


Apf seems to work!  ;D  ;D

To [Pobot3]: !apf
Pobot3: The Outzone gates will open in 0 hours, 52 minutes, and 54 seconds.
To [Pobot3]: !apf set now
Pobot3: APF Timestamp Updated.
Automatic web updates are Disabled.
The Outzone gates will open in 0 hours, 0 minutes, and 0 seconds.
Title: Re: 0.4_Support for latest 0.5.1
Post by: Temar on May 15, 2008, 07:08:23 am
Fixed Problem with gmsg commands not being registered correctly
Title: Re: 0.4_Support for latest 0.5.1
Post by: shadowdamon on June 10, 2008, 09:23:45 pm
Im getting this error, no clue how or why.

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in C:\BeBot\custom\modules\0.4_Support.php(31) : eval()'d code on line 344

Any help would be appretiated.
Title: Re: 0.4_Support for latest 0.5.1
Post by: Blueeagle on June 11, 2008, 02:35:57 am
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in C:\BeBot\custom\modules\0.4_Support.php(31) : eval()'d code on line 344
A T_CONSTANT_ENCAPSED_STRING is a string constant that's encapsed with single or double quotes like 'hello' or "hello".
The error is occuring on line 31 of the support module where it (the support module) is evaluating code with eval(). In the code being evalueated apperantly there is such a string on line 344 that the PHP parser did not expect. What it did expect, however, was a closing parenthesis. ')'.

Now, the $48'000 question is which module the support-module is attempting to load and what lines 340-345 look like. Without knowing that it's impossible to debug the issue.
Title: Re: 0.4_Support for latest 0.5.1
Post by: Temar on June 11, 2008, 03:42:40 am
above that line should be the module it is loading
i told my module to say its loading the module before for this exact reason
Title: Re: 0.4_Support for latest 0.5.1
Post by: Trancillion on July 05, 2008, 08:33:56 pm
having this problem aswell:

Noctrish [2008-07-05 18:04:56]  [GROUP] [MSG]   [Nocturnal Fear] Dayshade: !quote add [Nocturnal Fear] Trancillion: !cheetos [Nocturnal Fear] Noctrish: /me cast
s Materialize Greater Cheetos in Trancillion's mouth.

Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in D:\0.5.2\custom\core\0.4_Support.php(31) : eval()'d code on line 260

in 0.4_support.php:

255:   $contents = str_replace('function gc($', 'function gc($name, $msg)
256:   {
257:      if($msg[0] != $this -> bot -> commpre && !$this -> dontuseprefix)
258:      {
259:         $msg = $this -> bot -> commpre.$msg;
260:      }
261:      $this -> gc_support($name, $msg);
262:   }
263:
264:   function gc_support($', $contents);

in Quotes.php

275:            $reply = "Unable to delete quote with ID of " . $qnum . ". You must be an admin or the contributor of the quote to delete it.";
258:         }
259:      }
260:      else
261:      {
262:         $sql = "SELECT id FROM #___quotes ORDER BY id DESC LIMIT 1";
263:         $num = $this -> bot -> db -> select($sql);
264:         $reply = "Quote with id of " . $qnum . " not found. (Highest quote ID is " . $num[0][0] . ".)";
265:      }
266:      return $reply;
267:   } // End function del_quote()

no ide if this is any help at all, but so far only this Quotes.php that has created any problems. and i'v added 1 by 1. tested them all after adding.
(well xp.php has a smal problem of listing alien lvls on just !xp, but thats just a smal problem. works when you put a level behind).
Title: Re: 0.4_Support for latest 0.5.1
Post by: Temar on July 06, 2008, 03:23:27 pm
the module should not affect that query, my guess is its somit todo with the quotes module or mysql
Title: Re: 0.4_Support for latest 0.5.1
Post by: clashbot on July 18, 2008, 06:02:05 pm
ok, this seems to be the section I need. The nano, by temar, is not working with the current svn. It has to do with the arguments being passed on. Nano currently is not accepting any arguments so constantly displays the help page. I have the latest 0.4 support mod, I have the latest everything...but since upgrading to the 5.2 I have been unable to use nano at all.
Title: Re: 0.4_Support for latest 0.5.1
Post by: Zweiblum on July 23, 2008, 04:50:54 pm
hmm.. i dont understand that:
im using 0.5.2 now.
the 0.5 modules r in c:\bot\custom\modules
the 0.4 modules are in c:\bot\custom\modules\04

i got aiboss.php and swstimer.php in the .\modules dir and its working fine
even the 0.4_support.php is inside .\modules sire
i got trickle.php and apf.php (from glara) in .\modules\04
trickle.php is working fine, but apf.php isnt.. and i realy dont see why :/
the bot just doesnt know the command !apf ... maybe i just dont see the problem :/
Title: Re: 0.4_Support for latest 0.5.1
Post by: Temar on July 23, 2008, 05:40:56 pm
0.4 modules: c:\bot\custom\04\
Title: Re: 0.4_Support for latest 0.5.1
Post by: Zweiblum on July 23, 2008, 05:52:36 pm
thx for the reply!
ok for the apf.php costum\modules works fine but the strange thing is, that the tickle.php must be in bot\custom\modules\04 else the bot wont start... thats strange, but now everything works fine.

many thx for helping a noob like me ;)
Title: Re: 0.4_Support for latest 0.5.1
Post by: Temar on July 23, 2008, 07:09:15 pm
anything in modules\04 isnt loaded
Title: Re: 0.4_Support for latest 0.5.1
Post by: Zweiblum on July 23, 2008, 07:11:39 pm
actually m trickle.php is at C:\0.5.2\custom\modules\04 and its only working when its in that dir, else it wont.
Title: Re: 0.4_Support for latest 0.5.1
Post by: Temar on July 24, 2008, 05:29:24 am
like i said anythin in custom/modules/04 isnt loaded, Bebot doesnt load them, my Support module doesnt load them unless u changed it

what is the error you are getting?
Title: Re: 0.4_Support for latest 0.5.1
Post by: Zweiblum on July 24, 2008, 08:18:17 am
im a lil bit confused... when u say "anythin in custom/modules/04 isnt loaded" its sounds like that it shouldnt work in game, but it is.
when the module (tickle.php) is NOT in that dir (custom/module/04) the bot istn loading with any error msg, hes just in a logon loop trying to logon again and again and again..
Title: Re: 0.4_Support for latest 0.5.1
Post by: Temar on July 24, 2008, 03:38:34 pm
Bebot doesnt load it, my module only loads custom/04/ and folder you put in the conf eg "mybotmobs/modules/" it loads "mybotmobs/modules/04" which is just basicly a /04/ folder inside whateva u specify, and custom/module/ cant be 1 u specified or it would be loaded twice
Title: Re: 0.4_Support for latest 0.5.1
Post by: clashbot on August 12, 2008, 02:32:42 pm
was trying to get MOTD to work and I am getting an error from the support module:

fatal error: cannot access private property bot::$cron in 0.4_support.php(31) : eval()'d code on line 111

Title: Re: 0.4_Support for latest 0.5.1
Post by: Temar on August 12, 2008, 07:47:37 pm
please post or point to this module so i can investigate the problem
Title: Re: 0.4_Support for latest 0.5.1
Post by: clashbot on August 12, 2008, 07:49:27 pm
http://bebot.link/bebot-0-4-support/motd-module-from-2-x-to-4-x/ (http://bebot.link/bebot-0-4-support/motd-module-from-2-x-to-4-x/) was the original place where I found the 4.x mod
Title: Re: 0.4_Support for latest 0.5
Post by: Temar on August 13, 2008, 12:47:49 am
Done Added replacements for when a module tries to set and unset cron directly
Title: Re: 0.4_Support for latest 0.5
Post by: taconis on August 22, 2008, 11:33:18 pm
Fatal error: Can't use method return value in write context in C:\BeBot\Wolfcomm\modules\0.4_Support.php(31) : eval()'d code on line 25

exact code is....

// get contents of a file into a string
$filename = "./custom/04/".$mod;
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);
$contents = support_replace($contents);

The 04_support.php module is located in \modules.  All 0.4 modules are in \custom\04\.  This error occurs before any custom modules load.
Title: Re: 0.4_Support for latest 0.5
Post by: Temar on August 23, 2008, 05:35:47 am
the erro say its code from a modules it loading, thats why it says eval()'d code, check the module listed above the error
SimplePortal 2.3.7 © 2008-2024, SimplePortal