from finditem to lasttarget

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
sovereign
Posts: 3
Joined: 2005-01-13 14:58:43
Contact:

from finditem to lasttarget

Post 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?
CONDOMchick
Posts: 362
Joined: 2005-04-23 20:18:57

Post 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')
Dragon World. [since 2004]
GrandMaster Ranger
Posts: 73
Joined: 2005-01-14 13:41:05
Location: Одесса - мама
Contact:

Post by GrandMaster Ranger »

can't understand what you need, but try it :wink:
next time write source codes :lol:

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
sovereign
Posts: 3
Joined: 2005-01-13 14:58:43
Contact:

Post 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.
GrandMaster Ranger
Posts: 73
Joined: 2005-01-14 13:41:05
Location: Одесса - мама
Contact:

Post by GrandMaster Ranger »

If you cast a spell on object ( for example finditem ) , it automatically become lasttarget.......
it's working? yes... need something else? :D
sovereign
Posts: 3
Joined: 2005-01-13 14:58:43
Contact:

Post 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? :D


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.
Post Reply