ShiroNaito Posted July 1, 2019 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 65 Reputation: 1 Joined: 04/04/19 Last Seen: May 27, 2021 Share Posted July 1, 2019 Good day .. I just want to request a random quest npc where in : case 1: jellopy 200x , garlet 200x apple 200x case 2: silk 200x , hairband 1 etc case 3: different items again the reason why im looking this npc is I have a daily quest with rewards ..I dont want players to horde requirements and submit it every day ... Thankyou Quote Link to comment Share on other sites More sharing options...
1 Emistry Posted August 24, 2019 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted August 24, 2019 prontera,155,181,5 script Sample 4_F_KAFRA1,{ if (!quest_random) { quest_random = rand(1, 3); mes "You have been assigned with a new quest."; next; } switch(quest_random) { case 1: setarray .@reward, 4001, 1; setarray .@item, 512; setarray .@amount, 100; break; case 2: setarray .@reward, 4002, 1; setarray .@item, 501, 502, 503; setarray .@amount, 3, 1, 2; break; case 3: setarray .@reward, 4003, 1; setarray .@item, 512, 503; setarray .@amount, 300, 100; break; default: mes "invalid quest."; close; } mes "Quest Requirement(s):"; .@size = getarraysize(.@item); for (.@i = 0; .@i < .@size; .@i++) { mes " > "+.@amount[.@i]+"x "+getitemname(.@item[.@i]); if (countitem(.@item[.@i]) < .@amount[.@i]) .@fail++; } if (!.@fail) { next; if (select("Submit Quest", "Cancel") == 1) { for (.@i = 0; .@i < .@size; .@i++) delitem .@item[.@i], .@amount[.@i]; getitem .@reward[0], .@reward[1]; quest_random = 0; } } close; } try 3 Quote Link to comment Share on other sites More sharing options...
0 Eross Posted April 11, 2020 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 377 Reputation: 12 Joined: 04/05/20 Last Seen: 19 hours ago Share Posted April 11, 2020 On 8/24/2019 at 3:10 PM, Emistry said: prontera,155,181,5 script Sample 4_F_KAFRA1,{ if (!quest_random) { quest_random = rand(1, 3); mes "You have been assigned with a new quest."; next; } switch(quest_random) { case 1: setarray .@reward, 4001, 1; setarray .@item, 512; setarray .@amount, 100; break; case 2: setarray .@reward, 4002, 1; setarray .@item, 501, 502, 503; setarray .@amount, 3, 1, 2; break; case 3: setarray .@reward, 4003, 1; setarray .@item, 512, 503; setarray .@amount, 300, 100; break; default: mes "invalid quest."; close; } mes "Quest Requirement(s):"; .@size = getarraysize(.@item); for (.@i = 0; .@i < .@size; .@i++) { mes " > "+.@amount[.@i]+"x "+getitemname(.@item[.@i]); if (countitem(.@item[.@i]) < .@amount[.@i]) .@fail++; } if (!.@fail) { next; if (select("Submit Quest", "Cancel") == 1) { for (.@i = 0; .@i < .@size; .@i++) delitem .@item[.@i], .@amount[.@i]; getitem .@reward[0], .@reward[1]; quest_random = 0; } } close; } try Hi I know this thread is old ..I just sent you a message regarding this @Emistry thankyou Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted April 11, 2020 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: April 15 Share Posted April 11, 2020 5 minutes ago, erjsanmiguel said: Hi I know this thread is old ..I just sent you a message regarding this @Emistry thankyou There is absolutely no reason to resurrect a thread to tell someone that you've sent them a message. They'll see the message just fine without you telling them to go look for it. Quote Link to comment Share on other sites More sharing options...
Question
ShiroNaito
Good day .. I just want to request a random quest npc where in :
case 1: jellopy 200x , garlet 200x apple 200x
case 2: silk 200x , hairband 1 etc
case 3: different items again
the reason why im looking this npc is I have a daily quest with rewards ..I dont want players to horde requirements and submit it every day ...
Thankyou
Link to comment
Share on other sites
3 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.