BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => 0.2.x Custom/Unofficial Modules => Topic started by: Wolfbiter on January 13, 2006, 01:49:24 am

Title: Alien-biomaterial script
Post by: Wolfbiter on January 13, 2006, 01:49:24 am
Updated 2007-01-21

A script which can identify multiple clumps at once, and also gives clickable links for highest ql weapon for type X materials.
Usage: !clump [post all bio-clumps here]
!id and !bio also works

Will reply 1-3 clumps back in chat, 4+ in a textblob.

!type [ql] <type #> - Show you what you can use ql (default 300) type # for
!ofab # - Show Ofab armor - Weapons are with !type (!type # works for armor now too)

Update notes
Moved from hardcoded into database for this, finally.
Didn't bugtest this script as I should have.. so report any and all bugs you find.
All armor (!ofab and !clump with armor upgrade) are so-so, both output and code-wise.. I was just too lazy to make it better, it's just something you'll have to live with.
All Ofab (armor and weapon) are ql300 only.
-Armor: Only way to get reliable data is to buy every single piece and check the item #'s for each step. If you're prepared to do that, contact me and I'll setup a bot that you can use to collect the data.
-Weapon: Too lazy to get item # for any other ql.. I might some day when I'm even more bored than now.
Anyone that wishes to complete the lowid for ofab weapon clumps are more than welcome to do so.

Fixes
2007-01-03: send_pgmsg -> send_pgroup... I always make that misstake
2007-01-21: Fixed !ofab output and changes some other minor script changes. Also added which weapontype to Ofab weapon clumps info (need new .sql for that change, if you don't care you can keep old).
Title: Re: Alien-biomaterial script
Post by: jjones666 on January 13, 2006, 07:47:02 pm
Very nice =)

Cheers,

-jj-
Title: Re: Alien-biomaterial script
Post by: Wolfbiter on January 14, 2006, 08:50:18 pm
Need to use the fix listed at http://bebot.link/index.php/topic,234.0 for the script to work proper.
Title: Re: Alien-biomaterial script
Post by: jjones666 on June 28, 2006, 09:03:11 am
Is there any way the script can be modified to output to GC only if clump posted there or PGROUP only if posted there, currently sends to both.

Cheers,

-jj-
Title: Re: Alien-biomaterial script
Post by: Wolfbiter on June 28, 2006, 06:10:43 pm
The whole script is a bit outdated.. added a !type command and changed the script some... I'll post an update in the first post after I look over it.
Title: Re: Alien-biomaterial script
Post by: jjones666 on June 28, 2006, 08:38:14 pm
Thanks :-)
Title: Re: Alien-biomaterial script
Post by: Wolfbiter on July 25, 2006, 12:00:48 pm
A late but needed update.
Title: Re: Alien-biomaterial script
Post by: Wolfbiter on December 31, 2006, 05:52:12 am
Big update... LE clumps and harcoded info -> database
Title: Re: Alien-biomaterial script
Post by: ilon on December 31, 2006, 08:13:16 am
hello, when trying to start the bot with this module, i get the following error
Parse error: parse error, unexpected T_STRING in /home/bebot/BeBot_v0.2.10/modules/Clump.php on line 163
and the bot starts to crashloop.
Code: [Select]
$output="<>bot->make_blob("Weapon types",$output);is the line it complains about.

i dont know php, but that string isnt closed, might be the problem? tried to close it, but just gave me another error >_>
Title: Re: Alien-biomaterial script
Post by: Wolfbiter on December 31, 2006, 09:50:24 am
That line isn't pressent in my local script, nor when I downloaded it just now from here... In both scripts, line 163 is just a "}". Try downloading the script again.
Title: Re: Alien-biomaterial script
Post by: ilon on December 31, 2006, 10:00:08 am
hm, sorry to bother you, guess it was only some problems with pasting large texts into putty :(
Title: Re: Alien-biomaterial script
Post by: Malosar on December 31, 2006, 01:11:24 pm
awesome! far better than my interim hack, thankyou.

edit: omg ofab armor list not in blob, the spam the spam! need to edit...
Title: Re: Alien-biomaterial script
Post by: Wolfbiter on December 31, 2006, 05:56:15 pm
Yea.. I applied laziness when I made the armor, why I also made a .sql without basic ofab to cut down on spam (not to mention you can see basic ofab in the shops).
Title: Re: Alien-biomaterial script
Post by: Malosar on January 02, 2007, 06:00:57 pm
Here is a slightly updated version of Wolfbiters which changed Ofab results into a blob, and also allows ql option for !ofab and !type commands. For ofab it will select the next lowest increment of 25 from whatever ql you specify. You will need new sql because of the added ofab armor data.
Title: Re: Alien-biomaterial script
Post by: Snarfblatt on January 02, 2007, 09:08:39 pm
Not sure if this is relevant to anyone else, but I had to change the sql to use a single-quote to escape the single-quotes, rather than the backslash. For example, in the original it would say:

Code: [Select]
Kyr\'Ozch
to

Code: [Select]
Kyr''Ozch
Title: Re: Alien-biomaterial script
Post by: Snarfblatt on January 02, 2007, 09:33:02 pm
The command !ofab kills my bot anyone else have this sort of problem? The bot is installed as a raid bot.

Edit: kindof weird, but it works fine in my guild bot and in tells.. just seems to die in the pg.
Title: Re: Alien-biomaterial script
Post by: Malosar on January 02, 2007, 09:38:33 pm
The command !ofab kills my bot anyone else have this sort of problem? The bot is installed as a raid bot.

Check your console and post any errors here.
Title: Re: Alien-biomaterial script
Post by: Snarfblatt on January 02, 2007, 09:51:00 pm
Code: [Select]
Fatal error: Call to undefined method Bot::send_pgmsg() in Clump.php on line 177

Looks like this should be calling send_pgroup.. not send_pgmsg. So that should fix it.
Title: Re: Alien-biomaterial script
Post by: Malosar on January 02, 2007, 10:33:02 pm
oops, thanks. fixed and reposted.
Title: Re: Alien-biomaterial script
Post by: pusikas on January 03, 2007, 02:06:53 am
I know this is just something minor and of no real importance, but why are all your files with blank lines? What code editor are you using, Malosar? I just know that my stupid vi hates it, makes the syntax highlighting slow as hell for some reason. :)
Title: Re: Alien-biomaterial script
Post by: jjones666 on January 03, 2007, 02:28:51 am
I know this is just something minor and of no real importance, but why are all your files with blank lines? What code editor are you using, Malosar? I just know that my stupid vi hates it, makes the syntax highlighting slow as hell for some reason. :)

Yeah, double spacing gives me headache to read too :-)  I tided it up and cleaned up the !ofab output slightly.  (I re-added the default ql 300 to !type also - different QL's still work if entered manually).

http://www.jjones.co.uk/files/clump.php

Thanks both for the updates :-D

-jj-
Title: Re: Alien-biomaterial script
Post by: Malosar on January 03, 2007, 03:18:14 am
hmm it displays fine on mine, I thought it was something else that was making double spaces. I use gedit in ubuntu. I hate double spacing so sorry it's doing it for you all :p
Title: Re: Alien-biomaterial script
Post by: Khalem on January 03, 2007, 08:51:20 pm
This is normally caused by CR/LF (Carriage Return/Line Feed) and Newline issues.
Windows and Unix use two different ways to designate a new line.

Most modern editors is able to handle both just fine, Notepad Plus is the one i've had the least trouble with http://notepad-plus.sourceforge.net although even it seems to have an issue with this one O.o.

Notepad in Vista at least has no issues with double lines with this file.
Title: Re: Alien-biomaterial script
Post by: Malosar on January 03, 2007, 09:06:51 pm
Can anyone suggest an alternative that I can use in gnome? Must support php, html, bash, perl code highlighting ofc.
Title: Re: Alien-biomaterial script
Post by: Naturalistic on January 03, 2007, 09:25:46 pm
I like Notepad2 >_>
Title: Re: Alien-biomaterial script
Post by: Wolfbiter on January 03, 2007, 11:22:47 pm
For windows, I like Edit+ (http://www.editplus.com/). No idea for *nix.
Maybe I'll steal the ofab blob into my script someday when I'm bored, so people can get my script without double lines ;)
Title: Re: Alien-biomaterial script
Post by: Malosar on January 04, 2007, 01:04:56 am
I use UltraEdit32 for windows so I downloaded my clump.php.txt and it looked fine. However I saved it in UltraEdit and posted it again. See if the lines look again now? If so I might redo some of my previous postings as well.
Title: Re: Alien-biomaterial script
Post by: Areteh on January 06, 2007, 01:12:59 pm
help files.  There are quite a few of them for this module.  (yeah, I'm spamming them a bit, just figured since I'm writing them for my own bots, I may as well share.)
Title: Re: Alien-biomaterial script
Post by: Wolfbiter on January 21, 2007, 11:48:51 pm
updated
Title: Re: Alien-biomaterial script
Post by: Psymonosmash` on March 24, 2007, 10:42:14 pm
Hello, i just tried installing this module onto my bot but every time someone drops a clump into org chat they get "[Cerberus] Tempcerbot: Solid Clump of Kyr'Ozch Bio-Material is an unknown material (or a bug in the script). Please contact Wolfbiter@RK1 before you do anything with it!"

the bot shot right back at them by the bot:

"MySQL error <# 0> on query: select type, name, specials, spec from clumpref where lid=247764 or hid=254804 Table 'databasename.clumpref' doesn't exist"

Anyone know what is wrong?

I am also a complete noob towards all of the code here so i need quite a simple explanation please:)

Psymonosmash
Title: Re: Alien-biomaterial script
Post by: jjones666 on March 24, 2007, 11:02:12 pm
Check you have clumpref table in your bot database (ie you imported all the SQL files).

Also the 'databasename.clumpref' is wrong in the PHP I suspect.  If you are only using one database, this should simply be clumpref (ie remove the leading databasename.).

Let me know if further issues.

-jj-
Title: Re: Alien-biomaterial script
Post by: Wolfbiter on March 24, 2007, 11:45:24 pm
See that jj posted between I hit "reply" and started writing this.. do what he said and see if that solves it.
Title: Re: Alien-biomaterial script
Post by: Psymonosmash` on March 25, 2007, 11:18:52 am
Hi again sorry, but i don't know how to find that database :( and not sure which php fiel you are referring to?

Sorry for the hastle.

Psymonosmash
Title: Re: Alien-biomaterial script
Post by: tonyuh on May 07, 2007, 10:01:56 pm
have a minor 'bug'..

Code: [Select]
[2007-05-07 19:45:54] [GROUP] [MSG] [Org] Name: !bio [link]Solid Clump of Kyr'Ozch Bio-Material[/link]
[2007-05-07 19:45:54] [GROUP] [MSG] [Org] Bot: QL 177 of Kyr'Ozch Bio-Material - Type 1 / Fling shot<br> -> <a href='itemref://254572/254573/196'>Kyr'Ozch Grenade Gun - Type 1[/link] QL 196<br> -> <a href='itemref://254621/254622/196'>Kyr'Ozch Pistol - Type 1[/link] QL 196<br> -> <a href='itemref://254586/254587/196'>Kyr'Ozch Shotgun - Type 1[/link] QL 196

And then 2 seconds later.. another guy did the same thing with another clump.. it was fine... not sure whats wrong here, but it doesn't seem to happen anymore.

Cheers,
Tony
Title: Re: Alien-biomaterial script
Post by: Snarfblatt on August 22, 2007, 07:48:57 pm
Anyone doing an update to this for 0.4.x? I really like the multiple clump identification of this rather than the 1 at a time process of the original module.
Title: Re: Alien-biomaterial script
Post by: Wolfbiter on August 22, 2007, 08:05:18 pm
It's not really converted, just modified enough to work.
SimplePortal 2.3.7 © 2008-2024, SimplePortal