[EasyUO] Gambit: Chiv Spells (adding more stuff soon)

If you make a Client-side script you can publish it here for other players to use
Locked
User avatar
Devlin
Legendary Scribe
Posts: 652
Joined: Thu Mar 18, 2010 12:50 pm

[EasyUO] Gambit: Chiv Spells (adding more stuff soon)

Post by Devlin »

Gambit has been added back into Rearmer 7.03. I will not be updating this further most likely. Rearmer can be found at http://www.uoex.net/forum/viewtopic.php ... 660#p29212


Read on to figure out what the script does, how to set it up, and tips on how to use it properly.

Functions
Pause/Play: Pausing will stop casting spells. This includes Consecrate Weapon and Enemy of One.
Auto-casts Divine Fury: Will cast Divine Fury when you go below 75% Stamina.
Auto-casts Consecrate Weapon: Will recast CW every 10 seconds. Will only cast if you have a weapon equipped.
Auto-casts Enemy of One: IN BETA MODE! Sets a target chosen by you to cast this on/recast when it wears off (only on the set target. If you choose skeletons, it will only recast on skeletons and only once it expires. This feature of only recasting your set target is what is in beta. The timer will stay in even if auto cast goes out.)

Set-Up:
1.) The default Pause button is F4. Default resume is F5. If you leave the defaults, you can leave your in game macros as well, BUT it will cast your in game macro still. If this is annoying to you (my pause is my claim button, so I dont mind) rebind the script '''OR''' your in game macros.
Keys that can be used are A-Z, 0-9, F1-F12 and ESC, BACK, TAB, ENTER, PAUSE, CAPSLOCK, SPACE, PGDN, PGUP, END, HOME, LEFT, RIGHT, UP, DOWN, PRNSCR, INSERT, DELETE, NUMLOCK or SCROLLLOCK.

2.) Enemy of Target hotkey is used to set the target you wish to recast Enemy of One on. Once Enemy of One expires it will recast on any skeleton in range. Pausing stops. To Resume you must retarget.

3. If you use Rearmer and Gambit together, make your Pause/Play buttons the same to stop all spells together. Make them different to have Counter Attack on a different pause then Consc Wep/Enemy of One. Divine Fury is not affected by Pause by default. Ctrl+F "FuryOn" and change the line beneath it.

Tips:
If Enemy of One doesn't target properly: Manually recast Enemy of One and hit the target you want... Sorry. Still in beta, I will find a fix for this. Please report any bugs you notice to Devlin in game. Thank you.

Pausing: All spells are paused upon start. This includes Counter Attack and all Chivalry spells (Consecrate Weapon, Divine Fury, and Enemy of One.) Hitting the Play button will begin auto-smart casting Counter Attack, Consecrate Weapon, and Divine Fury again.
  • Enemy of One will only start AFTER you have selected a target. To stop casting, use your Pause hotkey. To begin recasting
    Enemy of One you must use your Target hotkey and reselect your target again.
Once you run the setup: You can tweak some settings to improve performance. See the section below.

Quick Start-Up: You can remove the screen that pop-ups when you start the script. Ctrl+F "QuickStart" and remove the text between START/END. Now you will no longer have to hit Yes upon startup.

Update List:
-Chivalry spells have been added. Consecrate Weapon, Divine Fury, and Enemy of One can now all be recast as well!
-Switching abilities and weapons is now much smoother. A message has been added to confirm abilities have switched. You still may need to hold the key down slightly. Just don't tap it too quick.
-Momentum Strike (MS) is now 100x times better to use. When you activate Momentum Strike (press the hotkey) the script will only use MS when there are two or more targets within one tile of you. Otherwise it uses your Primary Ability (by default. Secondary Ability can be used if you edit the script.This is is SO much more efficient than the old method, which I don't even want to explain (it's that bad.)

Code: Select all

[b][u][size=150]To-Do List:[/size][/u][/b]
Add: Curse Weapon, Discord, and Auto Attack functions.

[code]; Script: Gambit
; Author: Devlin
; Current Version: 1.01 Beta
; Purpose: Recasts Chivalry Spells.
; To be added: Auto attack, Curse
; Weapon, Discord, and other stuff.
;
;                SET-UP:
; You MUST edit the first 3 hotkeys below!
; Read instructions on the Wiki. Then
; use the comments on each line for help.

               ;        Hotkeys
set %Hold F4   ; Pause hotkey
set %Play F5   ; Play hotkey
set %EOO F6    ; Enemy of One Target hotkey

                    ;         Defaults
set %Sub DivFuryOn ; DivFuryOn/DivFuryOff
set %Sub2 ConWepOff ; ConWepOn/ConWepOff

               ;          Timers
set %T_CW 10   ; Time between Consecrate Wep
               ; casts. CW lasts 5-11 seconds.
               ; Change if you have low karma.
set %T_E 180   ; Time between Enemy of One
               ; casts. EOO lasts 120-230 seconds.
               ; Lower if you don't cast often enough, increase if you cast too soon.
set %pause 40  ; Increase if you spam Divine Fury, shorter if it takes too long to cast (25-50 range)
set %stam 75   ; Change to % Stamina you cast Divine Fury.


;-----------------------------------------------------------
;-----------------------------------------------------------
;    Don't go beyond here without reading the wiki!
;-----------------------------------------------------------
;-----------------------------------------------------------
set %Sub3 TargetOff
set %Sub4 EnemyOff
set %T_E3 11111111111

event sysmessage Consecrate Weapon is on hold. Hit %play to begin casting.
wait 5

loop:
repeat
{
     if #charGhost = NO
     {
     }
     else
     {
          goto loop:
     }

onhotkey %Hold
{
     set %T_Hold #time    ; FuryOn
     ;set %Sub DivFuryOff ; DivFuryOn pauses DF when pause is pressed. To have divine fury always cast, regardless if paused, disable this line.
     set %Sub2 ConWepOff  ; ConWepOn
}
onhotkey %Play
{
     set %Sub DivFuryOn
     set %Sub2 ConWepOn
     event sysmessage Casting has been resumed. Hit %hold to Pause.
}
onhotkey %EOO
{
     set %Sub3 TargetOn
     set %Sub4 EnemyOn
}

;---------------------------------------
;               Functions
;---------------------------------------
gosub %Sub   ; Divine Fury
gosub %Sub2  ; Consecrate Weapon
gosub %Sub3  ; Enemy of One Target Select(1/2)
gosub %Sub4  ; Enemy of One Auto Recast  (2/2)
;---------------------------------------
;
;---------------------------------------

}
until ( #mana <=  %mana )
{
     event sysmessage You are out of Mana
     wait 2s
}
goto loop:

sub DivFuryOn
if ( #stamina * 100 ) / #maxstam <= %stam && #mana > 10 && #charghost = no && h notin #charstatus
{
     wait 10
     event macro 15 205
     wait 25 + %pause
}
else
{
}
return

sub DivFuryOff
return

sub ConWepOn
if #mindmg > 10 && #targcurs = 0 && ( #stamina * 100 ) / #maxstam >= %stam && #mana > 10 && ( H notin #charstatus )
{
         if ( #time > ( %T_CW + %T_Play ) )
         {
         wait 1
         set %T_Play #time
         event macro 15 203
         wait 1

         }
         else
         {
         }
}
else
{
}
return

sub ConWepOff
set %T_Hold2 #time

if ( ( %T_Hold2 - %T_Hold ) < 5 )
{
     event sysmessage Casting is now Paused. Please hit %play to resume casting.
     wait 4s  ; Make longer if Pause message is spammed
}
else
{
}
return

sub TargetOn
set #targcurs 1
while #targcurs = 1
{
wait 1
}
set %T_E2 #time
Finditem #ltargetid
set %string #findtype
str Left %string 3
set %Etarget #strres
set %Sub3 TargetOff
return

sub TargetOff
return

sub EnemyOn
if #targcurs = 0 && ( H notin #charstatus ) && #charghost = no && #mana > 15
{
     if ( #time < %T_E2 + 3 ) || ( #time > ( %T_E + %T_E3 ) )
     {  ; time < hotkey time + 3, first cast. OR time > wait + hotkey, recasts
          Finditem %Etarget G_5
          wait 1

          if #Findcnt > 0 && #targcurs = 0 && ( H notin #charstatus )
          {
               wait 15
               event macro 15 206
               wait 15
               set #ltargetid #Findid
               event macro 27 0
               set %T_E3 #time
               wait 40
          }
          else
          {
          }
     }
     else
     {
     }


     if ( #time => ( %T_E + %T_E3 - 2 ) ) && ( #time < ( %T_E + %T_E3 ) )
     {  ; time > wait + last cast. Two second span.
          event sysmessage Enemy of One will expire shortly.
          wait 1s
     }
     else
     {
     }

}
else
{
}
return

sub EnemyOff
return

sub Settings
savePix *PrimX *PrimY 1
savePix *SecX *SecY 2
savePix *MSX *MSY 3
set *Save 1
return



sub Setup

     display Please Move your Mouse over the Primary Ability Icon. You have 3 seconds to do so.
     wait 3s
     set *PrimX #CURSORX
     set *PrimY #CURSORY

     display Please Move your Mouse over the Secondary Ability Icon. You have 3 seconds to do so.
     wait 3s
     set *SecX #CURSORX
     set *SecY #CURSORY

     display Please Move your Mouse over the Momentum Strike Ability Icon. You have 3 seconds to do so.
     wait 3s
     set *MSX #CURSORX
     set *MSY #CURSORY

     display Please Move your Mouse over the Counter Attack Ability Icon. You have 3 seconds to do so. If you aren't using Counter Attack... Just hit okay/wait. Doesn't really matter.
     wait 3s
     set *CountX #CURSORX
     set *CountY #CURSORY


display The script is now ready to run. To switch which ability is active, simply press your hotkey for that ability (You may need to hit it twice)
return
Last edited by Devlin on Wed Oct 28, 2015 7:11 pm, edited 1 time in total.
Resident Wiki Editor/Village Idiot

EasyUO Scripts
ReArmer
ReArmer (Old Version)
ReReader
Separate Journal for Guild or Public Chat (Old)
---------------------------------------------
Combat Focus Guide (Godmode Formula)
User avatar
Yoda
Legendary Scribe
Posts: 813
Joined: Thu Feb 24, 2011 11:38 am
Location: Canada

Re: [EasyUO] Gambit: Chiv Spells (adding more stuff soon)

Post by Yoda »

great script devlin...

I made it into a gui toolbar, in addition to the hotkeys, on my own system I disabled the hotkeys due to collision with ingame macros I had set

but thought some people may like it with buttons
The Devlin-Gambit-Gui Remix

Code: Select all

[b][u][size=150]To-Do List:[/size][/u][/b]
Add: Curse Weapon, Discord, and Auto Attack functions.

[code]; Script: Gambit
; Author: Devlin
; Current Version: 1.01 Beta
; Purpose: Recasts Chivalry Spells.
; To be added: Auto attack, Curse
; Weapon, Discord, and other stuff.
;
;                SET-UP:
; You MUST edit the first 3 hotkeys below!
; Read instructions on the Wiki. Then
; use the comments on each line for help.

               ;        Hotkeys
set %Hold F4   ; Pause hotkey
set %Play F5   ; Play hotkey
set %EOO F6    ; Enemy of One Target hotkey

                    ;         Defaults
set %Sub DivFuryOn ; DivFuryOn/DivFuryOff
set %Sub2 ConWepOff ; ConWepOn/ConWepOff

               ;          Timers
set %T_CW 10   ; Time between Consecrate Wep
               ; casts. CW lasts 5-11 seconds.
               ; Change if you have low karma.
set %T_E 180   ; Time between Enemy of One
               ; casts. EOO lasts 120-230 seconds.
               ; Lower if you don't cast often enough, increase if you cast too soon.
set %pause 40  ; Increase if you spam Divine Fury, shorter if it takes too long to cast (25-50 range)
set %stam 75   ; Change to % Stamina you cast Divine Fury.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; GUI-Menu By Yoda
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    menu clear
    set #menubutton none
    menu window transparent 100
    menu window size 189 49
    menu Font Name Gautami
    menu Font Size 8
    menu Font Style b
    menu Font Align Center
    menu Window Title Gambit by Devlin v1.21GUI BETA
    menu Font BGColor $80003f
    menu Font Color White
    menu button hold 0 0 40 20 Hold
      menu Font BGColor $70002f
      menu Font Color White
    menu button play 40 0 40 20 Play
      menu Font BGColor $60001f
      menu Font Color White
    menu button eeo 80 0 109 20 Enemy Of 1 Target


     menu Image Create test 0 20 252 38
    menu Image File test 0 0 gambit.jpg
              ;
    menu show
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;-----------------------------------------------------------
;-----------------------------------------------------------
;    Don't go beyond here without reading the wiki!
;-----------------------------------------------------------
;-----------------------------------------------------------
set %Sub3 TargetOff
set %Sub4 EnemyOff
set %T_E3 11111111111

event sysmessage Consecrate Weapon is on hold. Hit %play to begin casting.
wait 5

loop:
repeat
{
     if #charGhost = NO
     {
     }
     else
     {
          goto loop:
     }


if #menubutton = hold
    {
      set %T_Hold #time
      set %Sub2 ConWepOff
     set #menubutton none
    }
    
if #menubutton = play
    {
     set %Sub DivFuryOn
     set %Sub2 ConWepOn
     event sysmessage Casting has been resumed. Hit Hold to Pause.
     set #menubutton none
    }

if #menubutton = eoo
{
    set %Sub3 TargetOn
     set %Sub4 EnemyOn
     set #menubutton none
    }
    


;---------------------------------------
;               Functions
;---------------------------------------
gosub %Sub   ; Divine Fury
gosub %Sub2  ; Consecrate Weapon
gosub %Sub3  ; Enemy of One Target Select(1/2)
gosub %Sub4  ; Enemy of One Auto Recast  (2/2)
;---------------------------------------
;
;---------------------------------------

}
until ( #mana <=  %mana )
{
     event sysmessage You are out of Mana
     wait 2s
}
goto loop:

sub DivFuryOn
if ( #stamina * 100 ) / #maxstam <= %stam && #mana > 10 && #charghost = no && h notin #charstatus
{
     wait 10
     event macro 15 205
     wait 25 + %pause
}
else
{
}
return

sub DivFuryOff
return

sub ConWepOn
if #mindmg > 10 && #targcurs = 0 && ( #stamina * 100 ) / #maxstam >= %stam && #mana > 10 && ( H notin #charstatus )
{
         if ( #time > ( %T_CW + %T_Play ) )
         {
         wait 1
         set %T_Play #time
         event macro 15 203
         wait 1

         }
         else
         {
         }
}
else
{
}
return

sub ConWepOff
set %T_Hold2 #time

if ( ( %T_Hold2 - %T_Hold ) < 5 )
{
     event sysmessage Casting is now Paused. Please hit Play to resume casting.
     wait 4s  ; Make longer if Pause message is spammed
}
else
{
}
return

sub TargetOn
set #targcurs 1
while #targcurs = 1
{
wait 1
}
set %T_E2 #time
Finditem #ltargetid
set %string #findtype
str Left %string 3
set %Etarget #strres
set %Sub3 TargetOff
return

sub TargetOff
return

sub EnemyOn
if #targcurs = 0 && ( H notin #charstatus ) && #charghost = no && #mana > 15
{
     if ( #time < %T_E2 + 3 ) || ( #time > ( %T_E + %T_E3 ) )
     {  ; time < hotkey time + 3, first cast. OR time > wait + hotkey, recasts
          Finditem %Etarget G_5
          wait 1

          if #Findcnt > 0 && #targcurs = 0 && ( H notin #charstatus )
          {
               wait 15
               event macro 15 206
               wait 15
               set #ltargetid #Findid
               event macro 27 0
               set %T_E3 #time
               wait 40
          }
          else
          {
          }
     }
     else
     {
     }


     if ( #time => ( %T_E + %T_E3 - 2 ) ) && ( #time < ( %T_E + %T_E3 ) )
     {  ; time > wait + last cast. Two second span.
          event sysmessage Enemy of One will expire shortly.
          wait 1s
     }
     else
     {
     }

}
else
{
}
return

sub EnemyOff
return

sub Settings
savePix *PrimX *PrimY 1
savePix *SecX *SecY 2
savePix *MSX *MSY 3
set *Save 1
return



sub Setup

     display Please Move your Mouse over the Primary Ability Icon. You have 3 seconds to do so.
     wait 3s
     set *PrimX #CURSORX
     set *PrimY #CURSORY

     display Please Move your Mouse over the Secondary Ability Icon. You have 3 seconds to do so.
     wait 3s
     set *SecX #CURSORX
     set *SecY #CURSORY

     display Please Move your Mouse over the Momentum Strike Ability Icon. You have 3 seconds to do so.
     wait 3s
     set *MSX #CURSORX
     set *MSY #CURSORY

     display Please Move your Mouse over the Counter Attack Ability Icon. You have 3 seconds to do so. If you aren't using Counter Attack... Just hit okay/wait. Doesn't really matter.
     wait 3s
     set *CountX #CURSORX
     set *CountY #CURSORY


display The script is now ready to run. To switch which ability is active, simply press your hotkey for that ability (You may need to hit it twice)
return
didn't do much else other than make a little toolbar remote control save the image below in the same directory as your script to complete the widget
Attachments
banner for menuwindow
banner for menuwindow
gambit.jpg (29.23 KiB) Viewed 6838 times
Guildmaster: JDI - Est 2011
User avatar
Yoda
Legendary Scribe
Posts: 813
Joined: Thu Feb 24, 2011 11:38 am
Location: Canada

Re: [EasyUO] Gambit: Chiv Spells (adding more stuff soon)

Post by Yoda »

bump
Guildmaster: JDI - Est 2011
jdlindberg89
Passer by
Posts: 2
Joined: Tue Aug 19, 2014 9:58 am

Re: [EasyUO] Gambit: Chiv Spells (adding more stuff soon)

Post by jdlindberg89 »

Let me start off by saying I have no idea how to code using easyuo. I have been playing around with this script a little this morning and I can get it all to work except for the divine fury. It will only cast if I set the stam% to 100 then it just spams it until I am out of Mana. Why not put the divine fury on a variable timer like concrete wep is?
User avatar
Devlin
Legendary Scribe
Posts: 652
Joined: Thu Mar 18, 2010 12:50 pm

Re: [EasyUO] Gambit: Chiv Spells (adding more stuff soon)

Post by Devlin »

The divine fury aspect of the script is only to replenish stamina so as to not lose swing speed. If you wanted the script to cast DF on a timer like CW you could copy the CW subs and modify the variables to new stuff for DF, so you can cast that on a timer as well (or instead of when you dip below 70% stam, which is what the script is designed to do.)
Resident Wiki Editor/Village Idiot

EasyUO Scripts
ReArmer
ReArmer (Old Version)
ReReader
Separate Journal for Guild or Public Chat (Old)
---------------------------------------------
Combat Focus Guide (Godmode Formula)
Locked