Compatibility unverified
This community Razor script has not been tested in game by the Hub. Read its setup and client requirements before use.
----- MANUAL SETUP ----//
BardProvocation
Provocation Hotkey.razor
1# This is an automated backup - check out https://outlands.uorazorscripts.com/script/d99e0dbe-170f-43b3-9a1a-4de4a9d548ef for latest2# Automation by Jaseowns3## Script: Provocation Hotkey4## Created by: Nevor#90515#############################################6 7//----- MANUAL SETUP ----//8 9//You can prevent Razor spamming system messages by using filters10//It is not mandatory, but highly recommended to use them11//Go to 'Filters' tab in Razor menu -> Text & Messages -> Check Enable text filter -> Click Add12//Make sure to check 'Filter system messages', but do not check 'Ignore filtered messages in overhead and scripts'13//Create the following text filters:14// target set15// Target a new16// No one matching that was found on your screen17 18//This variable determines the search radius for barding targets, change at your own risk (not tested)19@setvar! bardingTargetSearchRadius 820//Amount of time to wait for the server to respond with system messages (adjust according to ping if necessary)21@setvar! forServerResponse 30022 23//----- AUTO SETUP ----//24 25if not timerexists ProvoTimer26 createtimer! ProvoTimer27 settimer ProvoTimer 1050028elseif timer ProvoTimer <= 1050029 overhead '[SKILL COOLDOWN]' 4330 stop31endif32 33@setvar! firstProvocationTarget 134@setvar! secondProvocationTarget 335@setvar! needToBard 336@setvar! previousLastTarget 737 38//---- CLEANING UP ----//39 40clearsysmsg41if targetexists42 if targetexists 'beneficial'43 target self44 wait 5045 else46 hotkey 'Cancel Current Target'47 wait 5048 endif49endif50 51//---- INSTRUMENT CHECK ----//52 53if not varexist myInstrument or not find myInstrument backpack54//lute 3763, drum 3740, lap harp 3762, tambourine 3742, bamboo flute 1024555 while findtype 3740|3742|3762|3763|10245 backpack as instrucheck56 getlabel instrucheck instrulabel57 wait forServerResponse58 if 'supremely' in instrulabel59 @setvar myInstrument instrucheck60 overhead 'New supreme instrument set'61 wait forServerResponse62 dclick myInstrument63 break64 elseif 'exceedingly' in instrulabel65 @setvar myInstrument instrucheck66 overhead 'New exceeding instrument set'67 wait forServerResponse68 dclick myInstrument69 break70 else71 @ignore instrucheck72 endif73 endwhile74 @clearignore75 if not varexist myInstrument or not find myInstrument backpack76 overhead "Instrument not found. Set a new one!"77 @setvar myInstrument78 wait forServerResponse79 dclick myInstrument80 endif81 if not varexist myInstrument or not find myInstrument backpack82 for 383 overhead '** NO INSTRUMENT **' 3384 endfor85 stop86 endif87endif88 89//---- TARGET SEARCH ----//90 91@setvar! preScriptLastTarget lasttarget 92if find preScriptLastTarget ground -1 -1 bardingTargetSearchRadius93 if noto preScriptLastTarget = 'hostile' or noto preScriptLastTarget = 'criminal'94 @setvar! previousLastTarget preScriptLastTarget95 endif96endif97if previousLastTarget != preScriptLastTarget98 hotkey 'Target Closest Non-Friendly Monster'99 @setvar! previousLastTarget lasttarget100endif101@setvar! checkLastTarget previousLastTarget102 103while not dead previousLastTarget104 if find checkLastTarget ground -1 -1 bardingTargetSearchRadius105 getlabel checkLastTarget BardingStatusCheck106 if 'break' in BardingStatusCheck107 //do nothing108 elseif 'pacified' in BardingStatusCheck or 'provoked' in BardingStatusCheck109 if find checkLastTarget ground -1 -1 bardingTargetSearchRadius and checkLastTarget != firstProvocationTarget and checkLastTarget != secondProvocationTarget110 @setvar! possibleProvoTarget checkLastTarget111 endif112 else113 if not find firstProvocationTarget ground -1 -1 bardingTargetSearchRadius and find checkLastTarget ground -1 -1 bardingTargetSearchRadius and checkLastTarget != secondProvocationTarget114 @setvar! firstProvocationTarget checkLastTarget115 endif116 if not find secondProvocationTarget ground -1 -1 bardingTargetSearchRadius and find checkLastTarget ground -1 -1 bardingTargetSearchRadius and checkLastTarget != firstProvocationTarget117 @setvar! secondProvocationTarget checkLastTarget118 endif119 endif120 endif121 if not dead firstProvocationTarget and not dead secondProvocationTarget122 @setvar! needToBard 1123 break124 elseif index > 0 and checkLastTarget = previousLastTarget125 if dead firstProvocationTarget and not dead possibleProvoTarget and possibleProvoTarget != secondProvocationTarget126 @setvar! firstProvocationTarget possibleProvoTarget127 elseif dead secondProvocationTarget and not dead possibleProvoTarget and possibleProvoTarget != firstProvocationTarget128 @setvar! secondProvocationTarget possibleProvoTarget129 endif130 @setvar! possibleProvoTarget 0131 if find firstProvocationTarget ground -1 -1 bardingTargetSearchRadius and find secondProvocationTarget ground -1 -1 bardingTargetSearchRadius132 @setvar! needToBard 1133 endif134 break135 endif136 hotkey 'Next Non-Friendly Monster Target'137 @setvar! checkLastTarget lasttarget138endwhile139 140//---- BARDING ----//141 142if needToBard = 1143 hotkey 'Provocation'144 wft 3000145 target firstProvocationTarget146 wait forServerResponse147 if insysmsg 'Target cannot be seen'148 overhead "� Not visible �" 43 firstProvocationTarget149 elseif insysmsg 'That is too far away.'150 overhead '� Too far away �' 43 firstProvocationTarget151 else152 wft 3000153 target secondProvocationTarget154 wait forServerResponse155 if insysmsg 'You play successfully, provoking'156 overhead '[PROVO SUCCESS]'157 overhead '� Provoked �' 88 firstProvocationTarget158 overhead '� Provoked �' 88 secondProvocationTarget159 settimer ProvoTimer 0160 elseif insysmsg 'You fail to incite'161 overhead '[PROVO FAIL]' 43162 overhead '� Failed �' 43 firstProvocationTarget163 overhead '� Failed �' 43 secondProvocationTarget164 settimer ProvoTimer 5000165 elseif insysmsg 'Target cannot be seen'166 overhead "� Not visible �" 43 secondProvocationTarget167 elseif insysmsg 'That is too far away.'168 overhead '� Too far away �' 43 secondProvocationTarget169 elseif insysmsg 'The creatures you are trying to provoke are too far away from each other for your music to have an effect.'170 overhead '� Too far apart �' 43 firstProvocationTarget171 overhead '� Too far apart �' 43 secondProvocationTarget172 elseif insysmsg 'tell someone to attack themselves!'173 //Oops, that should not be possible to happen174 overhead '[SELF TARGETING FAIL]' 33175 else176 //maybe the server could not respond with a sysmsg in time - adjust forServerResponse variable in setup to a higher value177 overhead '[UNEXPECTED PROVO RESULT]' 33178 settimer ProvoTimer 5000179 endif180 endif181else182 overhead '[NO TARGETS]' 43183endif184 185//---- INSTRUMENT CHECK ----//186 187getlabel myInstrument InstruLabel188if '(10/' in InstruLabel189 overhead '10 Songs left to play' 33190elseif '(3/' in InstruLabel191 overhead '* 3 Songs left to play *' 33192elseif '(2/' in InstruLabel193 overhead '** 2 Songs left to play **' 33194elseif '(1/' in InstruLabel195 for 3196 overhead '*** LAST SONG ***' 33197 endfor198endif199 200//---- CLEANING UP ----//201 202hotkey 'Set Last Target'203wft 3000204target preScriptLastTarget205 206if targetexists 207 hotkey 'Cancel Current Target'208endif