Created: about 19 hours ago on 12/05/2026, 09:34:31 AM
FileType: Razor Script (Outlands)
Size: 49876
Description: poisoning-afk
// poisoning-afk.razor - AFK Poisoning trainer for Razor Outlands Edition (ClassicUO 585)
// Press Play and walk away. It trains Poisoning to your cap as fast as the server allows.
//
// What it handles by itself, every round:
// - Healing, best option first, only with what your char really has:
// poison: Cure potion, Cleanse by Fire, Arch Cure, Cure, bandage.
// hits: Heal potion, bandage, Close Wounds, Greater Heal, Heal.
// Each spell checks the book, minimum skill, mana and reagents (a Spellstone counts).
// A spell that does not open a cursor is skipped for 10 minutes (only that spell).
// Poisoned and nothing to cure it: keeps training. Not poisoned but hurt: heals
// or waits for natural regen, then resumes.
// - Potion by skill (Outlands community bands, not yet measured by us):
// under 50 train at an NPC, 50-55 Poison, 55-80 Greater, 80-100 Deadly,
// 100-120 Lethal. Lesser is never used and Lethal is never wasted below 100.
// The type is read from the potion label: all poison potions share one graphic.
// - Restock when the right potion runs out, in this order:
// 1. a Storage Shelf within 2 tiles (uses its resupply loadout),
// 2. the supply container you target on the first run: a chest on the floor
// (within 2 tiles), a bag in your backpack, or your bank box (stand by a
// banker, the script says "bank" by itself). Using the bank: open it before
// pressing Play, so the script recognizes the bank box on every run.
// It also pulls bandages, Cure and Heal potions, and a blade or cheese if you lack a target.
// - Target: any bladed or piercing weapon (one or two handed) in your hands or backpack,
// or cheese (3 gp at any cook, same gain as a weapon, but one cheese per dose).
// Training weapons, blessed weapons and anything the server refuses are skipped.
// - Waits for the server: retries the moment the skill is ready, waits out saves.
// - Stops only when: Poisoning is 120, it is under 50, there is no right potion or
// target anywhere, or the skill sits exactly at 100, 105, 110 or 115 for 45 minutes
// and 400 doses (skill cap not unlocked by a Power Scroll, or the arrow is not up).
// Razor cannot read the skill cap: if you hit the 720 total at an odd value
// (like 101.7) it keeps training, so watch your total skills.
//
// - Safety at 100+: Lethal training only runs while you carry a way to cure poison
// (Cure potion, bandages with 60 Healing and Anatomy, or a cure spell you can cast).
// Without one it stops, because a grave mistake with Lethal can kill you AFK.
//
// Measured on the Outlands Test server (04/12/2026):
// - outcome texts: "You apply the poison.", "You fail to apply a sufficient dose of poison.",
// "You make a grave mistake while applying the poison." (or the emote "stumbles around
// in confusion and pain"), and the recharge reply "You must wait a few moments before
// using another skill." (no potion spent).
// - skill recharge: 3.9 to 4.3 s after using the skill, so the next use waits 4.3 s.
// - the weapon context menu ("Apply Greater Poison"...) numbers its entries by position,
// not by potion type, so "menu weapon N" can pick the wrong potion. Not used here.
// - accepted targets: spear, short spear, pitchfork, war fork, katana, cutlass, scimitar,
// longsword, broadsword, viking sword, dagger and cheese. Cheese and spear gain alike.
// - Outlands prints no skill gain message, so the cap check reads the skill value.
// Still open: whether an unopened bag inside the backpack is seen.
//
// Razor notes for editors: no semicolons anywhere (they cut the line), an "as" alias dies
// at its endif (copy it with @setvar!), insysmsg consumes what it matches (on some builds
// also everything older), so test each text once, timers count up (999999 = yes, 0 = no,
// test with >= 900000, and a 0 turns into yes after 15 min if nobody rewrites it).
clearignore
clearsysmsg
setskill 'Poisoning' up
removelist emptyOnce
removelist labelTries
removelist silent
removelist supplyIsBank
removelist supplyLabelTries
settimer sinceUse 999999
settimer triedBlade 999999
settimer triedBank 999999
settimer fCleanse 999999
settimer fClose 999999
settimer fArch 999999
settimer fCure 999999
settimer fGHeal 999999
settimer fHeal 999999
settimer potHeal 999999
settimer triedShelf 999999
settimer triedSupply 999999
settimer checkedWeapon 0
removetimer capHold
removelist capDoses
// supply container: asked only when the one from a previous run is not around.
// Not on you and not on the floor means a bank box (re-opened later by saying "bank").
if not find supplyBox true and not find supplyBox ground
overhead "Target your supply container: chest, bag or open bank box (ESC to skip)" 68
setvar supplyBox
endif
if find supplyBox and not find supplyBox backpack
createlist supplyIsBank
endif
while not dead
// limits
if skill 'Poisoning' >= 120
overhead "Poisoning is 120: done" 88
stop
elseif skill 'Poisoning' < 50
overhead "Poisoning under 50: train at an NPC until 50, then run me again" 33
stop
endif
// skill cap: Outlands prints no gain text, so watch the value. Sitting exactly on a
// Power Scroll step for 45 min means the cap is there (gains come every few minutes).
if skill 'Poisoning' = 100 or skill 'Poisoning' = 105 or skill 'Poisoning' = 110 or skill 'Poisoning' = 115
if not timerexists capHold
createtimer capHold
removelist capDoses
createlist capDoses
elseif timer capHold > 2700000 and list capDoses >= 400
overhead "Poisoning has not moved from this cap in 45 min and 400 doses: use the next Power Scroll or set the arrow up. Stopping." 33
stop
endif
elseif timerexists capHold
removetimer capHold
removelist capDoses
endif
// world save: wait for it to finish
if insysmsg "world is saving"
overhead "World save: waiting" 68
settimer save 0
while timer save < 60000
if insysmsg "save complete"
settimer save 99999
endif
pause 200
endwhile
endif
// 0. healing
settimer heal 0
while timer heal < 900000 and not dead
// what the char has this round (999999 = yes, 0 = no)
// Chivalry book 0x2252, Magery book 0x0EFA, Spellstone 0x023B covers reagents
settimer hasChiv 0
settimer hasMag 0
settimer rCure 0
settimer rArch 0
settimer rGHeal 0
settimer rHeal 0
if findtype 0x2252 backpack
settimer hasChiv 999999
endif
if findtype 0x0EFA backpack
settimer hasMag 999999
endif
if findtype 0x023B backpack
settimer rCure 999999
settimer rArch 999999
settimer rGHeal 999999
settimer rHeal 999999
elseif findtype 0x0F84 backpack and findtype 0x0F85 backpack
settimer rCure 999999
if findtype 0x0F86 backpack
settimer rArch 999999
if findtype 0x0F8D backpack
settimer rGHeal 999999
endif
endif
if findtype 0x0F8D backpack
settimer rHeal 999999
endif
endif
// a) poison: one try per round, best first
if poisoned
if findtype 0x0F07 backpack as cp
overhead "Poisoned: drinking a Cure potion" 68
dclick cp
pause 500
elseif timer hasChiv >= 900000 and skill 'Chivalry' >= 60 and mana >= 10 and timer fCleanse >= 600000
overhead "Poisoned: casting Cleanse by Fire" 68
cast 'Cleanse by Fire'
wft 3000
if targetexists
target self
else
settimer fCleanse 0
endif
elseif timer hasMag >= 900000 and timer rArch >= 900000 and skill 'Magery' >= 70 and mana >= 11 and timer fArch >= 600000
overhead "Poisoned: casting Arch Cure" 68
cast 'Arch Cure'
wft 3000
if targetexists
target self
else
settimer fArch 0
endif
elseif timer hasMag >= 900000 and timer rCure >= 900000 and skill 'Magery' >= 30 and mana >= 6 and timer fCure >= 600000
overhead "Poisoned: casting Cure" 68
cast 'Cure'
wft 3000
if targetexists
target self
else
settimer fCure 0
endif
elseif skill 'Healing' >= 60 and skill 'Anatomy' >= 60 and findtype 0x0E21 backpack as bv and not bandaging
overhead "Poisoned: bandaging" 68
dclick bv
wft 2000
if targetexists
target self
endif
endif
endif
// b) hits: heals fail while poisoned, so only when clean
if diffhits >= 10 and not poisoned
if findtype 0x0F0C backpack as vp and timer potHeal >= 10000
overhead "Hurt: drinking a Heal potion" 68
dclick vp
settimer potHeal 0
pause 500
elseif findtype 0x0E21 backpack as bh and not bandaging
overhead "Hurt: bandaging" 68
dclick bh
wft 2000
if targetexists
target self
endif
elseif timer hasChiv >= 900000 and skill 'Chivalry' >= 70 and mana >= 10 and timer fClose >= 600000
overhead "Hurt: casting Close Wounds" 68
cast 'Close Wounds'
wft 3000
if targetexists
target self
else
settimer fClose 0
endif
elseif timer hasMag >= 900000 and timer rGHeal >= 900000 and skill 'Magery' >= 50 and mana >= 11 and timer fGHeal >= 600000
overhead "Hurt: casting Greater Heal" 68
cast 'Greater Heal'
wft 3000
if targetexists
target self
else
settimer fGHeal 0
endif
elseif timer hasMag >= 900000 and timer rHeal >= 900000 and skill 'Magery' >= 30 and mana >= 4 and timer fHeal >= 600000
overhead "Hurt: casting Heal" 68
cast 'Heal'
wft 3000
if targetexists
target self
else
settimer fHeal 0
endif
endif
endif
// c) poisoned: back to training (cures retry next round).
// Clean and hurt: stay here healing or regenerating. Healthy: train.
if poisoned
settimer heal 999999
elseif diffhits >= 5
overhead "Waiting for hits to regenerate" 68
pause 1500
else
settimer heal 999999
endif
endwhile
// 1. right potion for the current skill, loose in the backpack (sets hasPot and potG)
settimer hasPot 0
settimer noLabel 0
settimer scan 0
while timer scan < 60000
if findtype 0x0F0A backpack -1 -1 1 as p
getlabel p lbl
settimer good 0
settimer known 999999
if "ethal" in lbl
if skill 'Poisoning' >= 100
settimer good 999999
endif
elseif "eadly" in lbl
if skill 'Poisoning' >= 80 and skill 'Poisoning' < 100
settimer good 999999
endif
elseif "reater" in lbl
if skill 'Poisoning' >= 55 and skill 'Poisoning' < 80
settimer good 999999
endif
elseif "esser" in lbl
settimer good 0
elseif "oison" in lbl
if skill 'Poisoning' < 55
settimer good 999999
endif
else
// label did not arrive (lag) or is unknown: retry, skip it after 3 tries
settimer known 0
settimer noLabel 999999
settimer scan 99999
if not listexists labelTries
createlist labelTries
endif
pushlist labelTries 1
if list labelTries >= 3
overhead "Unknown potion label: skipping that potion" 33
@ignore p
removelist labelTries
endif
endif
if timer known >= 900000
removelist labelTries
if timer good >= 900000
@setvar! potG p
settimer hasPot 999999
settimer scan 99999
else
@ignore p
endif
endif
else
settimer scan 99999
endif
endwhile
// 2. Lethal is only trained while you can cure its poison
settimer needCure 0
if skill 'Poisoning' >= 100
settimer needCure 999999
if findtype 0x0F07 backpack
settimer needCure 0
elseif skill 'Healing' >= 60 and skill 'Anatomy' >= 60 and findtype 0x0E21 backpack
settimer needCure 0
elseif timer hasChiv >= 900000 and skill 'Chivalry' >= 60
settimer needCure 0
elseif timer hasMag >= 900000 and timer rCure >= 900000 and skill 'Magery' >= 30
settimer needCure 0
endif
endif
if timer noLabel >= 900000
overhead "Potion label not loaded yet: retrying" 68
pause 500
elseif timer hasPot < 900000 and findtype 0x0F0A backpack as sub
// the right potion may sit in a sub-bag: loose ones of other bands are ignored now.
// The supply bag itself is left alone: the restock reads its labels.
if find sub supplyBox
@ignore sub
else
overhead "Moving poison potions out of a sub-bag" 68
lift sub 30
pause 600
drop backpack -1 -1 -1
pause 600
endif
elseif timer hasPot < 900000 or timer needCure >= 900000
// 3. restock: one source per round, each source retried after 60 s
if timer needCure >= 900000
overhead "Lethal needs a poison cure on you: looking for Cure potions or bandages" 33
endif
clearignore
// clearignore also frees a skipped training weapon: read weapon labels again
settimer checkedWeapon 0
if findtype "storage shelf" ground -1 -1 2 as shelf and timer triedShelf >= 60000
overhead "Restocking from the Storage Shelf" 68
settimer triedShelf 0
menu shelf 1
settimer wait 0
while timer wait < 10000
if findtype 0x0F0A backpack
settimer wait 99999
endif
pause 200
endwhile
pause 600
elseif timer triedBank >= 60000 and listexists supplyIsBank and not find supplyBox
overhead "Opening the bank (stand next to a banker)" 68
settimer triedBank 0
say "bank"
pause 1500
elseif timer triedSupply >= 60000 and find supplyBox true
overhead "Restocking from your supply container" 68
settimer triedSupply 0
if not listexists supplyIsBank
dclick supplyBox
pause 1000
endif
settimer scan 0
settimer noLabel 0
settimer took 0
while timer scan < 60000
if findtype 0x0F0A supplyBox -1 -1 1 as q
getlabel q lbl
settimer good 0
settimer known 999999
if "ethal" in lbl
if skill 'Poisoning' >= 100
settimer good 999999
endif
elseif "eadly" in lbl
if skill 'Poisoning' >= 80 and skill 'Poisoning' < 100
settimer good 999999
endif
elseif "reater" in lbl
if skill 'Poisoning' >= 55 and skill 'Poisoning' < 80
settimer good 999999
endif
elseif "esser" in lbl
settimer good 0
elseif "oison" in lbl
if skill 'Poisoning' < 55
settimer good 999999
endif
else
// label not loaded or unknown: skip it for this pass, look at the next one
settimer known 0
settimer noLabel 999999
@ignore q
endif
if timer good >= 900000
overhead "Taking potions from the supply container" 68
lift q 30
pause 600
drop backpack -1 -1 -1
pause 600
settimer took 999999
settimer scan 99999
elseif timer known >= 900000
@ignore q
endif
else
settimer scan 99999
endif
endwhile
// a label that did not load: try this container again, at most 3 times
if timer noLabel >= 900000 and timer took < 900000
if not listexists supplyLabelTries
createlist supplyLabelTries
endif
pushlist supplyLabelTries 1
if list supplyLabelTries < 3
settimer triedSupply 60000
else
removelist supplyLabelTries
endif
endif
if not findtype 0x0E21 backpack and findtype 0x0E21 supplyBox -1 -1 1 as b
overhead "Taking bandages" 68
lift b 50
pause 600
drop backpack -1 -1 -1
pause 600
endif
if not findtype 0x0F07 backpack and findtype 0x0F07 supplyBox -1 -1 1 as c
overhead "Taking Cure potions" 68
lift c 5
pause 600
drop backpack -1 -1 -1
pause 600
endif
if not findtype 0x0F0C backpack and findtype 0x0F0C supplyBox -1 -1 1 as h
overhead "Taking Heal potions" 68
lift h 5
pause 600
drop backpack -1 -1 -1
pause 600
endif
clearignore
elseif timer triedSupply >= 60000 and find supplyBox ground
overhead "Supply container is too far: stand within 2 tiles of it" 33
settimer triedSupply 0
else
if listexists emptyOnce
removelist emptyOnce
if timer needCure >= 900000
overhead "Poisoning 100+ with no Cure potion, bandage skill or cure spell: stopping to keep you alive" 33
else
overhead "No right potion in backpack, Storage Shelf or supply container: stopping" 33
endif
stop
endif
createlist emptyOnce
overhead "Nothing found yet: checking the backpack once more" 68
endif
else
removelist emptyOnce
// 4. target: a bladed or piercing weapon in hand or backpack, else cheese
settimer hasWeapon 999999
removelist targetIsFood
if findtype 0x1400 as w
@setvar! weaponG w
elseif findtype 0x1401 as w
@setvar! weaponG w
elseif findtype 0x0F52 as w
@setvar! weaponG w
elseif findtype 0x0F51 as w
@setvar! weaponG w
elseif findtype 0x1404 as w
@setvar! weaponG w
elseif findtype 0x1405 as w
@setvar! weaponG w
elseif findtype 0x1440 as w
@setvar! weaponG w
elseif findtype 0x1441 as w
@setvar! weaponG w
elseif findtype 0x13FE as w
@setvar! weaponG w
elseif findtype 0x13FF as w
@setvar! weaponG w
elseif findtype 0x13B6 as w
@setvar! weaponG w
elseif findtype 0x13B5 as w
@setvar! weaponG w
elseif findtype 0x0F60 as w
@setvar! weaponG w
elseif findtype 0x0F61 as w
@setvar! weaponG w
elseif findtype 0x0F5E as w
@setvar! weaponG w
elseif findtype 0x0F5F as w
@setvar! weaponG w
elseif findtype 0x13B9 as w
@setvar! weaponG w
elseif findtype 0x13BA as w
@setvar! weaponG w
elseif findtype 0x0F62 as w
@setvar! weaponG w
elseif findtype 0x0F63 as w
@setvar! weaponG w
elseif findtype 0x1402 as w
@setvar! weaponG w
elseif findtype 0x1403 as w
@setvar! weaponG w
elseif findtype 0x0E87 as w
@setvar! weaponG w
elseif findtype 0x0E88 as w
@setvar! weaponG w
// not measured yet: knives and cleaver come after the measured blades
elseif findtype 0x13F6 as w
@setvar! weaponG w
elseif findtype 0x13F7 as w
@setvar! weaponG w
elseif findtype 0x0EC4 as w
@setvar! weaponG w
elseif findtype 0x0EC5 as w
@setvar! weaponG w
elseif findtype 0x0EC2 as w
@setvar! weaponG w
elseif findtype 0x0EC3 as w
@setvar! weaponG w
elseif findtype 0x097D as w
// cheese: same gain as a weapon, one cheese per dose, 3 gp at any cook
@setvar! weaponG w
createlist targetIsFood
elseif timer triedBlade >= 60000 and timer triedBank >= 60000 and listexists supplyIsBank and not find supplyBox
settimer hasWeapon 0
settimer triedBank 0
overhead "No blade on you: opening the bank (stand next to a banker)" 68
say "bank"
pause 1500
elseif timer triedBlade >= 60000 and find supplyBox true
// no blade on you: fetch one from the supply container, then start over
settimer hasWeapon 0
settimer triedBlade 0
if not listexists supplyIsBank
dclick supplyBox
pause 1000
endif
if findtype 0x1400 supplyBox -1 -1 1 as la
overhead "Taking a kryss from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x1401 supplyBox -1 -1 1 as la
overhead "Taking a kryss from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x0F52 supplyBox -1 -1 1 as la
overhead "Taking a dagger from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x0F51 supplyBox -1 -1 1 as la
overhead "Taking a dagger from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x1404 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x1405 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x1440 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x1441 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x13FE supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x13FF supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x13B6 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x13B5 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x0F60 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x0F61 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x0F5E supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x0F5F supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x13B9 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x13BA supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x0F62 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x0F63 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x1402 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x1403 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x0E87 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x0E88 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x13F6 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x13F7 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x0EC4 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x0EC5 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x0EC2 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x0EC3 supplyBox -1 -1 1 as la
overhead "Taking a blade from the supply container" 68
lift la
pause 600
drop backpack -1 -1 -1
elseif findtype 0x097D supplyBox -1 -1 1 as la
overhead "Taking cheese from the supply container" 68
lift la 20
pause 600
drop backpack -1 -1 -1
pause 600
// the new cheese stacks onto the old pile: free it from the ignore list
clearignore
settimer checkedWeapon 0
else
overhead "No blade or cheese in the supply container either" 33
endif
// a new item came: read its label again
settimer checkedWeapon 0
pause 600
else
overhead "No blade or cheese on you, and the supply container has none or is out of reach: stopping" 33
stop
endif
if timer hasWeapon >= 900000
// 5. training weapons cannot be poisoned: checked once per weapon
settimer weaponOk 999999
if timer checkedWeapon < 900000
getlabel weaponG wlbl
if "raining" in wlbl
overhead "Training weapons cannot be poisoned: skipping it" 33
settimer weaponOk 0
@ignore weaponG
// let the next round fetch another item from the supply
settimer triedBlade 60000
else
settimer checkedWeapon 999999
endif
endif
if timer weaponOk >= 900000
// 6. empty hands: equip the weapon (two-handers go on the other layer)
if rhandempty and lhandempty and not listexists targetIsFood
overhead "Equipping the weapon" 68
lift weaponG
pause 400
drop self RightHand
pause 600
if rhandempty and lhandempty
lift weaponG
pause 400
drop self LeftHand
pause 600
endif
endif
// 7. apply through the skill cursor (potion, then weapon).
// A save announced during healing would be wiped by clearsysmsg: wait it out first.
if insysmsg "world is saving"
overhead "World save: waiting" 68
settimer save 0
while timer save < 60000
if insysmsg "save complete"
settimer save 99999
endif
pause 200
endwhile
endif
clearsysmsg
settimer judge 0
// skill recharge measured at up to 4.3 s: wait it out instead of spamming the skill
while timer sinceUse < 4300
pause 50
endwhile
settimer ready 0
while not targetexists and timer ready < 15000
useskill 'Poisoning'
wft 700
if not targetexists
pause 400
endif
endwhile
if targetexists
settimer sinceUse 0
target potG
wft 2000
if targetexists
overhead "Applying poison" 68
clearsysmsg
target weaponG
settimer judge 999999
else
overhead "That potion was refused: trying another one" 33
@ignore potG
endif
else
overhead "Skill not ready after 15 s: trying again" 33
endif
// 8. outcome from the server text. Each text is tested once and acted on
// right there. 6 s is only a hang guard.
settimer outcome 0
while timer outcome < 6000 and timer judge >= 900000
if insysmsg "grave mistake"
overhead "Grave mistake: poisoned myself, curing next" 33
settimer outcome 10000
elseif insysmsg "You apply the poison"
if listexists capDoses
pushlist capDoses 1
endif
settimer outcome 10000
elseif insysmsg "sufficient dose"
overhead "Failed the dose: trying again" 68
if listexists capDoses
pushlist capDoses 1
endif
settimer outcome 10000
elseif insysmsg "must wait"
settimer outcome 10000
elseif insysmsg "must be in your backpack"
overhead "That potion is not loose in the backpack: trying another one" 33
@ignore potG
settimer outcome 10000
elseif insysmsg "only poison" or insysmsg "cannot be poisoned" or insysmsg "cannot poison"
overhead "The server refused this weapon: switching" 33
clearhands both
pause 600
@ignore weaponG
// let the next round fetch another item from the supply
settimer triedBlade 60000
settimer checkedWeapon 0
settimer outcome 10000
elseif insysmsg "world is saving"
overhead "World save: waiting" 68
settimer save 0
while timer save < 60000
if insysmsg "save complete"
settimer save 99999
endif
pause 200
endwhile
settimer outcome 10000
endif
pause 100
endwhile
// no outcome text but now poisoned: the grave mistake came only as the emote
if timer outcome < 9000 and timer judge >= 900000 and poisoned
overhead "No outcome text but I am poisoned: counting it as a grave mistake" 33
settimer outcome 10000
endif
// an answer clears the silence count
if timer outcome >= 9000
removelist silent
endif
// no answer in 6 s: lag or an unknown text. Switch weapon only after 3 in a row.
if timer outcome < 9000 and timer judge >= 900000
if not listexists silent
createlist silent
endif
pushlist silent 1
if list silent >= 3
overhead "No answer 3 times in a row: switching weapon" 33
clearhands both
pause 600
@ignore weaponG
// let the next round fetch another item from the supply
settimer triedBlade 60000
settimer checkedWeapon 0
removelist silent
else
overhead "No answer from the server: retrying" 68
endif
endif
endif
endif
endif
endwhile
overhead "Dead: Poisoning trainer stopped" 33
Original Version Saved - 12/5/2026, 9:34:31 AM - about 19 hours ago
poisoning-afk
No changes to display