Akiza Izinsky Posted February 7, 2014 Posted February 7, 2014 (edited) Hello, i`d like to request a npc script with random prize. for example : This Quest Required : 3x Evil Horn 100x Jellopy 1x Evil Druid Card And You will rewarded with 1 of this following prize : Beret, Giant Baphomet Horn, Ghostring Card, Angeling Card, Valk Item. so when you handover the item to the npc. you only get 1 of those item with random chances. i`m using eAthena Edited February 7, 2014 by Akiza Izinsky Quote
Kido Posted February 7, 2014 Posted February 7, 2014 question about the bapho horn, is the one that grands tolerance or the one that grands damage? Quote
Akiza Izinsky Posted February 7, 2014 Author Posted February 7, 2014 yes, the one that gives 12% damage on demi human Quote
Kido Posted February 7, 2014 Posted February 7, 2014 Here you go my friend izlude,105,141,5 script Random Prize#1 100,{ mes "[Random Prize]"; mes "Hello, you can earn 1 random item of the following:"; mes "Beret, Giant Baphomet Horns, Ghostring Card, Angeling Card or a Valkyrie Helm if you give me the following items."; next; mes "3 Evil Horn"; mes "100 Jellopy"; mes "1 Evil Druid Card"; next; mes "Do you have the items?"; switch(select("-Yes, i have them:-No, let me go fot them")) { case 1: mes "Allright, let's see..."; if(countitem(923)<=2 && countitem(4141) ==0 && countitem(909) <=99){ mes "You don't have them, go for them and then comeback..."; } else { mes "Allright, seems like you have them, here you go, good luck!"; getitem callfunc( "F_Rand", 5172,5374,4047,4054,5171 ), 1; } close; case 2: mes "Allright, good luck on the hunting"; } end; } function script F_Rand { return getarg(rand(getargcount())); } remember to apply TABS on the first line (hit the tab key on your keyboard) izlude,105,141,5<TAB>script<TAB>Random Prize#1<TAB>100,{ lol sorry my main city is izlude, change it as you want xD Thanks to AnnieRuru i could do this by reading this post http://rathena.org/board/topic/78263-scripting-faqtipstricks/ 1 Quote
Patskie Posted February 7, 2014 Posted February 7, 2014 You don't need to add the F_Rand function on your script as it is already existing here npc/other/Global_Functions.txt#L158 Quote
Kido Posted February 7, 2014 Posted February 7, 2014 You don't need to add the F_Rand function on your script as it is already existing here npc/other/Global_Functions.txt#L158 i tested it without the function and didn't work DD: sry maybe my version is old? i'm using r17701 D: Quote
Question
Akiza Izinsky
Hello, i`d like to request a npc script with random prize. for example :
This Quest Required :
3x Evil Horn
100x Jellopy
1x Evil Druid Card
And You will rewarded with 1 of this following prize :
Beret, Giant Baphomet Horn, Ghostring Card, Angeling Card, Valk Item.
so when you handover the item to the npc. you only get 1 of those item with random chances.
i`m using eAthena
Edited by Akiza Izinsky5 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.