Find
You are looking at a material called spellcasting
This material is set by the
cast
spell and remains until you are successful at casting the desired spell.
Created by
thorn
, last updated 03 Jul 2009
Code
##tickloc:runsub spellcasting;
##spellcasting:
$matvals = $actor's matvals;
manipulate $matvals get living to $living;
manipulate $living get nextspell to $nextspell by 2;
manipulate $nextspell get sname to $target by 3;
manipulate $nextspell get sat to $second by 3;
include 69104;
$init_obj = $actor;
$dobject = $target;
$lac = 'cast';
runsub difficultcheck;
if $success > 0 then spellcasting2 else spellcastingretry;
##spellcasting2:
copy $target;
multiset $new_id to "slot1='$init_obj',slot2='$second',slot3=0,loc='$loc'";
relook $loc;
switch $new_id on;
$material = $actor's material;
swap $material take _spellcasting_;
set $actor's material to $material;
$matvals = $actor's matvals;
manipulate $matvals get living to $living;
manipulate $living set nextspell to "" by 2;
manipulate $matvals set living to $living;
set $actor's matvals to $matvals;
include 58416;
multivar $skiller=$actor,$skillname='magic';
runsub incrskill;
$manamax = $actor's manamax;
if $skillvalue > $manamax then spellcastingmm;
##spellcastingmm:
set $actor's manamax to $skillvalue;
sayto $actor,"You can now gain up to $skillvalue in mana.";
##spellcastingretry:
$verb = (speaking,articulating,delivering,expressing,mumbling,murmuring,muttering,mumbling,sounding,uttering,voicing);
$secret = (arcane,esoteric,mysterious,mystic,recondite,apocryphal,enigmatic,mystical,mystifying,strange,veiled,intricate,orphic);
say 'cast',"[$init_obj] begins $verb $secret words...";