my poison script is suppose to apply poison everything time it sees the no poison/magic line. Before my attacks I do wp weapon and then block all the lines in the weaponprobe stuff so that its not much spam and its a little bit more better the problem is that my weapon has coal runes on it which blocks the trigger line so I wanted to know if anyone knows a way to keep most of my things but change a couple of things this is all my stuff:
0
Comments
in a script preinitialize two variables, poison_left and poison_right.
Then define yourself a new alias called 'ewp' or anything like that, plus two trigger lines two trigger specifically on a poison being there, each storing their current result in either poison_left or poison_right.
within 'ewp' you do the following:
- enable your trigger script parsing the output of weapon parse
- you set poison_left and poison_right to nil.
- send 'wp' to your weapons
Within the triggers you have a 'done with poisons' trigger, likely that's when the rune output comes. alternatively you can trigger on the lua script return isPrompt() . Within that piece of code:
- you compare whether the poison_left variable holds the poison you expected, otherwise you apply a new poison.
- same for poison_right
There sure are optimations that can be made. Also, I'm pretty unsure you can have more then one poison per one handed weapon, but I may be wrong. My script idea assumes there can only be one poison per weapon.
does that trick for you.
- 1. Script
poisons = {}
- 2. "ewp" alias
poisons={}
enableTrigger("poison wp")
send("wp weapon")
- 3. the "trigger". name it the same as the value in enableTrigger and disableTrigger, in this case "poison wp"
Trigger on: There are the following poisons or magical effects on, stay open for 10 more lines.
-4 make a sub trigger and drag it on the 'poison wp' trigger, creating a 'gateway trigger'. This trigger will only be run as long as the parent trigger is open.
Trigger on: \d\) (.+), perl regexp
Body: poisions[matches[2]] = true
- 5. make another subtrigger of "poison wp" as told above.
Trigger: return isPrompt() lua function
Body: if !poisons["anerod"] then
send("envenom weapon with anerod")
end
....
disableTrigger("poisons wp")
Now am not 100% sure if that makes more sense, as I go a different route and that's from the top of my head. Good luck!
if not poisons["anerod"] then
send("envenom weapon with anerod")
end
disableTrigger("poisons wp")