Jump to content
  • 0
Sign in to follow this  
Harmony

Converting a timed quest into account-bound

Question

Hello, I want this quest to be account bound because at it's current state you just have to change into another character to do the quest again

 

//======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
// *randomception!*
// If the player successfully hunts the monster
// he'll receive a reward!
//======Credits=====================================
// KeyWorld, nanakiwurtz, NeoMind, Kido
// Thanks for helping me out guize!
// Modified by Luciar for Yonko
//==================================================
 
prontera,161,184,5	script	Hunting Challenge	78,{
 
mes .Npc_Name$;
	if(Hunter) {
	mes "You have killed ^880000"+HuntCount+"^000000/^0000FF"+Amt
 
+"^000000 "+getmonsterinfo(Hunt,0)+"s, keep it up!";
	close;
	}
	if(gettimetick(2) < HuntDelay) {
		mes "You can only do this quest once every 12 hours!";
		close;
	}

mes "Hello, do you want to take on the Monster Hunting Challenge? If you manage to kill them, you'll receive a reward!"; 
if(select("Bring it on!:How about no?")==2) {
	mes .Npc_Name$;
	mes "Fine!";
	close;
}
 
next;
mes .Npc_Name$;
	Hunt = .Mob_List[rand(getarraysize(.Mob_List))];
	Amt = rand (50,100); //Amount of mob to hunt
	Hunter++;
 
mes "You have to hunt ^0000FF"+Amt+" "+getmonsterinfo(Hunt,0)+"^000000!";
next;
mes .Npc_Name$;
mes "Go go go!";
close2;
HuntDelay = gettimetick(2)+43200; //Once a day only.
end;

 
//----------Config----------
 
OnInit:
	.Npc_Name$ = "[^0000FF NPC ^000000]";
	setarray .Mob_List[0],1002,1007,1063; //Mobs to hunt. Default: Poring, Fabre, Lunatic
	.Reward = 7227; //Reward ID
	.RewAmt = 1; //Reward Amount
	end;
 
OnNPCKillEvent:
	if(Hunter > 0) {
		if(killedrid == Hunt) {
			HuntCount++;
			dispbottom "You have killed "+HuntCount+"/"+Amt+" "+getmonsterinfo(Hunt,0)+"s, keep it up!";
			if(HuntCount >= Amt) {
				dispbottom strnpcinfo(1)+": Congratulations! You did it!";
				getitem .Reward,.RewAmt;
				Hunt = 0;
				Hunter = 0;
				HuntCount = 0;
				Amt = 0;
			}
		}
	}
end;
}

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.