This one, createchest.src, belongs in \pkg\skills\lockpicking\commands\gm
Code: Select all
/*
* $Id: createchest.src $
*
*/
use uo;
program textcmd_Create(who, text)
if ( !text )
SendSysMessage(who, "Usage: .createchest <difficulty>");
return 0;
endif
var diff := CInt(text);
if( !diff)
SendSysMessage(who, "The difficulty defaults to 1.");
diff := 1;
endif
SendSysMessage(who, "Where would you like it placed?");
var targ := TargetCoordinates(who);
var chest := 0x69f8;
var created := CreateItemAtLocation(targ.x, targ.y, targ.z, chest, 1, who.realm);
SetObjProperty(chest, "lockpicking", diff );
SetObjProperty(chest,"spawnchest", 1);
created.locked :=1;
if ( !created )
SendSysMessage(who, "Error: Could not create the chest.");
return 0;
elseif ( !targ )
SendSysMessage(who, "Cancelled");
return 0;
endif
return 1;
endprogram
Code: Select all
ICP Register
{
Name Lockpicking
Version 2.0
Description The POL 095 Distro Lockpicking skill converted to POL 098
Description Conversion done by Yukiko - Hope Lives Shard Project.
Creator POL Distro Team
C_Email distro@polserver.com
Maintainer POL Distro Team
M_Email distro@polserver.com
#Script cmdlevel path
#TextCmd cmdlevel path
}
Thanks.