Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //======Name========================================
- // Daily Monster Hunt
- //======Version=====================================
- // 1.2
- //======Author(s)===================================
- // Sandbox
- //======Comments====================================
- // This NPC allows your player to hunt a random amount
- // of a random monster, within a random time
- // *randomception!*
- // If the player successfully hunts the monster
- // within the time limit, he'll receive a reward!
- //======Credits=====================================
- // KeyWorld, nanakiwurtz, NeoMind, Kido
- // Thanks for helping me out guize!
- //==================================================
- invek,134,163,6 script Daily Monsters Hunt 924,{
- mes .Npc_Name$;
- if(Hunter2) {
- mes "You have killed ^880000"+HuntCount2+"^000000/^0000FF"+Amt
- +"^000000 "+getmonsterinfo(Hunt2,0)+"s, keep it up!";
- close;
- }
- if(gettimetick(2) < #HuntDelay2) {
- mes "You can only do this quest once a day!";
- close;
- }
- mes "Hello, do you want to take on the Monster Hunting Challenge?","I will give you a random time limit to kill 100 x monsters, If you manage to kill them within the given time, you'll receive 10 x GaiaRO Token!";
- if(select("Bring it on!:How about no?")==2) {
- mes .Npc_Name$;
- mes "Fine!";
- close;
- }
- next;
- mes .Npc_Name$;
- Hunt2 = .Mob_List[rand(getarraysize(.Mob_List))];
- Time = rand(86400,86400); //Timer
- Amt = rand (100,100); //Amount of mob to hunt
- Hunter2++;
- mes "You have to hunt ^0000FF"+Amt+" "+getmonsterinfo(Hunt2,0)+"^000000 in ^AA0000"+Time+"^000000 seconds!";
- next;
- mes .Npc_Name$;
- mes "Go go go!";
- close2;
- showdigit Time,3;
- #HuntDelay2 = gettimetick(2)+86400; //Once a day only.
- HuntStart2 = gettimetick(2)+Time;
- sleep2 1000*Time;
- if(Hunter2) dispbottom strnpcinfo(1)+": I'm sorry, you didn't make it!";
- HuntStart2 = 0; //Reset all variables
- Hunt2 = 0;
- Hunter2 = 0;
- HuntCount2 = 0;
- Time = 0;
- Amt = 0;
- end;
- OnClock0000:
- query_sql( "DELETE FROM `char_reg_num` WHERE `key` LIKE 'Hunt%' OR `key` LIKE 'Time' OR `key` LIKE 'Amt' OR `key` LIKE '#HuntDelay2'" );
- addrid(0);
- HuntStart2 = 0;
- Hunt2 = 0;
- Hunter2 = 0;
- HuntCount2 = 0;
- Time = 0;
- Amt = 0;
- showdigit 1,3;
- #HuntDelay2 = 0;
- end;
- //----------Config----------
- OnInit:
- .Npc_Name$ = "[^0000FF NPC ^000000]";
- setarray .Mob_List[0],1002,1007,1063; //Mobs to hunt. Default: Poring, Fabre, Lunatic
- .Reward = 7606; //Reward ID
- .RewAmt = 10; //Reward Amount
- end;
- OnNPCKillEvent:
- if(Hunter2 > 0) {
- if(gettimetick(2) < HuntStart2) {
- if(killedrid == Hunt2) {
- HuntCount2++;
- dispbottom "You have killed "+HuntCount2+"/"+Amt+" "+getmonsterinfo(Hunt2,0)+"s, keep it up!";
- if(HuntCount2 >= Amt) {
- dispbottom strnpcinfo(1)+": Congratulations! You did it!";
- getitem .Reward,.RewAmt;
- HuntStart2 = 0;
- Hunt2 = 0;
- Hunter2 = 0;
- HuntCount2 = 0;
- Time = 0;
- Amt = 0;
- showdigit 1,3;
- }
- }
- }
- }
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement