Yoko

All sides of Injection
It is currently 2025-12-28 00:06:25

All times are UTC+02:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Macro for Heal Friend
PostPosted: 2004-05-15 20:23:01 
Offline

Joined: 2004-04-04 09:44:36
Posts: 7
sub life()
var Friend=0x000040ea
while uo.life > 0
if ((UO.GetHP('Friend')) <20 then
UO.usetype("bandage")
UO.WaitTargetLast()
UO.warmode(0)
wait(2000)
endif
if ((UO.GetHP('Friend')) == UO.GetMaxHP('Friend')) then
UO.warmode(1)
UO.attack('lasttarget')
wait(1000)
endif
wend
wait(1000)
end sub

but not work friend have 10/100 HP and macro not stop for heal...


Top
   
 Post subject:
PostPosted: 2004-05-15 20:56:35 
Offline
User avatar

Joined: 2004-04-17 23:02:41
Posts: 48
Location: Odessa, Ukraine
Try this...

Code:
Life(0x000040ea)


Code:
sub Life(Friend)
     While (UO.Life > 0)
            if (UO.GetHP(Friend) < 20) then #it doesn't work fine, cuz UO.GetHP() doesn't give EXACT information about HP
            While (UO.GetHP(Friend) < UO.GetMaxHP(Friend))
                     UO.WarMode(0)
                     UO.WaitTargetObject(Friend)
                     UO.UseType('bandage')
                     Wait(2000)                     
            WEnd
            EndIf
            UO.WarMode(1)
            UO.Attack('lastattack')
            Wait(1000)             
      WEnd
end sub


always urs, totus...

_________________
...thinking - 37% complete...


Top
   
 Post subject:
PostPosted: 2004-05-15 21:28:40 
Offline

Joined: 2004-04-04 09:44:36
Posts: 7
Thanks but not work macro not heal Friend...


Top
   
 Post subject:
PostPosted: 2004-05-15 21:57:44 
Offline
User avatar

Joined: 2004-04-17 23:02:41
Posts: 48
Location: Odessa, Ukraine
Of course...
Cuz UO.GetHP() doesn't return exact information about Hit Points of the object...

If u wanna heal urself, use UO.Life instead of UO.GetHP()...

U may use UO.GetHP() with UO.GetMaxHP() and in that case it's gonna be fine...

_________________
...thinking - 37% complete...


Top
   
PostPosted: 2004-05-16 21:35:50 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
legacy wrote:
if ((UO.GetHP('Friend')) <20 then

if ((UO.GetHP('Friend')*100/UO.GetMaxHP('Friend')) <20 then

also check out that Track World enabled in Main tab


Top
   
 Post subject:
PostPosted: 2004-05-17 09:57:34 
Offline

Joined: 2004-04-04 09:44:36
Posts: 7
Yoko iam run script and injection says Unhandled exception in parser

sub life()
var Friend=0x000040ea
while uo.life > 0
if ((UO.GetHP('Friend')*100/UO.GetMaxHP('Friend')) <20 then
UO.usetype("bandage")
UO.WaitTargetLast()
UO.warmode(0)
wait(2000)
endif
if ((UO.GetHP('Friend')) == UO.GetMaxHP('Friend')) then
UO.warmode(1)
UO.attack('lasttarget')
wait(1000)
endif
wend
wait(1000)
end sub

Track World item eneabled


Top
   
 Post subject:
PostPosted: 2004-05-17 22:48:23 
Offline
User avatar

Joined: 2004-04-03 18:39:28
Posts: 173
UO.attack('lasttarget') = UO.attack('laststatus') There is no lasttarget is just laststatus !


Top
   
 Post subject:
PostPosted: 2004-05-18 13:50:59 
Offline

Joined: 2004-04-06 12:13:49
Posts: 32
wrong asnwer kazoo.... thats not the problem with the script...
the problem is found in the IF statement... but i couldnt see whats wrong with it yet..

first thing what is wrong, but still wont solve the probelm is that uo.getblblabl("friend") is wrong you specified Friend as a variable so it must not have the quotation marks around it... (uo.gethp(friend)) would be right in this part..

but as i said... still problem isnt solved...


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited