ScriptUO

Official ScriptUO EasyUO Scripts => Site Scripter Libraries => 12TimesOvers' Script Library => Topic started by: 12TimesOver on June 02, 2009, 12:40:38 PM

Title: XIIxOveR's Justice League
Post by: 12TimesOver on June 02, 2009, 12:40:38 PM
Code: [Select]
;===========================================
; Script Name: XIIxOver's Justice League
; Author: XIIxOveR
; Version: 1.1 Public
; Shard OSI/FS: OSI
; Revision Date: 12-July-2008
; Purpose: AFK Justice Gainer with Two Accounts
;===========================================

Current Public Version: 1.1

Description
Gain Justice on one or more accounts while AFK.

Notes
1) This pair of scripts must be run on the same PC with 2 (or more if more than one blue account) Client.exe instances running. This is because they communicate by way of the persistent variable *XIIxResBotDead to determine the status of the red.
2) Recommend running with chars in a house and the blue/s a couple of tiles away from the red to avoid being interrupted. Script will pathfind to and from the red to res.
3) You can only gain Justice from the same red once every 7 minutes, this script will wait between 7 and 7.5 minutes (randomized) between kill attempts.
4) This script uses Magery however Eval is not required (Mindblast 4tw). However, you must have enough Magery skill to cast Resurrection somewhat reliably (110 Magery is recommended). There is no skill checking in the script, it is up to you to make sure you have enough magery so that you aren't standing there all day fizzling.
5) This script also assumes you understand the UOXL feature of EasyUO well enough to make sure each tab is set to point to the correct Client.exe instance. UOXL lessons are not provided in this thread!
6) For best results, a Red character with maxed out skill is recommended. The amount of Justice gained per kill is directly related to the number of skill points used by the red.

Instructions
1) Requires 1 red character and 1 or more blue characters all on seperate accounts but on the same PC (or PC instance in the case of Virtual PC's).
2) FIRST - Start "XIIxOveR's Justice League Red" for the red
3) THEN - Start an instance of "XIIxOveR's Justice League Blue" for each blue
Title: Re: XIIxOveR's Justice League
Post by: onlyindreams on January 22, 2010, 02:05:26 PM
I've been trying to figure out how to run this without having the red account. Is there way to make it so you can just run the Blue? I've tried setting basic event macro commands but I can't get the last target to work properly.

Prepare to laugh... This is the code I tried using. Obviously I don't know what I'm doing. What do I need to do differently to make this code work? Before running it I make sure that the red is last target. I put the extra long waits in there because I'm running protection so I don't fizzle standing next to the red.

Code: [Select]
Event macro 15 50  Cast Spell Flame Strike
wait 2s
Event macro 22     Last Target
wait 4s

Event macro 15 50  Cast Spell Flame Strike
wait 2s
Event Macro 22     Last Target
wait 4s

Event macro 15 58 Cast Spell Resurrection
wait 4s
Event Macro 22     Last Target
wait 4s

Event macro 15 58 Cast Spell Resurrection
wait 4s
Event Macro 22     Last Target
wait 430s

repeat
Title: Re: XIIxOveR's Justice League
Post by: Queen of the South on January 30, 2010, 02:42:23 PM
Loving the script m8 awesome time saver just annoyed i didnt  discover it before  doing 2 chars "manually" on my recent return to uo
Title: Re: XIIxOveR's Justice League
Post by: 12TimesOver on January 30, 2010, 03:25:06 PM
Glad you like it!! Just did 2 characters myself the other night in about 3 hours from no Justice to knight!!

Also, for those wondering, if someone uses the red script on a red it will automatically accept res's without the other characters using the blue script. In other words, you should be able to have one red running the red script while as many people as you want stand around killing it and res'ng it over and over.

Just thought that may come in handy for some...

X
Title: Re: XIIxOveR's Justice League
Post by: Hoby on June 03, 2010, 12:12:19 AM
think the gump for rezing is off.  It never clicks it to take the rez


edit: gump contsize is 400_350 and click pos 170 240 is right on the ok button, not sure why its not taking the rez
Title: Re: XIIxOveR's Justice League
Post by: 12TimesOver on June 03, 2010, 04:50:00 AM
think the gump for rezing is off.  It never clicks it to take the rez

I'm not aware that there was a change in the res gump size, have you ruled out any other issues such as making sure that the Justice League Red is definitely running against the red character?

If you've ruled this out already, can you give me the value of #contsize when the res gump is open? I can't actually look at it myself until I get home.

X
Title: Re: XIIxOveR's Justice League
Post by: Hoby on June 03, 2010, 07:18:58 AM
Nevermind, I got it working now.  Thanks for the quick reply.
Title: Re: XIIxOveR's Justice League
Post by: Oracle on June 10, 2010, 06:04:37 PM
12x,

I tried using this tonight and the blue casts Mind Blast once and then pathfinds over to try and rez the red, but he is still alive?  Started the redfirst, then the blue...

Title: Re: XIIxOveR's Justice League
Post by: manwinc on June 16, 2010, 04:45:54 PM
Its actually closer to a 5s wait time between justice gains. I put it at 330s just to be safe. working like a charm man thanks!
Title: Re: XIIxOveR's Justice League
Post by: Adenocard on June 28, 2010, 07:01:31 AM
Nice script it was touch and go at first, but a lil working on where i put the characters and all that.  But in the end worked wonderfully, thanks a ton made it so easy for me
Title: Re: XIIxOveR's Justice League
Post by: 12TimesOver on June 28, 2010, 07:19:25 AM
Thx for the feedback. Yeah there are some interesting things that can happen depending on the kind of house, what floor you're on, what kind of stuff might be in the way, etc. I wanted to keep it simple which means not necessarily foolproof. Glad you got it figured out!

X
Title: Re: XIIxOveR's Justice League
Post by: Cerveza on June 28, 2010, 07:32:39 AM
It'd be very easy to make this a single script and use UOXL to swap between clients....

Code: [Select]
namespace Global 12XO1

gosub setID Blue
set !blue #Result
gosub setID Red
set !red #Result

;Main Loop ; your mainloop
Repeat  
   gosub Kill
   gosub Path2Red
   gosub Res
   gosub Path2Start
   gosub swap_client !red ; swaps to the red char
   gosub red_script ; put the entire red accepting rez script in this sub
   gosub swap_client !blue ; swaps back to the blue char
   wait 420s 30s
Until #FALSE

;**************************
; %1 = name of target to id
Sub setID
  display OK Target your %1 now
  set #targCurs 1
  while #targCurs = 1
    wait 0
Return #ltargetID

;************
; %1 = charID
sub swap_client
  repeat
    {
      uoxl swap
      wait 10
    }
  until #charID = %1
return

Just for your consideration ;)
Title: Re: XIIxOveR's Justice League
Post by: Cerveza on October 04, 2010, 05:50:39 PM
#charGhost doesn't work on gargoyles. Here's what I did to the RED's script...

changed
Code: [Select]
   if #charghost = yes
to
Code: [Select]
  if #HITS = 0
Title: Re: XIIxOveR's Justice League
Post by: 12TimesOver on October 05, 2010, 05:52:59 AM
#charGhost doesn't work on gargoyles. Here's what I did to the RED's script...

changed
Code: [Select]
   if #charghost = yes
to
Code: [Select]
  if #HITS = 0
Good call Cerv, thanks I didn't know that.

I have some updates to do, been addicted to Minecraft for about a week now LOL.

X
Title: Re: XIIxOveR's Justice League
Post by: Endless Night on October 05, 2010, 08:27:39 AM
#charGhost doesn't work on gargoyles. Here's what I did to the RED's script...

you have got to be kidding me.
Title: Re: XIIxOveR's Justice League
Post by: manwinc on October 05, 2010, 09:39:07 AM
LOLS
Title: Re: XIIxOveR's Justice League
Post by: 12TimesOver on October 05, 2010, 10:16:31 AM
#charGhost doesn't work on gargoyles. Here's what I did to the RED's script...

you have got to be kidding me.
That's because gargoyles never die.......they just...well, you know the rest.

X
Title: Re: XIIxOveR's Justice League
Post by: UOMaddog on June 20, 2011, 09:36:39 PM
Just used this today to gain...one thing I thought of, wait to rez the person until the timer is up, that way they don't regen much in terms of HP!
Title: Re: XIIxOveR's Justice League
Post by: 12TimesOver on June 21, 2011, 04:24:05 AM
Just used this today to gain...one thing I thought of, wait to rez the person until the timer is up, that way they don't regen much in terms of HP!
That's actually a great idea!

X
Title: Re: XIIxOveR's Justice League
Post by: onlyindreams on June 23, 2011, 01:41:15 PM
#charGhost doesn't work on gargoyles. Here's what I did to the RED's script...

changed
Code: [Select]
  if #charghost = yes
to
Code: [Select]
 if #HITS = 0

I added this edit to the red script and it definitely made my blue human kill my red gargoyle. Except now I'm having an issue where my blue keeps trying to rez the red even though he's already alive! I've tried adding the same change (except 1hp) to the blue script in the rez sub, which didn't work. Any suggestions?


EDIT
As a little experiment I just started to kill my red immediately after rez'ing. Each time, no matter how long in between kills it says "You have gained in Justice". However, I don't always get the dot. I just have two dots after 6 kills. Are gargoyles just that bugged or is there something more to it?
Title: Re: XIIxOveR's Justice League
Post by: UOMaddog on June 23, 2011, 02:00:12 PM
The amount you gain varies based on the number of skill points (obviously a fully templated char at the 720 skill cap is best) of the red. You don't always gain a full dot so more than likely you're gaining roughly 80% of a dot which makes it seem like every once in awhile you don't gain, but you really do!
Title: Re: XIIxOveR's Justice League
Post by: onlyindreams on June 23, 2011, 09:32:44 PM
Thanks Maddog! I heard before that it was based on skill points but thought it was just a rumor. Thanks for confirming!
Title: Re: XIIxOveR's Justice League
Post by: Paulonius on August 29, 2011, 03:26:16 PM
I wonder why not just use a global variable for your ResBotDead value?  Would make it so that you don't need to run the scripts with razor...
Title: Re: XIIxOveR's Justice League
Post by: 12TimesOver on August 30, 2011, 04:54:40 AM
I wonder why not just use a global variable for your ResBotDead value?  Would make it so that you don't need to run the scripts with razor...
I have absolutely no idea what you're talking about Paulo ROFL!! :D Why would you have to run the script with Razor?? It uses a persistent variable to determine when it's dead and needs to be res'd by the "Blue" script.

X
Title: Re: XIIxOveR's Justice League
Post by: Paulonius on August 31, 2011, 04:03:20 AM
I must be missing something, I will go back and try to set it up again.  When I read the instructions it said I ought to use razor or UOXL.  I am wondering if my issue was that I had other iterations of UO open in addition to the two I was using.  I will try it with just two and see if that was my issue.
Title: Re: XIIxOveR's Justice League
Post by: 12TimesOver on August 31, 2011, 08:31:45 AM
I must be missing something, I will go back and try to set it up again.  When I read the instructions it said I ought to use razor or UOXL.  I am wondering if my issue was that I had other iterations of UO open in addition to the two I was using.  I will try it with just two and see if that was my issue.
Ahhh, gotcha - that was actually just meaning to dual-client on one machine. It does sound confusing now that you don't need 3rd party tools to dual-client anymore. I'm removing that from the instructions!

X
Title: Re: XIIxOveR's Justice League
Post by: Endless Night on August 31, 2011, 09:44:29 AM
I played/wrote a script like this once... but i did it as a single script that would just client swap between each char...

Don't know why i'm throwing that out their as if its not broken then don't fix it.
Title: Re: XIIxOveR's Justice League
Post by: 12TimesOver on August 31, 2011, 10:27:54 AM
I played/wrote a script like this once... but i did it as a single script that would just client swap between each char...

Don't know why i'm throwing that out their as if its not broken then don't fix it.

I must have known that so I wanted to do something different ;)

Title: Re: XIIxOveR's Justice League
Post by: Cerveza on August 31, 2011, 10:29:01 AM
EN, I did the same thing, but then went back to a separate script format because it kept switching to my third client that I was actually running.

I *could* have had it choose which clients were going to be doing the justice, then skip over any other clients I suppose...
Title: Re: XIIxOveR's Justice League
Post by: Goliath on September 15, 2011, 04:59:43 PM
Just used this and it worked flawlessly.  Great script.. Thanks!
Title: Re: XIIxOveR's Justice League
Post by: 12TimesOver on September 16, 2011, 06:47:36 AM
Just used this and it worked flawlessly.  Great script.. Thanks!
Awesome, thanks much for the feedback! Glad it worked out for ya.

X
Title: Re: XIIxOveR's Justice League
Post by: Crisis on January 29, 2016, 08:42:55 PM
Another awesome script! It still works like a charm, thanks 12X!
Title: Re: XIIxOveR's Justice League
Post by: 12TimesOver on January 30, 2016, 01:39:57 AM
Cool! Glad to see someone getting use out of this one :)
Title: Re: XIIxOveR's Justice League
Post by: Hoby on January 30, 2016, 10:03:34 PM
I just used this yesterday.  Gem of a script!
Title: Re: XIIxOveR's Justice League
Post by: Hoby on November 09, 2019, 05:25:56 PM
ok tried it tonight, the blue kills the red, red dies, but blue keeps casting spell over and over.  never recognizes that the red had died.  Anyone one else have this issue?  Both char status bars are uo. 
Title: Re: XIIxOveR's Justice League
Post by: The Ghost on November 10, 2019, 07:42:39 AM
I just notice that the #CHARGHOST  stay at no  event if you are dead. 
Event Version 333 have this issue.
We will need to scan for Ghost now.
Title: Re: XIIxOveR's Justice League
Post by: Gaderian on November 10, 2019, 07:50:38 AM
euo 1.6.0.334: just tested this and #charghost = yes if dead; = no if alive.

Are you seeing something different?

Gaderian
Title: Re: XIIxOveR's Justice League
Post by: The Ghost on November 10, 2019, 08:27:50 AM
I use my gargoyle and notice change in the status for me.     

Ok so now as a elf. #CHARGHOST = yes
sonce again Gargoyle have no love :)

anyhow  this is what I did to get to work   this is just a quick fix for the red.

Quote
repeat
   if #HITS = 0 ; if #charghost = yes
     {
      set *XIIxResBotDead #TRUE
      msg OooOooO$
      wait 2s
      }
  if #HITS > 1 ; if #charghost = no
         set *XIIxResBotDead #FALSE
   While #ContSize = 400_350
      {
      Click 170 240 f
      Wait 3s  ; was 2
     if #HITS > 1 ; if #charghost = no
         set *XIIxResBotDead #FALSE
      }
Until #FALSE
Title: Re: XIIxOveR's Justice League
Post by: Gaderian on November 10, 2019, 06:28:48 PM
I rarely play dead gargoyles.  ::)

Looks like it has always been true that dead gargoyles do not honor the #charghost value in EUO. Someone posted that it can be true that #hits = 0, but you are alive. I imagine that is true either for only a moment as you are near death. ;)

#HITS is only updated when the status bar is open for the character. However, #CHARTYPE is updated regardless of the the status bar gump being open - which gives an option for other situations when #CHARGHOST has been depended upon. Here is an alternative to the #HITS test using #CHARTYPE that would need to be updated if another race is ever added to UO:
Code: easyuo
  1. repeat
  2.  if _ , #chartype , _ in _KS_JS_ZU_KV_HDB_IDB_ ; if #charghost = yes
  3.   {
  4.   set *XIIxResBotDead #TRUE
  5.   msg OooOooO$
  6.   wait 2s
  7.   }
  8.  else
  9.   set *XIIxResBotDead #FALSE
  10.  while #ContSize = 400_350
  11.   {
  12.   Click 170 240 f
  13.   Wait 3s ; was 2
  14.   if _ , #chartype , _ notin _KS_JS_ZU_KV_HDB_IDB_ ; if #charghost = no
  15.    set *XIIxResBotDead #FALSE
  16.   }
  17. until #FALSE

Looking at the EUO Pascal code, there are 4 tests that can set #charghost to YES. My guess is that these 4 conditions are the Human/Elf and Male/Female conditions.

Anyway this is another option to determine ghost or not.

Gaderian
Title: Re: XIIxOveR's Justice League
Post by: Piller on March 09, 2023, 11:26:44 AM
with 2 humans still running great.

As said before will not work with a gargoil red. I really start to reading more into comments before turning my imbuer red  :-\\
Title: Re: XIIxOveR's Justice League
Post by: 12TimesOver on March 09, 2023, 03:59:35 PM
I really start to reading more into comments before turning my imbuer red  :-\\
:o  :laugh: :laugh: :laugh: :laugh: