Jump to content
  • 0

Quest NPC with Random Prize


Question

Posted (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 by Akiza Izinsky

5 answers to this question

Recommended Posts

Posted

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/

  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...