Forums Index >> Modding >> I was camped, and ALL I GOT WAS THIS k3w1 script!



Page : <1> :


Yesterday, I was severely ticked off by a camper. I told him to stop, but he persisted. But there's a silver lining, and it's pretty thick. Behold:

 

                                        

Function Goal::onEnter(%db, %this, %tank);
{
if ($Game::MissionType $= "Scrum")
{
if($Game::TeamGame)
{
%tank.inGoal = 1;
startCamperCounter(%tank);
if (%tank.reset)
{
schedule(300000, "%tank.resetTime");
%tank.reset = 0;
}
}
if (%tank.getFlag() != -1)
{
serverPlay3D(PupOffSound,%this.getTransform());
%flag = %tank.getFlag();
%flag.clearMount();
%flag.setTransform(VectorAdd(pickSpawnPoint(""),"0 0 10"));
%flag.setGoal(pickGoal());
if ($Game::TeamGame)
bottomPrintAll(%tank.client.nameBase SPC "scored a goal for the" SPC %tank.client.team.shortName SPC "team!",4,2);
else
bottomPrintAll(%tank.client.nameBase SPC "scored a goal!",4,2);
%tank.incScore(1,1);
}
}
}
Function startCamperCounter(%tank)
{
if (%tank.time == 10)
{
%tank.time = 0;
%tank.client.hurtMe(100);
}
else if (%tank.inGoal)
{
%tank.time++;
schedule (1000, "startCamperCounter", %tank);
}
}
Function resetTime(%tank);
{
%tank.reset = 1;
%tank.time = 0;
}

 


Anti-camper script. 'Nuff said.
I already posted it on the ACAS thread, I know, but I didn't get many responses.

Saturday, October 15, 2005 at 8:45:41 AM

Cool script Dj good job!

Saturday, October 15, 2005 at 9:16:19 AM

Good but
if (%tank.time == 10)
shouldnt have 1 equals...

Saturday, October 15, 2005 at 12:11:12 PM

Yeppers...

Saturday, October 15, 2005 at 12:17:39 PM

I don't like it. People could just sit outside the goal and wait.

Also this makes goal battles nearly impossible.

Saturday, October 15, 2005 at 12:36:20 PM

I'd suggest to make it so that it only goes into effect if one or two tanks are camping but if the number of tanks in the goal exceeds a certain number, then it won't work.


Saturday, October 15, 2005 at 7:16:30 PM

Page : <1> :

insert quote insert url insert email insert image bold italic underline superscript subscript horizontal rule : : Help on using forum codes

Add comment:

HTML is disabled within comments, but ZBB Code is enabled.

Back to the top

Web site designed, maintained and funded by -z- and Dan MacDonald