Tweaking Rearmer

Discussion about the technical aspects of scripting. Ask about all issues involving your freelance projects here.
Locked
User avatar
Devlin
Legendary Scribe
Reactions:
Posts: 658
Joined: Thu Mar 18, 2010 12:50 pm

Tweaking Rearmer

Post by Devlin »

I have it set up so rearmer works when you switch weapons by checking for a change in wep damage. However, sometimes it doesn't go off, which means you need to toggle a weapon on/off for it to rearm your ability (which means the problem can keep happening indefinitely, theoretically. I usually get it after 1-2 tries, IF it does fail.) I. I've tinkered with the wait timer in the damage check with mixed results, yet haven't got it to be perfect.

I'm trying to do one of two things
-Fix the damage check so it never fails to rearm when you switch weapons.
-Add a feature to the onhotkey function which will rearm the ability instead of having to toggle on/off (if the first can't be achieved.)

Any input would be greatly appreciated. This is the section of code I'm toying with.

Code: Select all

if ( Abs ( %min - #minDmg ) > 15 ) || ( ( %max <> #maxDmg ) > 15 ) ;|| ( Abs (%max - %maxDmg ) > 15 )
          {
               gosub Settings ; saves pixels of icons
               ;wait 5
               set %min #minDmg
               set %max #maxDmg
               goto loop:
          }
          onhotkey %Prim
          {
               set %Sub Prim
               event exmsg #charid 3 0 [Primary]
               event sysmessage Primary Ability activated
          }
[/size]
Resident Wiki Editor/Village Idiot

EasyUO Scripts
ReArmer
ReArmer (Old Version)
ReReader
Runebook Copier
---------------------------------------------
Combat Focus Guide (Godmode Formula)
Locked