hye i found this script while browsing rathena, and could someone modify the script to how many item player will get. example if they got some potions, instead just 1 potion, i wana it to be 10 depends on the configuration.
example : with 1 ticket player can get this items on list by random
1. 10 white potion
2. 30 blue potion
3. 5 Ygg berry
4. 1 pod
and the list goes on, as i can see the current script did put random at 10 which i assume was 10% chances? soo if i add 0.1 means 0.1% ?
Sorry had to re-edit this post since lots of ppl confused with my question.
thanks for help.
Spoiler
neko_isle,77,127,5 script Gatcha562,{if(!countitem(.itemuse)){
mes "A "+ getitemname(.itemuse)+" is needed to use this machine";
close;}
delitem .itemuse,1;.@r= rand(.totalchance);for(.@i=0;(.@r-=.itemchance[.@i])>=0;++.@i);
getitem .itemid[.@i],1;
end;OnInit:.itemuse =40022;// poring coin
setarray .itemid,501,502,503,504,505,506,507,508,509;
setarray .itemchance,10,10,10,10,3,10,10,10,10;for(.@i=0;.itemid[.@i];++.@i).totalchance +=.itemchance[.@i];
end;}
Question
Dolphin86
hye i found this script while browsing rathena, and could someone modify the script to how many item player will get. example if they got some potions, instead just 1 potion, i wana it to be 10 depends on the configuration.
example : with 1 ticket player can get this items on list by random
1. 10 white potion
2. 30 blue potion
3. 5 Ygg berry
4. 1 pod
and the list goes on, as i can see the current script did put random at 10 which i assume was 10% chances? soo if i add 0.1 means 0.1% ?
Sorry had to re-edit this post since lots of ppl confused with my question.
thanks for help.
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.