How about just this? :
Code:
castspell("$userid","spellid")
Maybe use it in an EVENT_SAY{ routine.....
Maybe used something like this:
Code:
EVENT_SAY{
if ($1-=~ "jerk")
{
say("You should not have done that!")
castspell("$userid","nukespell")
say("Now it appears you have learned not to do that.")
}
}
Though This is for .qst format (Im still learning hehe).
You DID see the sticky in this forum?! maybe try the command test script that came from Lurker005's post and that Eglin wrote..
Code:
sub EVENT_SAY() {
quest::say("Greetings. $name... I can tell you about [variables] and [commands] or you can give me items.") if ($text=~/hail/i);
quest::say("Want to test a variable? Try [name]. [race]. [class]. [userid]. [ulevel]. [uguildid]. [mobid]. [mlevel]. [faction]. [zonesn]. [zoneln]. or [status]") if ($text=~/variabl/i);
quest::say("name = $name") if($text=~/name/i);
quest::say("race = $race") if($text=~/race/i);
quest::say("class = $class") if($text=~/class/i);
quest::say("userid = $userid") if($text=~/userid/i);
quest::say("ulevel = $ulevel") if($text=~/ulevel/i);
quest::say("uguildid = $uguildid") if($text=~/uguildid/i);
quest::say("mobid = $mobid") if($text=~/mobid/i);
quest::say("mlevel = $mlevel") if($text=~/mlevel/i);
quest::say("faction = $faction") if($text=~/faction/i);
quest::say("zonesn = $zonesn") if($text=~/zonesn/i);
quest::say("zoneln = $zoneln") if($text=~/zoneln/i);
quest::say("status = $status") if($text=~/status/i);
quest::say("Want to test a command? Try [emote]. [shout]. [spawn]. [echo]. [summonitem]. [castspell]. [depop]. [cumflag]. [flagnpc]. [flagclient].[exp]. [level]. [safemove]. [rain]. [snow]. [givecash]. [pvp]. [doanim]. [addskill]. or [me]") if($text=~/command/i);
quest::emote("emotes before you.") if ($text=~/emote/i);
quest::shout("Is this shouting?") if ($text=~/shout/i);
quest::say("I don't feel like spawning anything right now") if($text=~/spawn/i);
quest::echo("this is an echo echo echo echo echo") if ($text=~/echo/i);
quest::summonitem(17969) if ($text=~/summonitem/i);
quest::castspell(278, $id) if ($text=~/castspell/i);
quest::say("awww... I don't wanna!") if ($text=~/depop/i);
quest::exp(100) if ($text=~/exp/i);
quest::level($ulevel + 1) if ($text=~/level/i);
quest::safemove() if ($text=~/safemove/i);
quest::rain(1) if ($text=~/rain/i);
quest::snow(1) if ($text=~/snow/i);
quest::givecash(0,0,0,50) if ($text=~/givecash/i);
quest::pvp("on") if ($text=~/pvp/i);
quest::doanim(3) if ($text=~/doanim/i);
quest::me("The heavens applaud you.") if ($text=~/me/i);
}