Thread: Slot machine help 317 [pi]

Results 1 to 2 of 2
  1. #1 Slot machine help 317 [pi] 
    Registered Member Defective's Avatar
    Join Date
    Dec 2011
    Age
    29
    Posts
    466
    Thanks given
    20
    Thanks received
    3
    Rep Power
    62
    hey guys so, i followed this tut pretty precisely and everything seemed to work, all compiled fine and everything, but now that i click the NPC it does nothing do i have to use a specific NPC or any will do? at the moment im using the 1870 as used in the case of DialogueHandler.java....

    Here is the tut that i used

    Quote Originally Posted by wokel View Post
    Hey guys, here is some pictures of what your adding!





    Everyone said the old interface was so ugly so I made a new one, hope you guys like it

    Whats new in v1.2?
    New interface (Background)
    Exit Button
    Fixed the buggs
    almost all miss spelling with the messages "Example: You gambled 50m and won 50m, 500m win!"...


    First:
    Download these files: [url=http://www.mediafire.com/?b5z4kp5to8dkdjh[/url]

    Then for the server messages! Open Client.java and add thisover public void logout)
    Code:
    /*fury from 10m gambling*/
    		public void gamble10mfury() {
    		for (int j = 0; j < Server.playerHandler.players.length; j++) {
    			if (Server.playerHandler.players[j] != null) {
    				Client c2 = (Client) Server.playerHandler.players[j];
    					c2.sendMessage("<col=255>"+playerName+" Just gambled 10m and won a fury!");
    				}
    			}
    		}
    		
    		/*650M from DONOR gambling*/
    		public void Donator650m() {
    		for (int j = 0; j < Server.playerHandler.players.length; j++) {
    			if (Server.playerHandler.players[j] != null) {
    				Client c2 = (Client) Server.playerHandler.players[j];
    					c2.sendMessage("<col=255>"+playerName+" Just gambled 150m and won 650m!");
    				}
    			}
    		}
    		
    		/*580m from 200m gambling*/
    		public void gamble200m580m() {
    		for (int j = 0; j < Server.playerHandler.players.length; j++) {
    			if (Server.playerHandler.players[j] != null) {
    				Client c2 = (Client) Server.playerHandler.players[j];
    					c2.sendMessage("<col=255>"+playerName+" Just gambled 200m and won 580m!");
    				}
    			}
    		}
    		
    				/*claws from donor gambling*/
    		public void datclaws() {
    		for (int j = 0; j < Server.playerHandler.players.length; j++) {
    			if (Server.playerHandler.players[j] != null) {
    				Client c2 = (Client) Server.playerHandler.players[j];
    					c2.sendMessage("<col=255>"+playerName+" Just gambled 150m and won Dragon Claws!");
    				}
    			}
    		}
    		
    				/*ags from 150m gambling*/
    		public void datags() {
    		for (int j = 0; j < Server.playerHandler.players.length; j++) {
    			if (Server.playerHandler.players[j] != null) {
    				Client c2 = (Client) Server.playerHandler.players[j];
    					c2.sendMessage("<col=255>"+playerName+" Just gambled 150m and won a AGS!");
    				}
    			}
    		}
    		
    		/*50m from  10m gambling*/
    		public void gamble10m50m() {
    		for (int j = 0; j < Server.playerHandler.players.length; j++) {
    			if (Server.playerHandler.players[j] != null) {
    				Client c2 = (Client) Server.playerHandler.players[j];
    					c2.sendMessage("<col=255>"+playerName+" Just gambled 10m and won 50m!");
    				}
    			}
    		}
    		
    				/*120m from 50m gambling*/
    		public void gamble50m120m() {
    		for (int j = 0; j < Server.playerHandler.players.length; j++) {
    			if (Server.playerHandler.players[j] != null) {
    				Client c2 = (Client) Server.playerHandler.players[j];
    					c2.sendMessage("<col=255>"+playerName+" Just gambled 50m and won 120m!");
    				}
    			}
    		}
    		
    						/*Bandos Tassetm from 100m gambling*/
    		public void gamble100mbandostasset() {
    		for (int j = 0; j < Server.playerHandler.players.length; j++) {
    			if (Server.playerHandler.players[j] != null) {
    				Client c2 = (Client) Server.playerHandler.players[j];
    					c2.sendMessage("<col=255>"+playerName+" Just gambled 100m and won a Bandos Tasset!");
    				}
    			}
    		}
    		
    								/*Bandos Tasset from 100m gambling*/
    		public void gamble100m220m() {
    		for (int j = 0; j < Server.playerHandler.players.length; j++) {
    			if (Server.playerHandler.players[j] != null) {
    				Client c2 = (Client) Server.playerHandler.players[j];
    					c2.sendMessage("<col=255>"+playerName+" Just gambled 100m and won 220m!");
    				}
    			}
    		}
    		
    		/*Bandos set from 100m gambling*/
    		public void gamble200mbandosset() {
    		for (int j = 0; j < Server.playerHandler.players.length; j++) {
    			if (Server.playerHandler.players[j] != null) {
    				Client c2 = (Client) Server.playerHandler.players[j];
    					c2.sendMessage("<col=255>"+playerName+" Just gambled 200m and won a Bandos set!!!!");
    				}
    			}
    		}
    		
    		/*430m from 200m gambling*/
    		public void gamble200m430m() {
    		for (int j = 0; j < Server.playerHandler.players.length; j++) {
    			if (Server.playerHandler.players[j] != null) {
    				Client c2 = (Client) Server.playerHandler.players[j];
    					c2.sendMessage("<col=255>"+playerName+" Just gambled 200m and won 430m!!!!");
    				}
    			}
    		}
    		}
    Still in Client.java add this random item systemover public void logout)
    Code:
    /*Gambling System*/
    	public void Gamble10m() 
    	{
    	int votingReward = Misc.random(16); //16 random options
                    if (votingReward == 1) { //the number 1 option
    			getItems().addItem(995, 4000000); //The reward
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won 4m! 6m loss!");
    			/*I won't repeat this messages just because I'm too lazy*/
    		}
    		else if (votingReward == 2) {
    			getItems().addItem(1290, 15);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won 15 Rune swords! 10m loss!");
    		}
    		else if (votingReward == 3) {
    			getItems().addItem(6585, 1);
    			gamble10mfury();
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won a Fury 25m WIN!");
    		}
    		else if (votingReward == 4) {
    			getItems().addItem(1700, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won a Diamond amulet! 10m loss!");
    		}
    		else if (votingReward == 5) {
    			getItems().addItem(995, 2000000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won 2m! 8m loss!");
    		}
    		else if (votingReward == 6) {
    			getItems().addItem(995, 50000000);
    			gamble10m50m();
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won 50m! 40m WIN!");
    		}
    		else if (votingReward == 7) {
    			getItems().addItem(1511, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won 1 logs! 10m loss!");
    		}
    		else if (votingReward == 8) {
    			getItems().addItem(4153, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won a g maul! 10m loss!");
    		}
    		else if (votingReward == 9) {
    			getItems().addItem(1323, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won a iron scimitar! 10m loss!");
    		}
    		else if (votingReward == 10) {
    			getItems().addItem(1231, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won a dd(p)! 10m loss!");
    		}
    		else if (votingReward == 11) {
    			getItems().addItem(15441, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won a Yellow Whip! 20m WIN!");
    		}
    		else if (votingReward == 12) {
    			getItems().addItem(230, 500);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won 500 vials! 10m loss!");
    		}
    		else if (votingReward == 13) {
    			getItems().addItem(9244, 5000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won 5k d bolts!! 5m Win!");
    		}
    		else if (votingReward == 14) {
    			getItems().addItem(995, 15000000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won 15m! 5m WIN!");
    		}
    		else if (votingReward == 15) {
    			getItems().addItem(6914, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won a Master wand! 5m WIN!");
    		}
    		else if (votingReward == 16) {
    			getItems().addItem(871, 50);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won a Iron knive(p) 10m loss!");
    				}
    			}
    	/*Gambling System, 50m gambling Rewards*/		
    	public void Gamble50m()
    	{
    	int votingReward = Misc.random(16); //16 random options
                    if (votingReward == 1) { //the number 1 option
    			getItems().addItem(11283, 1); //The reward
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won a dfs! 25m WIN!");
    			/*I won't repeat this messages just because I'm too lazy*/
    		}
    		else if (votingReward == 2) {
    			getItems().addItem(1290, 15);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won 15 Rune swords! 50m loss!");
    		}
    		else if (votingReward == 3) {
    			getItems().addItem(6585, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won a Fury! 15m loss!");
    		}
    		else if (votingReward == 4) {
    			getItems().addItem(11700, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won a Zamorak Godsword! 15 WIN!");
    		}
    		else if (votingReward == 5) {
    			getItems().addItem(11696, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won a Bandos Godsword! 8m loss!");
    		}
    		else if (votingReward == 6) {
    			getItems().addItem(995, 50000000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won 50m! nothing won!");
    		}
    		else if (votingReward == 7) {
    			getItems().addItem(1511, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won 1 logs! 50m loss!");
    		}
    		else if (votingReward == 8) {
    			getItems().addItem(4153, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won a g maul! 50m loss!");
    		}
    		else if (votingReward == 9) {
    			getItems().addItem(1323, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won a iron scimitar! 50m loss!");
    		}
    		else if (votingReward == 10) {
    			getItems().addItem(1231, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won a dd(p)! 50m loss!");
    		}
    		else if (votingReward == 11) {
    			getItems().addItem(15441, 2);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won two Yellow Whips! 10m WIN!");
    		}
    		else if (votingReward == 12) {
    			getItems().addItem(995, 120000000);
    			gamble50m120m();
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won 120m! 10m loss!");
    		}
    		else if (votingReward == 13) {
    			getItems().addItem(9244, 15000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 10m and won 15k d bolts!! 5m Win!");
    		}
    		else if (votingReward == 14) {
    			getItems().addItem(995, 15000000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won 55m! 5m WIN!");
    		}
    		else if (votingReward == 15) {
    			getItems().addItem(6914, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won a Master wand! 35m loose!");
    		}
    		else if (votingReward == 16) {
    			getItems().addItem(871, 50);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won a Iron knive(p) 50m loss!");
    				}
    			}
    	/*Gambling System, 100m Gambling Rewards*/
    	public void Gamble100m()
    	{
    	int votingReward = Misc.random(16); //16 random options
                    if (votingReward == 1) { //the number 1 option
    			getItems().addItem(11283, 1); //The reward
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 100m and won a dfs! 30m loss!");
    			/*I won't repeat this messages just because I'm too lazy*/
    		}
    		else if (votingReward == 2) {
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 100m got nothing! 100m loss!");
    		}
    		else if (votingReward == 3) {
    			getItems().addItem(6585, 2);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 100m and won 2 Fury! 30m loss!");
    		}
    		else if (votingReward == 4) {
    			getItems().addItem(19111, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 100m and won a Tookhar-kal! 150m WIN!");
    		}
    		else if (votingReward == 5) {
    			getItems().addItem(15071, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 100m and won a Voting Hat! 150m win!!");
    		}
    		else if (votingReward == 6) {
    			getItems().addItem(995, 100000000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 100m and won 100m! nothing won!");
    		}
    		else if (votingReward == 7) {
    			getItems().addItem(11726, 1);
    			gamble100mbandostasset();
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 100m and won a Bandos Tasset! 80m Win!!");
    		}
    		else if (votingReward == 8) {
    			getItems().addItem(4153, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won a g maul! 50m loss!");
    		}
    		else if (votingReward == 9) {
    			getItems().addItem(1323, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won a iron scimitar! 50m loss!");
    		}
    		else if (votingReward == 10) {
    			getItems().addItem(1231, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 50m and won a dd(p)! 50m loss!");
    		}
    		else if (votingReward == 11) {
    			getItems().addItem(15443, 1);
    			getItems().addItem(15441, 1);
    			getItems().addItem(15442, 1);
    			getItems().addItem(15444, 1);
    			getItems().addItem(15441, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 100m and won a color whip set! 50m WIN!");
    		}
    		else if (votingReward == 12) {
    			getItems().addItem(995, 220000000);
    			gamble100m220m();
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 100m and won 220m! 120m WIN!");
    		}
    		else if (votingReward == 13) {
    			getItems().addItem(9244, 15000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 100m and won 30k d bolts!! 30m loss!");
    		}
    		else if (votingReward == 14) {
    			getItems().addItem(995, 55000000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 100m and won 55m! 5m WIN!");
    		}
    		else if (votingReward == 15) {
    			getItems().addItem(6914, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 100m and won a Master wand! 85m loose!");
    		}
    		else if (votingReward == 16) {
    			getItems().addItem(871, 50);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 100m and won a Iron knive(p) 100m loss!");
    				}
    			}
    				/*Gambling System, DONATOR 150m Gambling Rewards*/
    	public void Gamble150m()
    	{
    	int votingReward = Misc.random(18); //16 random options
                    if (votingReward == 1) { //the number 1 option
    			getItems().addItem(11283, 3); //The reward
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won three dfs's! 60m WIN!");
    			/*I won't repeat this messages just because I'm too lazy*/
    		}
    		else if (votingReward == 2) {
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m got nothing! 150m loss!");
    		}
    		else if (votingReward == 3) {
    			getItems().addItem(6585, 4);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won 4 Furys! 30m loss!");
    		}
    		else if (votingReward == 4) {
    			getItems().addItem(19111, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won a Tookhar-kal! 100m WIN!");
    		}
    		else if (votingReward == 5) {
    			getItems().addItem(995, 600000000);
    			Donator650m();
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won 600m!! 150m win!!");
    		}
    		else if (votingReward == 6) {
    			getItems().addItem(995, 100000000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won 100m! nothing won!");
    		}
    		else if (votingReward == 7) {
    			getItems().addItem(11726, 1);
    			gamble100mbandostasset();
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won a Bandos Tasset! 80m Win!!");
    		}
    		else if (votingReward == 8) {
    			getItems().addItem(4153, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won a g maul! 50m loss!");
    		}
    		else if (votingReward == 9) {
    			getItems().addItem(1323, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won a iron scimitar! 50m loss!");
    		}
    		else if (votingReward == 10) {
    			getItems().addItem(1231, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won a dd(p)! 50m loss!");
    		}
    		else if (votingReward == 11) {
    			getItems().addItem(15443, 1);
    			getItems().addItem(15441, 1);
    			getItems().addItem(15442, 1);
    			getItems().addItem(15444, 1);
    			getItems().addItem(15441, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won a color whip set! 50m WIN!");
    		}
    		else if (votingReward == 12) {
    			getItems().addItem(995, 320000000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won 320m! 170m WIN!");
    		}
    		else if (votingReward == 13) {
    			getItems().addItem(9244, 15000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won 30k d bolts!! 30m loss!");
    		}
    		else if (votingReward == 14) {
    			getItems().addItem(995, 55000000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won 55m! 5m WIN!");
    		}
    		else if (votingReward == 15) {
    			getItems().addItem(6914, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won a Master wand! 85m loos!");
    		}
    		else if (votingReward == 16) {
    			getItems().addItem(871, 50);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won a Iron knive(p) 100m loss!");
    		}	
    		else if (votingReward == 17) {
    			getItems().addItem(14484, 1);
    			datclaws();
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won a pair of dragon claws! 450m WIN!!");
    		}
    		else if (votingReward == 18) {
    			getItems().addItem(11694, 1);
    			datags();
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 150m and won a AGS! 500m WIN!");
    				}
    			}
    				/*Gambling System, 200m Gambling Rewards*/
    	public void Gamble200mCRAZY()
    	{
    	int votingReward = Misc.random(18); //16 random options
                    if (votingReward == 1) { //the number 1 option
    			getItems().addItem(995, 75000000); //The reward
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won 75m 125m loss!");
    			/*I won't repeat this messages just because I'm too lazy*/
    		}
    		else if (votingReward == 2) {
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m got nothing! 200m loss!");
    		}
    		else if (votingReward == 3) {
    			getItems().addItem(13896, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won a Statius Helm! 50m win!");
    		}
    		else if (votingReward == 4) {
    			getItems().addItem(19111, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won a Tookhar-kal! 50m loose!");
    		}
    		else if (votingReward == 5) {
    			getItems().addItem(15071, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won a Voting Hat! 150m win!!");
    		}
    		else if (votingReward == 6) {
    			getItems().addItem(995, 200000000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won 200m! nothing won!");
    		}
    		else if (votingReward == 7) {
    			getItems().addItem(11726, 1);
    			getItems().addItem(11724, 1);
    			gamble200mbandosset();
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won a Bandos Set! 150m Win!!");
    		}
    		else if (votingReward == 8) {
    			getItems().addItem(4153, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won a g maul! 200m loss!");
    		}
    		else if (votingReward == 9) {
    			getItems().addItem(1323, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won a iron scimitar! 200m loss!");
    		}
    		else if (votingReward == 10) {
    			getItems().addItem(1231, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won a dd(p)! 50m loss!");
    		}
    		else if (votingReward == 11) {
    			getItems().addItem(15443, 1);
    			getItems().addItem(15441, 1);
    			getItems().addItem(15442, 1);
    			getItems().addItem(15444, 1);
    			getItems().addItem(15441, 1);
    			getItems().addItem(4151, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won a color whip set! 50m WIN!");
    		}
    		else if (votingReward == 12) {
    			getItems().addItem(995, 220000000);
    			gamble200m430m();
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won 430m! 130m WIN!");
    		}
    		else if (votingReward == 13) {
    			getItems().addItem(9244, 15000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won 100k d bolts!! 50m loss!");
    		}
    		else if (votingReward == 14) {
    			getItems().addItem(995, 55000000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won 55m! 150m loss!");
    		}
    		else if (votingReward == 15) {
    			getItems().addItem(6914, 1);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won a Master wand! 185m loose!");
    		}
    		else if (votingReward == 16) {
    			getItems().addItem(871, 50);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won a Iron knive(p) 200m loss!");
    		}
    		else if (votingReward == 17) {
    			getItems().addItem(995, 700000000);
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won a 700M! 500m WIN!");
    		}
    		else if (votingReward == 18) {
    			getItems().addItem(995, 580000000);
    			gamble200m580m();
    			forcedText = "I JUST GAMBLED ALL MY MONEY!"; //Player will say this message
    			forcedChatUpdateRequired = true; 
    			updateRequired = true;			
    			sendMessage("You gambled your 200m and won 580M! 380m WIN!");
    				}
    			}
    in ClickingButtons.java add this:
    Code:
    					/*Gambling on 150m cash while being donator!*/
    		case 128242: //the button
    		if (c.isDonator == 1 && c.getItems().playerHasItem(995, 150000000)) {
    		c.getItems().deleteItem(995, 150000000); //deleetes hes 150m if he got
    		c.Gamble150m(); //Then it will do my code
    		} else { //if he don't have 150m or donator
    		c.sendMessage("<col=255>You will need to be a donator and have atleast 150m cash to do this!"); //he will get this message
    		}
    		break;
    					/*Gambling on 10m cash*/
    		case 128234: //the button
    		if (c.getItems().playerHasItem(995, 10000000)) { //check's if he got 10m
    		c.getItems().deleteItem(995, 10000000); //deleetes hes 10m if he got
    		c.Gamble10m(); //Then it will do my code
    		} else { //if he don't have 10m
    		c.sendMessage("<col=255>You will need atleast 10m cash to do this!"); //he will get this message
    		}
    		break;
    		
    		/*Gambling on 50m cash*/
    		case 128236:
    		if (c.getItems().playerHasItem(995, 50000000)) {
    		c.getItems().deleteItem(995, 50000000);
    		c.Gamble50m();
    		} else {
    		c.sendMessage("<col=255>You will need atleast 50m cash to do this!");
    		}
    		break;
    		
    		/*Gambling on 100m cash*/
    		case 128238:
    		if (c.getItems().playerHasItem(995, 100000000)) {
    		c.getItems().deleteItem(995, 100000000);
    		c.Gamble100m();
    		} else {
    		c.sendMessage("<col=255>You will need atleast 100m cash to do this!");
    		}
    		break;
    		
    				/*Gambling on 200m cash*/
    		case 128240:
    		if (c.getItems().playerHasItem(995, 200000000)) {
    		c.getItems().deleteItem(995, 200000000);
    		c.Gamble200mCRAZY();
    		} else {
    		c.sendMessage("<col=255>You will need atleast 200m cash to do this!");
    		}
    		break;
    Still in ClickingButtons.java under cae 9157 add this:
    Code:
    				if (c.dialogueAction == 517) { //If it's our dialogue.
    						c.getPA().showInterface(33000); //Opens the interface.
    					return;
    			}
    Now in DialogueHandler.java add this:
    Code:
    		/*Gambler Guy*/
    		case 1870:
    		c.getDH().sendNpcChat4("Hello "+c.playerName+"!", "! Would you like to Play a game?", " ", " ", c.talkingNpc, "Gambling Master");
    		c.nextChat = 1871;
    		break;
    		case 1871:
    		c.getDH().sendNpcChat4("Perfect! Here is some information:", "Get your money and i will get you a random reward", "it all depends on how much money you want to use!", "Good luck "+c.playerName+"!", c.talkingNpc, "Gambling Master");
    		c.nextChat = 1872;
    		break;
    		case 1872:
    		c.getDH().sendOption2("Lets Gamble!", "Fuck no! I'm too scared! :(");
    		c.dialogueAction = 517;
    		break;
    Now lets go to RSInterface.java (client sided) and add this:
    Code:
    	/*Slot Machine by Wokel*/
    	public static void SlotMachine(TextDrawingArea[] TDA){ //Name
    	RSInterface Interface = addTabInterface(33000); //Interface to open
    	
    	/**Children**/
    	setChildren(13, Interface);
    	/**End of Children**/
    	
    	/**Sprites**/
    	/*Background*/
    	addSprite(33001, 1, "Interfaces/SLOTS/BACKGROUND"); //Background of the Interface!
    	/**End of Sprites**/
    	
    	/**Text**/
    	/**End of Text**/
    	
    	/**Buttons**/
    	/*Button 1, 10m*/
    	addHoverButton(33002, "Interfaces/SLOTS/BUTTON", 0, 94, 20, "Gamble 10m!", -1, 33003, 1);
    	addHoveredButton(33003, "Interfaces/SLOTS/BUTTON", 1, 115, 24, 33020); //Big button
    	/*Button 2, 50m*/
    	addHoverButton(33004, "Interfaces/SLOTS/BUTTON", 2, 94, 20, "Gamble 50m!", -1, 33005, 1);
    	addHoveredButton(33005, "Interfaces/SLOTS/BUTTON", 3, 115, 24, 33021); //Big button
    	/*Button 3, 100m*/
    	addHoverButton(33006, "Interfaces/SLOTS/BUTTON", 4, 94, 20, "Gamble 100m!", -1, 33007, 1);
    	addHoveredButton(33007, "Interfaces/SLOTS/BUTTON", 5, 115, 24, 33022); //Big button
    	/*Button 4, 200m*/
    	addHoverButton(33008, "Interfaces/SLOTS/BUTTON", 6, 94, 20, "Gamble 200m!", -1, 33009, 1);
    	addHoveredButton(33009, "Interfaces/SLOTS/BUTTON", 7, 115, 24, 33023); //Big button
    	/*Button 5, Reward Button*/
    	addHoverButton(33010, "Interfaces/SLOTS/LIST", 1, 120, 53, "Donator Gambling", -1, 33011, 1);
    	addHoveredButton(33011, "Interfaces/SLOTS/LIST", 2, 130, 57, 33024); //Big button
    	/*Exit Button*/
    	addHoverButton(33012, "Interfaces/SLOTS/close", 1, 21, 21, "Close", -1, 33013, 1);
    	addHoveredButton(33013, "Interfaces/SLOTS/close", 2, 21, 21, 33025); //Big button
    	/*End of Buttons*/
    	
    	/*Bounds, Position of the buttons and sprites*/
    	setBounds(33001, 4, 16, 0, Interface);
    	setBounds(33002, 25, 245, 1, Interface);
    	setBounds(33003, 25, 245, 2, Interface);
    	setBounds(33004, 145, 245, 3, Interface);
    	setBounds(33005, 145, 245, 4, Interface);
    	setBounds(33006, 265, 245, 5, Interface);
    	setBounds(33007, 265, 245, 6, Interface);
    	setBounds(33008, 385, 245, 7, Interface);
    	setBounds(33009, 385, 245, 8, Interface);
    	setBounds(33010, 200, 160, 9, Interface);
    	setBounds(33011, 200, 160, 10, Interface);
    	setBounds(33012, 481, 20, 11, Interface);
    	setBounds(33013, 481, 20, 12, Interface);
    	/*End of Bounds*/
    	}
    And that should be everything! anything i forgot to add? Please tell me!



    --Off Topic--
    Spoiler for Funny Video:

    Reply With Quote  
     

  2. #2  
    Server developer


    Join Date
    Jul 2010
    Posts
    881
    Thanks given
    265
    Thanks received
    55
    Rep Power
    94
    You miss some ActionHandler code; FirstClickNpc

    Code:
    case npcIdhere:
       c.getDH().sendDialogue(dialogueHere, npcIdHere);
    break;
    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. Noob Problem - ItemDef_2 Need help. 317 PI
    By Assist in forum Models
    Replies: 1
    Last Post: 06-14-2014, 09:37 PM
  2. custom interface help 317 PI
    By Ash Ketchum in forum Help
    Replies: 3
    Last Post: 07-28-2013, 07:30 AM
  3. Item on Item [Help [317/PI]
    By EverEffect in forum Help
    Replies: 2
    Last Post: 09-28-2011, 05:06 AM
  4. Need memory leak help - 317 PI
    By tehbomb in forum Help
    Replies: 3
    Last Post: 04-05-2011, 02:30 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
  •