Jump to content
  • 0

Quest NPC with Random Prize


Akiza Izinsky

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  59
  • Reputation:   0
  • Joined:  09/23/12
  • Last Seen:  

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
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

question about the bapho horn, is the one that grands tolerance or the one that grands damage?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  59
  • Reputation:   0
  • Joined:  09/23/12
  • Last Seen:  

yes, the one that gives 12% damage on demi human

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

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:

Link to comment
Share on other sites

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.

×
×
  • Create New...