Rage Guy Posted July 20, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 354 Reputation: 3 Joined: 02/17/13 Last Seen: August 14, 2016 Share Posted July 20, 2013 i want a bet npc the npc is i want the person when he talk to the npc the npc ask him first yes or no for betting the betting is only for 40m Zeny 70% lose them 30% be 80m Zemy Quote Link to comment Share on other sites More sharing options...
Patskie Posted July 20, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 14 hours ago Share Posted July 20, 2013 prontera,150,150,0 script Gambler 100,{ set .@npc$,"[ " +strnpcinfo(1)+ " ]"; set .@chance,30; // 30% chance set .@zeny,40000000; mes .@npc$; mes "Bet with me " +strcharinfo(0); if ( select("Yes:No") - 1 || Zeny < .@zeny ) end; if ( rand(100) < .@chance ) set Zeny, Zeny + ( .@zeny * 2 ); else set Zeny, Zeny - .@zeny; } Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted July 20, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 354 Reputation: 3 Joined: 02/17/13 Last Seen: August 14, 2016 Author Share Posted July 20, 2013 error pls help Quote Link to comment Share on other sites More sharing options...
Patskie Posted July 20, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 14 hours ago Share Posted July 20, 2013 prontera,150,150,0<TAB>script<TAB>Gambler<TAB>100,{ Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted July 23, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 354 Reputation: 3 Joined: 02/17/13 Last Seen: August 14, 2016 Author Share Posted July 23, 2013 when i click yes or no he just stun me Quote Link to comment Share on other sites More sharing options...
DeadlySilence Posted July 23, 2013 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 181 Reputation: 53 Joined: 04/07/13 Last Seen: August 23, 2014 Share Posted July 23, 2013 Try this: prontera,150,150,0 script Gambler 100,{ set .@npc$," [ " +strnpcinfo(1)+ " ]"; set .@chance, 30; // 30% chance set .@zeny, 40000000; mes .@npc$; mes "Bet with me, " + strcharinfo(0) + "!"; if (2 == select("Yes:No")) { next; mes .@npc$; mes "Okay, maybe next time."; close; } if (.@zeny > Zeny) { next; mes .@npc$; mes "I'm sorry, but you don't have enough Zeny. You need " + .@zeny + " to bet."; close; } next; if (rand(100) < .@chance) { mes .@npc$; mes "Hooray, you won!"; set Zeny, Zeny + ( .@zeny * 2 ); close; } else { mes .@npc$; mes "Too bad, you lost!"; set Zeny, Zeny - .@zeny; close; } } The same as Patskie's, but with more detailed output for the user. Quote Link to comment Share on other sites More sharing options...
Question
Rage Guy
i want a bet npc
the npc is
i want the person when he talk to the npc
the npc ask him first yes or no for betting
the betting is
only for 40m Zeny
70% lose them
30% be 80m Zemy
Link to comment
Share on other sites
5 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.