EQ2Bot Poison/Selection Question

Coladar

Member
The last thing I did any real scripting on was some basic Perl when I was about 11, which was 15 years ago. So if this comes across as overly basic, I apologize in advance. After a few months of tinkering here and there with my six character's class routines, I decided to go over my primary character's (Brig) in detail. Everything has been going well for a couple days. Then it hits me, I want to add poisons to the class tab. It'd be extremely nice to be able to change poisons out depending on the situation using the UI. I get that done without any problem, and I now have four of each (Damage, Debuff, Util) poison in a drop down box. My problem is coming with taking that definition, and transferring it so that when it is defined the same way the old poisons used to have to be by hand it comes out as text, such as
DebuffPoisonShort:Set[enfeebling poison]

Like right now I've got (Just posting the basics):
UI file:
<combobox Name='DbffPsn'>
<Item Value='2'>Fettering (Snare)</Item>
Class file:

declare DbffPsn string script

DbffPsn:Set[${CharacterSet.FindSet[${Me.SubClass}].FindSetting[DbffPsn,]}]


PreAction[7]:Set[DbffPoisons]
DebuffPoisonShort[7,2]:Set[Cerebral Ebb]

And finally:

case DbffPoisons
if ${MaintainPoison}
{
Me:CreateCustomInventoryArray[nonbankonly]
if ${Me.Maintained[${DebuffPoisonShort[${xAction},${DbffPsn}]}](exists)} && ${Me.CustomInventory[${DebuffPoisonShort[${xAction},${DbffPsn}]}](exists)}
Me.CustomInventory[${DebuffPoisonShort[${xAction},${DbffPsn}]}]:Use
}


So why won't it do... anything? I've tried a hundred variations, realizing often major mistakes/overlooks I'd made. But this as I have it seems like it should work in my totally retarded when it comes to scripting head. Everything looks like it's defined right and should work the same way the old way worked. I'm guessing somehow I'm doing something that is preventing the text definition I'm setting as DebuffPoisonShort from actually becoming text the way it would when you set it manually as a simple this equals [inserttexthere] definition by playing the {xAction},${DbffPsn} and trying to set those to text individually earlier in the script. But I'm extraordinarily new to this, this isn't the most basic of alterations to a script, and right now I've got an epic headache from trying to figure this out for four hours.

Additionally, if I wanted to streamline the process, do the item values in the UI drop box have to be numerical, or could I take out defining them in the class config with something like[7,1]:Set[Gracelessness] [7,2]:Set[Cerebral Ebb] and instead simply have the text string defined as when you select Gracelessness, it's defined as Gracelessness in the UI file (<Item Value='Fettering Poison'>Fettering (Snare)</Item>) without any definitions in the class file? I did a quick search and didn't come up with anything, so hopefully this isn't too idiotic to post here.
 
Last edited:

Coladar

Member
One quick note, since I haven't gotten to sleep yet. I have a few ideas, first and foremost is trying to apply the potion's system's logic to this, but that's tonight. I'm almost certain even I can apply the searching for potions, which now is only one search (Search for any potion with Arcane Potion = all possible arcane potions.) to include several searches (Caustic, Gracelessness, etc.) Again, tonight. But I wanted to make one correction.

declare DbffPsn string script

Is a leftover from when I was trying to define the shortname of the poison in the UI file, and thus the value was text. Now I reverted back to numbers, 0-4, it should have been changed and now has been changed back to:

declare DbffPsn int script 1

Only issue I had when I was running the script through in my head, so that was an obvious problem.
 

Coladar

Member
I actually managed to get it working after about six more hours working on it. Ended up making it so that it will show every single possible poison (Not just the main four, but stuff like Di'Zok Mental Strike, etc.) for each of the three poison types, but only if they exist in the inventory the same way the cure potions are set up. I'm still not quite sure why what I did earlier didn't work, since it still seems like it should have. If anyone wants to bother, I'd still be curious as to the answer in case I ever come across a similar problem in the future. I'm not sure it was worth nine-ten hours (As I said, I'm extremely new to anything other than changing the spell casting order.), but this really did end up working quite nicely.
 

Coladar

Member
I just figured if anyone wanted to try having poisons in the class tab instead of editing the class routine file, I'd go ahead and upload it. If you have any of the four major poisons for each of the three tiers plus the three extra 70-80 damage poisons in your inventory, they will be listed. Just select which poison you want to use and it's good to go. I also made one more small cosmetic change before I start to totally rip apart and redo the Brig script. The old method really didn't handle stances well, so I added a drop down box where you can choose, and when you want to switch simply hit the change button. It seems to work a bit more intuitively than, say, the SK script, where there are two check boxes and you have to uncheck one before you can check the other. The button is what causes the script to cancel whichever stance you have up instead of unchecking the stance in other scripts.

Nothing that really matters, or is even worth uploading. I just figured since I already made a thread, even if it's not in the right section for even as meaningless a change as this, I'd upload it if anyone cares. Particularly since this was the only feature the Brig script was really lacking. This beats having to go in the file to switch poisons, which wasn't worth the effort, or searching through your inventory. I changed the version number to today's date, so if you use this make the change in eq2bot.iss to 20100326.
 

Attachments

Top Bottom