Page 1 of 1
from finditem to lasttarget
Posted: 2006-11-26 03:28:07
by sovereign
Hi everyone,
i have a problem with my script. I´m searching for some kind types in my script through findtype. If i find some targets i want to cast spells from scrolls or fire from cavalry crossbow on the target, but i can´t even if i stare the target through finditem. I need to switch the target from finditem to lasttarget, but don´t know why

. Can someone help me?
Posted: 2006-11-26 03:37:54
by CONDOMchick
Well.... if i understood u...
Code: Select all
UO.Set('lasttarget')
UO.FindType('here type',-1,'my')
UO.WaitTargetObject('lasttarget')
UO.UseObject('finditem')
Posted: 2006-11-26 12:54:56
by GrandMaster Ranger
can't understand what you need, but try it
next time write source codes
Code: Select all
sub main()
var x,i,oops
dim xxx[3]
xxx[1]=0x0000
xxx[2]=0x0000
xxx[3]=0x0000
UO.exec('set distance 12')
UO.exec('set finddistance 12')
while not uo.dead()
for i=1 to 3
wait(50)
uo.FindType(xxx[i],'-1','ground')
if UO.FindCount() >= 1 then
oops=uo.getserial('finditem')
UO.cast( 'Needed spell', oops)
end if
next
wend
end sub
Posted: 2006-11-27 06:43:42
by sovereign
sub main()
var n
Dim A[4]
A[1] = 0x0000;
A[2] = 0x0000;
A[3] = 0x0000;
A[4] = 0x0000;
FOR n=1 TO 4
UO.FindType(A[n],"-1",'ground')
UO.AddObject("cil","finditem")
UO.UseObject('finditem')
uo.msg(".stare")
UO.WaitTargetObject("cil")
wait(100)
UO.msg('.cast_lt 105')
End if
NEXT
end sub
sub para()
If UO.Count("0x1F52") >= 1 then
uo.waittargetobject("cil")
uo.usetype("0x1F52","0x054A")
else
UO.msg('.cast_lt 138')
endif
end sub
OK, guys. There is my searching skript and my skript for paralyze casting from silent scrolls if is any of them equipped. As you can see i´m searching for targets through findtype, but i´m casting paralyze on lasttarget and there is a difference between findtype target and lasttarget.
I solve that problem using uo.addobject. Now it´s working, but i´d love to know if it can be transfered somehow from findtype object to lasttarget object.
Posted: 2006-11-27 14:22:09
by GrandMaster Ranger
If you cast a spell on object ( for example finditem ) , it automatically become lasttarget.......
it's working? yes... need something else?

Posted: 2006-11-27 16:01:41
by sovereign
GrandMaster Ranger wrote:If you cast a spell on object ( for example finditem ) , it automatically become lasttarget.......
it's working? yes... need something else?

It´s quite weird, but i can´t. If i stare for example rune to teleport and then i find target through findtype macro i can cast easily spells on that target, but if i want to cast spells from scrolls i cast at that rune, thats the problem i just wanna solve.