Page 1 of 1

/cast item

Posted: Thu Apr 29, 2004 5:34 pm
by Falco72

Code: Select all

|||Cast a spell from an item 
Sub ItemCast(icItemName)
   /if (${Debug}==1) /echo Status: botspell.ItemCast, ${cItemName}
   /if (${cItemName.Length}<=0) /return
   /varset SpellSts 0
   /varset Fail 0
   /if (${Me.Sitting}) /stand
   /echo ${icItemName}
   /cast item "${icItemName}"
   :ItemLoop
   /doevents
   /delay 5
   /if (${Me.Casting.ID}) /goto :ItemLoop
/return
This is the code I use to cast from an item and to make it short it do not works anymore after var system change.
The echo give back the right name of the item but to cast it I need to put the "" around the name (at least it was so with the old var system). I have tried both using

Code: Select all

/cast item "${icItemName}"
and using

Code: Select all

/cast item ${icItemName}
but neither works. More, if I use the same command in EQ via command line (using the "" around item name), like

Code: Select all

/cast item "Brown Silk Bridle"
it works fine. Any idea???

Posted: Thu Apr 29, 2004 7:12 pm
by Preocts
No idea. Just tried it out and it works fine for me. Here is the code I used:

Code: Select all

Sub Main
  /declare Temp string local "Fisherman's Companion"

  /echo ${Temp}
  /cast item ${Temp}

/return
All I can think of is make damn sure that ${icItemName} is the correct string to cast the item and make sure you have the newest zip. :?
Wish I could be more help.

Posted: Thu Apr 29, 2004 7:59 pm
by ml2517

Code: Select all

|||Cast a spell from an item 
Sub ItemCast(icItemName) 
   /if (${Debug}==1) /echo Status: botspell.ItemCast, ${icItemName} 
   /if (${icItemName.Length}<=0) /return 
   /varset SpellSts 0 
   /varset Fail 0 
   /if (${Me.Sitting}) /stand 
   /echo ${icItemName} 
   /cast item "${icItemName}" 
   :ItemLoop 
   /doevents 
   /delay 5 
   /if (${Me.Casting.ID}) /goto :ItemLoop 
/return