Page 1 of 1

target guilds enemy

Posted: 2004-10-26 01:10:52
by virussino
Hi :)

blank for a long time I try to make a macro for target players enemy, but after months of tests I have lost the hopes

someone could address to me towards the just road?

I have tried with getnotoriety, but on "RunUO Shard" they give many problems to me, it serves to me macro that nameplates single pg of some guilds [ Evils ] or [ Army ] or other and even than nameplates player the more neighbor to me, but he is not indispensable, can be made something?

Code: Select all

sub target() 
var exit = 0
var noto = 0
wait (200)
while (exit <= 10)
exit = exit + 1
uo.press (56) ; target next (8)
wait (300)
noto = UO.GetNotoriety("laststatus")
if ((noto == 6) || (noto == 5) || (noto == 4)) && (uo.GetName("laststatus")) then
  uo.print("TARGET: "+uo.GetName("laststatus"))
  ; uo.attack("laststatus")
  return
 end if
wend 
end sub


this is my macro

the problems are:
1) it takes also pk of my guild
2) often the target remains on my pg
3) if the targetnext the macro passes on my pg goes in tilt
4) uo.GetName("laststatus") it always does not work in correct way


sorry for english, I use translator online :)

tnx ^^

Posted: 2004-10-26 06:53:08
by clagio
you can add a check on the name of the target, so if the name is = to your name, or the name of one pk of your guild, the script go on, with another target next

something like this:

sub target()
var exit = 0
var noto = 0
wait (200)
while (exit <= 10)
exit = exit + 1
uo.press (56) ; target next (8)
wait (300)
noto = UO.GetNotoriety("laststatus")
if ((noto == 6) || (noto == 5) || (noto == 4)) && (uo.GetName("laststatus")) then
if ((UO.GetName"laststatus" == "Your_name") || (UO.GetName"laststatus" == "Pk_guild") then
uo.press (56) ; target next (8)
else
uo.print("TARGET: "+uo.GetName("laststatus"))
uo.attack("laststatus")
return
end if
end if
wend
end sub

Posted: 2004-10-26 08:49:50
by Archangel

Code: Select all

sub attack()
var i=0,isEnemy=0
var enemyID
DIM enemy[2]
    enemy[0] = '0x0190' #male
    enemy[1] = '0x0191' #female
UO.Set("finddistance","12")
UO.IgnoreReset()
UO.Ignore(UO.GetSerial("self")) #ignores you (: becouse sometime it`ll attack u
for i=0 to 1
 UO.FindType(enemy[i],-1,"ground") #search for man or woman
 if UO.FindCount()>0 then
  enemyID=UO.GetSerial("finditem") #object ID of finditem(man or woman)
  if (UO.GetNotoriety(enemyID)>2) then #if object ID not a friend or innocent u`ll attack him
   isEnemy=1
  endif
 endif
next
if (isEnemy==1) or (UO.InJournal("is attacking you!")) then
 UO.ServerPrint("You have a second to get out of here!") #unlucky him (:
 UO.Click(enemyID) #<<
 wait(1000) #<<server responce
 UO.Print(UO.GetName(enemyID)) #<<u`ll get his name only this way
 UO.Attack(enemyID) #attacks enemy
endif
endsub

it should work
about this

Code: Select all

if (UO.GetNotoriety(enemyID)>2) then

you can change some

Code: Select all

if (UO.GetNotoriety(enemyID)>2) then
  UO.Click(enemyID)
  wait(1000)
   if (UO.InJournal("Name of youre murderer friend")) then
    UO.DeleteJournal()
    isEnemy=0
   else
    isEnemy=1
   endif
  endif
 endif
next
if (isEnemy==1) or (UO.InJournal("is attacking you!")) then
 UO.ServerPrint("You have a second to get out of here!") #unlucky him (:
 UO.Click(enemyID)
 wait(1000)
 UO.Print(UO.GetName(enemyID))

Posted: 2004-10-26 22:50:59
by virussino
thanks:D

often it takes pg blue, is normal?
I have fear that getnotoriety not the functions much good on my shard

I can select the player so as to to make to appear the bar of a life under of it, or to take to its bar of the life (Status)?

in place of UO.Attack(enemyID) I would want to only take the target, in order then to use a button with AttackLast ^^

tnx :D

Posted: 2004-10-31 13:47:44
by virussino
tried many things but nobody difficult this works too much macro :|

it would be possible to make macro with targetnext that firm when it finds a player of one guild?

to set up of the variable ones like [ Evils ] and [ KrT ] and to make so that the targetnext make a cycle as in mine macro it only begins them and firm on players of those the two guilds?

it would go to me well even if the targetnext it was not stopped on my companions of guild, therefore in the battles with many players would be the much easiest one to take the target :(

plss :°°°