Thread: Spammin chatbox

Results 1 to 6 of 6
  1. #1 Spammin chatbox 
    Registered Member
    Join Date
    Apr 2016
    Posts
    117
    Thanks given
    4
    Thanks received
    3
    Rep Power
    36
    So when i rub my antique lamp is sends 7 lines of "you rub the mysterious lamp" , same with ::vote it says "thank you for voting like 10 times.... how can i stop this?

    EDIT: This has also happened at sometime.. https://www.rune-server.org/runescap...-need-fix.html
    Reply With Quote  
     

  2. #2  
    Myre


    Join Date
    Apr 2012
    Age
    26
    Posts
    1,519
    Thanks given
    407
    Thanks received
    367
    Rep Power
    475
    It would help if you were to post the corresponding code that way we can see if there is anything it's calling to repeat the message multiple times.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Apr 2016
    Posts
    117
    Thanks given
    4
    Thanks received
    3
    Rep Power
    36
    Quote Originally Posted by New Username View Post
    It would help if you were to post the corresponding code that way we can see if there is anything it's calling to repeat the message multiple times.
    Code:
    			if (playerCommand.equals("vote")) {
    		        for (int j = 0; j < Server.playerHandler.players.length; j++) {
    		            if (Server.playerHandler.players[j] != null) {
    		                Client c2 = (Client) Server.playerHandler.players[j];
    		                c2.getPA().sendFrame126("www.genesisvoting.motivoters.com/motivote/", 12000);
    						//c.sendMessage("<col=255>Thanks for choosing to vote for our server!");
    						c.sendMessage("<col=255>When you're done, type ::redeem AUTH to receive your reward.");
    		            }
    				}
    			}
    Also it repeats ironmen cant duel
    Code:
    if (c.isIronman > 0 || c.isUltimateIronman > 0) {
    	         c.sendMessage("@red@Ironmen are not allowed to trade.");
    	         return;
    	      }
    Reply With Quote  
     

  4. #4  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Quote Originally Posted by TheRealGenesis View Post
    Code:
    			if (playerCommand.equals("vote")) {
    		        for (int j = 0; j < Server.playerHandler.players.length; j++) {
    		            if (Server.playerHandler.players[j] != null) {
    		                Client c2 = (Client) Server.playerHandler.players[j];
    		                c2.getPA().sendFrame126("www.genesisvoting.motivoters.com/motivote/", 12000);
    						//c.sendMessage("<col=255>Thanks for choosing to vote for our server!");
    						c.sendMessage("<col=255>When you're done, type ::redeem AUTH to receive your reward.");
    		            }
    				}
    			}
    Also it repeats ironmen cant duel
    Code:
    if (c.isIronman > 0 || c.isUltimateIronman > 0) {
    	         c.sendMessage("@red@Ironmen are not allowed to trade.");
    	         return;
    	      }
    Why would you wish to loop all players that is online when you claim your vote auth?
    And for the ironmen cant duel could be due to the whole method is a boolean method, try instead of return change to return false.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Apr 2016
    Posts
    117
    Thanks given
    4
    Thanks received
    3
    Rep Power
    36
    Quote Originally Posted by arch337 View Post
    Why would you wish to loop all players that is online when you claim your vote auth?
    And for the ironmen cant duel could be due to the whole method is a boolean method, try instead of return change to return false.
    Gave me errors, also this has happened at some point
    https://www.rune-server.org/runescap...-need-fix.html
    Reply With Quote  
     

  6. #6  
    The One And Only

    01053's Avatar
    Join Date
    Apr 2011
    Age
    28
    Posts
    2,887
    Thanks given
    417
    Thanks received
    885
    Rep Power
    856
    Take the message outside of the loop, tbh you don't even need the loop at all.

    Code:
    			if (playerCommand.equals("vote")) {
    		                c.getPA().sendFrame126("www.genesisvoting.motivoters.com/motivote/", 12000);
    				c.sendMessage("<col=255>When you're done, type ::redeem AUTH to receive your reward.");
    				}


    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. Costum gameframe response to costum chatbox
    By Cup-o-cino in forum Graphics
    Replies: 28
    Last Post: 04-11-2009, 12:30 PM
  2. Changing chatbox text colors
    By Xx nub xx in forum Tutorials
    Replies: 39
    Last Post: 07-27-2008, 09:59 PM
  3. costume chatbox
    By Cup-o-cino in forum Graphics
    Replies: 7
    Last Post: 12-16-2007, 01:25 AM
  4. Inventories and Chatboxes.
    By Drags in forum Graphics
    Replies: 27
    Last Post: 10-01-2007, 01:59 AM
  5. ChatBox Sprites -
    By 007 Snoop in forum Graphics
    Replies: 27
    Last Post: 09-03-2007, 01:05 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
  •