Find
You are looking at the npc called Muloch
Created by
thorn
, last updated 18 Mar 2008
Code
if target of talk then talks;
if reacting to meditate then checkskill;
if reacting to meditating then suggestspell;
##talks:
"[$init_obj] says, 'Can you tell me about necromancy?'";
"[$actor] cackles and hisses, 'It wants to know about the dark arts? [$actor] will teach if it wants. Will it sit and meditate to learn?'";
##checkskill:
getgender $init_obj;
"[$actor] watches $himher meditate.";
include 58416;
multivar $skiller=$init_obj,$skillname='mysticism';
runsub getskillvalue;
if $init_obj's manamax == 0 then onemm;
if $skillvalue > 0 then goballistic;
##onemm:
set $init_obj's manamax to 1;
##checkskill2:
multivar $skiller=$init_obj,$skillname='magic';
runsub getskillvalue;
if $skillvalue == '0' then initmagic else sensemagic;
multivar $skiller=$init_obj,$skillname='necromancy';
runsub getskillvalue;
if $skillvalue == '0' then initnecromancy else sensenecromancy;
##goballistic:
"[$actor] grimaces darkly at [$init_obj], 'It is a mystic! We hate mystics!";
$target = $init_obj;
say 'orderattack',"[$actor] points at [$init_obj] and shrieks, 'Kill it, my pets! Kill! Kill!'";
##suggestspell:
"[$actor] says to [$init_obj], 'Now stand and try casting our simplest spell, the one that imbalms.'";
##initmagic:
"[$actor] widens his boney fingers, sending rancid whispering tendrils of diabolical magic into [$init_obj]'s core.";
multivar $skillcap='10',$skilltipobj='69414';
runsub initskill;
if $init_obj's manacap > 0 then convertit;
runsub getskillvalue;
set $init_obj's manamax to $skillvalue;
##sensemagic:
"[$actor] senses the magical ability already within [$init_obj]";
if $init_obj's manacap > 0 then convertit;
##initnecromancy:
"[$actor] widens his gaping jaw and hisses death's forbidden secrets to the depths of [$init_obj]'s mind.";
multivar $skillcap='10',$skilltipobj='69372';
runsub initskill;
##sensenecromancy:
"[$actor] senses the necromantic ability already within [$init_obj]";
##convertit:
$manamax = $init_obj's manamax;
if $manamax > 1 then convertit2 else erasem;
##convertit2:
$skillvals = $init_obj's skillvals;
manipulate $skillvals get magic to $magic;
manipulate $magic set svalue to $manamax by 2;
if $manamax > 10 then convertit3;
manipulate $skillvals set magic to $magic;
set $init_obj's skillvals to $skillvals;
runsub erasem;
##convertit3:
manipulate $magic set scap to 20 by 2;
manipulate $magic set stipobj to 69425 by 2;
##erasem:
find $init_obj,manacap;
if $found_id > 0 then erasem2;
find $init_obj,manapoints;
if $found_id > 0 then erasem2;
##erasem2:
set $found_id's loc to 0;