Find
You are looking at a npc called Thale
To mysticism, seek you?
talk to Thale
you must.
Created by
thorn
, last updated 25 Jul 2012
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 mysticism?'";
"[$actor] replies, 'A channel to yourself. A channel to all. Sit you must. Meditate you must.'";
##checkskill:
getgender $init_obj;
"[$actor] watches $himher meditate.";
include 58416;
multivar $skiller=$init_obj,$skillname='necromancy';
runsub getskillvalue;
if $init_obj's manamax == 0 then onemm;
if $skillvalue > 0 then goballistic else checkskill2;
##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='mysticism';
runsub getskillvalue;
if $skillvalue == '0' then initmysticism else sensemysticism;
##goballistic:
"[$actor] frowns judgementally at [$init_obj], 'I sense your involvement with the dark side of magic. You are not welcome here.'";
$target = $init_obj;
##suggestspell:
"[$actor] says to [$init_obj], 'Now stand and try casting our simplest spell, the one that heals.'";
##initmagic:
"[$actor] closes his eyes, and channels some secrets of magic to [$init_obj]'s psyche.";
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;
##initmysticism:
"[$actor] closes his eyes, and channels some secrets of mysticism to [$init_obj]'s psyche.";
multivar $skillcap='10',$skilltipobj='69372';
runsub initskill;
##sensemysticism:
"[$actor] senses the mystical 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;