So I wanna make a script who can lock EnemyID by 'laststatus'.
But i am confused with Inj Script's var scope.
Below is a piece of my script
Code: Select all
var EnemyID
var EnmMode=1
var Locked
sub LockEnemy()
Locked=0
if uo.GetSerial('self')==uo.Getserial('laststatus') then
uo.print("NO to self")
return
endif
EnemyID=uo.Getserial('laststatus'))
uo.print("EnemyID Stored!")
Locked=1
end sub
Sub JPara()
Var Type='0x1F52'
Var Color='0x0000'
if uo.GetSerial('self')==uo.GetSerial('laststatus') then
uo.print("Dont Point to Self!")
return
endif
if EnmMode==1 then
if Locked==1 then
UO.Set('lasttarget',EnemyID)
else
uo.print("Lock Enemy first!")
endif
else
UO.Set('lasttarget','laststatus')
endif
UO.FindType(Type,Color,2)
if uo.findcount()>0 then
uo.WaitTargetLast()
UO.UseObject('finditem')
else
UO.print("No Paralyze Scroll!")
endif
Endsub
How to modify this script to make it work?
Thx a lot.
I already tryed uo.Getglobal() and uo.SetGlobal(),but it's text,especially for uo.Getserial('laststatus'),we need a Hex value,not just string.
So,Please help me!