[EasyUO]Jedi-GinsuInatorV1.85 Hotkey/GUI Driven MultiFunctio
Posted: Thu Mar 20, 2014 10:50 am
ok so I posted those 3 scripts last night and in the process of having a nap i came up with much more I could do plus I realized since they are driven hotkeys, I can put it all in one script and reduce tabs running in easyuo..
its still a little warped in its construction, and there are better ways to do everything within this script
some of them I realize some of them I do not.
Scriptors feel free to update this to perhaps do the following
1. The Weapon Switcher uses 6 subroutines 1 for each weapon, and 1 to initialize get all the weapons in the right place and setup the initial state so that switcher doesn't immediately bug out.. it is a terrifying kludge and is a workaround due to lack of finesse
it should be 2 routines, the initialize and 1 subroutine to switch the weapon using passed arguements instead of 5 that have minute changes, I know this logically I just wasn't confident in the syntax to get it working correctly
2. Currently it will Hammer Re-Armer6.2's primary and secondary functions if the weapon switches when re-armer is doing something, I realize to fix this I have to call re-armer to pause those functions then do the weapon switch, then allow re-armer to resume as it is written now, re-armer has no pause function for that, and I am not confident in using call to accomplish this, once I am I want to do that, and in each weapon configuration be able to set a default mode (primary secondary momentum strike) that suits it, I have not seen any conflicts with gambit as of yet.
3. Like The Weapon Switch Routines The Potion Drinkers could all use the same drink/fill routine with passed arguements see above for why its 3 routines and the special one for poisoning vs 1 routine parsed with args.
4. The pack clean could include Zoogi Fungus and Fertile Dirt I suppose and other things from claim but those are keyable
5. It would be lovely to use a gui that has a small hud with buttons for all of these functions vs hotkeys which feel clumsy and are harder to eat food while using (Lazy I know) but I am even less confident with Gui Functionality
so what it all does, once you have the mountain of id's set this script will do the following
hotkey shift+f12 - Armor Dress
hotkey shift+f11 - ReOpens Weapon Bag if it gets closed accidentally or when switching worlds (needed to keep weapon switches active)
hotkey shift+f10 - Minor Pack cleanup for things additional to gold that are aquired with claim bandies, arrows, and oints
hotkey shift+f1-f5 switches between 5 distinct weapon setups (currently can cause re-armer6.2 to need to be restarted)
hotkey shift+f6 - if an infecting strike weapon is quiped it will poison it and refill the poison
hotkey shift+f7 - dequips shield, drinks greater strength pot requips shield refills potion
hotkey shift+f8 - dequips shield, drinks greater agility pot requips shield refills potion
hotkey shift+f9 - dequips shield, drinks total refresh pot requips shield refills potion
hotkey alt+1 switches out robe for invisibility shroud (harry potter mode On)
hotkey alt+2 switches out invisibility shroud for robeitem (harry potter mode Off)
*additional notes/quirks
- initially the weapon bag is opened, it must stay open for things to work correctly it won't move around, same goes for the initial first time it refills a potion put them somewhere out of your way and all is well but keep them open (easyuo limitiation as far as I know makes this neccesary)
- the single bottles of deadly poison, greater strength, greater agility, total refresh currently reside in the main backpack, I suppose I could altar this, and perhaps there is a way to make it not matter/keep them in with the kegs
- the keg id's are kinda hardcoded atm in future versions I will hopefully altar this so that the keg can be emptied fully without it crapping out the drinkers/poisoner and requiring re-flagging of the id
- alot of these functions use exevents, didn't think of an alternate method that would be as fast, so use caution and common sense, don't fire off hotkeys in the height of battle these are more quiet moment hotkeys
other than the re-armer collision it seems to work very beautifully for the most part
and onto the mess of a script
save image below to same directory as the script to complete the widget
its still a little warped in its construction, and there are better ways to do everything within this script
some of them I realize some of them I do not.
Scriptors feel free to update this to perhaps do the following
1. The Weapon Switcher uses 6 subroutines 1 for each weapon, and 1 to initialize get all the weapons in the right place and setup the initial state so that switcher doesn't immediately bug out.. it is a terrifying kludge and is a workaround due to lack of finesse
it should be 2 routines, the initialize and 1 subroutine to switch the weapon using passed arguements instead of 5 that have minute changes, I know this logically I just wasn't confident in the syntax to get it working correctly
2. Currently it will Hammer Re-Armer6.2's primary and secondary functions if the weapon switches when re-armer is doing something, I realize to fix this I have to call re-armer to pause those functions then do the weapon switch, then allow re-armer to resume as it is written now, re-armer has no pause function for that, and I am not confident in using call to accomplish this, once I am I want to do that, and in each weapon configuration be able to set a default mode (primary secondary momentum strike) that suits it, I have not seen any conflicts with gambit as of yet.
3. Like The Weapon Switch Routines The Potion Drinkers could all use the same drink/fill routine with passed arguements see above for why its 3 routines and the special one for poisoning vs 1 routine parsed with args.
4. The pack clean could include Zoogi Fungus and Fertile Dirt I suppose and other things from claim but those are keyable
5. It would be lovely to use a gui that has a small hud with buttons for all of these functions vs hotkeys which feel clumsy and are harder to eat food while using (Lazy I know) but I am even less confident with Gui Functionality
so what it all does, once you have the mountain of id's set this script will do the following
hotkey shift+f12 - Armor Dress
hotkey shift+f11 - ReOpens Weapon Bag if it gets closed accidentally or when switching worlds (needed to keep weapon switches active)
hotkey shift+f10 - Minor Pack cleanup for things additional to gold that are aquired with claim bandies, arrows, and oints
hotkey shift+f1-f5 switches between 5 distinct weapon setups (currently can cause re-armer6.2 to need to be restarted)
hotkey shift+f6 - if an infecting strike weapon is quiped it will poison it and refill the poison
hotkey shift+f7 - dequips shield, drinks greater strength pot requips shield refills potion
hotkey shift+f8 - dequips shield, drinks greater agility pot requips shield refills potion
hotkey shift+f9 - dequips shield, drinks total refresh pot requips shield refills potion
hotkey alt+1 switches out robe for invisibility shroud (harry potter mode On)
hotkey alt+2 switches out invisibility shroud for robeitem (harry potter mode Off)
*additional notes/quirks
- initially the weapon bag is opened, it must stay open for things to work correctly it won't move around, same goes for the initial first time it refills a potion put them somewhere out of your way and all is well but keep them open (easyuo limitiation as far as I know makes this neccesary)
- the single bottles of deadly poison, greater strength, greater agility, total refresh currently reside in the main backpack, I suppose I could altar this, and perhaps there is a way to make it not matter/keep them in with the kegs
- the keg id's are kinda hardcoded atm in future versions I will hopefully altar this so that the keg can be emptied fully without it crapping out the drinkers/poisoner and requiring re-flagging of the id
- alot of these functions use exevents, didn't think of an alternate method that would be as fast, so use caution and common sense, don't fire off hotkeys in the height of battle these are more quiet moment hotkeys
other than the re-armer collision it seems to work very beautifully for the most part
and onto the mess of a script
Code: Select all
;Ginsu-Inator v1.80 Lovingly Hacked together with paperclips and sticky tape by Yoda (slightly less of it now)
;I apologize as always for horrible psychological scarring from reading what is likely clumsy smashmouth scripting
;randomass delays?
;special thanks to tegger for debugging my buggy poisoner routine
;This script handles a bunch of utility hotkeys for weapon switching, potion drinking, weapon poisoning and dressing
;was 3 scripts Keg-inator, De-Naked-inator, and Weapon-Svitch-inator but one script made more sense eventually.
;v2.0 won't suck as bad, going to tryfix the re-armer collision via modding it slightly and controlling it at
;time of weapon switch chance of success 0.5% Yay!
;v1.85 Redesgned Control Bar
;v1.80 added 2nd tier of GUI controls in a flyer bar for one handed operation with mouse also works with existing keyboard shortcuts
;fixed bug in poisoning routine that was causing it to hang up and cease to function sometimes
;v1.42 Now that it all works I used it in the real world realized a good use for the now vacant hotkey was to re-open the weapon holder
;after switching worlds and it closes, the potion drinkers already do this but seemed smarter for the weaps to work this way
;v1.40 Thanks to Vempa again for the much nicer init routine freeing up f11 for another function so now taking suggestions as to what
;to make shift+f11 do for now it re-runs the initilization for weaps if it gets buggered up
;v1.30 Thanks to Vempa for weapon switch run from one generalized subroutine with passed arguements
;rather than customized purpose built copies, makes customizing for less weapons easier too
;potion drinkers still separate routines however
;added "Mischief Managed" messages to potion routines to show when you can enact another hotkey
;v1.20 Added Cloak Of Invisibility hotkeys alt 1 and alt 2 (harry potter mode)
;v1.0 First Version Yay!
;ids of gear for armor dress hotkey
set %face NTKOXMD ; A Jedi Master's Face
set %boots ASZCSSD ; Yoda's Stormtrooper Stompers
set %necklace WOELDFE ; Yoda's Collar
set %ring OWQEUWD ; Relayer Ring
set %earrings XZLGMOD ; Relayer Earrings
set %bracelet NGSRUOD ; Relayer Bracelet
set %shirt IFASDND ; A Balron Ate My Other T-Shirt
set %kilt LMUOQND ; Yoda's Manskirt of Awesomeness
set %pants ELFTAOD ; Yoda's Lucky Pants
set %arms XBVUZND ; Ancient Jedi Pauldrons
set %gloves BYPVDPE ; A Jedi Master's Hands
set %belt LTBFVPD ; Yoda's Formal Cumberbund
set %chest YVOFNOD ; A Jedi Master's Armor
set %vest YBZHHOD ; Yoda's Bantha Skin Vest
set %robe YBILMND ; Ancient Jedi's Robe
set %cape QEVJMOD ; Yoda's Mantle Of Jedi Truth
; end of dress macro ids
set %harrypotter DWTBHSD ;Invisibility Shroud for cloaking
; weapon and shield ids for weapon switch hotkeys (shield is shared by potion drinker hotkeys)
set %shield AZQYKQD ; Set the id of your shield hand item
set %weapon1 EBOORND ; Set the id of your 1st weapon
set %weapon2 VSXKZVD ; Set the id of your 2nd weapon
set %weapon3 REEXIUD ; Set the id of your 3rd weapon
set %weapon4 GVRZROD ; Set the id of your 4th weapon
set %weapon5 LDSGWMD ; Set the id of your 5th weapon
set %weaponLuggage KCYNZQD ; ID of Blessed Bag for weapon storage (doesn't have to be a blessed bag mine just is)
set %curWeap %weapon1 ; really bad half baked initializer may not need to be declared and set here use shift+f11 hotkey
; to set weapons to storage bag and initialize the weapon switcher so it works
; ids for potion drinker hotkeys kegs if emptied will have to have their id's redone as they will change trying to improve this
set %kegBagId ZGXDEYD ; your bag of holding id containing kegs
set %noxKegId SHHBCOD ; id of Deadly Poison Keg
set %strKegId ACFATQD ; id of Greater Str Potion Keg
set %aglKegId ZDKOCRD ; id of Greater Agility Potion Keg
set %refKegId YVJOCRD ; id of Refresh Potion Keg
; end of potion drinker ids
set %storageID STPYLSD ; Id of bag of holding for pak clean hotkey(bandages, oints, arrows)
Begin:
set #lObjectID %weaponLuggage
event macro 17 0
wait 1s
gosub InitSwitcherInator
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; The MenuBar - By Yoda ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
menu clear ;
set #menubutton none
menu Window Title Behold The Devistating The Jedi Ginsu-Inator v1.85
menu window transparent 95
menu window size 467 42
menu Font Name Gautami
menu Font Size 8
menu Font Style b
menu Font Align center
menu Font BGColor $005010
menu Font Color White
menu button switch1 125 1 40 20 Wep1
menu Font BGColor $006010
menu Font Color White
menu button switch2 165 1 40 20 Wep2
menu Font BGColor $007010
menu Font Color White
menu button switch3 205 1 40 20 Wep3
menu Font BGColor $008010
menu Font Color White
menu button switch4 245 1 40 20 Wep4
menu Font BGColor $009010
menu Font Color White
menu button switch5 285 1 40 20 Wep5
menu Font BGColor $102010
menu Font Color White
menu button inv 325 1 40 20 Hide
menu Font BGColor $203020
menu Font Color White
menu button notinv 365 1 50 20 Show
menu Font Align center
menu Font BGColor $007010
menu Font Color White
menu button clean 405 1 61 20 PackKleen
menu Font BGColor $00c000
menu Font Color White
menu button poison 205 21 46 20 Poison
menu Font BGColor $c0c0c0
menu Font Color Black
menu button strength 251 21 30 20 STR
menu Font BGColor $0000a0
menu Font Color White
menu button dexterity 281 21 30 20 DEX
menu Font BGColor $a00000
menu Font Color White
menu button stamina 311 21 43 20 STAM
menu Font BGColor $006010
menu Font Color White
menu button wepbag 354 21 56 20 OpenBag
menu Font BGColor $005010
menu Font Color White
menu button dress 410 21 56 20 DressMe
menu Image Create test 0 0 960 60
menu Image File test 0 0 ginsu.jpg
menu show
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
MenuListener:
if #menubutton = switch1
{
gosub Switcheroo 1
set #menubutton none
}
if #menubutton = switch2
{
gosub Switcheroo 2
set #menubutton none
}
if #menubutton = switch3
{
gosub Switcheroo 3
set #menubutton none
}
if #menubutton = switch4
{
gosub Switcheroo 4
set #menubutton none
}
if #menubutton = switch5
{
gosub Switcheroo 5
set #menubutton none
}
if #menubutton = inv
{
gosub HarryPotter
set #menubutton none
}
if #menubutton = notinv
{
gosub NotHarryPotter
set #menubutton none
}
if #menubutton = poison
{
gosub poison
set #menubutton none
}
if #menubutton = strength
{
gosub STRInator
set #menubutton none
}
if #menubutton = dexterity
{
gosub AGLInator
set #menubutton none
}
if #menubutton = stamina
{
gosub REFInator
set #menubutton none
}
if #menubutton = clean
{
gosub PakKleen
set #menubutton none
}
if #menubutton = wepbag
{
gosub OopsMyBagClosed
set #menubutton none
}
if #menubutton = dress
{
gosub EekImNaked
set #menubutton none
}
OnHotKey f1 shift
gosub Switcheroo 1
OnHotKey f2 shift
gosub Switcheroo 2
OnHotKey f3 shift
gosub Switcheroo 3
OnHotKey f4 shift
gosub Switcheroo 4
OnHotKey f5 shift
gosub Switcheroo 5
OnHotKey f6 shift
gosub poison
OnHotKey f7 shift
gosub STRInator
OnHotKey f8 shift
gosub AGLInator
OnHotKey f9 shift
gosub REFInator
OnHotKey f10 shift
gosub PakKleen
OnHotKey f11 shift
gosub OopsMyBagClosed
OnHotKey f12 shift
gosub EekImNaked
OnHotKey 1 alt
gosub HarryPotter
OnHotKey 2 alt
gosub NotHarryPotter
GOTO HotKeyLoop
goto MenuListener:
sub STRInator
{
{
set #rhandid %shield
event macro 24 1
wait 40
event macro 1 0 Stronger I Must Be!
FINDITEM XUF C_ , #backpackid
set #lObjectID #findid
event macro 17 0
wait 1s
set #rhandid %shield
event macro 24 1
wait 40
wait 2s
set #lObjectID %kegBagId
event macro 17 0
wait 1s
set #lObjectID %strKegId
event macro 17 0
event exmsg #charid 3 0 Mischief Managed!
}
return True
}
return False
sub AGLInator
{
{
set #rhandid %shield
event macro 24 1
wait 40
event macro 1 0 Become Faster Will I!
FINDITEM YUF C_ , #backpackid
set #lObjectID #findid
event macro 17 0
wait 1s
set #rhandid %shield
event macro 24 1
wait 40
wait 2s
set #lObjectID %kegBagId
event macro 17 0
wait 1s
set #lObjectID %aglKegId
event macro 17 0
event exmsg #charid 3 0 Mischief Managed!
}
return True
}
return False
sub REFInator
{
{
set #rhandid %shield
event macro 24 1
wait 40
event macro 1 0 Stamina I Need!
FINDITEM ZUF C_ , #backpackid
set #lObjectID #findid
event macro 17 0
wait 1s
set #rhandid %shield
event macro 24 1
wait 40
wait 2s
set #lObjectID %kegBagId
event macro 17 0
wait 1s
set #lObjectID %refKegId
event macro 17 0
event exmsg #charid 3 0 Mischief Managed!
}
return True
}
return False
sub poison
FINDITEM AVF C_ , #backpackid
if #FINDCNT > 0
{
finditem CUO C_ , #charid ; finds butcher knife in hand (on you body)
if #FINDCNT > 0
{
set %weapon %weapon1
event macro 13 30
target 3s
FINDITEM AVF C_ , #backpackid
set #lTargetID #findid
event macro 22
target 3s
set #lTargetID %weapon
target 3s
event macro 22
wait 2s
set #lObjectID %kegBagId
event macro 17 0
wait 1s
set #lObjectID %noxKegId
event macro 17 0
event exmsg #charid 3 0 Mischief Managed!
}
}
else
{
display ok No poison pots in backpack
return True
}
return False
sub EekImNaked
{
{
event macro 1 0 Eek I'm Naked!! Look Away I Am Hideous!
exevent drag %face
wait 6
exevent droppd
wait 6
exevent drag %boots
wait 6
exevent droppd
wait 6
exevent drag %necklace
wait 6
exevent droppd
wait 6
exevent drag %ring
wait 6
exevent droppd
wait 6
exevent drag %earrings
wait 6
exevent droppd
wait 6
exevent drag %bracelet
wait 6
exevent droppd
wait 6
exevent drag %shirt
wait 6
exevent droppd
wait 6
exevent drag %kilt
wait 6
exevent droppd
wait 6
exevent drag %pants
wait 6
exevent droppd
wait 6
exevent drag %arms
wait 6
exevent droppd
wait 6
exevent drag %gloves
wait 6
exevent droppd
wait 6
exevent drag %chest
wait 6
exevent droppd
wait 6
exevent drag %vest
wait 6
exevent droppd
wait 6
exevent drag %belt
wait 6
exevent droppd
wait 6
exevent drag %robe
wait 6
exevent droppd
wait 6
exevent drag %cape
wait 6
exevent droppd
wait 6
event exmsg #charid 3 0 No Longer A Streaker!
}
return True
}
return False
sub HarryPotter
{
{
event exmsg #charid 3 0 Cloaking Engaged
exevent drag %robe
wait 6
exevent dropc %weaponLuggage
wait 6
exevent drag %harrypotter
wait 6
exevent droppd
wait 6
event exmsg #charid 3 0 Cloaked
}
return True
}
return False
sub NotHarryPotter
{
{
event exmsg #charid 3 0 Cloaking Lifted
exevent drag %harrypotter
wait 6
exevent dropc %weaponLuggage
wait 6
exevent drag %robe
wait 6
exevent droppd
wait 6
event exmsg #charid 3 0 You Can Be Seen
}
return True
}
return False
sub Switcheroo
{
;Void Func, Recieves weapon number (1,2,3 etc)
if ( ( %1 <> 1 ) && ( %1 / 2 = 0 ) ) || ( ( %1 > 5 ) || ( %1 < 0 ) )
{
event exmsg #charid 3 0 Switcheroo function argument incorrect! Halting!
halt
}
exevent drag %curWeap
wait 11
exevent dropc %weaponLuggage
wait 11
exevent drag %shield
wait 11
exevent dropc %weaponLuggage
wait 11
if %1 = 1
event exmsg #charid 3 0 Pike Of The Jedi!
if %1 = 2
event exmsg #charid 3 0 A Light Axe?
if %1 = 3
event exmsg #charid 3 0 A Jedi Master's Bow!
if %1 = 4
event exmsg #charid 3 0 LightSaber Version Two!
if %1 = 5
event exmsg #charid 3 0 Blaze Of Yoda!
exevent drag %weapon . %1
wait 11
exevent droppd
wait 11
exevent drag %shield
wait 11
exevent droppd
wait 11
set %curWeap %weapon . %1
event exmsg #charid 3 0 Mischief Managed!
set %1
return
}
sub PakKleen
{
{
event macro 1 0 Clean Up I will
FINDITEM WLF C_ , #backpackid
exevent drag #findid #findstack
wait 6
exevent dropc %storageID
wait 6
FINDITEM ZLF C_ , #backpackid
exevent drag #findid #findstack
wait 6
exevent dropc %storageID
wait 6
FINDITEM RWF C_ , #backpackid
exevent drag #findid #findstack
wait 6
exevent dropc %storageID
wait 6
event exmsg #charid 3 0 No Longer A Mess You Are!
}
return True
}
return False
sub InitSwitcherInator
{
event exmsg #charid 3 0 Initializing Weapon
finditem * C_ , #charid
set %i 1
set %j 1
for %i 1 #findcnt
{
finditem * C_ , #charid
for %j 1 5
{
set %tmpPntr weapon . %j
if #findid = % . %tmpPntr
{
set %curWeap #findid
break
}
}
ignoreitem #findid
}
event exmsg #charid 3 0 Ready To Use Switcher Hotkeys You Are
return
}
sub OopsMyBagClosed
{
set #lObjectID %weaponLuggage
event macro 17 0
wait 1s
event macro 1 0 [emote fart
return
}