Thread: [PI] Pest Control-Fixing Portals 200 HP

Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1 [PI] Pest Control-Fixing Portals 200 HP 
    Registered Member
    Join Date
    Mar 2010
    Posts
    102
    Thanks given
    4
    Thanks received
    1
    Rep Power
    1
    Ok this is a quick snippet to show how to stop the portals going back to 200 HP.

    Difficulty: 1/10
    Requires: No knowledge
    Base: Project Insanity

    First add:
    Code:
    	public int Portal1kill = 0;
    	public int Portal2kill = 0;
    	public int Portal3kill = 0;
    	public int Portal4kill = 0;
    at the top of PestControl.java
    under
    Code:
    	public int gameTimer = -1;
    	public int waitTimer = 15;
    	public int properTimer = 0;
    Then find:
    Code:
    if (Server.npcHandler.npcs[j] != null) {
    							if (Server.npcHandler.npcs[j].npcType == 6142)
    								c.getPA().sendFrame126("" + Server.npcHandler.npcs[j].HP + "", 21111);
    							if (Server.npcHandler.npcs[j].npcType == 6143)
    								c.getPA().sendFrame126("" + Server.npcHandler.npcs[j].HP + "", 21112);
    							if (Server.npcHandler.npcs[j].npcType == 6143)
    								c.getPA().sendFrame126("" + Server.npcHandler.npcs[j].HP + "", 21113);
    							if (Server.npcHandler.npcs[j].npcType == 6145)
    								c.getPA().sendFrame126("" + Server.npcHandler.npcs[j].HP + "", 21114);
    							if (Server.npcHandler.npcs[j].npcType == 3782)
    								c.getPA().sendFrame126("" + Server.npcHandler.npcs[j].HP + "", 21115);
    						}
    and replace it with:

    Code:
    if (Server.npcHandler.npcs[j] != null) {
    							if (Server.npcHandler.npcs[j].npcType == 6142)
    							if (Portal1kill == 0) {
    								c.getPA().sendFrame126("" + Server.npcHandler.npcs[j].HP + "", 21111);
    								if(Server.npcHandler.npcs[j].HP == 0) {
    									Portal1kill = 1;
    								}
    							} else {
    								c.getPA().sendFrame126("Dead", 21111);
    							}
    							if (Server.npcHandler.npcs[j].npcType == 6143)
    							if (Portal2kill == 0) {
    								c.getPA().sendFrame126("" + Server.npcHandler.npcs[j].HP + "", 21112);
    								if(Server.npcHandler.npcs[j].HP == 0) {
    									Portal2kill = 1;
    								}
    							} else {
    								c.getPA().sendFrame126("Dead", 21112);
    							}
    							if (Server.npcHandler.npcs[j].npcType == 6144)
    							if (Portal3kill == 0) {
    								c.getPA().sendFrame126("" + Server.npcHandler.npcs[j].HP + "", 21113);
    								if(Server.npcHandler.npcs[j].HP == 0) {
    									Portal3kill = 1;
    								}
    							} else {
    								c.getPA().sendFrame126("Dead", 21113);
    							}
    							if (Server.npcHandler.npcs[j].npcType == 6145)
    							if (Portal4kill == 0) {
    								c.getPA().sendFrame126("" + Server.npcHandler.npcs[j].HP + "", 21114);
    								if(Server.npcHandler.npcs[j].HP == 0) {
    									Portal4kill = 1;
    								}
    							} else {
    								c.getPA().sendFrame126("Dead", 21114);
    							}
    							if (Server.npcHandler.npcs[j].npcType == 3782)
    								c.getPA().sendFrame126("" + Server.npcHandler.npcs[j].HP + "", 21115);
    						}
    This will stop the Health going back to 200. And will show "Dead" when each portal dies.

    Almost forgot, add this in:
    Code:
    					Portal1kill = 0;
    					Portal2kill = 0;
    					Portal3kill = 0;
    					Portal4kill = 0;
    under:
    Code:
    c.getCombat().resetPrayers();
    which is in the endgame void. This will simply reset the variables so that they don't say "Dead" immediately when u start the next game.

    Post if your using!

    -Nathan

    .
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Respected Member

    Join Date
    Jan 2009
    Posts
    5,682
    Thanks given
    1,093
    Thanks received
    3,494
    Discord
    View profile
    Rep Power
    5000
    Already posted, check my threads. <thumbsup/>
    Reply With Quote  
     

  4. #3  
    Registered Member
    Join Date
    Mar 2010
    Posts
    102
    Thanks given
    4
    Thanks received
    1
    Rep Power
    1
    Quote Originally Posted by RogueX View Post
    Already posted, check my threads. <thumbsup/>
    Well someone asked for it, so im posting it.
    Reply With Quote  
     

  5. #4  
    Registered Member
    Join Date
    Jul 2008
    Posts
    3,167
    Thanks given
    235
    Thanks received
    74
    Rep Power
    209
    i tested it but wont work
    Reply With Quote  
     

  6. #5  
    Registered Member
    Join Date
    Mar 2010
    Posts
    102
    Thanks given
    4
    Thanks received
    1
    Rep Power
    1
    Quote Originally Posted by dani_gonzales View Post
    i tested it but wont work
    cant of added it correctly.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #6  
    Registered Member Santi Cazorla's Avatar
    Join Date
    Aug 2009
    Age
    24
    Posts
    1,137
    Thanks given
    258
    Thanks received
    55
    Rep Power
    7
    no errors, good sign so far

    will try ingame later.

    EDIT : it dont work.

    can you please post your whole interface?
    Reply With Quote  
     

  8. #7  
    Banned
    Join Date
    Mar 2008
    Posts
    1,937
    Thanks given
    131
    Thanks received
    61
    Rep Power
    0
    doesnt work.
    Reply With Quote  
     

  9. #8  
    Banned
    Join Date
    May 2010
    Posts
    122
    Thanks given
    0
    Thanks received
    4
    Rep Power
    0
    i just get 43 errors :z
    Reply With Quote  
     

  10. #9  
    Registered Member Abadonia's Avatar
    Join Date
    Dec 2010
    Age
    29
    Posts
    223
    Thanks given
    13
    Thanks received
    0
    Rep Power
    25
    Quote Originally Posted by pixelthis View Post
    Already posted, check my threads. <thumbsup/>
    All you did was post the interfaces and text updating, but the way yours works is the npc will go to 0, and then back to 200, hes trying to make it remain at 0.
    Reply With Quote  
     

  11. #10  
    Registered Member Abadonia's Avatar
    Join Date
    Dec 2010
    Age
    29
    Posts
    223
    Thanks given
    13
    Thanks received
    0
    Rep Power
    25
    Anybody have a fix for this? it goes bk to 200 on my server :@
    Owner Of Abadonia.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Fully Working Pest Control with Portals
    By Jellybean732 in forum Tutorials
    Replies: 59
    Last Post: 04-11-2012, 04:23 PM
  2. Pest control
    By bracket in forum Requests
    Replies: 6
    Last Post: 03-01-2010, 08:28 PM
  3. Fixing Delta's PC portals
    By Coder Alex in forum Snippets
    Replies: 10
    Last Post: 07-14-2009, 11:51 PM
  4. Need Help With Fixing Portals
    By Senthery in forum Help
    Replies: 1
    Last Post: 01-20-2009, 01:03 AM
  5. Pest control.
    By medabi3 in forum Configuration
    Replies: 9
    Last Post: 02-05-2008, 06:24 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •