Blue Jem Posted November 6, 2013 Posted November 6, 2013 Example: this number for dice roll 1: 2: 3: 4: 5: 6: Player choose one for dice roll if the player choose number 4 then the npc roll the dice .the result of roll is 6 the player is lost. if player choose number 1 then the npc roll the again . the result is 1 the player win times two of prize Quote
Patskie Posted November 6, 2013 Posted November 6, 2013 Try : prontera,150,150,0 script Sample 100,{ // Item ID,Amount setarray .prize,7227,5; if ( countitem(.prize[0]) < .prize[1] ) { mes "You need to have " + .prize[1] + " " +getitemname(.prize[0]); close; } mes "Input your number"; next; input .@guess,1,6; mes "Roll roll roll ~"; next; .random_number = rand(1,6); if ( .@guess == .random_number ) { getitem .prize[0], (2 * .prize[1]); mes "You got it! (" +.@guess+ ")"; } else { delitem .prize[0], .prize[1]; mes "Better luck next time!"; mes "NPC number : " +.random_number; mes "Your number : " +.@guess; } close; } Quote
Blue Jem Posted November 6, 2013 Author Posted November 6, 2013 ok i try then i post the error is work thx alot Quote
Question
Blue Jem
Example:
this number for dice roll
1:
2:
3:
4:
5:
6:
Player choose one for dice roll if the player choose number 4 then the npc roll the dice .the result of roll is 6 the player is lost.
if player choose number 1 then the npc roll the again . the result is 1 the player win times two of prize
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.