ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Xanderyum on January 04, 2014, 11:19:38 AM

Title: How to share the same attack last ID or something like that???
Post by: Xanderyum on January 04, 2014, 11:19:38 AM
Hello!

I'm wondering how to make two clients attack the same thing, but directly, how to make my slave toon attack the same thing my primary toon is attacking.  I know I could make it attack specific things, such as find ID xxx attack that ID.  But, I'd really like my slave to see that I attacked a specific mob, or grey or red toon, and do the same.  Mostly, the idea is to kill mobs twice as fast.

after I get this, then I'll tackle xhealing, dual recalling to locations, and a hot key to start and stop the script together.

My end game, is to be able to attack daemons or dragons at the same time, with out my slave deciding it wants to aggro a mob that hasn't targeted us first.

Is there an uncomplicated way to achieve this?

Cheers!

P.S. If you feel that giving me the "answer" is too easy, please point me in the right direction, so that I can try and figure it out.  I understand some things are scripters trade secrets, and I'm not trying to steal your ideas.
Title: Re: How to share the same attack last ID or something like that???
Post by: dxrom on January 04, 2014, 11:31:00 AM
Global variable.
Title: Re: How to share the same attack last ID or something like that???
Post by: Xanderyum on January 04, 2014, 11:45:32 AM
I have no idea what that is, but will spend this time to find out.  Thanks!!!!
Title: Re: How to share the same attack last ID or something like that???
Post by: TrailMyx on January 04, 2014, 11:45:46 AM
Check out what Cerveza wrote up about the subject:

http://www.scriptuo.com/index.php?topic=1130.30
Title: Re: How to share the same attack last ID or something like that???
Post by: Xanderyum on January 04, 2014, 01:00:10 PM
Stuck at work, but I think I have the idea roughly.

My primary would attack a mob, then find the ID of that last mob attacked and set that ID as a global variable named something like !current_mob.

then my secondary would:

set %current_mob !current_mob
finditem %current_mob
set #ltargetid #findid
event macro 27 0
set !mob_current #false    (to reset it to look for it again and attack it? or should I put that at the top of the Primaries script to reset everytime it goes through the loop again?

can I set a global ID as
Title: Re: How to share the same attack last ID or something like that???
Post by: dxrom on January 04, 2014, 01:17:44 PM
Here is a snippet of what I use to assign global vars. (Which are then read by stealth and handled there.)

Code: [Select]
set *14 0
repeat
  onhotkey 1
    gosub SetTarget
until #false

sub SetTarget
 set #TargCurs 1
 targ:
 if #TargCurs = 1
   goto targ
   
 set *13 #LTargetID
return

That 14 lines of code is literally all I use EUO for anymore :>