Author Topic: waitfortarget (for spell casting)  (Read 1126 times)

0 Members and 1 Guest are viewing this topic.

Offline camotbikTopic starter

  • Sr. Member
  • *
  • Posts: 349
  • Activity:
    0%
  • Reputation Power: 3
  • camotbik has no influence.
  • Gender: Male
  • Hello! I'm a UO addict.
  • Respect: +37
  • Referrals: 0
    • View Profile
waitfortarget (for spell casting)
« on: November 05, 2011, 12:16:56 AM »
+1
Sample of usage
Code: [Select]
Gosub Paralyze
stop
;=====================================================================
;====================================================  PARALYZE ======
;=====================================================================
Sub Paralyze
  if #mana > 25 && #scnt2 > %CoolDown
  {
    finditem #ltargetid G_10
    if #targcurs = 1 && #findcnt > 0
      event macro 22 0
    set %_jindex #jindex < -------------------
    event macro 15 37
    set %CoolDown ( #scnt2 + 25 )
    gosub WaitForTarget 40
    if #ltargetid <> #charid
    {
      finditem #ltargetid G_10
      if #findcnt > 0
        event macro 22 0
    }
  }
return
;=====================================================================
; Gosub WaitForTarget %1 ; %1 = n ms. =========== WAITFORTARGET ======
;=====================================================================
Sub WaitForTarget
  set %Distrupted #false
  set %WaitForTarget ( #scnt2 + %1 )
  repeat
    if #jindex >= %_jindex
    {
      scanjournal %_jindex
      if disturbed IN #journal || recovered IN #journal || reagents IN #journal || mana IN #journal
      {
        set %Distrupted #true
        set %CoolDown #scnt2
      }
      set %_jindex %_jindex + 1
    }
  until #targcurs = 1 || %Distrupted = #true || #scnt2 > %WaitForTarget
return
« Last Edit: November 05, 2011, 02:16:22 AM by camotbik »
What you witness -- is whatver..
uogamers hybrid.

Tags: