Auto Attack script

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
motxu
Posts: 48
Joined: 2005-04-13 16:01:09
Contact:

Auto Attack script

Post by motxu »

I would like to auto cast Im Por Ylem to any player that appears in my screen when y run the script
thanks
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

There are two types of people in UO without races. That's woman's and man's type us usually.

Use them in array and if it'd be found on the sreen( change by set finddistance ), then get this id by uo.GetSerial('finditem') and cast what d'u want.
motxu
Posts: 48
Joined: 2005-04-13 16:01:09
Contact:

Post by motxu »

uo.say("Hey BltCh! get out my way!")
var i
DIM t[2]
t[0] = "0x0191"
t[1] = "0x0190"
uo.ignore( "self" )
UO.Set("finddistance","20")
for i = 0 to 1
uo.findtype( t[i] , -1 , "ground" )
if uo.FindCount() then
uo.attack( "finditem" )
uo.cast("Weaken","finditem")
wait(3500)
endif
next
wait(500)
End Sub

ok ok, but now imagine i would like to get everybodys serial, any player on screen. How to do that? Thanks :D
Sanch
Posts: 308
Joined: 2005-07-17 15:30:52
Location: www.drw.ru

Post by Sanch »

Code: Select all

sub Spell()
uo.say("Hey BltCh! get out my way!")
var i, m, id
DIM t[2]
t[0] = "0x0191"
t[1] = "0x0190"
uo.ignore( "self" )
UO.Set("finddistance","20")
for i = 0 to 1
  uo.findtype( t[i] , -1 , "ground" )
  if uo.FindCount() then
    id = uo.getserial('finditem')
    uo.print('Aim ID '+id)
    uo.attack( "finditem" )
    uo.deletejournal('The spell fizzles.')
    m = uo.mana
    uo.cast("Weaken","finditem")
    repeat
      wait(100)
    until uo.injournal('The spell fizzles.') or m > uo.mana
  endif
next
End Sub
motxu
Posts: 48
Joined: 2005-04-13 16:01:09
Contact:

Post by motxu »

but that takes only one player serial. i Want everybodys serial
thanks anyway ;)
Sanch
Posts: 308
Joined: 2005-07-17 15:30:52
Location: www.drw.ru

Post by Sanch »

I don't understand you. Do you want to get yourself ID and aim ID or all object around you?
motxu
Posts: 48
Joined: 2005-04-13 16:01:09
Contact:

Post by motxu »

k let me explain.
I just want a macro that gets everybodys serial in my screen.
If there are two people, get both serials and associate them with two label.

person one serial = a
person two serial = b

understand now? :P
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

motxu wrote:k let me explain.
I just want a macro that gets everybodys serial in my screen.
If there are two people, get both serials and associate them with two label.

person one serial = a
person two serial = b

understand now? :P


what to do with those serials ? write somewher down?
motxu
Posts: 48
Joined: 2005-04-13 16:01:09
Contact:

Post by motxu »

imagine im getting ganked by two people.
i run the script and got both serials so i can cast Magic Reflection to both players and make them fizzle their spells. (spells in my shard fizzle if a spell hits u while casting)

understand now? :P
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

motxu wrote:imagine im getting ganked by two people.
i run the script and got both serials so i can cast Magic Reflection to both players and make them fizzle their spells. (spells in my shard fizzle if a spell hits u while casting)

understand now? :P


use your hands for that - it's more faster and there will be no problems with scripts
motxu
Posts: 48
Joined: 2005-04-13 16:01:09
Contact:

Post by motxu »

well , ill use my hands ^^

thanks anyway man, you've been solving nearly all my problems :P
thanks again ;)
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

motxu wrote:well , ill use my hands ^^

thanks anyway man, you've been solving nearly all my problems :P
thanks again ;)

you're welcome :wink:
Mihail
Expert!
Posts: 548
Joined: 2005-05-20 20:30:10
Contact:

Post by Mihail »

Code: Select all

UO.Set("finddistance","20") 

14 tiles - max
motxu
Posts: 48
Joined: 2005-04-13 16:01:09
Contact:

Post by motxu »

and how to find an item with findistance,1. If not found try to find the item in findistance,2. If not found try with findistance,3 etc? ?
thanks ^^
Post Reply