BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => 0.2.x Custom/Unofficial Modules => Topic started by: Malosar on December 19, 2006, 02:09:45 am

Title: Clump inc LE types
Post by: Malosar on December 19, 2006, 02:09:45 am
Modifed Wolfbiters clump module to include support for the new LE types including weapons and armor. All the same commands as the original:

!clump
!bio
!id
!type

Shows ql300 mk6 refs for each type and makes a blob with links to items search for each armor type. Could probably use a detailed rewrite for some more comprehensive weapon and armor generation but it's good enough for now.
Title: Re: Clump inc LE types
Post by: Naturalistic on December 19, 2006, 10:10:27 am
Haven't had a chance to run it yet, but looks good from the code. Will check it out later, maybe worth adding ;)
Title: Re: Clump inc LE types
Post by: Malosar on December 22, 2006, 02:11:46 pm
Fixed a typo so type 812 works now.
Title: Re: Clump inc LE types
Post by: Bart on December 23, 2006, 08:21:14 am
after installing this the bot crashes..... works with 2.x right?
Title: Re: Clump inc LE types
Post by: Malosar on December 23, 2006, 07:08:57 pm
Yes I run 0.2.x. Check the console and post any errors you get so we can help solve the issue.
Title: Re: Clump inc LE types
Post by: pusikas on December 25, 2006, 02:01:32 am
Doesn't really work for me, either:
Code: [Select]
[2006-12-25 00:58:24]   [GROUP] [MSG]   [Vengeance] Luuv: !bio [link]Solid Clump of Kyr'Ozch Bio-Material[/link]
[2006-12-25 00:58:24]   [GROUP] [MSG]   [Vengeance] Vbot: QL 153 of Kyr'Ozch Bio-Material - Type 2 / Aimed Shot<br> -> <a href='itemref://254607/254608/170'>Kyr'Ozch Crossbow Type 2[/link] QL 170<br> -> <a href='itemref://254474/254475/170'>Kyr'Ozch Rifle Type 2[/link] QL 170
[2006-12-25 00:58:36]   [GROUP] [MSG]   [Vengeance] Luuv: !bio [link]Kyr'Ozch Bio-Material - Type 295[/link]

Fatal error: Cannot use string offset as an array in /usr/local/vbot/modules/Clump.php on line 627

As you can see, it works for a type 2 clump, but crashed on a type 295...
Title: Re: Clump inc LE types
Post by: nebhyper on December 25, 2006, 02:15:32 am
Fatal error: Cannot use string offset as an array in /usr/local/vbot/modules/Clump.php on line 627


I get the same error
Title: Re: Clump inc LE types
Post by: Malosar on December 25, 2006, 02:23:21 pm
PHP5 doesn't like [ 0 ] as offsets in a foreach.
Title: Re: Clump inc LE types
Post by: pusikas on December 25, 2006, 05:16:43 pm
Soooo... can you give a hint on how to fix this? :) I did not have large amounts of unidentified bio, so I could not test it with anything else than type 2 and 295. If it helps, I can scrounge for other clumps and see if I can test it for all types. :)
Title: Re: Clump inc LE types
Post by: Malosar on December 26, 2006, 02:26:14 pm
Soooo... can you give a hint on how to fix this? :) I did not have large amounts of unidentified bio, so I could not test it with anything else than type 2 and 295. If it helps, I can scrounge for other clumps and see if I can test it for all types. :)

I don't know a way around it sorry. it's one of the reasons I use php4 only. Maybe someone whom runs php5 and these reference structures work could explain how or post version numbers.
Title: Re: Clump inc LE types
Post by: nebhyper on December 26, 2006, 07:51:30 pm
I do not think it is

if you do !bio for a type 2  it works, yet a !bio on a type 295 crashes it.   

Same code is proccessed for each type and it handles the
Title: Re: Clump inc LE types
Post by: pusikas on December 27, 2006, 04:54:01 am
OK, tested with various clumps. All AI clumps I could find worked, and all LE upgrades for weapons worked as well. What does not work for me is the upgrades for Ofab armor. Also, while the LE weapon types work, they produce strange output:
Code: [Select]
To [Vbot]: !bio Kyr'Ozch Bio-Material - Type 812
[Vbot]: QL 196 of Kyr'Ozch Bio-Material - Type 812 / Ofab Peregrine, Hawk, Tiger
 -> Kyr'Ozch Peregrine Type 812 QL 217
 -> Kyr'Ozch Hawk Type 812 QL 217
 -> Kyr'Ozch Tiger Type 812 QL 217
From what I read in the code, it should not be "Kyr'Ozch Peregrine Type 812", but rather "Ofab Peregrine Mk 6", and ql300, not ql217. Well, actually, I think the code has a typo there, it should be "Mk 6", code reads "Mk6", but that shouldn't matter, should it?
So, from what I can see, it runs into the routine that handles the AI weapons, no matter what I post to him. As to why, I have no idea yet. :)
Title: Re: Clump inc LE types
Post by: Malosar on December 27, 2006, 01:01:03 pm
It looks to be because I modifed the !types section only, but not the section that handles id's. I will look at it today and update it.
Title: Re: Clump inc LE types
Post by: pusikas on December 27, 2006, 02:23:57 pm
I know I'm a PITA, but... mabe it's just me, but for some reason the php file has tons of blank lines in it. Except for some part in the beginning, every second line is blank for me, which is the reason for the awfully high line numbers. If it's not just me that managed to insert the blank lines somehow, perhaps you could remove them to improve readability. I ran sed over it to do that, but then the line numbers where errors occur are not the same as yours anymore, which isn't too cool, either. :)
Title: Re: Clump inc LE types
Post by: Malosar on December 27, 2006, 02:46:36 pm
The original had much more blank lines, there was actually 2 blank lines between every line. It's either the way some people code or a translation between text editors. I usually cramp mine together a bit more and I did clean this one up to my liking some. To a lot of people the extra spaces give them better readability, to others it's worse, it's a personal coding preference.
Title: Re: Clump inc LE types
Post by: Malosar on December 27, 2006, 03:20:05 pm
ok I updated the module, see if it works for the armor clumps now. I can't test it because i'm at work and I have no LE biomaterial anyway.

edit: fixed the le weapon parse in id_clump, it was passing the id as a string. Tested with armor and weapon clumps via org mates, seems to be working now.
Title: Re: Clump inc LE types
Post by: pusikas on December 28, 2006, 02:18:19 am
Sweet! Looks good now. One thing tho: it does not give ql300 for Ofab weapons. Not that it matters much. And and and... the weapon is written "Mk 6", and not "Mk6". *hides*
SimplePortal 2.3.7 © 2008-2025, SimplePortal