is there a way to script a Targetnext that doesnt target npc

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
paulinho4life
Posts: 45
Joined: 2004-07-20 00:14:10

is there a way to script a Targetnext that doesnt target npc

Post by paulinho4life »

is there a way to script a targetnext that doesnt target woman ou men npcs, like the vendors ?

I always die in PVP to blues, because i take too long to get they targeted. :/

I searched for any difference between players and npcs, and i found something called HAS.

Player:
ID=0x00006F8A Type=0x0190 EJQB Name=Velh0 de SaiA
Quantity: 0 Colour: 0x83EA Layer: 0 Has: 1
X=1220 Y=1773 Z=0 C=0xFFFFFFFF F=0x00

HAS = 1

VENDORS:
ID=0x000409CE Type=0x0190 SKBP Name=Strom
Quantity: 0 Colour: 0x041C Layer: 0 Has: 0
X=3053 Y=3366 Z=15 C=0xFFFFFFFF F=0x00

HAS = 0...

is there a way to write a script that target only human with has = 1 ?
what has means ?
omi4
Posts: 457
Joined: 2005-07-10 21:53:05

Post by omi4 »

She is a horse...
:(
paulinho4life
Posts: 45
Joined: 2004-07-20 00:14:10

Post by paulinho4life »

so, there is a way to target only people in a horse?
has=1 ?


how can i do it.
omi4
Posts: 457
Joined: 2005-07-10 21:53:05

Post by omi4 »

Code: Select all

sub F_Target()
   UO.Ignore("self")
   for a = 0 to a > 1
      for i = 16033 to i > 16059
         repeat
            var horse = UO.GetSerial("~0x019" + str(a) + "." + str(UO.Int2Hex(i)))
         until horse <> 0
         UO.IgnoreReset()
         return UO.ContainerOf(horse)
      next
   next
   UO.IgnoreReset()
   return 0
end sub
paulinho4life
Posts: 45
Joined: 2004-07-20 00:14:10

Post by paulinho4life »

ERROR, Variable undefined A
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

paulinho4life wrote:ERROR, Variable undefined A

Code: Select all

sub F_Target()
   VAR a, i
  UO.Ignore("self")
   for a = 0 to a > 1
      for i = 16033 to i > 16059
         repeat
            var horse = UO.GetSerial("~0x019" + str(a) + "." + str(UO.Int2Hex(i)))
         until horse <> 0
         UO.IgnoreReset()
         return UO.ContainerOf(horse)
      next
   next
   UO.IgnoreReset()
   return 0
end sub
paulinho4life
Posts: 45
Joined: 2004-07-20 00:14:10

Post by paulinho4life »

it still doesnt work... thats a example of a script like that


Code: Select all

sub NextTarget()
var Finding=1
   uo.ignorereset()
   uo.ignore('self')
   while Finding
      wait(100)
      uo.findtype('0x0190', -1, 'ground')
      if uo.FindCount() then
         if UO.GetNotoriety('finditem') == 6 then
            Finding=0
            uo.cast("Magic Arrow", 'finditem')
            uo.attack('finditem')
         else
            uo.ignore('finditem')
         end if
      else
         uo.findtype('0x0191', -1, 'ground')
         if uo.FindCount() then
            if UO.GetNotoriety('finditem') == 6 then
               Finding=0
               uo.cast("Magic Arrow", 'finditem')
               uo.attack('finditem')
            else
               uo.ignore('finditem')
            end if
         else
            Finding=0
         end if
      end if
   wend
   uo.ignorereset()
end sub


but i want HAS = 1.
i would appreciate your help again.

sincerely
Paulinho.
paulinho4life
Posts: 45
Joined: 2004-07-20 00:14:10

Post by paulinho4life »

up..
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

paulinho4life wrote:up..


ask Experts
Post Reply