Thread: [pi] Pest control weird shit

Results 1 to 7 of 7
  1. #1 [pi] Pest control weird shit 
    Registered Member

    Join Date
    Sep 2008
    Posts
    4,833
    Thanks given
    894
    Thanks received
    1,439
    Rep Power
    2924
    Got stuck atm, im correcting my pest control system, and i've got 2 problems which are really strange, i cant seem to fix.

    1: Pest Control interface only works 100% for 1 player, For anyone else it just dosent update.

    2: When the portals Die the Health Returns to 200 In the working Interface, The portals are not respawning, But if i throw and Else statement like
    Code:
    if (NPCHandler.npcs[j].HP <= 0) {
    c.getPA().sendFrame126("Dead", 21111);
    It just nulls up, Any ideas from anyone?
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Aug 2011
    Posts
    2,760
    Thanks given
    297
    Thanks received
    534
    Rep Power
    1596
    if (NPCHandler.npcs[j].HP <= 0) {
    c.getPA().sendFrame126("Dead", 21111);

    make it 'c2' and define it as players who are in the boat/minigame.
    Quote Originally Posted by Aj View Post
    This is not even a tutorial. It's fail for rep. It's fail for life.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Nando's Avatar
    Join Date
    Feb 2009
    Age
    29
    Posts
    3,517
    Thanks given
    2,439
    Thanks received
    1,108
    Rep Power
    5000
    process it through server class not client class
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Sep 2008
    Posts
    4,833
    Thanks given
    894
    Thanks received
    1,439
    Rep Power
    2924
    Quote Originally Posted by Nando View Post
    process it through server class not client class
    Already doing that
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Sep 2008
    Posts
    4,833
    Thanks given
    894
    Thanks received
    1,439
    Rep Power
    2924
    Quote Originally Posted by 'Spike View Post
    if (NPCHandler.npcs[j].HP <= 0) {
    c.getPA().sendFrame126("Dead", 21111);

    make it 'c2' and define it as players who are in the boat/minigame.
    Gunna give this 1 a go now
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Sep 2008
    Posts
    4,833
    Thanks given
    894
    Thanks received
    1,439
    Rep Power
    2924
    So i played around with it a bit more, and this worked, It said Dead when it killed the portal, But then it went back to 200 After another second. I think that has to do with the NPCHandler spawn timer So i think i'll be able to finish this error my self, here is the code for anyone who wants.

    Any ideas about the other problem?
    Code:
    if (PlayerHandler.players[j].inPcGame()) {
    					Client c = (Client) PlayerHandler.players[j];
    					for (j = 0; j < NPCHandler.npcs.length; j++) {
    						if (NPCHandler.npcs[j] != null) {
    						if ((NPCHandler.npcs[j].HP <= 0) && (playingGame = true)) {
    							if (NPCHandler.npcs[j].npcType == 6142)
    								c.getPA().sendFrame126("Dead", 21111);
    							if (NPCHandler.npcs[j].npcType == 6143)
    								c.getPA().sendFrame126("Dead", 21112);
    							if (NPCHandler.npcs[j].npcType == 6144)
    								c.getPA().sendFrame126("Dead", 21113);
    							if (NPCHandler.npcs[j].npcType == 6145)
    								c.getPA().sendFrame126("Dead", 21114);
    						} else {
    							if (NPCHandler.npcs[j].npcType == 6142)
    								c.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21111);
    							if (NPCHandler.npcs[j].npcType == 6143)
    								c.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21112);
    							if (NPCHandler.npcs[j].npcType == 6144)
    								c.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21113);
    							if (NPCHandler.npcs[j].npcType == 6145)
    								c.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21114);
    						}
    						}
    					}
    					c.getPA().sendFrame126(""+c.pcDamage+"", 21115);
    					c.getPA().sendFrame126("500", 21116);
    				c.getPA().sendFrame126("Time Remaining: "+gameTimer+"", 21117);
    					c.getPA().walkableInterface(21100);
    				}
    Reply With Quote  
     

  7. #7  
    Donator
    programz's Avatar
    Join Date
    Apr 2011
    Posts
    213
    Thanks given
    2
    Thanks received
    6
    Rep Power
    24
    try this method if (PlayerHandler.players[j].inPcGame()) {
    Client c = (Client) PlayerHandler.players[j];
    for (j = 1; j < NPCHandler.npcs.length; j++) {
    if (NPCHandler.npcs[j] != null) {
    if ((NPCHandler.npcs[j].HP <= 0) && (playingGame = true)) {
    if (NPCHandler.npcs[j].npcType == 6142)
    c2.getPA().sendFrame126("Dead", 21111);
    if (NPCHandler.npcs[j].npcType == 6143)
    c2.getPA().sendFrame126("Dead", 21112);
    if (NPCHandler.npcs[j].npcType == 6144)
    c2.getPA().sendFrame126("Dead", 21113);
    if (NPCHandler.npcs[j].npcType == 6145)
    c2.getPA().sendFrame126("Dead", 21114);
    } else {
    if (NPCHandler.npcs[j].npcType == 6142)
    c2.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21111);
    if (NPCHandler.npcs[j].npcType == 6143)
    c2.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21112);
    if (NPCHandler.npcs[j].npcType == 6144)
    c2.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21113);
    if (NPCHandler.npcs[j].npcType == 6145)
    c2.getPA().sendFrame126("" + NPCHandler.npcs[j].HP + "", 21114);
    }
    }
    }
    c2.getPA().sendFrame126(""+c.pcDamage+"", 21115);
    c2.getPA().sendFrame126("500", 21116);
    c2.getPA().sendFrame126("Time Remaining: "+gameTimer+"", 21117);
    c2.getPA().walkableInterface(21100);
    }
    Reply With Quote  
     


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. pest control
    By sexyrussian in forum Help
    Replies: 0
    Last Post: 05-23-2010, 02:06 AM
  2. Pest Control
    By Aeterna in forum Help
    Replies: 7
    Last Post: 09-22-2009, 07:37 PM
  3. Pest Control
    By Kduffy45 in forum Requests
    Replies: 0
    Last Post: 08-25-2009, 03:40 AM
  4. Pest control [HELP]
    By Coder Alex in forum Help
    Replies: 1
    Last Post: 07-07-2009, 05:07 PM
  5. Replies: 87
    Last Post: 06-05-2009, 06:49 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
  •