Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===== Hercules Script ===================================
- //===== By ===================================================
- //== True Zeal =========================================
- //===== Description =======================================
- //== Daily Quest
- //===== Comments ==========================================
- //== good luck
- //=========================================================
- prontera,150,150,3 script Daily Quest 4_M_ALCHE_E,{
- //----- Configuration --------------------------------------
- // Sets the name of the NPC in dialogue screens
- .@name$ = "[Daily Quest]";
- // Sets the ItemID# of the prize/reward
- set .reward,7227;
- // Sets the amount of item listed above to give in reward
- set .rewardamount,1;
- // Don't worry about this, just used to display amount of items required
- set @randomcount1,countitem(L_DailyLolz1);
- set @randomcount2,countitem(L_DailyLolz1);
- set @randomcount3,countitem(L_DailyLolz1);
- L_Menu:
- if (L_SetDailyQuest == 0) {
- mes .@name$;
- mes "Would you like a quest?";
- next;
- menu "Yes",-,"No",L_Close;
- mes .@name$;
- mes "Okay then, I want you to collect the following items for me:";
- next;
- // Sets the random item numbers
- set L_Random1,rand(9,16);
- set L_Random2,rand(100,221);
- set L_Random3,rand(100,221);
- // Sets which card to randomly choose.
- // Replace 4001, 4002, etc. with the ones you want
- setarray .@ItemID1,4001,4002,4003,4004;
- // Sets item 2 option
- setarray .@ItemID2,501,502,503,503;
- // Sets item 3 option
- setarray .@ItemID3,504,505,506,507;
- // This function randomly picks an item from the list above, corresponding to its thing
- set .@ItemName1,rand( getarraysize(.@ItemID1) );
- set .@ItemName2,rand( getarraysize(.@ItemID2) );
- set .@ItemName3,rand( getarraysize(.@ItemID3) );
- // Sets the random item to save to your character (sorry I've given up explaining now lol)
- set L_DailyLolz1,.@ItemName1;
- set L_DailyLolz2,.@ItemName2;
- set L_DailyLolz3,.@ItemName3;
- // Makes it impossible to return to this screen once quest is active
- set L_SetDailyQuest,1;
- mes .@name$;
- mes "" + L_Random1 + "x " + getitemname(.@ItemName1) + "";
- mes "" + L_Random2 + "x " + getitemname(.@ItemName2) + "";
- mes "" + L_Random3 + "x " + getitemname(.@ItemName3) + "";
- next;
- mes .@name$;
- mes "Good luck!";
- close;
- }
- else {
- mes .@name$;
- mes "You already have a quest!";
- next;
- switch(select("Claim Reward:Cancel")) {
- case 1:
- mes .@name$;
- mes "You need the following items:";
- mes "" + L_Random1 + "x " + getitemname(L_DailyLolz1) + "";
- mes "" + L_Random2 + "x " + getitemname(L_DailyLolz2) + "";
- mes "" + L_Random3 + "x " + getitemname(L_DailyLolz3) + "";
- next;
- switch(select("Turn in items:Cancel")) {
- case 1:
- if (countitem(L_DailyLolz1) >= L_Random1 && countitem(L_DailyLolz2) >= L_Random2 && countitem(L_DailyLolz3) >= L_Random3) {
- mes .@name$;
- mes "Let me see...";
- next;
- delitem L_DailyLolz1,L_Random1;
- delitem L_DailyLolz2,L_Random2;
- delitem L_DailyLolz3,L_Random3;
- getitem .reward,.rewardamount;
- set L_DailyLolz1,0;
- set L_DailyLolz2,0;
- set L_DailyLolz3,0;
- set L_Random1,0;
- set L_Random2,0;
- set L_Random3,0;
- set L_SetDailyQuest,0;
- next;
- mes .@name$;
- mes "Well done!";
- close;
- }
- else {
- mes .@name$;
- mes "You don't have all the required items!";
- next;
- mes "You still need:";
- mes "" + L_Random1-@randomcount1 + "x " + getitemname(L_DailyLolz1) + "";
- mes "" + L_Random2-@randomcount2 + "x " + getitemname(L_DailyLolz2) + "";
- mes "" + L_Random3-@randomcount3 + "x " + getitemname(L_DailyLolz3) + "";
- close;
- }
- break;
- case 2:
- close;
- break;
- }
- break;
- case 2:
- close;
- break;
- }
- }
- L_Close:
- close;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement