Find
You are looking at a npc called Sparticles
Sparticles rests on a mat, meditating. He seems to want you to sit on a mat so you can received your lesson.
Created by
thorn
, last updated 25 Jul 2012
Code
if reacting to moves then moved;
if target of talk then talked;
##moved:
if $init_obj's material like living then moved2;
##moved2:
include 58416;
say 'msg',"[$actor] nods towards [$init_obj], 'Thank you. Now, let me check you over.'";
$improve = 0;
multivar $skiller=$init_obj,$skillname='aim';
runsub getskillvalue;
runsub getskillcap;
multivar $aim=$skillvalue,$acap=$skillcap,$skillname='dodge';
runsub getskillvalue;
runsub getskillcap;
multivar $dodge=$skillvalue,$dcap=$skillcap;
$wrth = $init_obj's worth;
if $aim < 10 then lowaim else checkacap;
if $dodge < 10 then lowdodge else checkdcap;
set $init_obj's worth to $wrth;
if $improve eq 0 then canthelp;
say 'msg',"[$actor] says to [$init_obj],'You may go now.'";
##lowaim:
say 'msg',"[$actor] says to [$init_obj],'You need a bit of practice on your aim.'";
##lowdodge:
say 'msg',"[$actor] says to [$init_obj],'A bit of work on your dodging ability would help.'";
##checkacap:
if $acap > 10 then ahigh else trainaim;
##ahigh:
say 'msg',"[$actor] says to [$init_obj],'Your aim is quite impressive.'";
##trainaim:
if $wrth < 50 then toopoor else trainaim2;
##trainaim2:
say 'msg',"[$init_obj] tosses 50 coins to [$actor]";
$improve = 1;
take 50 from $wrth;
say 'msg',"[$actor] teaches [$init_obj] a few things about the art of aiming";
multivar $skillname='aim',$skillcap=20,$skilltipobj-58771;
runsub setskillcap;
sayto $init_obj,"You can now learn up to 20 aim points. You gain this whenever you miss your opponent";
##checkdcap:
if $dcap > 10 then dhigh else traindodge;
##dhigh:
say 'msg',"[$actor] says to [$init_obj],'You seem to be able to dodge very well.'";
##traindodge:
if $wrth < 50 then toopoor else traindodge2;
##traindodge2:
say 'msg',"[$init_obj] tosses 50 coins to [$actor]";
$improve = 1;
take 50 from $wrth;
say 'msg',"[$actor] teaches [$init_obj] a few things about the art of dodging";
set $init_obj's healthmax to 20;
multivar $skillname='dodge',$skillcap=20,$skilltipobj-58774;
runsub setskillcap;
sayto $init_obj,"You can now learn up to 20 dodge points. You sometimes gain this when you are hit by your opponent";
sayto $init_obj,"You can also now heal up to 20 health points.";
##toopoor:
say 'msg',"[$actor] says to [$init_obj], 'I can help you for only 50 coins. Come back when you have it.";
##canthelp:
say 'msg',"[$actor] shakes his head at [$init_obj],'Sorry, but I cannot help you.'";
##talked:
say 'msg',"[$init_obj] says to [$actor], 'Can you teach me anything about combat?";
say 'mag',"[$actor] smiles at [$init_obj] and gestures towards a mat, 'Please have a seat and we will see how you are doing.'";