Good day everyone, i'm requesting for a npc script how to put in the script for example when they pay 5k zeny is 5% to chance get item, but when 5m zeny 10% chance they getitem. sorry for may bad english!!
PS: 5,000 zeny is 5% chance and 5M zeny is 10% chance
~Thanks.
input .@zeny_to_gamble;
if (.@zeny_to_gamble == 0) {
mes "You can only put ^FF00005,000^000000 up to ^FF00005,000,000^000000 Zeny to proceed.";
close;
}
if (.@zeny_to_gamble < 5000 || .@zeny_to_gamble > 5000000) {
mes "You can only put ^FF00005,000^000000 up to ^FF00005,000,000^000000 Zeny to proceed.";
close;
}
Zeny -= .@zeny_to_gamble;
.@r = rand(100);
if (.@r < (.@zeny_to_gamble/100000)) { // 50/100 = 50% chance
Question
Chasewalk
Good day everyone, i'm requesting for a npc script how to put in the script for example when they pay 5k zeny is 5% to chance get item, but when 5m zeny 10% chance they getitem. sorry for may bad english!!
PS: 5,000 zeny is 5% chance and 5M zeny is 10% chance
~Thanks.
input .@zeny_to_gamble;
Edited by Chasewalkif (.@zeny_to_gamble == 0) {
mes "You can only put ^FF00005,000^000000 up to ^FF00005,000,000^000000 Zeny to proceed.";
close;
}
if (.@zeny_to_gamble < 5000 || .@zeny_to_gamble > 5000000) {
mes "You can only put ^FF00005,000^000000 up to ^FF00005,000,000^000000 Zeny to proceed.";
close;
}
Zeny -= .@zeny_to_gamble;
.@r = rand(100);
if (.@r < (.@zeny_to_gamble/100000)) { // 50/100 = 50% chance
Link to comment
Share on other sites
1 answer 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.