Blue Jem Posted November 6, 2013 Group: Members Topic Count: 151 Topics Per Day: 0.04 Content Count: 393 Reputation: 3 Joined: 09/16/13 Last Seen: June 4, 2014 Share 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 Link to comment Share on other sites More sharing options...
Patskie Posted November 6, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 19 hours ago Share 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 Link to comment Share on other sites More sharing options...
Blue Jem Posted November 6, 2013 Group: Members Topic Count: 151 Topics Per Day: 0.04 Content Count: 393 Reputation: 3 Joined: 09/16/13 Last Seen: June 4, 2014 Author Share Posted November 6, 2013 ok i try then i post the error is work thx alot Quote Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites
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.