conversion of spell_routines.inc for ISXEQ

Moderator: MacroQuest Developers

onetimehero
a ghoul
a ghoul
Posts: 105
Joined: Fri Sep 05, 2003 2:42 pm

conversion of spell_routines.inc for ISXEQ

Post by onetimehero » Mon Apr 25, 2005 6:16 pm

Still a work in progress, but thought I'd post it for comment/derision/yuks.

Code: Select all


function sr_cast(string spellName, string spellType, timer giveupTimer, string functocall)
{
  if "!${Variable[sr_casting]} " 
    declare sr_casting bool script 0
  if "!${Variable[sr_cast_return]}"
    declare sr_cast_return string script CAST_SUCCESS
  if "!${Variable[spellType]}"
    declare spellType string local spell 
  if "!${Variable[sr_giveupTimer]}"
    declare sr_giveupTimer timer script
  if "!${Variable[sr_GUTvalid]}"
    declare sr_GUTvalid bool script
  if "!${Variable[sr_fizzleIsInterrupt]}"
    declare sr_fizzleIsInterrupt bool script false
  if "!${Variable[sr_itemRefreshTime]}"
    declare sr_itemRefreshTime float script 0 
  if "!${Variable[sr_castEndTime]}"
    declare sr_castEndTime timer script 0


  if "${spellType.Equal[alt]}"
    call sr_cast_alt "${spellName}" ${giveupTimer} ${functocall}
  if "${spellType.Equal[item]}"
    call sr_cast_item "${spellName}" ${giveupTimer} ${functocall}
  if "${spellType.Left[3].Equal[gem]}"
    call sr_cast_spell "${spellName}" ${spellType.Right[1]} ${giveupTimer} ${functocall}
  if "${spellType.Equal[spell]}"
    call sr_cast_spell "${spellName}" 0 ${giveupTimer} ${functocall}

  return ${sr_cast_return}    
}


function sr_cast_spell(string spellName, int gem, timer giveupTimer, string functocall)
{
  
  varset sr_GUTvalid false
  
  varset sr_cast_return CAST_SUCCESS
  varset sr_giveupTimer ${giveupTimer}
  if "${sr_giveupTimer}"
    varset sr_GUTvalid true
  else
    varset sr_giveupTimer 60s

  if "${Me.Invis} && ${noInvis}"
  {
    varset sr_cast_return CAST_INVIS
    return CAST_INVIS
  }

  do 
  {
    WaitFrame
  } 
  while "${Me.Casting.ID} ||  ${Me.Speed} || ${Me.Moving} "

  If "${Me.Ducking}" 
    keypress duck 
  If "!${Me.Standing}" 
    EQExecute /stand 
  if "${Window[SpellBookWnd].Open}"
    keypress spellbook 

  If "!${Me.Book[${spellName}]}" 
  { 
      Echo Spell: "${spellName}" was not found in your book 
      varset sr_cast_return CAST_UNKNOWNSPELL
      Return "CAST_UNKNOWNSPELL" 
  } 

  if "!${Me.Gem[${spellName}]}" 
  { 
    if "${gem}==0"
    {
      varset sr_cast_return CAST_NOTMEMMED
      return ${sr_cast_return}
    }
    memspell ${gem} "${spellName}" 
    wait 10 ${Window[SpellBookWnd].Open}
    do
    {
      if ( ${sr_GUTvalid} )
      {
        if ( !${sr_giveupTimer} )
           return CAST_TIMEOUT
      }
      WaitFrame
    }
    while "${Window[SpellBookWnd].Open}"

    wait 10 ${Me.Gem[${spellName}]}
    if "!${Me.Gem[${spellName}]}" 
    {
      echo Spell Memorization interrupted
      return "CAST_INTERRUPTED"
    }
    if "${sr_GUTvalid}"
    {
      varset sr_giveupTimer ${sr_giveupTimer.OriginalValue}
;      echo sr_giveupTimer is ${sr_giveupTimer}
    }
  }
  do
  {
    if "${sr_GUTvalid}"
    {
;      echo waiting for ready, sr_giveupTimer is ${sr_giveupTimer}
      if "!${sr_giveupTimer}"
         return CAST_TIMEOUT
    }
    WaitFrame
  }
  while "!${Me.SpellReady[${spellName}]} && ${sr_giveupTimer}"

  call sr_cast_add_triggers
  cast ${spellName}

  do 
  {
    WaitFrame
    if "${Me.Casting.ID}"
    {
      varcalc sr_castEndTime ${Me.Casting.MyCastTime}*10 
      echo Casting: ${Me.Casting.Name}${If[!${Me.Casting.TargetType.Equal[PB AE]} && !${Me.Casting.TargetType.Equal[self]} && ${Target.ID}, on >> ${Target.CleanName} <<,]} 
    } 

    call sr_waitcast ${functocall}

    if "${sr_cast_return.Equal[CAST_FIZZLE]}"
    {
      echo sr_cast_spell Cast fizzled, recasting
      varset sr_cast_return CAST_SUCCESS
      cast ${spellName}
      wait 1 ${Me.Casting.ID}
    }    
  }
  while ${Me.Casting.ID}

  WaitFrame  
  ExecuteQueued

  call sr_cast_remove_triggers
  return ${sr_cast_return}
}

function sr_cast_item(string spellName, timer giveupTimer, string functocall)
{
  declare sr_swapItemBack bool local false 
  declare sr_slotName int local 
  declare sr_oldItemName string local 
  declare sr_slotID int local 
  declare sr_oldSlotID int local 

  varset sr_GUTvalid false
  
  varset sr_cast_return CAST_SUCCESS
  varset sr_giveupTimer ${giveupTimer}
  if "${sr_giveupTimer}"
    varset sr_GUTvalid true
  else
    varset sr_giveupTimer 60s

;  echo sr_GUTValid is ${sr_GUTvalid}, sr_giveupTimer is ${sr_giveupTimer}, functocall is ${functocall}

  if "!${FindItem[${spellName}].InvSlot}" 
  {
    echo Cannot find item: ${spellName} 
    varset sr_cast_return CAST_UNKNOWNSPELL
    return CAST_UNKNOWNSPELL 
  }      
  if "${FindItem[${spellName}].InvSlot}>29"
  {
    echo Cant cast item that isn't equipped or in main invslot
    varset sr_cast_return CAST_FAILED
    return CAST_FAILED
; TODO implement item swapping 
    varset sr_swapItemBack true 
    if "${FindItem[${spellName}].WornSlot[1]}"
      {
        varset sr_slotName ${FindItem[${spellName}].WornSlot[1]} 
      } 
      else 
      { 
        varset sr_slotName 29 
      } 
      varset sr_slotID ${InvSlot[${sr_slotName}].ID}      
      varset sr_oldSlotID ${FindItem[${spellName}].InvSlot.ID} 
      varset sr_oldItemName ${InvSlot[${sr_slotID}].Item.Name} 
      call sr_SwapItem "${spellName}" ${sr_slotID} 
  } 

  do
  {
    WaitFrame
  }
  while "${sr_itemRefreshTime} > ${MacroQuest.Running}" 
  varset sr_itemRefreshTime ${Math.Calc[${MacroQuest.Running}+200]} 

  call sr_cast_add_triggers

  cast item "${spellName}"
   
  do
  {
    WaitFrame
    if "${Me.Casting.ID}"
    { 
      varcalc sr_castEndTime ${FindItem[${spellName}].CastTime}*10 
      echo Casting: ${FindItem[${spellName}].Spell.Name}${If[!${FindItem[${spellName}].Spell.TargetType.Equal[PB AE]} && !${FindItem[${spellName}].Spell.TargetType.Equal[self]} && ${Target.ID}, on >> ${Target.CleanName} <<,]} 
    } 

    call sr_waitcast ${functocall}

    if "${sr_swapItemBack}"
    { 
      if "${FindItem[${sr_oldItemName}].ID}" 
        call sr_SwapItem "${sr_oldItemName}" ${sr_slotID}          
      else if ( ${FindItem[${spellName}].ID} ) { 
        call sr_SwapItem "${spellName}" ${oldSlotID} 
    } 
    
    if "${sr_cast_return.Equal[CAST_CANCELLED]}"
    { 
      echo Spell was cancelled... 
      return CAST_CANCELLED 
    } 

    if "!${sr_cast_return.Equal[CAST_SUCCESS]}"
    { 
      if "${sr_cast_return.Equal[CAST_NOTREADY]}"
        return CAST_NOTREADY 
      if "${sr_cast_return.Equal[CAST_RESTART]}"
        cast item "${spellName}" 
      if "${sr_cast_return.Equal[CAST_STUNNED]}" 
      {
        if "${Me.Stunned}"
        { 
          wait 30 !${Me.Stunned} 
        } 
        else 
        { 
          wait 7 
        }
        cast item "${spellName}" 
        wait 1 ${Me.Casting.ID}
      } 
      if "${sr_cast_return.Equal[CAST_INTERRUPTED]}"
      { 
        if "${sr_GUTvalid}"
        {
          if "${sr_giveupTimer}"
          {
            echo Interrupted, trying to recast
            cast item "${spellName}"
            wait 1 ${Me.Casting.ID}
          }
        }
        else
        {
          echo Spell was interrupted... 
          return CAST_INTERRUPTED 
        }
      } 
      if "${sr_cast_return.Equal[CAST_COLLAPSE]}"
      { 
        varset sr_giveupTimer 200 
        cast item "${spellName}"
        wait 1 ${Me.Casting.ID}
      }
    }
  } 
  while ${Me.Casting.ID}

  WaitFrame  
  ExecuteQueued

  call sr_cast_remove_triggers
  return ${sr_cast_return}
}

function sr_waitcast(string functocall)
{
  declare currentTarget int local ${Target.ID} 
  declare currentTargetType string local ${Target.Type} 

  do
  {
    if "!${QueuedCommands}"
    {
      if "${sr_GUTvalid}"
      {
        if "!${sr_giveupTimer}"
           return CAST_TIMEOUT
      }
      WaitFrame
      if "${functocall.Length}>0"
        call ${functocall} ${sr_castEndTime}
    }
    else
    {
      ExecuteQueued
    }
    if "${currentTarget} && !${Spawn[${currentTarget}].Type.Equal[${currentTargetType}]}"
    { 
      if "!${Me.Casting.TargetType.Equal[PB AE]} && !${Me.Casting.TargetType.Equal[self]} && !${moveBack} && ( !${Me.Mount.ID} || !${noInterrupt} )"
      { 
        if "!${Me.Mount.ID} || ${sr_castEndTime}>70"
        { 
          call sr_Interrupt 
        } 
        else if "${Me.Casting.RecastTime}>3"
        { 
          keypress forward hold 
          delay 6 
          keypress forward 
          varset sr_moveBack true 
          varset sr_cast_return CAST_CANCELLED 
        } 
      } 
    } 
    if "${Me.State.Equal[DUCK]}"
      varset sr_cast_return CAST_CANCELLED 
  }
  while "${Me.Casting.ID}"
    
  WaitFrame
  if "${QueuedCommands}"
    ExecuteQueued
  return ${sr_cast_return}
}

function sr_Interrupt()
{
   if "${Me.Mount.ID}"
     EQExecute /dismount 
   if "!${Me.Ducking}"
   {
      keypress duck
      keypress duck
   }
   do
   {
     WaitFrame
   }
   while "${Me.Casting.ID}"
   varset sr_cast_return CAST_CANCELLED
   return CAST_CANCELLED
}


function sr_cast_add_triggers()
{
  AddTrigger sr_cast_interrupted "Your spell is interrupted."
  AddTrigger sr_cast_interrupted "Your casting has been interrupted!"
  AddTrigger sr_cast_interrupted "Aborting memorization of spell."
  AddTrigger sr_cast_begin "You begin casting @SPELL@."
  AddTrigger sr_cast_fizzle "Your spell fizzles!"
  AddTrigger sr_cast_collapse "Your gate is too unstable, and collapses."
  AddTrigger sr_cast_immune "Your target is immune to changes in its @WHAT@ speed."
  AddTrigger sr_cast_immune "Your target cannot be mesmerized@rest@"
  AddTrigger sr_cast_nohold "Your spell did not take hold."
  AddTrigger sr_cast_recover "You haven't recovered yet..."
  AddTrigger sr_cast_recover "Spell recovery time not yet met."
  AddTrigger sr_cast_nolos "You cannot see your target."
  AddTrigger sr_cast_notarget "You must first select a target for this spell!"
  AddTrigger sr_cast_notready "Spell recast time not yet met."
  AddTrigger sr_cast_outofmana "Insufficient Mana to cast this spell!"
  AddTrigger sr_cast_outofrange "Your target is out of range, get closer!"
  AddTrigger sr_cast_resisted "Your target resisted the @NAME@ spell."
  AddTrigger sr_cast_standing "You must be standing to cast a spell."
  AddTrigger sr_cast_stunned "You are stunned!"
  AddTrigger sr_cast_stunned "You cannot cast spells while stunned!"
  AddTrigger sr_cast_stunned "You *CANNOT* cast spells, you have been silenced!"
}

function sr_cast_remove_triggers()
{
  RemoveTrigger sr_cast_interrupted
  RemoveTrigger sr_cast_begin 
  RemoveTrigger sr_cast_fizzle 
  RemoveTrigger sr_cast_collapse 
  RemoveTrigger sr_cast_immune 
  RemoveTrigger sr_cast_nohold 
  RemoveTrigger sr_cast_recover 
  RemoveTrigger sr_cast_nolos 
  RemoveTrigger sr_cast_notarget
  RemoveTrigger sr_cast_notready 
  RemoveTrigger sr_cast_outofmana 
  RemoveTrigger sr_cast_outofrange 
  RemoveTrigger sr_cast_resisted 
  RemoveTrigger sr_cast_standing 
  RemoveTrigger sr_cast_stunned 
}

function sr_cast_interrupted(string FullLine)
{
  if "${sr_cast_return.NotEqual[CAST_CANCELLED]}"
    varset sr_cast_return CAST_INTERRUPTED
}

function sr_cast_begin(string FullLine)
{
;  echo cast begin got : ${FullLine}
;   varset sr_cast_return CAST_STARTED
}

function sr_cast_fizzle(string FullLine)
{
; DEBUGGING
;  echo Got a fizzle trigger
  if "${sr_fizzleIsInterrupt}"
    varset sr_cast_return CAST_INTERRUPTED
  else
    varset sr_cast_return CAST_FIZZLE
;  echo sr_cast_return set to ${sr_cast_return} in sr_cast_fizzle Trigger
}

function sr_cast_collapse(string FullLine)
{
  varset sr_cast_return CAST_COLLAPSE
}

function sr_cast_immune(string FullLine)
{
  varset sr_cast_return CAST_IMMUNE
}

function sr_cast_nohold(string FullLine)
{
  varset sr_cast_return CAST_NOHOLD
}

function sr_cast_recover(string FullLine)
{
  varset sr_cast_return CAST_NOTREADY
}

function sr_cast_nolos(string FullLine)
{
  varset sr_cast_return CAST_NOLOS
}

function sr_cast_notarget(string FullLine)
{
  varset sr_cast_return CAST_NOTARGET
}

function sr_cast_notready(string FullLine)
{
  varset sr_cast_return CAST_NOTREADY
}

function sr_cast_outofmana(string FullLine)
{
  varset sr_cast_return CAST_OUTOFMANA
}

function sr_cast_outofrange(string FullLine)
{
  varset sr_cast_return CAST_OUTOFRANGE
}

function sr_cast_resisted(string FullLine)
{
  varset sr_cast_return CAST_RESISTED
}

function sr_cast_standing(string FullLine)
{
  varset sr_cast_return CAST_NOTSTANDING
}  

function sr_cast_stunned(string FullLine)
{
  varset sr_cast_return CAST_STUNNED
}
Hmm. That's odd.

Lacky
a hill giant
a hill giant
Posts: 174
Joined: Mon Nov 22, 2004 4:02 pm

Hmm

Post by Lacky » Thu Apr 28, 2005 4:11 am

This is going to take some getting used too... Going to read through this and try to advance my knowledge a bit more when I am not dead tired.
So I am wrong, Sue me.

Red-One
a ghoul
a ghoul
Posts: 143
Joined: Tue Dec 28, 2004 9:14 pm

damn...

Post by Red-One » Sun May 01, 2005 3:15 pm

Nice work. Now $1 for genbot! :lol:


-Red

User avatar
billthecat
a lesser mummy
a lesser mummy
Posts: 64
Joined: Sun Jan 30, 2005 8:58 pm

Post by billthecat » Thu May 12, 2005 8:38 pm

That's what I want to do. :twisted:
"If you think nobody cares, try missing a couple of payments"

User avatar
billthecat
a lesser mummy
a lesser mummy
Posts: 64
Joined: Sun Jan 30, 2005 8:58 pm

Post by billthecat » Sat May 14, 2005 3:29 pm

In comparing these two, I'm seeing places where you actually rearranged where in the logic things are being checked. Was there a technical reason for the changes or was it just a matter of preference?

For example, the first thng cast_spell does in the MQ2 inc file is check to see if the spell is in your book. In the lavishscript version it's got the invis check moved in.
"If you think nobody cares, try missing a couple of payments"

onetimehero
a ghoul
a ghoul
Posts: 105
Joined: Fri Sep 05, 2003 2:42 pm

Post by onetimehero » Sat May 14, 2005 3:40 pm

Well, it's still a work in progress.

The invis check should be moved to the main cast function i think before the check for what type you are casting.

One thing i didn't like about spell_routines was if somebody invised me un expectedly, the macro would hang up in spell_routines in the wait_for_stop. My preference is to return a value to the caller indicating why it didn't cast, that way the macro can do other work (following, whatever).

Will be working on it more when ISXEQ is back up and working 8-)
Hmm. That's odd.

Lacky
a hill giant
a hill giant
Posts: 174
Joined: Mon Nov 22, 2004 4:02 pm

So... )

Post by Lacky » Tue Jun 28, 2005 9:58 pm

How is this coming along? It looks like this is a working copy so I am going to try it :). Just letting you know that I will be converting to IS as I am able. So your work will be used and appreciated.
So I am wrong, Sue me.

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

sr.inc

Post by EqMule » Wed Aug 17, 2005 8:57 pm

i wanted to try this, but i had to make some changes to it for it to work.

Posting it, but be aware that all i wanted to do was try out the spellpractice.iss which can be found at:http://macroquest2.com/phpBB2/viewtopic ... 5442#95442
so i will not guarantee that it works 100% for other things, but for that one it does...

Code: Select all

;sr.inc modified slightly by eqmule

function sr_cast(string spellName, string spellType, timer giveupTimer, string functocall) 
{ 
  if !${sr_casting(exists)} 
    declare sr_casting bool script 0 
  if !${sr_cast_return(exists)}
    declare sr_cast_return string script CAST_SUCCESS 
  if !${spellType(exists)} 
    declare spellType string local spell 
  if !${sr_giveupTimer(exists)} 
    declare sr_giveupTimer timer script 
  if !${sr_GUTvalid(exists)} 
    declare sr_GUTvalid bool script 
  if !${sr_fizzleIsInterrupt(exists)} 
    declare sr_fizzleIsInterrupt bool script true 
  if !${sr_itemRefreshTime(exists)} 
    declare sr_itemRefreshTime float script 0 
  if !${sr_castEndTime(exists)} 
    declare sr_castEndTime timer script 0 


  if "${spellType.Equal[alt]}" 
    call sr_cast_alt "${spellName}" ${giveupTimer} ${functocall} 
  if "${spellType.Equal[item]}" 
    call sr_cast_item "${spellName}" ${giveupTimer} ${functocall} 
  if "${spellType.Left[3].Equal[gem]}" 
    call sr_cast_spell "${spellName}" ${spellType.Right[1]} ${giveupTimer} ${functocall} 
  if "${spellType.Equal[spell]}" 
    call sr_cast_spell "${spellName}" 0 ${giveupTimer} ${functocall} 

  return ${sr_cast_return}    
} 


function sr_cast_spell(string spellName, int gem, timer giveupTimer, string functocall) 
{ 
  
  sr_GUTvalid:Set[0] 
  
  sr_cast_return:Set[CAST_SUCCESS] 
  sr_giveupTimer:Set[${giveupTimer}]
  if "${sr_giveupTimer}" 
    sr_GUTvalid:Set[1] 
  else 
    sr_giveupTimer:Set[60s] 

  if "${Me.Invis} && ${noInvis}" 
  { 
    sr_cast_return:Set[CAST_INVIS]
    return CAST_INVIS 
  } 

  do 
  { 
    WaitFrame 
  } 
  while "${Me.Casting.ID} ||  ${Me.Speed} || ${Me.Moving} " 

  If "${Me.Ducking}" 
    keypress duck 
  If "!${Me.Standing}" 
    EQExecute /stand 
  if "${Window[SpellBookWnd].Open}" 
    keypress spellbook 

  If "!${Me.Book[${spellName}]}" 
  { 
      Echo Spell: "${spellName}" was not found in your book 
      sr_cast_return:Set[CAST_UNKNOWNSPELL] 
      Return "CAST_UNKNOWNSPELL" 
  } 

  if "!${Me.Gem[${spellName}]}" 
  { 
    if "${gem}==0" 
    { 
      sr_cast_return:Set[CAST_NOTMEMMED] 
      return ${sr_cast_return} 
    } 
    memspell ${gem} "${spellName}" 
    wait 10 ${Window[SpellBookWnd].Open} 
    do 
    { 
      if ( ${sr_GUTvalid} ) 
      { 
        if ( !${sr_giveupTimer} ) 
           return CAST_TIMEOUT 
      } 
      WaitFrame 
    } 
    while "${Window[SpellBookWnd].Open}" 

    wait 10 ${Me.Gem[${spellName}]} 
    if "!${Me.Gem[${spellName}]}" 
    { 
      echo Spell Memorization interrupted 
      return "CAST_INTERRUPTED" 
    } 
    if "${sr_GUTvalid}" 
    { 
      sr_giveupTimer:Set[${sr_giveupTimer.OriginalValue}] 
;      echo sr_giveupTimer is ${sr_giveupTimer} 
    } 
  } 
  do 
  { 
    if "${sr_GUTvalid}" 
    { 
;      echo waiting for ready, sr_giveupTimer is ${sr_giveupTimer} 
      if "!${sr_giveupTimer}" 
         return CAST_TIMEOUT 
    } 
    WaitFrame 
  } 
  while "!${Me.SpellReady[${spellName}]} && ${sr_giveupTimer}" 

  call sr_cast_add_triggers 
  cast ${spellName} 

  do 
  { 
    WaitFrame 
    if "${Me.Casting.ID}" 
    { 
      sr_castEndTime:Set[${Me.Casting.MyCastTime}*10] 
      echo Casting: ${Me.Casting.Name}${If[!${Me.Casting.TargetType.Equal[PB AE]} && !${Me.Casting.TargetType.Equal[self]} && ${Target.ID}, on >> ${Target.CleanName} <<,]} 
    } 

    call sr_waitcast ${functocall} 

    if "${sr_cast_return.Equal[CAST_FIZZLE]}" 
    { 
      echo sr_cast_spell Cast fizzled, recasting 
      sr_cast_return:Set[CAST_SUCCESS] 
      cast ${spellName} 
      wait 1 ${Me.Casting.ID} 
    }    
  } 
  while ${Me.Casting.ID} 

  WaitFrame  
  ExecuteQueued 

  call sr_cast_remove_triggers 
  return ${sr_cast_return} 
} 

function sr_cast_item(string spellName, timer giveupTimer, string functocall) 
{ 
  declare sr_swapItemBack bool local false 
  declare sr_slotName int local 
  declare sr_oldItemName string local 
  declare sr_slotID int local 
  declare sr_oldSlotID int local 

  sr_GUTvalid:Set[0] 
  
  sr_cast_return:Set[CAST_SUCCESS] 
  sr_giveupTimer:Set[${giveupTimer}] 
  if "${sr_giveupTimer}" 
    sr_GUTvalid:Set[1] 
  else 
    sr_giveupTimer:Set[60s] 

;  echo sr_GUTValid is ${sr_GUTvalid}, sr_giveupTimer is ${sr_giveupTimer}, functocall is ${functocall} 

  if "!${FindItem[${spellName}].InvSlot}" 
  { 
    echo Cannot find item: ${spellName} 
    sr_cast_return:Set[CAST_UNKNOWNSPELL]
    return CAST_UNKNOWNSPELL 
  }      
  if "${FindItem[${spellName}].InvSlot}>29" 
  { 
    echo Cant cast item that isn't equipped or in main invslot 
    sr_cast_return:Set[CAST_FAILED] 
    return CAST_FAILED 
; TODO implement item swapping 
    sr_swapItemBack:Set[1]
    if "${FindItem[${spellName}].WornSlot[1]}" 
      { 
        sr_slotName:Set[${FindItem[${spellName}].WornSlot[1]}]
      } 
      else 
      { 
        sr_slotName:Set[29]
      } 
      sr_slotID:Set[${InvSlot[${sr_slotName}].ID}]   
      sr_oldSlotID:Set[${FindItem[${spellName}].InvSlot.ID}]
      sr_oldItemName:Set[${InvSlot[${sr_slotID}].Item.Name}]
      call sr_SwapItem "${spellName}" ${sr_slotID}
  } 

  do 
  { 
    WaitFrame 
  } 
  while "${sr_itemRefreshTime} > ${MacroQuest.Running}" 
  sr_itemRefreshTime:Set[${Math.Calc[${MacroQuest.Running}+200]}]

  call sr_cast_add_triggers 

  cast item "${spellName}" 
    
  do 
  { 
    WaitFrame 
    if "${Me.Casting.ID}" 
    { 
      sr_castEndTime:Set[${FindItem[${spellName}].CastTime}*10]
      echo Casting: ${FindItem[${spellName}].Spell.Name}${If[!${FindItem[${spellName}].Spell.TargetType.Equal[PB AE]} && !${FindItem[${spellName}].Spell.TargetType.Equal[self]} && ${Target.ID}, on >> ${Target.CleanName} <<,]} 
    } 

    call sr_waitcast ${functocall} 

    if "${sr_swapItemBack}" 
    { 
      if "${FindItem[${sr_oldItemName}].ID}" 
        call sr_SwapItem "${sr_oldItemName}" ${sr_slotID}          
      else if ( ${FindItem[${spellName}].ID} ) { 
        call sr_SwapItem "${spellName}" ${oldSlotID} 
    } 
    
    if "${sr_cast_return.Equal[CAST_CANCELLED]}" 
    { 
      echo Spell was cancelled... 
      return CAST_CANCELLED 
    } 

    if "!${sr_cast_return.Equal[CAST_SUCCESS]}" 
    { 
      if "${sr_cast_return.Equal[CAST_NOTREADY]}" 
        return CAST_NOTREADY 
      if "${sr_cast_return.Equal[CAST_RESTART]}" 
        cast item "${spellName}" 
      if "${sr_cast_return.Equal[CAST_STUNNED]}" 
      { 
        if "${Me.Stunned}" 
        { 
          wait 30 !${Me.Stunned} 
        } 
        else 
        { 
          wait 7 
        } 
        cast item "${spellName}" 
        wait 1 ${Me.Casting.ID} 
      } 
      if "${sr_cast_return.Equal[CAST_INTERRUPTED]}" 
      { 
        if "${sr_GUTvalid}" 
        { 
          if "${sr_giveupTimer}" 
          { 
            echo Interrupted, trying to recast 
            cast item "${spellName}" 
            wait 1 ${Me.Casting.ID} 
          } 
        } 
        else 
        { 
          echo Spell was interrupted... 
          return CAST_INTERRUPTED 
        } 
      } 
      if "${sr_cast_return.Equal[CAST_COLLAPSE]}" 
      { 
        sr_giveupTimer:Set[200]
        cast item "${spellName}" 
        wait 1 ${Me.Casting.ID} 
      } 
    } 
  } 
  while ${Me.Casting.ID} 

  WaitFrame  
  ExecuteQueued 

  call sr_cast_remove_triggers 
  return ${sr_cast_return} 
} 

function sr_waitcast(string functocall) 
{ 
  declare currentTarget int local ${Target.ID} 
  declare currentTargetType string local ${Target.Type} 

  do 
  { 
    if "!${QueuedCommands}" 
    { 
      if "${sr_GUTvalid}" 
      { 
        if "!${sr_giveupTimer}" 
           return CAST_TIMEOUT 
      } 
      WaitFrame 
      if "${functocall.Length}>0" 
        call ${functocall} ${sr_castEndTime} 
    } 
    else 
    { 
      ExecuteQueued 
    } 
    if "${currentTarget} && !${Spawn[${currentTarget}].Type.Equal[${currentTargetType}]}" 
    { 
      if "!${Me.Casting.TargetType.Equal[PB AE]} && !${Me.Casting.TargetType.Equal[self]} && !${moveBack} && ( !${Me.Mount.ID} || !${noInterrupt} )" 
      { 
        if "!${Me.Mount.ID} || ${sr_castEndTime}>70" 
        { 
          call sr_Interrupt 
        } 
        else if "${Me.Casting.RecastTime}>3" 
        { 
          keypress forward hold 
          delay 6 
          keypress forward 
          sr_moveBack:Set[1] 
          sr_cast_return:Set[CAST_CANCELLED] 
        } 
      } 
    } 
    if "${Me.State.Equal[DUCK]}" 
      sr_cast_return:Set[CAST_CANCELLED]
  } 
  while "${Me.Casting.ID}" 
    
  WaitFrame 
  if "${QueuedCommands}" 
    ExecuteQueued 
  return ${sr_cast_return} 
} 

function sr_Interrupt() 
{ 
   if "${Me.Mount.ID}" 
     EQExecute /dismount 
   if "!${Me.Ducking}" 
   { 
      keypress duck 
      keypress duck 
   } 
   do 
   { 
     WaitFrame 
   } 
   while "${Me.Casting.ID}" 
   sr_cast_return:Set[CAST_CANCELLED]
   return CAST_CANCELLED 
} 


function sr_cast_add_triggers() 
{ 
  AddTrigger sr_cast_interrupted "Your spell is interrupted." 
  AddTrigger sr_cast_interrupted "Your casting has been interrupted!" 
  AddTrigger sr_cast_interrupted "Aborting memorization of spell." 
  AddTrigger sr_cast_begin "You begin casting @SPELL@." 
  AddTrigger sr_cast_fizzle "Your spell fizzles!" 
  AddTrigger sr_cast_collapse "Your gate is too unstable, and collapses." 
  AddTrigger sr_cast_immune "Your target is immune to changes in its @WHAT@ speed." 
  AddTrigger sr_cast_immune "Your target cannot be mesmerized@rest@" 
  AddTrigger sr_cast_nohold "Your spell did not take hold." 
  AddTrigger sr_cast_recover "You haven't recovered yet..." 
  AddTrigger sr_cast_recover "Spell recovery time not yet met." 
  AddTrigger sr_cast_nolos "You cannot see your target." 
  AddTrigger sr_cast_notarget "You must first select a target for this spell!" 
  AddTrigger sr_cast_notready "Spell recast time not yet met." 
  AddTrigger sr_cast_outofmana "Insufficient Mana to cast this spell!" 
  AddTrigger sr_cast_outofrange "Your target is out of range, get closer!" 
  AddTrigger sr_cast_resisted "Your target resisted the @NAME@ spell." 
  AddTrigger sr_cast_standing "You must be standing to cast a spell." 
  AddTrigger sr_cast_stunned "You are stunned!" 
  AddTrigger sr_cast_stunned "You cannot cast spells while stunned!" 
  AddTrigger sr_cast_stunned "You *CANNOT* cast spells, you have been silenced!" 
} 

function sr_cast_remove_triggers() 
{ 
  RemoveTrigger sr_cast_interrupted 
  RemoveTrigger sr_cast_begin 
  RemoveTrigger sr_cast_fizzle 
  RemoveTrigger sr_cast_collapse 
  RemoveTrigger sr_cast_immune 
  RemoveTrigger sr_cast_nohold 
  RemoveTrigger sr_cast_recover 
  RemoveTrigger sr_cast_nolos 
  RemoveTrigger sr_cast_notarget 
  RemoveTrigger sr_cast_notready 
  RemoveTrigger sr_cast_outofmana 
  RemoveTrigger sr_cast_outofrange 
  RemoveTrigger sr_cast_resisted 
  RemoveTrigger sr_cast_standing 
  RemoveTrigger sr_cast_stunned 
} 

function sr_cast_interrupted(string FullLine) 
{ 
  if "${sr_cast_return.NotEqual[CAST_CANCELLED]}" 
    sr_cast_return:Set[CAST_INTERRUPTED]
} 

function sr_cast_begin(string FullLine) 
{ 
;  echo cast begin got : ${FullLine} 
;   sr_cast_return:Set[CAST_STARTED]
} 

function sr_cast_fizzle(string FullLine) 
{ 
; DEBUGGING 
;  echo Got a fizzle trigger 
  if "${sr_fizzleIsInterrupt}" 
    sr_cast_return:Set[CAST_INTERRUPTED]
  else 
    sr_cast_return:Set[CAST_FIZZLE]
;  echo sr_cast_return set to ${sr_cast_return} in sr_cast_fizzle Trigger 
} 

function sr_cast_collapse(string FullLine) 
{ 
  sr_cast_return:Set[CAST_COLLAPSE]
} 

function sr_cast_immune(string FullLine) 
{ 
  sr_cast_return:Set[CAST_IMMUNE]
} 

function sr_cast_nohold(string FullLine) 
{ 
  sr_cast_return:Set[CAST_NOHOLD]
} 

function sr_cast_recover(string FullLine) 
{ 
  sr_cast_return:Set[CAST_NOTREADY]
} 

function sr_cast_nolos(string FullLine) 
{ 
  sr_cast_return:Set[CAST_NOLOS]
} 

function sr_cast_notarget(string FullLine) 
{ 
  sr_cast_return:Set[CAST_NOTARGET]
} 

function sr_cast_notready(string FullLine) 
{ 
  sr_cast_return:Set[CAST_NOTREADY]
} 

function sr_cast_outofmana(string FullLine) 
{ 
  sr_cast_return:Set[CAST_OUTOFMANA]
} 

function sr_cast_outofrange(string FullLine) 
{ 
  sr_cast_return:Set[CAST_OUTOFRANGE]
} 

function sr_cast_resisted(string FullLine) 
{ 
  sr_cast_return:Set[CAST_RESISTED]
} 

function sr_cast_standing(string FullLine) 
{ 
  sr_cast_return:Set[CAST_NOTSTANDING]
}  

function sr_cast_stunned(string FullLine) 
{ 
  sr_cast_return:Set[CAST_STUNNED]
} 
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

iluvseq
Clueless Mudslinger
Posts: 269
Joined: Mon Apr 14, 2003 10:05 am

Post by iluvseq » Mon May 15, 2006 5:38 pm

Fixed the "else if" bug (should be "elseif"), also removed unnecissary quotes around the conditionals in if statements and merged some nested if statements into single complex conditionals.

Tested a bit...

Code: Select all

;sr.inc modified slightly by eqmule

function sr_cast(string spellName, string spellType, timer giveupTimer, string functocall)
{
  if !${sr_casting(exists)}
    declare sr_casting bool script 0
  if !${sr_cast_return(exists)}
    declare sr_cast_return string script CAST_SUCCESS
  if !${spellType(exists)}
    declare spellType string local spell
  if !${sr_giveupTimer(exists)}
    declare sr_giveupTimer timer script
  if !${sr_GUTvalid(exists)}
    declare sr_GUTvalid bool script
  if !${sr_fizzleIsInterrupt(exists)}
    declare sr_fizzleIsInterrupt bool script true
  if !${sr_itemRefreshTime(exists)}
    declare sr_itemRefreshTime float script 0
  if !${sr_castEndTime(exists)}
    declare sr_castEndTime timer script 0


  if ${spellType.Equal[alt]}
    call sr_cast_alt "${spellName}" ${giveupTimer} ${functocall}
  if ${spellType.Equal[item]}
    call sr_cast_item "${spellName}" ${giveupTimer} ${functocall}
  if ${spellType.Left[3].Equal[gem]}
    call sr_cast_spell "${spellName}" ${spellType.Right[1]} ${giveupTimer} ${functocall}
  if ${spellType.Equal[spell]}
    call sr_cast_spell "${spellName}" 0 ${giveupTimer} ${functocall}

  return ${sr_cast_return}   
}


function sr_cast_spell(string spellName, int gem, timer giveupTimer, string functocall)
{
 
  sr_GUTvalid:Set[0]
 
  sr_cast_return:Set[CAST_SUCCESS]
  sr_giveupTimer:Set[${giveupTimer}]
  if ${sr_giveupTimer}
    sr_GUTvalid:Set[1]
  else
    sr_giveupTimer:Set[60s]

  if ${Me.Invis} && ${noInvis}
  {
    sr_cast_return:Set[CAST_INVIS]
    return CAST_INVIS
  }

  do
  {
    WaitFrame
  }
  while ${Me.Casting.ID} ||  ${Me.Speed} || ${Me.Moving}

  If ${Me.Ducking}
    keypress duck
  If !${Me.Standing}
    EQExecute /stand
  if ${Window[SpellBookWnd].Open}
    keypress spellbook

  If !${Me.Book[${spellName}]}
  {
      Echo Spell: "${spellName}" was not found in your book
      sr_cast_return:Set[CAST_UNKNOWNSPELL]
      Return CAST_UNKNOWNSPELL
  }

  if !${Me.Gem[${spellName}]}
  {
    if ${gem}==0
    {
      sr_cast_return:Set[CAST_NOTMEMMED]
      return ${sr_cast_return}
    }
    memspell ${gem} "${spellName}"
    wait 10 ${Window[SpellBookWnd].Open}
    do
    {
      if ${sr_GUTvalid} && !${sr_giveupTimer}
        return CAST_TIMEOUT
      WaitFrame
    }
    while ${Window[SpellBookWnd].Open}

    wait 10 ${Me.Gem[${spellName}]}
    if !${Me.Gem[${spellName}]}
    {
      echo Spell Memorization interrupted
      return CAST_INTERRUPTED
    }
    if ${sr_GUTvalid}
    {
      sr_giveupTimer:Set[${sr_giveupTimer.OriginalValue}]
;      echo sr_giveupTimer is ${sr_giveupTimer}
    }
  }
  do
  {
    if ${sr_GUTvalid} && !${sr_giveupTimer}
      return CAST_TIMEOUT
    WaitFrame
  }
  while !${Me.SpellReady[${spellName}]} && ${sr_giveupTimer}

  call sr_cast_add_triggers
  cast "${spellName}"

  do
  {
    WaitFrame
    if ${Me.Casting.ID}
    {
      sr_castEndTime:Set[${Me.Casting.MyCastTime}*10]
      echo Casting: ${Me.Casting.Name} ${If[!${Me.Casting.TargetType.Equal[PB AE]} && !${Me.Casting.TargetType.Equal[self]} && ${Target.ID}, on >> ${Target.CleanName} <<,]}
    }

    call sr_waitcast ${functocall}

    if ${sr_cast_return.Equal[CAST_FIZZLE]}
    {
      echo sr_cast_spell Cast fizzled, recasting
      sr_cast_return:Set[CAST_SUCCESS]
      cast "${spellName}"
      wait 1 ${Me.Casting.ID}
    }
  }
  while ${Me.Casting.ID}

  WaitFrame 
  ExecuteQueued

  call sr_cast_remove_triggers
  return ${sr_cast_return}
}

function sr_cast_item(string spellName, timer giveupTimer, string functocall)
{
  declare sr_swapItemBack bool local false
  declare sr_slotName int local
  declare sr_oldItemName string local
  declare sr_slotID int local
  declare sr_oldSlotID int local

  sr_GUTvalid:Set[0]
 
  sr_cast_return:Set[CAST_SUCCESS]
  sr_giveupTimer:Set[${giveupTimer}]
  if ${sr_giveupTimer}
    sr_GUTvalid:Set[1]
  else
    sr_giveupTimer:Set[60s]

  if !${FindItem[${spellName}].InvSlot}
  {
    echo Cannot find item: ${spellName}
    sr_cast_return:Set[CAST_UNKNOWNSPELL]
    return CAST_UNKNOWNSPELL
  }     
  if ${FindItem[${spellName}].InvSlot}>29
  {
    echo Cant cast item that isn't equipped or in main invslot
    sr_cast_return:Set[CAST_FAILED]
    return CAST_FAILED
; TODO implement item swapping
    sr_swapItemBack:Set[1]
    if ${FindItem[${spellName}].WornSlot[1]}
      {
        sr_slotName:Set[${FindItem[${spellName}].WornSlot[1]}]
      }
      else
      {
        sr_slotName:Set[29]
      }
      sr_slotID:Set[${InvSlot[${sr_slotName}].ID}]   
      sr_oldSlotID:Set[${FindItem[${spellName}].InvSlot.ID}]
      sr_oldItemName:Set[${InvSlot[${sr_slotID}].Item.Name}]
      call sr_SwapItem "${spellName}" ${sr_slotID}
  }

  do
  {
    WaitFrame
  }
  while ${sr_itemRefreshTime} > ${MacroQuest.Running}
  sr_itemRefreshTime:Set[${Math.Calc[${MacroQuest.Running}+200]}]

  call sr_cast_add_triggers

  cast item "${spellName}"
   
  do
  {
    WaitFrame
    if ${Me.Casting.ID}
    {
      sr_castEndTime:Set[${FindItem[${spellName}].CastTime}*10]
      echo Casting: ${FindItem[${spellName}].Spell.Name} ${If[!${FindItem[${spellName}].Spell.TargetType.Equal[PB AE]} && !${FindItem[${spellName}].Spell.TargetType.Equal[self]} && ${Target.ID}, on >> ${Target.CleanName} <<,]}
    }

    call sr_waitcast ${functocall}

    if ${sr_swapItemBack}
    {
      if ${FindItem[${sr_oldItemName}].ID}
        call sr_SwapItem "${sr_oldItemName}" ${sr_slotID}
      elseif ${FindItem[${spellName}].ID} 
        call sr_SwapItem "${spellName}" ${oldSlotID}
    }
   
    if ${sr_cast_return.Equal[CAST_CANCELLED]}
    {
      echo Spell was cancelled...
      return CAST_CANCELLED
    }

    if !${sr_cast_return.Equal[CAST_SUCCESS]}
    {
      if ${sr_cast_return.Equal[CAST_NOTREADY]}
        return CAST_NOTREADY
      if ${sr_cast_return.Equal[CAST_RESTART]}
        cast item "${spellName}"
      if ${sr_cast_return.Equal[CAST_STUNNED]}
      {
        if ${Me.Stunned}
        {
          wait 30 !${Me.Stunned}
        }
        else
        {
          wait 7
        }
        cast item "${spellName}"
        wait 1 ${Me.Casting.ID}
      }
      if ${sr_cast_return.Equal[CAST_INTERRUPTED]}
      {
        if ${sr_GUTvalid} && ${sr_giveupTimer}
	{
          echo Interrupted, trying to recast
          cast item "${spellName}"
          wait 1 ${Me.Casting.ID}
        }
        else
        {
          echo Spell was interrupted...
          return CAST_INTERRUPTED
        }
      }
      if ${sr_cast_return.Equal[CAST_COLLAPSE]}
      {
        sr_giveupTimer:Set[200]
        cast item "${spellName}"
        wait 1 ${Me.Casting.ID}
      }
    }
  }
  while ${Me.Casting.ID}

  WaitFrame 
  ExecuteQueued

  call sr_cast_remove_triggers
  return ${sr_cast_return}
}

function sr_waitcast(string functocall)
{
  declare currentTarget int local ${Target.ID}
  declare currentTargetType string local ${Target.Type}

  do
  {
    if !${QueuedCommands}
    {
      if ${sr_GUTvalid} && !${sr_giveupTimer}
        return CAST_TIMEOUT

      WaitFrame
      if ${functocall.Length}>0
        call ${functocall} ${sr_castEndTime}
    }
    else
    {
      ExecuteQueued
    }
    if ${currentTarget} && !${Spawn[${currentTarget}].Type.Equal[${currentTargetType}]}
    {
      if !${Me.Casting.TargetType.Equal[PB AE]} && !${Me.Casting.TargetType.Equal[self]} && !${moveBack} && ( !${Me.Mount.ID} || !${noInterrupt} )
      {
        if !${Me.Mount.ID} || ${sr_castEndTime}>70
        {
          call sr_Interrupt
        }
        elseif ${Me.Casting.RecastTime}>3
        {
          keypress forward hold
          delay 6
          keypress forward
          sr_moveBack:Set[1]
          sr_cast_return:Set[CAST_CANCELLED]
        }
      }
    }
    if ${Me.State.Equal[DUCK]}
      sr_cast_return:Set[CAST_CANCELLED]
  }
  while ${Me.Casting.ID}
   
  WaitFrame
  if ${QueuedCommands}
    ExecuteQueued

  return ${sr_cast_return}
}

function sr_Interrupt()
{
   if ${Me.Mount.ID}
     EQExecute /dismount

   if !${Me.Ducking}
   {
      keypress duck
      keypress duck
   }

   do
   {
     WaitFrame
   }
   while ${Me.Casting.ID}

   sr_cast_return:Set[CAST_CANCELLED]
   return CAST_CANCELLED
}


function sr_cast_add_triggers()
{
  AddTrigger sr_cast_interrupted "Your spell is interrupted."
  AddTrigger sr_cast_interrupted "Your casting has been interrupted!"
  AddTrigger sr_cast_interrupted "Aborting memorization of spell."
  AddTrigger sr_cast_begin "You begin casting @SPELL@."
  AddTrigger sr_cast_fizzle "Your spell fizzles!"
  AddTrigger sr_cast_collapse "Your gate is too unstable, and collapses."
  AddTrigger sr_cast_immune "Your target is immune to changes in its @WHAT@ speed."
  AddTrigger sr_cast_immune "Your target cannot be mesmerized@rest@"
  AddTrigger sr_cast_nohold "Your spell did not take hold."
  AddTrigger sr_cast_recover "You haven't recovered yet..."
  AddTrigger sr_cast_recover "Spell recovery time not yet met."
  AddTrigger sr_cast_nolos "You cannot see your target."
  AddTrigger sr_cast_notarget "You must first select a target for this spell!"
  AddTrigger sr_cast_notready "Spell recast time not yet met."
  AddTrigger sr_cast_outofmana "Insufficient Mana to cast this spell!"
  AddTrigger sr_cast_outofrange "Your target is out of range, get closer!"
  AddTrigger sr_cast_resisted "Your target resisted the @NAME@ spell."
  AddTrigger sr_cast_standing "You must be standing to cast a spell."
  AddTrigger sr_cast_stunned "You are stunned!"
  AddTrigger sr_cast_stunned "You cannot cast spells while stunned!"
  AddTrigger sr_cast_stunned "You *CANNOT* cast spells, you have been silenced!"
}

function sr_cast_remove_triggers()
{
  RemoveTrigger sr_cast_interrupted
  RemoveTrigger sr_cast_begin
  RemoveTrigger sr_cast_fizzle
  RemoveTrigger sr_cast_collapse
  RemoveTrigger sr_cast_immune
  RemoveTrigger sr_cast_nohold
  RemoveTrigger sr_cast_recover
  RemoveTrigger sr_cast_nolos
  RemoveTrigger sr_cast_notarget
  RemoveTrigger sr_cast_notready
  RemoveTrigger sr_cast_outofmana
  RemoveTrigger sr_cast_outofrange
  RemoveTrigger sr_cast_resisted
  RemoveTrigger sr_cast_standing
  RemoveTrigger sr_cast_stunned
}

function sr_cast_interrupted(string FullLine)
{
  if ${sr_cast_return.NotEqual[CAST_CANCELLED]}
    sr_cast_return:Set[CAST_INTERRUPTED]
}

function sr_cast_begin(string FullLine)
{
;  echo cast begin got : ${FullLine}
;   sr_cast_return:Set[CAST_STARTED]
}

function sr_cast_fizzle(string FullLine)
{
; DEBUGGING
;  echo Got a fizzle trigger
  if ${sr_fizzleIsInterrupt}
    sr_cast_return:Set[CAST_INTERRUPTED]
  else
    sr_cast_return:Set[CAST_FIZZLE]
;  echo sr_cast_return set to ${sr_cast_return} in sr_cast_fizzle Trigger
}

function sr_cast_collapse(string FullLine)
{
  sr_cast_return:Set[CAST_COLLAPSE]
}

function sr_cast_immune(string FullLine)
{
  sr_cast_return:Set[CAST_IMMUNE]
}

function sr_cast_nohold(string FullLine)
{
  sr_cast_return:Set[CAST_NOHOLD]
}

function sr_cast_recover(string FullLine)
{
  sr_cast_return:Set[CAST_NOTREADY]
}

function sr_cast_nolos(string FullLine)
{
  sr_cast_return:Set[CAST_NOLOS]
}

function sr_cast_notarget(string FullLine)
{
  sr_cast_return:Set[CAST_NOTARGET]
}

function sr_cast_notready(string FullLine)
{
  sr_cast_return:Set[CAST_NOTREADY]
}

function sr_cast_outofmana(string FullLine)
{
  sr_cast_return:Set[CAST_OUTOFMANA]
}

function sr_cast_outofrange(string FullLine)
{
  sr_cast_return:Set[CAST_OUTOFRANGE]
}

function sr_cast_resisted(string FullLine)
{
  sr_cast_return:Set[CAST_RESISTED]
}

function sr_cast_standing(string FullLine)
{
  sr_cast_return:Set[CAST_NOTSTANDING]
} 

function sr_cast_stunned(string FullLine)
{
  sr_cast_return:Set[CAST_STUNNED]
}


User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Fri Jun 23, 2006 2:33 pm

iluvseq, thanks for fixing that problem. I'm successfully using this now.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

FrankJScott
naggy
naggy
Posts: 2349
Joined: Sun Feb 19, 2023 7:11 am

Awesome Mobility Scooter Site

Post by FrankJScott » Mon Jul 24, 2023 8:49 pm

To the lady asking about gold mobility scooters orlando florida, vespa hire near me, universal studios orlando wheelchair rental, disney magic kingdom scooter rental, cost to rent scooter at disney world, rent a bird scooter near me, I highly suggest this mobility scooter link or ecv rentals near disney world, electric scooter rental near me, rent a power scooter near me, big orange scooter rentals orlando fl, electric scooter on rent near me, disney world electric scooter rental, and don't forget this mobility scooter site as well as universal studios electric scooter rental, silver dollar city wheelchair rental, scooter vacations orlando, scooters to rent in orlando, wdw ecv rental, animal kingdom wheelchair rental, on top of this mobility scooter link which is as good as e scooters near me rent, handicap scooter rental near me, moto rental near me, apple scooter rental orlando florida, buena vista scooter rentals orlando florida, moped rental orlando florida, alongside all mobility scooter advice and don't forget mobility scooters to rent near me, ecv rental orlando disney, seaworld scooter rental, bird scooter rental near me, reserve scooter at disney world, universal studios electric scooter rental, and don't forget this mobility scooter url on top of disney springs wheelchair rental, find scooter rentals near me, electric scooter rental orlando, apple scooter rental orlando, rent me scooters, mobility scooter hire in orlando florida, as well as mobility scooter forum which is about scooter rental around me, scooter and wheelchair rentals near me, mobility rentals near me, escooter rental near me, bike on rent in near me, escooter hire near me, and don't forget this mobility scooter advice and don't forget disney scooter rental, yellow scooters orlando, medical electric scooter rental near me, mobility scooter orlando florida, scooter rental disney world orlando, zypp rental near me, as well as this mobility scooter site as well as disney world handicap scooter rental, disney world wheelchair and scooter rentals, disneyland wheelchair rentals, motor for rent near me, disney world wheelchair rental price, places to rent mopeds near me, as well as mobility scooter blog as well as mobility scooter hire orlando, best disney scooter rental, foldable scooter rental orlando, walt disney world handicap scooters, scooter rental near me prices, standing scooter rental near me, which is also great. Finally, have a look at this mobility scooter tips with rent motor scooters near me, Keyword Stats 2023-07-24 at 13_55_54, street scooter rental near me, apple scooter rental orlando florida, scooter vacations orlando, busch gardens electric scooter rental, for good measure. Check more @ Top Business Massage Details ac73_e7

FrankJScott
naggy
naggy
Posts: 2349
Joined: Sun Feb 19, 2023 7:11 am

Useful Google Info

Post by FrankJScott » Mon Jul 31, 2023 10:06 pm

I suggest you google it :)

FrankJScott
naggy
naggy
Posts: 2349
Joined: Sun Feb 19, 2023 7:11 am

Useful Interior Design Site

Post by FrankJScott » Thu Aug 10, 2023 9:17 pm

Why don't you Google it! before you post

FrankJScott
naggy
naggy
Posts: 2349
Joined: Sun Feb 19, 2023 7:11 am

Awesome Interior Design Blog

Post by FrankJScott » Thu Aug 10, 2023 11:05 pm

Why don't you Google it! before you post

FrankJScott
naggy
naggy
Posts: 2349
Joined: Sun Feb 19, 2023 7:11 am

Awesome Product Info

Post by FrankJScott » Fri Aug 18, 2023 7:20 pm

Why don't you Google it! before you post