Archer macro doesn't apply bandages.
Posted: February 1st, 2018, 8:56 pm
This macro doesn't apply bandages but will chug pots as expected.
---------------------------------------------------------------------------------
if not listexists 'delay'
createlist 'delay'
pushlist 'delay' 550
endif
if not listexists 'OneAboveBaseDex'
createlist 'OneAboveBaseDex'
pushlist 'OneAboveBaseDex' 140
endif
if not listexists 'OneAboveBaseStr'
createlist 'OneAboveBaseStr'
pushlist 'OneAboveBaseStr' 140
endif
//end setup
//
//
//
if not timerexists 'bandaid'
createtimer 'bandaid'
settimer 'bandaid' 10000
@clearjournal
endif
if not timerexists 'healpot'
createtimer 'healpot'
settimer 'healpot' 10100
@clearjournal
endif
if timer 'bandaid' > 15000
@clearjournal
endif
if dead 'self'
stop
endif
if @injournal 'You just kicked his ass!' 'system'
if not timerexists 'celebrate'
createtimer 'celebrate'
settimer 'celebrate' 30100
endif
if timer 'celebrate' > 30000
msg 'UNINSTALL' 53
msg 'YOU SUCK' 56
msg 'GET FUCKED KID' 48
settimer 'celebrate' 0
endif
endif
if counttype 0xe21 'any' 'backpack' > 0
if hits < maxhits
if timer 'bandaid' > 10000
@clearjournal
bandageself
settimer 'bandaid' 0
pause delay[0]
elseif @injournal 'being is not damaged!' 'system' or @injournal 'finish bandaging' 'system'
@clearjournal
bandageself
settimer 'bandaid' 0
pause delay[0]
elseif @injournal 'heal what little' 'system' or @injournal 'barely help' 'system'
@clearjournal
bandageself
settimer 'bandaid' 0
pause delay[0]
elseif @injournal 'bleeding wounds' 'system' or @injournal "Can't heal" 'system'
pause delay[0]
@clearjournal
bandageself
settimer 'bandaid' 0
pause delay[0]
@clearjournal
//if getting wait right after starting bandage, assume bandage failed
elseif @injournal 'Wait.' 'system' and not @injournal 'begin bandaging' 'system'
sysmsg 'RESET' 34
@clearjournal
pause delay[0]
if hits < maxhits
@clearjournal
bandageself
settimer 'bandaid' 0
pause delay[0]
endif
endif
endif
//restart bandage if slips early on
if @injournal 'fingers slip!' 'system' and timer 'bandaid' < 2000
while timer 'bandaid' < delay[0]
endwhile
bandageself
settimer 'bandaid' 0
@clearjournal
pause delay[0]
endif
if @injournal 'not damaged!' 'system'
settimer 'bandage' 7000
endif
if timer 'bandaid' > 995 and timer 'bandaid' < 1005
sysmsg '1' 34
while timer 'bandaid' < 1005
endwhile
endif
if timer 'bandaid' > 1995 and timer 'bandaid' < 2005
sysmsg '2' 34
while timer 'bandaid' < 2005
endwhile
endif
if timer 'bandaid' > 2995 and timer 'bandaid' < 3005
sysmsg '3' 34
while timer 'bandaid' < 3005
endwhile
endif
if timer 'bandaid' > 3995 and timer 'bandaid' < 4005
if not @injournal 'finish'
sysmsg '4' 34
endif
while timer 'bandaid' < 4005
endwhile
endif
if timer 'bandaid' > 4995 and timer 'bandaid' < 5005
if not @injournal 'finish'
sysmsg '5' 34
endif
while timer 'bandaid' < 5005
endwhile
endif
if timer 'bandaid' > 5995 and timer 'bandaid' < 6005
if not @injournal 'finish'
sysmsg '6' 34
endif
while timer 'bandaid' < 6005
endwhile
endif
if @injournal 'being is not damaged!' or @injournal 'finish applying'
settimer 'bandaid' 7000
elseif @injournal 'heal what little' or @injournal 'barely help'
settimer 'bandaid' 7000
endif
else
if not timerexists 'bandagewarning'
createtimer 'bandagewarning'
sysmsg 'Out of Bandages!' 34
elseif timer 'bandagewarning' > 10000
sysmsg 'Out of Bandages!' 34
@settimer 'bandagewarning' 0
endif
endif
if @findlayer 'self' 2 and not @property 'balanced' 'lefthand'
waitforproperties 'found' 5000
endif
if @findlayer 'self' 2 and not @property 'balanced' 'lefthand'
if not timerexists 'nochug'
@createtimer 'nochug'
elseif timer 'nochug' > 10000
sysmsg 'Unbalanced, autopotions off' 34
settimer 'nochug' 0
endif
else
if poisoned 'self' and counttype 0xf07 0 'backpack' > 3
usetype! '0xf07'
pause delay[0]
//1 above base str
elseif str <= OneAboveBaseStr[0] and counttype 0xf09 0 'backpack' > 0
usetype! 0xf09
pause delay[0]
//1 above base dex
elseif dex <= OneAboveBaseDex[0] and counttype 0xf08 0 'backpack' > 0
usetype! 0xf08
pause delay[0]
elseif not poisoned
if hits < 75 and not yellowhits 'self'
if counttype 0xf0c 0 'backpack' > 0 and timer 'healpot' > 10100
usetype! '0xf0c'
settimer 'healpot' 0
pause delay[0]
elseif maxstam > 152
if stam < 130 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
elseif maxstam > 122
if stam < 150 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
elseif maxstam > 92
if stam < 90 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
endif
elseif maxstam > 152
if stam < 150 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
elseif maxstam > 122
if stam < 120 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
elseif maxstam > 92
if stam < 90 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
endif
//if you get here you are poisoned but out of cure pots, so cant drink heal
else
if maxstam > 152
if stam < 150 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
elseif maxstam > 122
if stam < 120 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
elseif maxstam > 92
if stam < 90 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
endif
endif
endif
if hits == maxhits and counttype 0xf0e 0 'backpack' > 10
pause delay[0]
@movetypeoffset 0xf0e 'backpack' 'ground' (0 1 0) 'any'
pause delay[0]
endif
//code to throw back pots, untested within this macro
//if @findtype 0xf0d 0 'ground' 1 2
///if @inrange 'last' '10'
// @useobject 'found'
// @target! 'last'
//else
//@autotargetenemy
//@useobject 'found'
//if @inrange 'enemy' '10
// @target! 'enemy'
//else
// @targettilerelative 'self' 4
//endif
//endif
//endif
if not listexists 'BodyTypes2'
createlist 'BodyTypes2'
//human
pushlist 'BodyTypes2' 0x190
pushlist 'BodyTypes2' 0x191
//wraith
pushlist 'BodyTypes2' 0x2ec
pushlist 'BodyTypes2' 0x2eb
//elf
pushlist 'BodyTypes2' 0x25d
pushlist 'BodyTypes2' 0x25e
//lich
pushlist 'BodyTypes2' 0x2ed
//vamp
pushlist 'BodyTypes2' 0x2e9
pushlist 'BodyTypes2' 0x2e8
endif
clearignorelist
ignoreobject 'self'
if not timerexists 'nospammsg'
createtimer 'nospammsg'
endif
if timer 'nospammsg' > 1000
for 0 to 'BodyTypes2'
while @findtype BodyTypes2[] 'any' ground 0 18
if not hits 'found' == 0
if not @property 'Sculpted' 'found' and not @property 'the' 'found'
if yellowhits 'found'
headmsg 'Mortaled' 54 'found'
endif
if paralyzed 'found'
headmsg 'Paralyzed' 95 'found'
endif
endif
endif
ignoreobject 'found'
endwhile
endfor
settimer 'nospammsg' 0
endif
if not timerexists 'idoccheck'
@createtimer 'idoccheck'
@settimer 'idoccheck' 0
endif
if timer 'idoccheck' > 1000
while @findtype 0xbd2 'any' 'ground'
if @property 'Condition: This Structure is Slightly Worn' 'found'
headmsg 'SLIGHTLY' 34 'found'
elseif @property 'Condition: This Structure is Somewhat Worn' 'found'
headmsg 'SOMEWHAT' 34 'found'
elseif @property 'Condition: This Structure is Fairly Worn' 'found'
headmsg 'FAIRLY' 34 'found'
elseif @property 'Condition: This Structure is Greatly Worn' 'found'
headmsg 'GREATLY' 34 'found'
elseif @property 'Condition: This Structure is In Danger of Collapsing' 'found'
headmsg 'IDOC' 34 'found'
endif
ignoreobject 'found'
endwhile
clearignorelist
@settimer 'idoccheck' 0
endif
//stop to conserve pots if in guild houses
if x == 1333 and y == 1961
stop
endif
if x < 1197 and x > 1183
if y < 2342 and y > 2331
stop
endif
endif
---------------------------------------------------------------------------------
if not listexists 'delay'
createlist 'delay'
pushlist 'delay' 550
endif
if not listexists 'OneAboveBaseDex'
createlist 'OneAboveBaseDex'
pushlist 'OneAboveBaseDex' 140
endif
if not listexists 'OneAboveBaseStr'
createlist 'OneAboveBaseStr'
pushlist 'OneAboveBaseStr' 140
endif
//end setup
//
//
//
if not timerexists 'bandaid'
createtimer 'bandaid'
settimer 'bandaid' 10000
@clearjournal
endif
if not timerexists 'healpot'
createtimer 'healpot'
settimer 'healpot' 10100
@clearjournal
endif
if timer 'bandaid' > 15000
@clearjournal
endif
if dead 'self'
stop
endif
if @injournal 'You just kicked his ass!' 'system'
if not timerexists 'celebrate'
createtimer 'celebrate'
settimer 'celebrate' 30100
endif
if timer 'celebrate' > 30000
msg 'UNINSTALL' 53
msg 'YOU SUCK' 56
msg 'GET FUCKED KID' 48
settimer 'celebrate' 0
endif
endif
if counttype 0xe21 'any' 'backpack' > 0
if hits < maxhits
if timer 'bandaid' > 10000
@clearjournal
bandageself
settimer 'bandaid' 0
pause delay[0]
elseif @injournal 'being is not damaged!' 'system' or @injournal 'finish bandaging' 'system'
@clearjournal
bandageself
settimer 'bandaid' 0
pause delay[0]
elseif @injournal 'heal what little' 'system' or @injournal 'barely help' 'system'
@clearjournal
bandageself
settimer 'bandaid' 0
pause delay[0]
elseif @injournal 'bleeding wounds' 'system' or @injournal "Can't heal" 'system'
pause delay[0]
@clearjournal
bandageself
settimer 'bandaid' 0
pause delay[0]
@clearjournal
//if getting wait right after starting bandage, assume bandage failed
elseif @injournal 'Wait.' 'system' and not @injournal 'begin bandaging' 'system'
sysmsg 'RESET' 34
@clearjournal
pause delay[0]
if hits < maxhits
@clearjournal
bandageself
settimer 'bandaid' 0
pause delay[0]
endif
endif
endif
//restart bandage if slips early on
if @injournal 'fingers slip!' 'system' and timer 'bandaid' < 2000
while timer 'bandaid' < delay[0]
endwhile
bandageself
settimer 'bandaid' 0
@clearjournal
pause delay[0]
endif
if @injournal 'not damaged!' 'system'
settimer 'bandage' 7000
endif
if timer 'bandaid' > 995 and timer 'bandaid' < 1005
sysmsg '1' 34
while timer 'bandaid' < 1005
endwhile
endif
if timer 'bandaid' > 1995 and timer 'bandaid' < 2005
sysmsg '2' 34
while timer 'bandaid' < 2005
endwhile
endif
if timer 'bandaid' > 2995 and timer 'bandaid' < 3005
sysmsg '3' 34
while timer 'bandaid' < 3005
endwhile
endif
if timer 'bandaid' > 3995 and timer 'bandaid' < 4005
if not @injournal 'finish'
sysmsg '4' 34
endif
while timer 'bandaid' < 4005
endwhile
endif
if timer 'bandaid' > 4995 and timer 'bandaid' < 5005
if not @injournal 'finish'
sysmsg '5' 34
endif
while timer 'bandaid' < 5005
endwhile
endif
if timer 'bandaid' > 5995 and timer 'bandaid' < 6005
if not @injournal 'finish'
sysmsg '6' 34
endif
while timer 'bandaid' < 6005
endwhile
endif
if @injournal 'being is not damaged!' or @injournal 'finish applying'
settimer 'bandaid' 7000
elseif @injournal 'heal what little' or @injournal 'barely help'
settimer 'bandaid' 7000
endif
else
if not timerexists 'bandagewarning'
createtimer 'bandagewarning'
sysmsg 'Out of Bandages!' 34
elseif timer 'bandagewarning' > 10000
sysmsg 'Out of Bandages!' 34
@settimer 'bandagewarning' 0
endif
endif
if @findlayer 'self' 2 and not @property 'balanced' 'lefthand'
waitforproperties 'found' 5000
endif
if @findlayer 'self' 2 and not @property 'balanced' 'lefthand'
if not timerexists 'nochug'
@createtimer 'nochug'
elseif timer 'nochug' > 10000
sysmsg 'Unbalanced, autopotions off' 34
settimer 'nochug' 0
endif
else
if poisoned 'self' and counttype 0xf07 0 'backpack' > 3
usetype! '0xf07'
pause delay[0]
//1 above base str
elseif str <= OneAboveBaseStr[0] and counttype 0xf09 0 'backpack' > 0
usetype! 0xf09
pause delay[0]
//1 above base dex
elseif dex <= OneAboveBaseDex[0] and counttype 0xf08 0 'backpack' > 0
usetype! 0xf08
pause delay[0]
elseif not poisoned
if hits < 75 and not yellowhits 'self'
if counttype 0xf0c 0 'backpack' > 0 and timer 'healpot' > 10100
usetype! '0xf0c'
settimer 'healpot' 0
pause delay[0]
elseif maxstam > 152
if stam < 130 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
elseif maxstam > 122
if stam < 150 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
elseif maxstam > 92
if stam < 90 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
endif
elseif maxstam > 152
if stam < 150 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
elseif maxstam > 122
if stam < 120 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
elseif maxstam > 92
if stam < 90 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
endif
//if you get here you are poisoned but out of cure pots, so cant drink heal
else
if maxstam > 152
if stam < 150 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
elseif maxstam > 122
if stam < 120 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
elseif maxstam > 92
if stam < 90 and counttype 0xf0b 0 'backpack' > 5
usetype! '0xf0b'
pause delay[0]
endif
endif
endif
endif
if hits == maxhits and counttype 0xf0e 0 'backpack' > 10
pause delay[0]
@movetypeoffset 0xf0e 'backpack' 'ground' (0 1 0) 'any'
pause delay[0]
endif
//code to throw back pots, untested within this macro
//if @findtype 0xf0d 0 'ground' 1 2
///if @inrange 'last' '10'
// @useobject 'found'
// @target! 'last'
//else
//@autotargetenemy
//@useobject 'found'
//if @inrange 'enemy' '10
// @target! 'enemy'
//else
// @targettilerelative 'self' 4
//endif
//endif
//endif
if not listexists 'BodyTypes2'
createlist 'BodyTypes2'
//human
pushlist 'BodyTypes2' 0x190
pushlist 'BodyTypes2' 0x191
//wraith
pushlist 'BodyTypes2' 0x2ec
pushlist 'BodyTypes2' 0x2eb
//elf
pushlist 'BodyTypes2' 0x25d
pushlist 'BodyTypes2' 0x25e
//lich
pushlist 'BodyTypes2' 0x2ed
//vamp
pushlist 'BodyTypes2' 0x2e9
pushlist 'BodyTypes2' 0x2e8
endif
clearignorelist
ignoreobject 'self'
if not timerexists 'nospammsg'
createtimer 'nospammsg'
endif
if timer 'nospammsg' > 1000
for 0 to 'BodyTypes2'
while @findtype BodyTypes2[] 'any' ground 0 18
if not hits 'found' == 0
if not @property 'Sculpted' 'found' and not @property 'the' 'found'
if yellowhits 'found'
headmsg 'Mortaled' 54 'found'
endif
if paralyzed 'found'
headmsg 'Paralyzed' 95 'found'
endif
endif
endif
ignoreobject 'found'
endwhile
endfor
settimer 'nospammsg' 0
endif
if not timerexists 'idoccheck'
@createtimer 'idoccheck'
@settimer 'idoccheck' 0
endif
if timer 'idoccheck' > 1000
while @findtype 0xbd2 'any' 'ground'
if @property 'Condition: This Structure is Slightly Worn' 'found'
headmsg 'SLIGHTLY' 34 'found'
elseif @property 'Condition: This Structure is Somewhat Worn' 'found'
headmsg 'SOMEWHAT' 34 'found'
elseif @property 'Condition: This Structure is Fairly Worn' 'found'
headmsg 'FAIRLY' 34 'found'
elseif @property 'Condition: This Structure is Greatly Worn' 'found'
headmsg 'GREATLY' 34 'found'
elseif @property 'Condition: This Structure is In Danger of Collapsing' 'found'
headmsg 'IDOC' 34 'found'
endif
ignoreobject 'found'
endwhile
clearignorelist
@settimer 'idoccheck' 0
endif
//stop to conserve pots if in guild houses
if x == 1333 and y == 1961
stop
endif
if x < 1197 and x > 1183
if y < 2342 and y > 2331
stop
endif
endif