Forums Index >> Modding >> I was camped, and ALL I GOT WAS THIS k3w1 script!
Page : <1> :
Cool script Dj good job!
Good but
if (%tank.time == 10)
shouldnt have 1 equals...
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.
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.