I am creating an npc that gives items when you enter the server, but I have some questions how can I do, someone would know tell me.
- to have the item drop depend on chance
- Items with chance of 0.01 to 1 is made the announce.
prontera,150,105,4 script Itens 98,{
setarray .@itens[0] "607","608","609","610","611","612";
setarray .@qnt[0] "10","10","15","15","20","20";
setarray .@chance$[0], "0.01","0.1","0.2","0.5","1","100";
mes "[giveaway]";
mes "Hello I am";
mes "Selector that gives items";
mes "very special, I would like to try his luck?";
next;
switch(select(try his luck:No thanks ")) {
case 1:
if (countitem (6040) > = 100 & & countitem (6075) > = 50 & & countitem (6080) > = 50 (6095) countitem & & > = 50 & & countitem (713) > = 1) {
mes "[giveaway]";
mes "I see that you have all items";
delitem 6040.100;
delitem 6075.50;
delitem 6080.50;
delitem 6095.50;
delitem 713.1;
getitem. @itens [.@i]. @qnt [.@i];,
announce "the player ["+strcharinfo (0)+"] won 5 yggdrasil." .8;
close;
}
case 2:
mes "[giveaway]";
mes "OK, come back when you want";
close;
}
}
Question
Beret
I am creating an npc that gives items when you enter the server, but I have some questions how can I do, someone would know tell me.
- to have the item drop depend on chance
Link to comment
Share on other sites
4 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.