yes, its the code....
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// This Makes Declared Items UnDroppable
// $DropProo
f[%item] = true;
function Item::onDrop(%player,%item)
{
dbecho($dbechoMode, "Item::onDrop(" @ %player @ ", " @ %item @ ")");
if($matchStarted)
{
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if($DropProof[%item])
return;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if(%item.className != Armor)
{
if(%item.className == Projectile)
%delta = 20;
else
%delta = 1;
if(Player::getItemCount(%player, %item) < %delta)
%delta = Player::getItemCount(%player, %item);
if(%delta > 0)
{
%obj = newObject("","Item",%item,1,false);
%obj.delta = %delta;
schedule("Item::Pop(" @ %obj @ ");", $ItemPopTime, %obj);
addToSet("MissionCleanup", %obj);
if(IsDead(%player))
GameBase::throw(%obj, %player, 10, true);
else
{
GameBase::throw(%obj, %player, 15, false);
Item::playPickupSound(%obj);
}
Player::decItemCount(%player,%item,%delta);
RefreshAll(Player::getClient(%player));
return %obj;
}
}
}
}
function Ammo::onDrop(%player, %item)
{
dbecho($dbechoMode, "Ammo::onDrop(" @ %player @ ", " @ %item @ ")");
if($matchStarted)
{
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if($DropProof[%item])
return;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if(%item.className == Ammo)
%delta = 20;
else
%delta = 1;
if(Player::getItemCount(%player, %item) < %delta)
%delta = Player::getItemCount(%player, %item);
if(%delta > 0)
{
%obj = newObject("","Item",%item,%delta,false);
%obj.delta = %delta;
schedule("Item::Pop(" @ %obj @ ");", $ItemPopTime, %obj);
addToSet("MissionCleanup", %obj);
GameBase::throw(%obj,%player,20,false);
Item::playPickupSound(%obj);
Player::decItemCount(%player,%item,%delta);
RefreshAll(Player::getClient(%player));
}
}
}
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// This Puts Items Declared Into Storage Upon Death
// $DeathStorage[%item] = true;
function Player::onKilled(%this)
{
dbecho($dbechoMode, "Player::onKilled(" @ %this @ ")");
%clientId = Player::getClient(%this);
%killerId = fetchData(%clientId, "tmpkillerid");
storeData(%clientId, "tmpkillerid", "");
Client::setControlObject(%clientId.possessId, %clientId.possessId);
Client::setControlObject(%clientId, %clientId);
storeData(%clientId.possessId, "dumbAIflag", "");
$possessedBy[%clientId.possessId] = "";
if(IsStillArenaFighting(%clientId))
{
%a = GetArenaDuelerIndex(%clientId);
$ArenaDueler[%a] = GetWord($ArenaDueler[%a], 0) @ " DEAD";
if(!Player::IsAiControlled(%clientId))
%clientId.RespawnMeInArena = True;
}
else if(IsInRoster(%clientId))
{
if(Player::isAiControlled(%clientId))
RemoveFromRoster(%clientId);
}
else if(fetchData(%clientId, "noDropLootbagFlag"))
{ }
else
{
%tmploot = "";
if(fetchData(%clientId, "COINS") > 0)
%tmploot = %tmploot @ "COINS " @ floor(fetchData(%clientId, "COINS")) @ " ";
storeData(%clientId, "COINS", 0);
%max = getNumItems();
for (%i = 0; %i < %max; %i++)
{
%a = getItemData(%i);
%itemcount = Player::getItemCount(%clientId, %a);
if(%itemcount)
{
%flag = False;
if(fetchData(%clientId, "LCK") >= 0)
{
if(Player::getMountedItem(%clientId, $WeaponSlot) == %a || %a.className == "Equipped" || $LoreItem[%a] == True)
%flag = True;
}
else
%flag = True;
if(fetchData(%clientId, "LCK") < 0 && Player::isAiControlled(%clientId))
%flag = True;
if(%a == CastingBlade)
%flag = False;
if($StealProtectedItem[%a])
%flag = False;
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if($DeathStorage[%item])
{
%b = getItemData(%i);
if(%b.className == "Equipped")
%b = String::getSubStr(%b, 0, String::len(%b)-1);
storeData(%clientId, "BankStorage", SetStuffString(fetchData(%clientId, "BankStorage"), %b, %itemcount));
Player::setItemCount(%clientId, %a, 0);
}
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if(%flag)
{
%b = %a;
if(%b.className == "Equipped")
%b = String::getSubStr(%b, 0, String::len(%b)-1);
if(Player::getMountedItem(%clientId, $WeaponSlot) == %a)
{
%tmploot = %tmploot @ %b @ " 1 ";
Player::decItemCount(%clientId, %a);
}
else
{
%tmploot = %tmploot @ %b @ " " @ Player::getItemCount(%clientId, %a) @ " ";
Player::setItemCount(%clientId, %a, 0);
}
}
}
}
if(%tmploot != "")
{
if(Player::isAiControlled(%clientId))
TossLootbag(%clientId, %tmploot, 1, "*", 300);
else
{
%namelist = Client::getName(%clientId) @ ",";
if(fetchData(%clientId, "LCK") >= 0)
TossLootbag(%clientId, %tmploot, 5, %namelist, Cap(fetchData(%clientId, "LVL") * 300, 300, 3600));
else
TossLootbag(%clientId, %tmploot, 5, %namelist, Cap(fetchData(%clientId, "LVL") * 0.2, 5, "inf"));
}
}
updateSpawnStuff(%clientId);
%victimH = fetchData(%clientId, "MyHouse");
%killerH = fetchData(%killerId, "MyHouse");
%vhn = GetHouseNumber(%victimH);
%khn = GetHouseNumber(%killerH);
if(%vhn != "")
{
if(fetchData(%clientId, "LCK") < 0)
{
if(fetchData(%clientId, "RankPoints") <= 0)
BootFromCurrentHouse(%clientId, True);
else
Client::sendMessage(%clientId, $MsgRed, "You have lost all your Rank Points because you died with 0 LCK!");
storeData(%clientId, "RankPoints", 0);
}
Client::sendMessage(%clientId, $MsgWhite, "You lost 2 Rank Points.");
storeData(%clientId, "RankPoints", 2, "dec");
if(%khn != "")
{
if(%khn != %vhn)
{
Client::sendMessage(%killerId, $MsgWhite, "You gained 1 Rank Point!");
storeData(%killerId, "RankPoints", 1, "inc");
}
else
{
Client::sendMessage(%killerId, $MsgWhite, "You lost 1 Rank Point.");
storeData(%killerId, "RankPoints", 1, "dec");
}
}
}
else if(%vhn == "" && %khn != "")
{ }
if(!IsInArenaDueler(%clientId) && !Player::isAiControlled(%clientId) && fetchData(%clientId, "LCK") < 0)
{
if($hardcore)
{
if(fetchData(%clientId, "LVL") > 8 && fetchData(%clientId, "RemortStep") > 0)
{
if(!Player::isAiControlled(%killerId))
ResetPlayer(%clientId);
}
}
storeData(%clientId, "zone", "");
}
}
if(fetchData(%clientId, "deathmsg") != "")
{
%kitem = Player::getMountedItem(%killerId, $WeaponSlot);
%msg = nsprintf(fetchData(%clientId, "deathmsg"), Client::getName(%killerId), Client::getName(%clientId), %kitem.description);
remoteSay(%clientId, 0, %msg);
}
if(Player::isAiControlled(%clientId))
{
%i = GetEventCommandIndex(%clientId, "onkill");
if(%i != -1)
{
%name = GetWord($EventCommand[%clientId, %i], 0);
%type = GetWord($EventCommand[%clientId, %i], 1);
%cl = NEWgetClientByName(%name);
if(%cl == -1)
%cl = 2048;
%cmd = String::NEWgetSubStr($EventCommand[%clientId, %i], String::findSubStr($EventCommand[%clientId, %i], ">")+1, 99999);
%pcmd = ParseBlockData(%cmd, %clientId, %killerid);
$EventCommand[%clientId, %i] = "";
schedule("remoteSay(" @ %cl @ ", 0, \"" @ %pcmd @ "\", \"" @ %name @ "\");", 2);
}
ClearEvents(%clientId);
}
storeData(%clientId, "noDropLootbagFlag", "");
storeData(%clientId, "SpellCastStep", "");
%clientId.sleepMode = "";
refreshHPREGEN(%clientId);
refreshMANAREGEN(%clientId);
Client::setControlObject(%clientId, %clientId);
storeData(%clientId, "dumbAIflag", "");
storeData(%clientId, "lastzone", fetchData(%clientId, "zone"));
PlaySound(RandomRaceSound(fetchData(%clientId, "RACE"), Death), GameBase::getPosition(%clientId));
%clientId.dead = 1;
if($AutoRespawn > 0)
schedule("Game::autoRespawn(" @ %clientId @ ");",$AutoRespawn,%clientId);
Player::setDamageFlash(%this,0.75);
if(%clientId != -1)
{
if(%this.vehicle != "")
{
if(%this.driver != "")
{
%this.driver = "";
Client::setControlObject(Player::getClient(%this), %this);
Player::setMountObject(%this, -1, 0);
}
else
{
%this.vehicle.Seat[%this.vehicleSlot-2] = "";
%this.vehicleSlot = "";
}
%this.vehicle = "";
}
schedule("GameBase::startFadeOut(" @ %this @ ");", $CorpseTimeoutValue, %this);
Client::setOwnedObject(%clientId, -1);
Client::setControlObject(%clientId, Client::getObserverCamera(%clientId));
Observer::setOrbitObject(%clientId, %this, 15, 15, 15);
schedule("deleteObject(" @ %this @ ");", $CorpseTimeoutValue + 2.5, %this);
%clientId.observerMode = "dead";
%clientId.dieTime = getSimTime();
}
}
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// This Sets User Lists For Set Items
// $UserList[%item] = "%name1 %name2 %name3 .... ";
function Item::onUse(%player,%item)
{
dbecho($dbechoMode, "Item::onUse(" @ %player @ ", " @ %item @ ")");
%clientId = Player::getClient(%player);
if(!IsDead(%clientId))
{
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if($UserList[%item] != "")
{
%name = Client::getName(%clientId);
%found = false;
for(%i=0; (%word=getWord($UserList[%item], %i)) != ""; %i++)
{
if(%word == %name)
%found = true;
}
if(!%found)
return;
}
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
if(%item.className == Accessory)
{
%cnt = 0;
%max = getNumItems();
for(%i = 0; %i < %max; %i++)
{
%checkItem = getItemData(%i);
if(%checkItem.className == Equipped && GetAccessoryVar(%checkItem, $AccessoryType) == GetAccessoryVar(%item, $AccessoryType))
%cnt += Player::getItemCount(%player, %checkItem);
}
if(SkillCanUse(%clientId, %item))
{
if(%cnt < $maxAccessory[GetAccessoryVar(%item, $AccessoryType)])
{
Client::sendMessage(%clientId, $MsgBeige, "You equipped " @ %item.description @ ".");
Player::setItemCount(%player, %item, Player::getItemCount(%player, %item)-1);
Player::setItemCount(%player, %item @ "0", Player::getItemCount(%player, %item @ "0")+1);
}
else
Client::sendMessage(%clientId, $MsgRed, "You can't equip this item because you have too many already equipped.~wC_BuySell.wav");
}
else
Client::sendMessage(%clientId, $MsgRed, "You can't equip this item because you lack the necessary skills.~wC_BuySell.wav");
if($OverrideMountPoint[%item] == "")
Player::mountItem(%player, %item @ "0", 1, 0);
}
else if(%item.className == Equipped)
{
%o = String::getSubStr(%item, 0, String::len(%item)-1);
Client::sendMessage(%clientId, $MsgBeige, "You unequipped " @ %item.description @ ".");
Player::setItemCount(%player, %item, Player::getItemCount(%player, %item)-1);
Player::setItemCount(%player, %o, Player::getItemCount(%player, %o)+1);
if($OverrideMountPoint[%item] == "")
Player::unMountItem(%player, 1);
}
else
RPGmountItem(%player, %item, $DefaultSlot);
refreshHP(%clientId, 0);
refreshMANA(%clientId, 0);
RefreshAll(%clientId);
}
}
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Declare Your Item Special Features
$StealProtectedItem[BadgeOfHonor] = true;
$DeathStorage[BadgeOfHonor] = true;
$DropProof[BadgeOfHonor] = true;
$StealProtectedItem[BadgeOfLoyalty] = true;
$DeathStorage[BadgeOfLoyalty] = true;
$DropProof[BadgeOfLoyalty] = true;
$StealProtectedItem[BadgeOfFriendship] = true;
$DeathStorage[BadgeOfFriendship] = true;
$DropProof[BadgeOfFriendship] = true;
$StealProtectedItem[BadgeOfReverence] = true;
$DeathStorage[BadgeOfReverence] = true;
$DropProof[BadgeOfReverence] = true;
$StealProtectedItem[LightningBlade] = true;
$DeathStorage[LightningBlade] = true;
$DropProof[LightningBlade] = true;
$UserList[LightningBlade] = "Ozzy Particle Pecker Draak Funger eViL Mithrandir";
p.s. - spacing complimentary to our friendly < pre > HTML command =)