ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: Scrripty on July 19, 2009, 07:44:14 PM
-
So what I got here is a lightning strike/primary/secondary sub where what you select on my "menu" turns them on and off. I have a tick box that turns the whole thing on, then a drop down menu to select each one. Then I have a tick box to turn on watching mana !LSManaPercentage and I ALSO need to check mana for the primary and secondary specials regardless of how much mana you actually have, so say primary takes 28 on the second hit, you need to make sure you're ABOVE that before it engages... Can someone think of a better way here? I'm sure I'll figure it out, but I'm just brain dead. Honestly I have a serious health condition making it hard to focus atm. :) I want to release a new version and I'm having scripters block. :) Eventually I'll make it based on the users lmc and mana... I have a sub to check how much lmc a person has, and that's working for spells. I'll just use that variable to calc this also. After its working better of course. :) I've got it to WORK, but for some reason, its not checking the mana when it goes to the primary/secondary/ls subs... The explicitly set check down there in the subs. It's strange. What am I missing? Oh yea, I will put in a check for the occasion when a person has less than the amount of mana required to toggle a special. If anyone has a better idea than this sub here, please share. :) Brain is fried... The only thing you're not seeing here is I use pixel scanning to set the lightning strike and prim/secondary special icons, then this just sets which one you want to check and toggle on when it's off.
sub ls
menu get 13 ;Lightning Strike;Primary:Secondary
if #menures = #true
{
menu get 14 ; WS Mana Check
if #menures = #true
{
if #mana > ( #maxmana * !LSManaPercentage ) / 10
{
gosub lsSpecial
gosub execPrimary
gosub execSecondary
return
}
}
gosub lsSpecial
gosub execPrimary
gosub execSecondary
gosub exec-ls
}
return
;END Lightning Strike
sub lsSpecial
menu get specials
if #menures = 1
{
set !CombatType 15
set !CombatSpecial 149
set !1 1
gosub exec-ls
}
return
sub execPrimary
menu get specials
if #menures = 2
{
if #mana > 27
{
set !CombatType 35
set !CombatSpecial 0
set !1 2
gosub exec-ls
}
}
return
sub execSecondary
menu get specials
if #menures = 3
{
if #mana > 7
{
set !CombatType 36
set !CombatSpecial 0
set !1 3
gosub exec-ls
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
sub exec-ls
cmppix !savePix f
{
event macro !CombatType !CombatSpecial
wait 5
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;