Find
You are looking at a massive hammer
Put your weapon on the forge. If your aim is good enough, you may be able to repair or improve it.
Example:
create a knife.put the knife on the forge
Created by
thorn
, last updated 19 Jul 2012
Code
##tickloc:runsub ticked;
##ticked:
$forge = 50597;
if $actor's slot1 > 0 then checks1host;
##checks1host:
$slot1 = $actor's slot1;
$slot2 = $actor's slot2;
if $slot1's host eq $forge then checks1hosthow else clearslot;
##checks1hosthow:
if $slot1's hosthow eq 'on' then checks2loc else clearslot;
##checks2loc:
if $slot2's loc eq $loc then checks2h else clearslot;
##checks2h:
if $slot2's health > 0 then improve else dead;
##improve:
$health = $slot1's health;
$healthmax = $slot1's healthmax;
include 58416;
multivar $skiller=$slot2,$skillname='aim';
runsub getskillvalue;
$aim = $skillvalue;
$skillname = 'forge';
runsub getskillvalue;
if $skillvalue == 0 then initforge;
$forge = $skillvalue;
add $forge to $aim;
$chance = random $aim;
if $chance > $health then incrweapon else incrforge;
runsub mistake/5;
##incrweapon:
$verb = (works,toils,buckles down,drudges,carries on,labors,plugs away,strains,strives,sweats);
$adverb = (carefully,hard,attentively,conscientiously,deliberately,delicately,faithfully,fastidiously,heedfully,laboriously,meticulously,precisely,prudently,rigorously,scrupulously,thoroughly,vigilantly);
getgender $slot1;
add 1 to $health;
if $health > $healthmax then incrmax else repair;
##initforge:
multivar $skillname='forge',$skillcap='20',$skilltipobj='67676';
runsub initskill;
##incrforge:
multivar $skillname='forge';
runsub incrskill;
##incrmax:
add 1 to $healthmax;
set $slot1's health to $healthmax;
set $slot1's healthmax to $healthmax;
say 'msg',"[$slot2] $verb $adverb with[$slot1] and manages to improve $himher a bit.";
if $healthmax eq 20 then gash;
if $healthmax eq 30 then wound;
if $healthmax eq 40 then cut;
if $healthmax eq 50 then slice;
##repair:
set $slot1's health to $health;
say 'msg',"[$slot2] $verb $adverb with[$slot1] and manages to repair $himher a bit.";
##dead:
getgender $slot2;
say 'msg',"[$slot2] cannot work on the weapon, most likely because $heshe is dead.";
runsub clearslot;
##clearslot:
update $slot2 = "host='',hosthow=''";
update $actor = "slot1='',slot2=''";
relook $loc;
##mistake:
$s2h = $slot2's health;
take 1 from $s2h;
set $slot2's health to $s2h;
$verb = (slips,fumbles,flubs,goofs,messes up,stumbles,screws up,misjudges,buggers up,bungles,miscalculates,mucks up);
$adverb = (accidentally,as luck would have it,by a fluke,by mistake,for some reason,fortuitously,out of the clear blue sky,unexpectedly,unintentionally,unwittingly);
$hurt = (bruises,damages,harms,nicks,wounds,cuts,cuts up,flails,flogs,impairs,injures,lacerates,lashes,mars,mauls,nips,pierces,pinches,pommels,pricks,punctures,slugs,stabs,tears,whacks);
$bodypart = (hand,wrist,finger,thumb,forearm,elbow,arm,shoulder,chest,neck,head,face,ear,nose,abdomen,backside,thigh,knee,shin,ankle,foot,toe);
getgender $slot2;
say 'msg',"While working on [$slot1], [$slot2] $verb and $adverb $hurt $hisher $bodypart.";
if $s2h > 0 then continue else fatal;
##fatal:
set $slot2's health to 0;
say 'msg',"[$slot2] is killed by the accident.";
##clearslot:
update $actor = "slot1='',slot2=''";
relook $loc;
##gash:
$special = 55822;
runsub addspec;
##wound:
$special = 55824;
runsub addspec;
##cut:
$special = 55823;
runsub addspec;
##slice:
$special = 55825;
runsub addspec;
##addspec:
copy $special;
switch $new_id off;
set $new_id's loc to $slot1;
set $new_id's pose to 'hidden';
$mat = $slot1's material;
swap $mat add _showspecials_;
set $slot1's material to $mat;
print "[$slot1] can now inflict [$new_id]";