freeze.src
Code: Select all
use uo;
use os;
program freeze(who)
SendSysMessage(who, "Target the creature or person to render immobile.");
var targ := Target(who, TGTOPT_NOCHECK_LOS );
if(!targ)
SendSysMessage(who, "Cancelled.");
return;
endif
if(targ.ip)
if(targ.cmdlevel < who.cmdlevel)
targ.frozen := 1;
SendSysMessage(who, "Player has been frozen!");
return;
else
SendSysMessage(who, "Player has a higher command level, cannot freeze!");
return;
endif
elseif(!targ.npctemplate)
SendSysMessage(who, "You cannot freeze an object!");
return;
else
targ.frozen := 1;
SendSysMessage(who, "Creature has been frozen!");
return;
endif
endprogram
thaw.src
Code: Select all
use uo;
use os;
program thaw(who)
SendSysMessage(who, "Target the creature or person to mobilize.");
var targ := Target(who, TGTOPT_NOCHECK_LOS );
if(!targ)
SendSysMessage(who, "Cancelled.");
return;
endif
if(targ.ip)
if(targ.cmdlevel <= who.cmdlevel)
targ.frozen := 0;
SendSysMessage(who, "Player has been thawed!");
return;
else
SendSysMessage(who, "Player has a higher command level, cannot thaw!");
return;
endif
elseif(!targ.npctemplate)
SendSysMessage(who, "You cannot thaw an object!");
return;
else
targ.frozen := 0;
SendSysMessage(who, "Creature has been thawed!");
return;
endif
endprogram