• Log in or sign up for an account here: https://www.sythe.org/login

PestControl On Your Server! (Finally released on Sythe!)

  • Thread starter Thread starter Anime190
  • Start date Start date
A

Anime190

Guest
Here it is, PC on private servers :D Post errors, suggestions etc. ^_^

Purpose: adding full pest control
Difficulty: 5/10
Knowledge: finding copy & pasting
Server Base: pimp
WARNING: Back up your server



--------------------------------------------------------------------------

first of all open up server.java and add these:


Code:
Code:
gameison = new gameison();
public static gameison gameison = null;save and close server.java and open up npcHandler.java and find this

Code:
void processat the top add this:

Code:
if (hitTimer > 0) {
hitTimer -= 1;}
if (hitTimer2 > 0) {
hitTimer2 -= 1;}
if (hitTimer3 > 0) {
hitTimer3 -= 1;}

and then under:

Code:
Code:
int old1 = (npcs[i].npcType - 1);
							int old2 = npcs[i].makeX;
							int old3 = npcs[i].makeY;
							int old4 = npcs[i].heightLevel;
							int old5 = npcs[i].moverangeX1;
							int old6 = npcs[i].moverangeY1;
							int old7 = npcs[i].moverangeX2;
							int old8 = npcs[i].moverangeY2;
							int old9 = npcs[i].walkingType;
							int old10 = npcs[i].MaxHP;
							npcs[i] = null;

change:

Code:
Code:
newNPC(old1, old2, old3, old4, old5, old6, old7, old8, old9, old10, true);

to:

Code:
Code:
if(server.gameison.gameIsOn == false){newNPC(old1, old2, old3, old4, old5, old6, old7, old8, old9, old10, true);}

Code:
under the last }

do all this:

Code:
Code:
if(npcs[i].npcType == 3771 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(misc.random2(100) == 1){
gfxAll(441,npcs[i].absY,npcs[i].absX);
npcs[i].animNumber = 326;
npcs[i].updateRequired = true;
gfxAll(437,npcs[4].absY,npcs[4].absX);
npcs[4].hitDiff = misc.random(10);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animUpdateRequired = true;
npcs[i].updateRequired = true;
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
}
if(npcs[i].npcType == 3770 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(misc.random2(100) == 1){
gfxAll(441,npcs[i].absY,npcs[i].absX);
npcs[i].animNumber = 326;
npcs[i].updateRequired = true;
gfxAll(437,npcs[4].absY,npcs[4].absX);
npcs[4].hitDiff = misc.random(10);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animUpdateRequired = true;
npcs[i].updateRequired = true;
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
}
if(npcs[i].npcType == 3769 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(misc.random2(100) == 1){
gfxAll(441,npcs[i].absY,npcs[i].absX);
npcs[i].animNumber = 326;
npcs[i].updateRequired = true;
gfxAll(437,npcs[4].absY,npcs[4].absX);
npcs[4].hitDiff = misc.random(10);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animUpdateRequired = true;
npcs[i].updateRequired = true;
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
}
if(npcs[i].npcType == 3768 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(misc.random2(100) == 1){
gfxAll(441,npcs[i].absY,npcs[i].absX);
npcs[i].animNumber = 326;
npcs[i].updateRequired = true;
gfxAll(437,npcs[4].absY,npcs[4].absX);
npcs[4].hitDiff = misc.random(10);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animUpdateRequired = true;
npcs[i].updateRequired = true;
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
}
if(npcs[i].npcType == 3758 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(misc.random2(100) == 1){
gfxAll(441,npcs[i].absY,npcs[i].absX);
npcs[i].animNumber = 326;
npcs[i].updateRequired = true;
gfxAll(437,npcs[4].absY,npcs[4].absX);
npcs[4].hitDiff = misc.random(10);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animUpdateRequired = true;
npcs[i].updateRequired = true;
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
}
if(npcs[i].npcType == 3757 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(misc.random2(100) == 1){
gfxAll(441,npcs[i].absY,npcs[i].absX);
npcs[i].animNumber = 326;
npcs[i].updateRequired = true;
gfxAll(437,npcs[4].absY,npcs[4].absX);
npcs[4].hitDiff = misc.random(10);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animUpdateRequired = true;
npcs[i].updateRequired = true;
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
}
if(npcs[i].npcType == 3756 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(misc.random2(100) == 1){
gfxAll(441,npcs[i].absY,npcs[i].absX);
npcs[i].animNumber = 326;
npcs[i].updateRequired = true;
gfxAll(437,npcs[4].absY,npcs[4].absX);
npcs[4].hitDiff = misc.random(10);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animUpdateRequired = true;
npcs[i].updateRequired = true;
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
}
if(npcs[i].npcType == 3755 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(misc.random2(100) == 1){
gfxAll(441,npcs[i].absY,npcs[i].absX);
npcs[i].animNumber = 326;
npcs[i].updateRequired = true;
gfxAll(437,npcs[4].absY,npcs[4].absX);
npcs[4].hitDiff = misc.random(10);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animUpdateRequired = true;
npcs[i].updateRequired = true;
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
}
if(npcs[i].npcType == 3754 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(misc.random2(100) == 1){
gfxAll(441,npcs[i].absY,npcs[i].absX);
npcs[i].animNumber = 326;
npcs[i].updateRequired = true;
gfxAll(437,npcs[4].absY,npcs[4].absX);
npcs[4].hitDiff = misc.random(10);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animUpdateRequired = true;
npcs[i].updateRequired = true;
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
}
if(npcs[i].npcType == 3753 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(misc.random2(100) == 1){
gfxAll(441,npcs[i].absY,npcs[i].absX);
npcs[i].animNumber = 326;
npcs[i].updateRequired = true;
gfxAll(437,npcs[4].absY,npcs[4].absX);
npcs[4].hitDiff = misc.random(10);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animUpdateRequired = true;
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
}
if(npcs[i].npcType == 3747 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(misc.random2(100) == 1){
gfxAll(441,npcs[i].absY,npcs[i].absX);
npcs[i].animNumber = 326;
npcs[i].updateRequired = true;
gfxAll(437,npcs[4].absY,npcs[4].absX);
npcs[4].hitDiff = misc.random(10);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animUpdateRequired = true;
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
}
if(npcs[i].npcType == 3748 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(misc.random2(100) == 1){
gfxAll(441,npcs[i].absY,npcs[i].absX);
npcs[i].animNumber = 326;
npcs[i].updateRequired = true;
gfxAll(437,npcs[4].absY,npcs[4].absX);
npcs[4].hitDiff = misc.random(10);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animUpdateRequired = true;
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
}
if(npcs[i].npcType == 3749 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(misc.random2(100) == 1){
gfxAll(441,npcs[i].absY,npcs[i].absX);
npcs[i].animNumber = 326;
npcs[i].updateRequired = true;
gfxAll(437,npcs[4].absY,npcs[4].absX);
npcs[4].hitDiff = misc.random(10);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animUpdateRequired = true;
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
}
if(npcs[i].npcType == 3750 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(misc.random2(100) == 1){
gfxAll(441,npcs[i].absY,npcs[i].absX);
npcs[i].animNumber = 326;
npcs[i].updateRequired = true;
gfxAll(437,npcs[4].absY,npcs[4].absX);
npcs[4].hitDiff = misc.random(10);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animUpdateRequired = true;
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
}
if(npcs[i].npcType == 3751 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(misc.random2(100) == 1){
gfxAll(441,npcs[i].absY,npcs[i].absX);
npcs[i].animNumber = 326;
npcs[i].updateRequired = true;
gfxAll(437,npcs[4].absY,npcs[4].absX);
npcs[4].hitDiff = misc.random(10);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animUpdateRequired = true;
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
}
if(npcs[i].npcType == 3771 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(hitTimer == 0){
npcs[4].hitDiff = misc.random(5);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animNumber = 326;
npcs[i].animUpdateRequired = true;
npcs[i].updateRequired = true;
hitTimer = 6;}
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
if(npcs[i].npcType == 3776 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(hitTimer2 == 0){
npcs[4].hitDiff = misc.random(5);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animNumber = 326;
npcs[i].animUpdateRequired = true;
npcs[i].updateRequired = true;
hitTimer2 = 3;}
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}
if(npcs[i].npcType == 3758 && server.gameison.gameIsOn == true) {
if(npcs[4].IsDead == false){
if(hitTimer3 == 0){
npcs[4].hitDiff = misc.random(5);
npcs[4].hitUpdateRequired = true;
npcs[4].updateRequired = true;
npcs[i].animNumber = 326;
npcs[i].animUpdateRequired = true;
npcs[i].updateRequired = true;
hitTimer3 = 5;}
}
if(npcs[4].IsDead == true){
server.gameison.voidIsDead = true;
}
}

And change:

Code:
Code:
 else if (npcs[i].RandomWalk == false && npcs[i].IsUnderAttack == true) {
if(npcs[i].npcType == 1645 || npcs[i].npcType == 509 || npcs[i].npcType == 1241 || npcs[i].npcType == 1246 || npcs[i].npcType == 1159 || npcs[i].npcType == 54)
                                                AttackPlayerMage(i);
                                                else
						AttackPlayer(i);
					} else if (npcs[i].followingPlayer && npcs[i].followPlayer > 0 && server.playerHandler.players[npcs[i].followPlayer] != null) {
                                                if(server.playerHandler.players[npcs[i].followPlayer].AttackingOn > 0) {
                                                int follow = npcs[i].followPlayer;
                                                npcs[i].StartKilling = server.playerHandler.players[follow].AttackingOn;
                                                npcs[i].RandomWalk = true;
                                                npcs[i].IsUnderAttack = true;
                                                if(npcs[i].StartKilling > 0) {
                                                if(npcs[i].npcType == 1645 || npcs[i].npcType == 509 || npcs[i].npcType == 1241 || npcs[i].npcType == 1246 || npcs[i].npcType == 54)
                                                AttackPlayerMage(i);
                                                else
                                                AttackPlayer(i);
                                                }
                                                }
                                                else {
                                                FollowPlayer(i);
                                                }
					}
To;

Code:
Code:
 else if (npcs[i].RandomWalk == false && npcs[i].IsUnderAttack == true) {
                                                if(npcs[i].npcType == 3777
					        || npcs[i].npcType == 3778
					        || npcs[i].npcType == 3779
					        || npcs[i].npcType == 3780)
                                                {
                                                npcs[i].RandomWalk = false;
                                                npcs[i].IsUnderAttack = false;
                                                } else if(npcs[i].npcType == 1645 || npcs[i].npcType == 509 || npcs[i].npcType == 1241 || npcs[i].npcType == 1246 || npcs[i].npcType == 1159 || npcs[i].npcType == 54)
                                                AttackPlayerMage(i);
                                                else
						AttackPlayer(i);
					} else if (npcs[i].followingPlayer && npcs[i].followPlayer > 0 && server.playerHandler.players[npcs[i].followPlayer] != null) {
                                                if(server.playerHandler.players[npcs[i].followPlayer].AttackingOn > 0) {
                                                int follow = npcs[i].followPlayer;
                                                if(npcs[i].npcType == 3777
					        || npcs[i].npcType == 3778
					        || npcs[i].npcType == 3779
					        || npcs[i].npcType == 3780)
                                                {
                                                npcs[i].RandomWalk = false;
                                                npcs[i].IsUnderAttack = false;
                                                } else {
                                                npcs[i].StartKilling = server.playerHandler.players[follow].AttackingOn;
                                                npcs[i].RandomWalk = true;
                                                npcs[i].IsUnderAttack = true;
                                                if(npcs[i].StartKilling > 0) {
                                                if(npcs[i].npcType == 1645 || npcs[i].npcType == 509 || npcs[i].npcType == 1241 || npcs[i].npcType == 1246 || npcs[i].npcType == 54)
                                                AttackPlayerMage(i);
                                                else
                                                AttackPlayer(i);
                                                }
                                                }
                                                }
                                                else {
                                                FollowPlayer(i);
                                                }
					}
Add these 3 ints:

Code:
Code:
public int attackTimer, attackTimer2, attackTimer3;

Save and close that and open up client.java
find boolean process and ABOVE it add all this:


Code:
Code:
public void callUpdates(){
updateRequired = true; 
appearanceUpdateRequired = true;
}
	public void WritePest()
	{
		sendQuest("@red@Pest Control!", 15894);
		sendQuest("@red@To enter a game", 15895);
		sendQuest("@red@Go up to the boat", 15897);
		sendQuest("@red@stand next to the", 15898);
		sendQuest("@red@gangplank to enter", 15899);
		sendQuest("@red@& then wait!", 15900);
		sendQuest("@red@Points: @gre@"+points, 15901);
		sendQuest("", 15896);
		sendQuest("", 15902);
		sendQuest("", 15903);
		sendQuest("", 15904);
		sendQuest("", 15905);
		sendQuest("", 15906);
		setInterfaceWalkable(15892);
	}

public boolean IsDead = false;
public boolean IsDead2 = false;
public boolean IsDead3 = false;
public boolean IsDead4 = false;
public boolean IsDead5 = false;
public int DisplayHp;
public int DisplayHp1;
public int DisplayHp2;
public int DisplayHp3;
public int voidHp = 0;
public int DisplayedHp;
public int DisplayedHp1;
public int DisplayedHp2;
public int DisplayedHp3;
public int voidedHp;
public void voidMaster()
{
sendQuest("@red@VHP:@gre@ "+voidHp/5+"%", 15894);
}
public void portal1()
{
sendQuest("@red@Red portal:@gre@ "+DisplayHp/5+"%", 15895);
}
public void portal2()
{
sendQuest("@blu@Blue portal:@gre@ "+DisplayHp1/5+"%", 15897);
}
public void portal3()
{
sendQuest("@yel@Yellow portal:@gre@ "+DisplayHp2/5+"%", 15898);
}
public void portal4()
{
sendQuest("@dbl@Purple portal:@gre@ "+DisplayHp3/5+"%", 15899);
}

public int mageTimer = 0;
public boolean gameOn = false;
public boolean gameOnOnce = false;
public boolean won = false;
public boolean wonOnce = false;
public boolean lost = false;
public boolean lostOnce = false;
public boolean gameWait = false;
public boolean outPest = false;
public boolean yellowdead = false;
public boolean reddead = false;
public boolean bluedead = false;
public boolean purpledead = false;
public int waitGameTimer = 0;
public int waitGameAmount = 0;
public int gameTimer = -2400;
public int gameAmount = 0;
public int points = 0;
public int pointsAmount = 0;
public int gameWaitTime = -500;
public int gameWaitAmount = 0;
public boolean isDeadOnce = false;and then underneith process add all this:

Code:
/* Start of pest control  */
if(absX == 2657 && absY == 2639)
{
if(server.gameison.gameIsOn == true)
{
teleportToX = 2657;
teleportToY = 2593;
heightLevel = 0;
gameOnOnce = true;
gameWait = false;
server.gameison.gameIsOn = true;
sendMessage("You join a prebuilt game of pest control");
misc.println(playerName+" Joins pest control!");
PlayerHandler.messageToAll = playerName+" Joins pest control!";
gameOn = true;
callUpdates();
}
else{
teleportToX = 2661;
teleportToY = 2639;
heightLevel = 0;
sendMessage("Welcome to the pest control boat, to leave type ::pc.");
gameWait = true;
WritePest();
callUpdates();
}
}
		if (gameWaitAmount < 0) {
			gameWaitAmount = 0;
		}
		if (gameWaitTime > 0) {
			gameWaitTime -= 1;
		}
		if (gameAmount < 0) {
			gameAmount = 0;
		}
		if (gameTimer > 0) {
			gameTimer -= 1;
		}
if(gameWait == true)
{
gameOn = false;
gameWaitTime++;
gameWaitAmount++;
sendQuest("@red@::pc to leave", 15894);
sendQuest("@red@Time left:@gre@ -"+gameWaitTime/2+" secs", 15895);
sendQuest("@red@Time waited:@gre@ --"+gameWaitAmount/2+" secs", 15897);
sendQuest("@red@Points:@gre@ "+points, 15898);
sendQuest("@whi@Players on: @gre@"+PlayerHandler.getPlayerCount(), 15899);
sendQuest("@whi@Pest control Dev'd by:", 15900);
sendQuest("@whi@Sam, client by Jon", 15901);
sendQuest("", 15896);
sendQuest("", 15902);
sendQuest("", 15903);
sendQuest("", 15904);
sendQuest("", 15905);
sendQuest("", 15906);
if(gameWaitTime == -22)
{
PlayerHandler.messageToAll = "A pest control game is going to start in 10 seconds!";
}
if(gameWaitTime == 0 && gameOn == false)
{
teleportToX = 2657;
teleportToY = 2593;
server.gameison.gameIsOn = true;
server.gameison.voidIsDead = false;
heightLevel = 0;
sendMessage("Welcome to pest control "+playerName+" kill as much as you can!");
gameWait = false;
gameOn = true;
gameOnOnce = false;
callUpdates();
isDeadOnce = false;
}
}
if(gameOn == true && gameOnOnce == false)
{
gameOnOnce = true;
gameWait = false;
server.gameison.gameIsOn = true;
server.gameison.voidIsDead = false;
misc.println("A pest control game has started!");
PlayerHandler.messageToAll = "A pest control game has started!";
}
if(gameOn == true)
{
gameTimer++;
gameAmount++;
for (int i = 0; i < server.npcHandler.maxNPCs; i++){
if (server.npcHandler.npcs[i] != null){
if (server.npcHandler.npcs[i].npcType == 3782){
voidHp = server.npcHandler.npcs[i].HP;
IsDead = server.npcHandler.npcs[i].IsDead;
}
}
}
if(voidHp != voidedHp)
{
voidMaster();
voidedHp = voidHp;
}
/*   portal one    */

for (int a = 0; a < server.npcHandler.maxNPCs; a++){
if (server.npcHandler.npcs[a] != null){
if (server.npcHandler.npcs[a].npcType == 3780){
DisplayHp = server.npcHandler.npcs[a].HP;
IsDead2 = server.npcHandler.npcs[a].IsDead;
}
}
}
if(DisplayHp != DisplayedHp)
{
portal1();
DisplayedHp = DisplayHp;
}

/*   portal one    */

/*   portal two    */
for (int b = 0; b < server.npcHandler.maxNPCs; b++){
if (server.npcHandler.npcs[b] != null){
if (server.npcHandler.npcs[b].npcType == 3778){
DisplayHp1 = server.npcHandler.npcs[b].HP;
IsDead3 = server.npcHandler.npcs[b].IsDead;
}
}
}
if(DisplayedHp1 != DisplayHp1)
{
portal2();
DisplayedHp1 = DisplayHp1;
}

/*   portal two    */

/*   portal three    */

for (int c = 0; c < server.npcHandler.maxNPCs; c++){
if (server.npcHandler.npcs[c] != null){
if (server.npcHandler.npcs[c].npcType == 3779){
DisplayHp2 = server.npcHandler.npcs[c].HP;
IsDead4 = server.npcHandler.npcs[c].IsDead;
}
}
}
if(DisplayHp2 != DisplayedHp2)
{
portal3();
DisplayedHp2 = DisplayHp2;
}

/*   portal three    */

/*   portal four    */

for (int d = 0; d < server.npcHandler.maxNPCs; d++){
if (server.npcHandler.npcs[d] != null){
if (server.npcHandler.npcs[d].npcType == 3777){
DisplayHp3 = server.npcHandler.npcs[d].HP;
IsDead5 = server.npcHandler.npcs[d].IsDead;
}
}
}
if(DisplayHp3 != DisplayedHp3)
{
portal4();
DisplayedHp3 = DisplayHp3;
}

/*   portal four    */
if(IsDead2 == true){
sendQuest("@red@Red portal:@lre@ CLOSED", 15895);
IsDead2 = true;
reddead = true;
}
if(IsDead3 == true){
sendQuest("@blu@Blue portal:@lre@ CLOSED", 15897);
IsDead3 = true;
bluedead = true;
}
if(IsDead4 == true){
sendQuest("@yel@Yellow portal:@lre@ CLOSED", 15898);
IsDead4 = true;
yellowdead = true;
}
if(IsDead5 == true){
sendQuest("@dbl@Purple portal:@lre@ CLOSED", 15899);
IsDead5 = true;
purpledead = true;
}
sendQuest("@red@Time left: @gre@-"+gameTimer/2+" secs", 15900);
sendQuest("@red@Time passed: @gre@--"+gameAmount/2+" secs", 15901);
sendQuest("", 15896);
sendQuest("", 15902);
sendQuest("", 15903);
sendQuest("", 15904);
sendQuest("", 15905);
sendQuest("", 15906);
sendQuest("", 15907);
}
if(gameTimer == 0 && IsDead == false)
{
won = true;
wonOnce = false;
reddead = false;
purpledead = false;
bluedead = false;
yellowdead = false;
}
if(reddead == true)
{
if(purpledead == true)
{
if(yellowdead == true)
{
if(bluedead == true)
{
won = true;
wonOnce = false;
reddead = false;
purpledead = false;
bluedead = false;
yellowdead = false;
}
}
}
}
if(IsDead == true && isDeadOnce == false)
{
isDeadOnce = true;
}
if(server.gameison.voidIsDead == true)
{
server.gameison.voidTwice = true;
}
if(server.gameison.voidTwice == true && lostOnce == false)
{
sendMessage("The voidwalker has died!");
teleportToX = 2668;
teleportToY = 2653;
heightLevel = 0;
WritePest();
gameOn = false;
gameOnOnce = false;
isDeadOnce = true;
lostOnce = true;
reddead = false;
purpledead = false;
bluedead = false;
yellowdead = false;
server.gameison.gameIsOn = false;
server.gameison.voidTwice = false;
server.gameison.voidIsDead = true;
sendMessage("YOU LOST, PLEASE LOG OUT TO BE ABLE TO MOVE");
}
if(won == true && wonOnce == false)
{
wonOnce = true;
won = false;
points++;
int gold = totalz * 15;
misc.println("The humans have won pest control!");
PlayerHandler.messageToAll = "The humans have won pest control!";
sendMessage("Congratulations, your team was strong enough to beat the");
sendMessage("Monsters, you gain "+pointsAmount+" pest control points &");
teleportToX = 2668;
teleportToY = 2653;
heightLevel = 0;
WritePest();
gameOn = false;
gameOnOnce = false;
server.gameison.gameIsOn = false;
addItem(995,gold);
sendMessage(gold+" GP for winning!");
}

And add this java file and compile & done.
Credit's; 89% Me, 11% Sam for helping me with voids :S

Enjoy! :D

~Anime190
 
Don't double post, nobody cares.
I just checked this thread because it said one reply and it was my the creator of this thread.
 
Very nice.
Going to test it in a sec..
Code:
else if (npcs[i].RandomWalk == false && npcs[i].IsUnderAttack == true) {
if(npcs[i].npcType == 1645 || npcs[i].npcType == 509 || npcs[i].npcType == 1241 || npcs[i].npcType == 1246 || npcs[i].npcType == 1159 || npcs[i].npcType == 54)
                                                AttackPlayerMage(i);
                                                else
						AttackPlayer(i);
					} else if (npcs[i].followingPlayer && npcs[i].followPlayer > 0 && server.playerHandler.players[npcs[i].followPlayer] != null) {
                                                if(server.playerHandler.players[npcs[i].followPlayer].AttackingOn > 0) {
                                                int follow = npcs[i].followPlayer;
                                                npcs[i].StartKilling = server.playerHandler.players[follow].AttackingOn;
                                                npcs[i].RandomWalk = true;
                                                npcs[i].IsUnderAttack = true;
                                                if(npcs[i].StartKilling > 0) {
                                                if(npcs[i].npcType == 1645 || npcs[i].npcType == 509 || npcs[i].npcType == 1241 || npcs[i].npcType == 1246 || npcs[i].npcType == 54)
                                                AttackPlayerMage(i);
                                                else
                                                AttackPlayer(i);
                                                }
                                                }
                                                else {
                                                FollowPlayer(i);
                                                }
					}

R u sure it's right?
 
dude your retarded this was made my Sam_Server a good friend of mine and i helped him make the server also i made a client for this server but i recently quit moparscape.org because of a non-learning community and LEECHERS like you. This seems like a good site but not a good impression so far.
 
go to my server...its sam servers pest controll one but really edited and anothe rserver also
 
nice job leecher, answer me this, does it work on project16 v6?
 
you guys are retarded, learn to READ! it clearly says work: found copied and pasted. now stfu n stop complaining he\she helped with something you randoms couldnt figure out.

no it doesn't

it sais "Purpose: adding full pest control
Difficulty: 5/10
Knowledge: finding copy & pasting
Server Base: pimp
WARNING: Back up your server"
learn to read.

it says that the only thing you need to do to figure this out is to know how to find stuff and copy and paste stuff.

he even took credit for this guide when it was made by someone else, god I hate when people try to fight about stuff they don't know SHIT about.
 
Runescape Gamblingrunescape gambling
Back
Top