[EasyUO]Hotkey - Weapon-Svitch-Inator! - Now v1.35

If you make a Client-side script you can publish it here for other players to use
Locked
User avatar
Yoda
Legendary Scribe
Posts: 813
Joined: Thu Feb 24, 2011 11:38 am
Location: Canada

[EasyUO]Hotkey - Weapon-Svitch-Inator! - Now v1.35

Post by Yoda »

ok this one is goofy, all my weapons are one handed but I like to switch them and am lazy, so I made a hotkey to manage it for me, it is required that the weapons are in a subcontainer of some sort id'd as weaponLuggage, the first thing the script does is open said bag, so if before you start switching weaps you move it somewhere nice, and leave it open it won't reopen said bag but will continue to function (hohoho sophistication!) otherwise you need the id's of the weapons and the shield and to edit the hotkeys used if you don't like shift + f1 - f4... And as my lag may be different then your lag you may have to adjust the static delays from wait 6 to something greater..

anyway it is one big kludge start to finish, and I am releasing this along with the other scripts tonite, welcoming remixes and improvements to my more or less "concept sketches that happen to work in spite of themselves"

as this is doing complicated stuff its best to switch weapons when not surrounded by monsters etc and not in the middle of a pile of spellspam etc, use common sense and it works pretty well for a hunk of rubbish

also please note to equip your first weapon configuration before switching setups otherwise the script goes crazy mainly because I am a lazy pratt who is fine with putting on the first config before using the hotkeys, and didn't write a proper initialization so that it doesn't blow up.

Code: Select all

;Weapon-Svitch-Inator! v1.36 - Lovingly Hacked together with paperclips and sticky tape by Yoda
;I apologize as always for horrible psychological scarring from reading what is likely clumsy smashmouth scripting
;revision v1.36 tweaked speed again so there is less hammering rearmer
;Todo for next update: clean this up to one subbie with arguements
;revusuib v1.35 tweaked speed for MOAR reliabilty and not hammering Rearmer
;revision v1.0 - 1.25 MOAR SPEED!!

set %shield  AZQYKQD  ; Set the id of your shield
set %weapon1 EBOORND  ; Set the id of your weapon
set %weapon2 VSXKZVD  ; Set the id of your other weapon
set %weapon3 REEXIUD  ; Set the id of your other weapon
set %weapon4 GVRZROD  ; Set the id of your other weapon
set %weapon5 LDSGWMD  ; Set the id of your other weapon
set %weaponLuggage  KCYNZQD ; ID of Blessed Bag
set %curWeap %weapon1

Begin:
set #lObjectID %weaponLuggage
      event macro 17 0
      wait 1s

HotKeyLoop:

OnHotKey f1 shift
gosub Switcheroo1
OnHotKey f2 shift
gosub Switcheroo2
OnHotKey f3 shift
gosub Switcheroo3
OnHotKey f4 shift
gosub Switcheroo4
OnHotKey f5 shift
gosub Switcheroo5
GOTO HotKeyLoop

sub Switcheroo1
{
     {
      exevent drag %curWeap
      wait 11
      exevent dropc %weaponLuggage
      wait 11
      exevent drag %shield
      wait 11
      exevent dropc %weaponLuggage
      wait 11
      event exmsg #charid 3 0 Pike Of The Jedi!
      exevent drag %weapon1
      wait 11
      exevent droppd
      wait 11
      exevent drag %shield
      wait 11
      exevent droppd
      wait 11
      set %curWeap %weapon1
      event exmsg #charid 3 0 Mischeif Managed!
         }
   return True
}
return False
sub Switcheroo2
{
        {

      exevent drag %curWeap
      wait 11
      exevent dropc %weaponLuggage
      wait 11
      exevent drag %shield
      wait 11
      exevent dropc %weaponLuggage
      wait 11
      event exmsg #charid 3 0 A Light Axe?
      exevent drag %weapon2
      wait 11
      exevent droppd
      wait 11
      exevent drag %shield
      wait 11
      exevent droppd
      wait 11
      set %curWeap %weapon2
      wait 11
      event exmsg #charid 3 0 Mischeif Managed!

         }
   return True
}
return False

sub Switcheroo3
{
    {

      exevent drag %curWeap
      wait 11
      exevent dropc %weaponLuggage
      wait 11
      exevent drag %shield
      wait 11
      exevent dropc %weaponLuggage
      wait 11
      event exmsg #charid 3 0 A Jedi Master's Bow!
      exevent drag %weapon3
      wait 11
      exevent droppd
      wait 11
      exevent drag %shield
      wait 11
      exevent droppd
      wait 11
      set %curWeap %weapon3
      wait 11
      event exmsg #charid 3 0 Mischeif Managed!
         }
   return True
}
return False

sub Switcheroo4
{
    {

      exevent drag %curWeap
      wait 11
      exevent dropc %weaponLuggage
      wait 11
      exevent drag %shield
      wait 11
      exevent dropc %weaponLuggage
      wait 11
      event exmsg #charid 3 0 LightSaber Version Two!
      exevent drag %weapon4
      wait 11
      exevent droppd
      wait 11
      exevent drag %shield
      wait 11
      exevent droppd
      wait 11
      set %curWeap %weapon4
      wait 11
      event exmsg #charid 3 0 Mischeif Managed!
         }
   return True
}
return False

sub Switcheroo5
{

    {
      exevent drag %curWeap
      wait 11
      exevent dropc %weaponLuggage
      wait 11
      exevent drag %shield
      wait 11
      exevent dropc %weaponLuggage
      wait 11
      event exmsg #charid 3 0 Blaze Of Yoda!
      exevent drag %weapon5
      wait 11
      exevent droppd
      wait 11
      exevent drag %shield
      wait 11
      exevent droppd
      wait 11
      set %curWeap %weapon5
      wait 11
      event exmsg #charid 3 0 Mischeif Managed!

         }
   return True
}
return False

Last edited by Yoda on Thu Mar 20, 2014 8:12 am, edited 3 times in total.
Guildmaster: JDI - Est 2011
User avatar
Yoda
Legendary Scribe
Posts: 813
Joined: Thu Feb 24, 2011 11:38 am
Location: Canada

Re: [EasyUO]Hotkey - Weapon-Svitch-Inator!

Post by Yoda »

off to bed currently this script will cause devlin-rearmer 6'2 to stop switching specials (aside from counter attack and mortal strike) after switching a weap.. over 50% of the time this I must fix, but how I dunno
Guildmaster: JDI - Est 2011
User avatar
Yoda
Legendary Scribe
Posts: 813
Joined: Thu Feb 24, 2011 11:38 am
Location: Canada

Re: [EasyUO]Hotkey - Weapon-Svitch-Inator! - Now v1.35

Post by Yoda »

yeah my "speed tweak messed it up" it didn't give any breathing room for rearmer to assert itself so changing the delays was all that was needed to fix, the 2 scripts SEEM to play nice together now, what I would actually like to do is call rearmer after each weapon quips to set the best default special for each weapon but not sure script to script communications is possible and simply driving it by causing the script to throw the hotkey didn't work
Guildmaster: JDI - Est 2011
vempa
Expert Scribe
Posts: 35
Joined: Thu Apr 04, 2013 7:31 pm

Re: [EasyUO]Hotkey - Weapon-Svitch-Inator! - Now v1.35

Post by vempa »

Code: Select all

menu Clear
menu Window Title Weapon Switcher
menu Window Color $CCCCCC
menu Window Size 370 120
menu Font BGColor $463228
menu Font Color White
menu Button Wep1 20 15 70 25 Weapon1
menu Button Wep2 120 15 70 25 Weapon2
menu Button Wep3 20 75 70 25 Weapon3
menu Button Wep4 120 75 70 25 Weapon4
menu Show 100 200
Set #menubutton n/a

if #menubutton <> n/a
{
   if Wep in #menubutton
   {
      str right #menubutton 1
      gosub SwitchToWep #StrRes
   }
   if Close in #menubutton
      halt
}

Locked