Jump to content
  • 0

Help with prize machine


sran

Question


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  56
  • Reputation:   0
  • Joined:  11/19/12
  • Last Seen:  

 

Hello download this npc and I liked it a lot, but I would like to change two things, that instead of giving hats of 100 cash example, and that to deliver the 100 cash is quite difficult that 100% is 5% to give cash

Maquina de Premios.txt

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

2 hours ago, sran said:

 

Hello download this npc and I liked it a lot, but I would like to change two things, that instead of giving hats of 100 cash example, and that to deliver the 100 cash is quite difficult that 100% is 5% to give cash

Maquina de Premios.txt

Try this one and see if this what you want.

/*	[======================================================================] 
			 ____  _         _              ____       
			|  _ \(_) _   _ (_)_ __   ___  |  _ \ ___  
			| | | | |\ \ / /| | '_ \ / _ \ | |_) / _ \ 
			| |_| | | \ V / | | | | |  __/ |  _ < (_) |
			|____/|_|  \_/  |_|_| |_|\___| |_| \_\___/  	  
					_     _     _     _     _  
				       / \   / \   / \   / \   / \ 
				      ( R ) ( a ) ( k ) ( a ) ( y )
				       \_/   \_/   \_/   \_/   \_/  Scripting                                           
	[======================================================================]	
		Script: Maquina de Premios
	[======================================================================]
		Created by: Rakay~
	[======================================================================]
		Actualizaciones: • None.			 
	[======================================================================]
		Version: 1.0
	[======================================================================]
		Description: Maquina que da Premios Random con Chance x 2 Coin
	[======================================================================]
		Credits: Este es un Script de uso Libre para Divine, Respetar.
			 Los Creditos del Autor. Rakay~
	[======================================================================] */
prontera,136,171,5	script	Maquina de Premios	562,{

set .@Pcant,2;
set .@n$, "[^008888 Maquina ^000000]";

mes .@n$;
mes "Hola ^008888"+strcharinfo(0)+"^000000!";
mes "Debes Inserta "+.@Pcant+" Poring Coin Para Jugar.";
mes " ";
mes "Deseas Jugar?";
next;
	if ( select("Insertar Coins:Salir") == 2 ) {
		mes .@n$;
		mes "Ok, Regresa cuando Quieras Jugar.";
		close;
	} //End If
	mes .@n$;
	if(countitem(7539) < .@Pcant){
	mes "Lo Siento, Necesitas "+.@Pcant+" Poring Coin.";
	close;
	}
	set @rand,rand(1,100); //randomize from 1 to 100
	delitem 7539,.@Pcant;
	mes "Iniciemos, Buena Suerte!";
	mes "...";
	sleep2 1000;
	mes "......";
	sleep2 1000;
	mes ".........";
	if(@rand < .win_chance){ //check if player randomed a number between 1 to (chance of winning)
	specialeffect 610;
	specialeffect2 610;
	mes "  ";
	mes "Exelente, Atrapaste un ["+.cash_prize+"] cash...Regresa Pronto";
	set #cash, #cash + .cash_prize; //Add cash to player
	dispbottom "You received: "+.cash_prize+" Cash";
	close;
	} else {
	specialeffect 611;
	specialeffect2 611;
	mes "  ";
	mes "Lo Siento, No Atrapaste Nada....Intentalo Nuevamente!";
	close;
	}
OnInit:
	set .cash_prize, 100;
	set .win_chance, 5;
	end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

Try this. 

I haven't tried it because I don't have any environment setup at the moment.

/*	[======================================================================] 
			 ____  _         _              ____       
			|  _ \(_) _   _ (_)_ __   ___  |  _ \ ___  
			| | | | |\ \ / /| | '_ \ / _ \ | |_) / _ \ 
			| |_| | | \ V / | | | | |  __/ |  _ < (_) |
			|____/|_|  \_/  |_|_| |_|\___| |_| \_\___/  	  
					_     _     _     _     _  
				       / \   / \   / \   / \   / \ 
				      ( R ) ( a ) ( k ) ( a ) ( y )
				       \_/   \_/   \_/   \_/   \_/  Scripting                                           
	[======================================================================]	
		Script: Maquina de Premios
	[======================================================================]
		Created by: Rakay~
	[======================================================================]
		Actualizaciones: • None.			 
	[======================================================================]
		Version: 1.0
	[======================================================================]
		Description: Maquina que da Premios Random con Chance x 2 Coin
	[======================================================================]
		Credits: Este es un Script de uso Libre para Divine, Respetar.
			 Los Creditos del Autor. Rakay~
	[======================================================================] */
prontera,136,171,5	script	Maquina de Premios	562,{

set .@Pcant,2;
set .@n$, "[^008888 Maquina ^000000]";

mes .@n$;
mes "Hola ^008888"+strcharinfo(0)+"^000000!";
mes "Debes Inserta "+.@Pcant+" Poring Coin Para Jugar.";
mes " ";
mes "Deseas Jugar?";
next;
	if ( select("Insertar Coins:Salir") == 2 ) {
		mes .@n$;
		mes "Ok, Regresa cuando Quieras Jugar.";
		close;
	} //End If
	mes .@n$;
	if(countitem(7539) < .@Pcant){
	mes "Lo Siento, Necesitas "+.@Pcant+" Poring Coin.";
	close;
	}
	set @rand,rand(1,100); //randomize from 1 to 100
	delitem 7539,.@Pcant;
	mes "Iniciemos, Buena Suerte!";
	mes "...";
	sleep2 1000;
	mes "......";
	sleep2 1000;
	mes ".........";
	if(@rand <= .win_chance){ //check if player randomed a number between 1 to (chance of winning)
	specialeffect 611;
	specialeffect2 611;
	mes "  ";
	mes "Lo Siento, No Atrapaste Nada....Intentalo Nuevamente!";
	close;
	}
	specialeffect 610;
	specialeffect2 610;
	mes "  ";
	mes "Exelente, Atrapaste un ["+.cash_prize+"] cash...Regresa Pronto";
	set #cash, #cash + .cash_prize; //Add cash to player
	close;
	

OnInit:
	set .cash_prize, 100;
	set .win_chance, 5;
	end;
}

You can customize how much cash and how big is the win rate by changing it through the "OnInit" part of the script.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  56
  • Reputation:   0
  • Joined:  11/19/12
  • Last Seen:  

 

Hi, I've tried it, but I get cash every time and I try it with 50 pc, the truth is I want it to be really hard to get cash in the machine.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  56
  • Reputation:   0
  • Joined:  11/19/12
  • Last Seen:  

Thanks solved, one last question if tomorrow I wish that it is more the possibility to make money where I have to change it
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...