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

Discussion in 'Archives' started by Anime190, Jun 11, 2007.

PestControl On Your Server! (Finally released on Sythe!)
  1. Unread #1 - Jun 11, 2007 at 9:40 AM
  2. Anime190
    Referrals:
    0

    Anime190 Guest

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

    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
     
  3. Unread #2 - Jun 12, 2007 at 3:12 AM
  4. Anime190
    Referrals:
    0

    Anime190 Guest

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

    No reply's? I worked hard on this code.
     
  5. Unread #3 - Jun 12, 2007 at 10:58 AM
  6. Olan14
    Joined:
    Jan 26, 2007
    Posts:
    581
    Referrals:
    0
    Sythe Gold:
    0

    Olan14 Forum Addict

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

    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.
     
  7. Unread #4 - Jun 12, 2007 at 9:42 PM
  8. Aerek
    Joined:
    Apr 2, 2007
    Posts:
    424
    Referrals:
    0
    Sythe Gold:
    0

    Aerek Forum Addict
    Banned

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

    leeched xD
     
  9. Unread #5 - Jun 13, 2007 at 6:07 AM
  10. BamBam
    Joined:
    Jan 26, 2007
    Posts:
    271
    Referrals:
    4
    Sythe Gold:
    0

    BamBam Forum Addict

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

    Agreed.
     
  11. Unread #6 - Jun 13, 2007 at 7:29 AM
  12. Ragnar
    Joined:
    Mar 29, 2006
    Posts:
    259
    Referrals:
    5
    Sythe Gold:
    0

    Ragnar Forum Addict
    Banned

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

    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?
     
  13. Unread #7 - Jun 13, 2007 at 4:38 PM
  14. Satan Project
    Referrals:
    0

    Satan Project Guest

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

    Nice dude but... FROM A SERVER!!!! SERVER NOOB
     
  15. Unread #8 - Jun 14, 2007 at 8:35 AM
  16. XWX
    Joined:
    Apr 25, 2005
    Posts:
    723
    Referrals:
    0
    Sythe Gold:
    18

    XWX Apprentice

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

    Lol leecher, this tutorial was posted on rune-server AND moparscape.org, lol god do i hate leechers
     
  17. Unread #9 - Jun 14, 2007 at 5:02 PM
  18. Better then best
    Joined:
    Jun 14, 2007
    Posts:
    52
    Referrals:
    0
    Sythe Gold:
    0

    Better then best Member
    Banned

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

    Haha i saw this there to !
     
  19. Unread #10 - Jun 14, 2007 at 8:07 PM
  20. darkr9583
    Joined:
    May 8, 2007
    Posts:
    423
    Referrals:
    0
    Sythe Gold:
    0

    darkr9583 Forum Addict

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

    u leacher :p
     
  21. Unread #11 - Jun 15, 2007 at 2:48 AM
  22. rich kid
    Joined:
    Jun 15, 2007
    Posts:
    55
    Referrals:
    0
    Sythe Gold:
    0

    rich kid Member
    Banned

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

    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.
     
  23. Unread #12 - Jun 19, 2007 at 11:04 PM
  24. DrazX©
    Referrals:
    0

    DrazX© Guest

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

    go to my server...its sam servers pest controll one but really edited and anothe rserver also
     
  25. Unread #13 - Jun 21, 2007 at 5:01 PM
  26. wataqi
    Joined:
    Jun 18, 2007
    Posts:
    55
    Referrals:
    0
    Sythe Gold:
    0

    wataqi Member

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

    why would you want to pest control on a mopar server?
     
  27. Unread #14 - Jun 21, 2007 at 8:05 PM
  28. pinecone jr
    Joined:
    Feb 19, 2007
    Posts:
    328
    Referrals:
    1
    Sythe Gold:
    0

    pinecone jr Forum Addict

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

    Leeched. done take credit for somthing you didnt do.
    lol. tihs was on Moparscape,org wayy before this
     
  29. Unread #15 - Jun 24, 2007 at 2:18 AM
  30. kewlscape
    Joined:
    Jan 27, 2007
    Posts:
    47
    Referrals:
    0
    Sythe Gold:
    0

    kewlscape Member

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

    lolz nice mate been done thoo...
     
  31. Unread #16 - Jun 25, 2007 at 4:59 PM
  32. superhobo666
    Joined:
    Feb 2, 2006
    Posts:
    26
    Referrals:
    0
    Sythe Gold:
    0

    superhobo666 Member

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

    nice job leecher, answer me this, does it work on project16 v6?
     
  33. Unread #17 - Jun 26, 2007 at 3:11 AM
  34. deadzone
    Joined:
    Feb 27, 2007
    Posts:
    2,192
    Referrals:
    1
    Sythe Gold:
    5

    deadzone Grand Master
    Banned

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

    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.
     
  35. Unread #18 - Jun 28, 2007 at 10:19 AM
  36. c0rrup[TED]
    Joined:
    Apr 23, 2006
    Posts:
    185
    Referrals:
    0
    Sythe Gold:
    0

    c0rrup[TED] Active Member
    Banned

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

    7Hx 4LL w0rkS !!!!!! 1 puT th1S c0d3 1n mY S3rv3r~!
     
  37. Unread #19 - Jun 29, 2007 at 12:38 PM
  38. superhobo666
    Joined:
    Feb 2, 2006
    Posts:
    26
    Referrals:
    0
    Sythe Gold:
    0

    superhobo666 Member

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

    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.
     
< Sellin Dragon~Fable Account (Premium) | hiring account trainer >

Users viewing this thread
1 guest


 
 
Adblock breaks this site