auto curse wep with halt

Discussion about the technical aspects of scripting. Ask about all issues involving your freelance projects here.
Locked
kenarn
Elder Scribe
Reactions:
Posts: 110
Joined: Sat Aug 07, 2010 1:12 pm

auto curse wep with halt

Post by kenarn »

ok, i made this orignaly ment for just casting curse weapon when my hp went below a certian amount, but after about 2 sec of testing i realized it spammed and blah blah blah so
i fixxed it and now this is what it does-
when mortaled striked (cast curse weapon) (no matter hp amount)
when you get set below your set hp amount (cast curse weapon)
but there is also a pause in it so it wont spam you also you can change the hp amount and the pause time,
so now it works great in places like s'gail and umbris and it wont spam ;))
-also much thanks to stigmund for helping me out where ever i messed up ;)

Code: Select all

;================================================================================
; Script Name: Auto Curse Weapon With Halt
; Author: Sobekn
; Version: 1.1
; Purpose: Casts Curse Weapon as needed.
; you can change the set hp number where it says percent hp 50
; you can change the pause time or how long inbetween cast when u r lower then your set number
;======================================================================================
;instanciate variables before loop
set %hp 50   ; This number determines at what % you cast Curse Weapon
set %pause 40s  ; Make this number larger if you are spamming Curse Weapon or smaller if it takes too long to cast
;

while #TRUE  ;puts the script on a constant loop (true = true so the loop wont stop)
{
    if ( #hits * 100 ) / #maxhits <= %hp || D in #charstatus
    {
      event macro 15 104
     ;event macro 1 0 [cs curseweapon
      wait %pause
    }
}
Sobekn

"Death is not the greatest loss is in life. The greatest loss in life is what dies inside of us while we live." - Norman Cousins
kenarn
Elder Scribe
Reactions:
Posts: 110
Joined: Sat Aug 07, 2010 1:12 pm

Re: auto curse wep with halt

Post by kenarn »

i found this on a uo guide site, so maybe this will make it easier for some of you to set times
its a simple equation to figure out durtaion of curse weapon
Caster's Spirit Speak x 10 / 34 + 1 in seconds
Sobekn

"Death is not the greatest loss is in life. The greatest loss in life is what dies inside of us while we live." - Norman Cousins
Locked