46
Scripting Chat / Re: what script would you like to see?
« on: July 08, 2011, 03:57:02 PM »
I guess this would be how I'd write one if I wanted something in a hurry...
I'm not sure if the % . #charid . _timeout is formated correctly, I always mess that up and would have to be able to play the script to see, but stupid easyuo is down as we all know!
%BANDAGEDELAY could be a preset number or set in the bandage sub based off the users dex (this uses #SCNT2 so 10 = 1s)
BANDAGE would need the bandage item type obviously
I'm not sure this would work, just a rough idea how I would start
I'm not sure if the % . #charid . _timeout is formated correctly, I always mess that up and would have to be able to play the script to see, but stupid easyuo is down as we all know!
%BANDAGEDELAY could be a preset number or set in the bandage sub based off the users dex (this uses #SCNT2 so 10 = 1s)
BANDAGE would need the bandage item type obviously
I'm not sure this would work, just a rough idea how I would start
Code: [Select]
loop:
uoxl SWAP
if % . #CHARID . _timeout > #SCNT2 && % . #CHARID . _timeout > #SCNT2 <> N/A
goto loop ;if the timeout has not been met, goto loop and check next client
;otherwise the timer is active (a bandage is being applied)
if #HITS <> #MAXHITS
{
gosub BANDAGESUB ;would find bandages, apply them, and execute next line...
set % . #CHARID . _timeout #SCNT2 + %BANDAGEDELAY ;sets/resets when the bandage should be done
}
goto loop
sub BANDAGESUB
finditem BANDAGE C_ , #backpackid
if #findkind = -1
return ;there's no bandages... this returns nothing and the timer still gets reset
;even though you did nothing. you can return a result and do another check
;before setting the timer variable. maybe execute a sound to alert the user that
;somethings wrong without interupting the script or other clients from healing
set #LOBJECTID #FINDID
while #TARGCURS <> 1
event macro 17 ;keep using #lobjectid until bandage cursor is up
while #TARGCURS = 1
event macro 23 ;keep targeting self until target cursor is gone
;bandage has been applied.. return, set timer and goto next client asap!
return