Find
You are looking at a npc called Luminitsa
Are you interested in learning the secrets of sorcery?
talk to Luminitsa
Created by
thorn
, last updated 31 Jul 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 sorcery?'";
"[$actor] replies, 'Sorcery is the culmination of the arcane formulae through the application of empirical research.'";
"[$actor] adds, 'But first, one must fulfill a conduit with the ethereal and with that take a seat and meditate.'";
##checkskill:
if $init_obj's manamax == 0 then onemm;
getgender $init_obj;
"[$actor] watches $himher meditate.";
include 58416;
multivar $skiller=$init_obj,$skillname='magic';
runsub getskillvalue;
if $skillvalue == '0' then initmagic else sensemagic;
multivar $skiller=$init_obj,$skillname='sorcery';
runsub getskillvalue;
if $skillvalue == '0' then initsorcery else sensesorcery;
##onemm:
set $init_obj's manamax to 1;
##suggestspell:
"[$actor] says to [$init_obj], 'Now stand and try casting our simplest spell, the one that produces light.'";
##initmagic:
"[$actor] mumbles strange words, drawing the fundamental secrets of magic to [$init_obj]'s mind.";
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;
##initsorcery:
"[$actor] utters a sophisticated phrase, and transfers some secrets of sorcery to [$init_obj]'s cognition.";
multivar $skillcap='10',$skilltipobj='69431';
runsub initskill;
##sensesorcery:
"[$actor] senses the sorcery 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;
"[$init_obj]'s magic converted to $manamax points";
##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;