91
Modification Help / Re: Build in Mining mod
« on: May 08, 2010, 11:14:07 PM »
Is there a way to fix that, so it works?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
I think it's that it doesn't delete the bricks, it makes them invisible.
commandToClient(%obj.client, 'centerPrint', "Mined "@ %type, 5);
%obj.client.sendMiningStatus();
Dig_rebuildDirt(%col.getPosition());
%col.delete();
}
$Dig_pickCost[1] = 50;
$Dig_pickCost[2] = 100;
$Dig_pickCost[3] = 175;
$Dig_pickCost[4] = 250;
$Dig_pickCost[5] = 400;
$Dig_valueMin["gold"] = 10;
$Dig_valueMin["einst"] = 3;
$Dig_valueMin["silver"] = 6;
function serverCmdStats(%client)
{
messageClient(%client, '', "<color:FFFFFF>Dirt: "@ %client.dig_dirt);
messageClient(%client, '', "<color:FFFFFF>Einsteinium: "@ %client.dig_einst);
messageClient(%client, '', "<color:FFFFFF>Silver: "@ %client.dig_silver);
messageClient(%client, '', "<color:FFFFFF>Gold: "@ %client.dig_gold);
}function Dig_announceStats()
{
for(%c = 0; %c < ClientGroup.getCount(); %c++)
{
%client = ClientGroup.getObject(%c);
%silverCount = %client.dig_silver;
%goldCount = %client.dig_gold;
%dirtCount = %client.dig_dirt;
%einstCount = %client.dig_einst;
if(%silverCount > %highSilver)
{
%highSilver = %silverCount;
%highSilverClient = %client;
}
if(%goldCount > %highGold)
{
%highGold = %goldCount;
%highGoldClient = %client;
}
if(%dirtCount > %highDirt)
{
%highDirt = %dirtCount;
%highDirtClient = %client;
}
if(%einstCount > %highEinst)
{
%highEinst = %einstCount;
%highEinstClient = %client;
}
}
if(ClientGroup.getCount())
{
if(%highGoldClient.dig_gold)
schedule(0, 0, BottomPrintAll, "Most gold: <color:FFFFFF>"@ %highGoldClient.getPlayerName() @"<color:FF0000>("@ %highGoldClient.dig_gold @")", 5);
if(%highSilverClient.dig_silver)
schedule(5000, 0, BottomPrintAll, "Most silver: <color:FFFFFF>"@ %highSilverClient.getPlayerName() @"<color:FF0000>("@ %highSilverClient.dig_silver @")", 5);
if(%highDirtClient.dig_dirt)
schedule(10000, 0, BottomPrintAll, "Most dirt: <color:FFFFFF>"@ %highDirtClient.getPlayerName() @"<color:FF0000>("@ %highDirtClient.dig_dirt @")", 5);
if(%highEinstClient.dig_einst)
schedule(10000, 0, BottomPrintAll, "Most einsteinium: <color:FFFFFF>"@ %highEinstClient.getPlayerName() @"<color:FF0000>("@ %highEinstClient.dig_einst @")", 5);
$Dig_announceSchedule = schedule(30000, 0, "Dig_announceStats");function Dig_PlaceDirt(%pos)
{
%x = getWord(%pos, 0);
%y = getWord(%pos, 1);
%z = getWord(%pos, 2);
%color = 8;
%colorfx = 0;
%health = 10;
if(!(mAbs(%x) <= 11 && mAbs(%y) <= 11 && %z <= 10 && %z >= 0))
{
%random = getRandom() * 100;
if(%random >= 97.5)
{
%type = "Gold";
%color = 1;
%health = 25*3;
}
else if(%random < 95 && %random > 90)
{
%type = "Silver";
%color = 4;
%health = 15*3;
}
else if(%random <= 89.5 && %random > 87.5)
{
%type = "Einst";
%color = 13;
%health = 11*3;
}
else if(%random > 89.5 && %random <= 90)
{
%type = "lava";
%color = 0;
%health = 1;
%colorfx = 3;
} if(%col.health <= 0 || (%obj.client.isAdmin && %obj.client.dig_powermode))
{
%type = "dirt";
if(%col.type $= "gold")
{
%type = "<color:FFFF00>gold";
if(!%obj.client.dig_powermode)
{
%obj.client.mineMoney += $Dig_valueMin["gold"];
%obj.client.dig_gold++;
}
}
else if(%col.type $= "silver")
{
%type = "<color:EEE5dE>silver";
if(!%obj.client.dig_powermode)
{
%obj.client.mineMoney += $Dig_valueMin["silver"];
%obj.client.dig_silver++;
}
}
else if(%col.type $= "einst")
{
%type = "<color:236B8E>einsteinium";
if(!%obj.client.dig_powermode)
{
%obj.client.mineMoney += $Dig_valueMin["einst"];
%obj.client.dig_einst++;
}
}
else if(%col.type $= "lava")
{
%type = "<color:FF0000>lava";
if(!%obj.client.dig_powermode)
%obj.client.dig_lava++;
if(!%obj.client.isAdmin)
%obj.client.player.kill();
messageAll('', "<color:FFFFFF>"@ %obj.client.getPlayerName() @" <color:00FF00>mined a lava pocket!");
}Well of course. And its also easy to say quality over quantity. But as we have seen, there is no lack of quality here so if more is possible, it would be very welcome :P
You should consider adding more generic weapons to this. Such as more CS stuff.