Jump to content
  • 0

remaining time


Bringer

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  746
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

hello rathena i want to add this event bind command on this event and remaining time how ?

For Bind command

    bindatcmd "hunt","Monster Challenge::OnhuntHour";

What about the Timer? is this correct?

 

set @hunt_timer, gettimetick(2);

OnhuntHour:
	mes "^0033ff[ War Server ]^000000";
	mes "Reward Hourly Points : ^FF0000[ "+#HourlyPoints+" ]^000000";
	mes " ";
	mes "@hunt_timer ? Time2Str( @hunt_timer )+" Remaining.":"Something went wrong relog!";
	end;

 

Spoiler

//======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,111,99,5	script	Monster Challenge	668,{
 
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 Every 2 Hours!";
		close;
	}

mes "Hello, do you want to take on the Monster Hunting Challenge?","If you manage to kill them, you'll receive a 1 Hourly Coin 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 (35,50); //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)+7200; //2hours.
end;

 
//----------Config----------
 
OnInit:
	.Npc_Name$ = "[^0000FF Monster Challenge ^000000]";
	setarray .Mob_List[0],1002,1007,1063,1011,1107,1113,1047,1049,1052,1012,1010; //Mobs to hunt. Default: Poring, Fabre, Lunatic
	.Reward = 31060; //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!";
				announce "Congratulations! You did it! "+strcharinfo(0)+" You Finished The Monster Challenge!!",0;
				getitem .Reward,.RewAmt;
				Hunt = 0;
				Hunter = 0;
				HuntCount = 0;
				Amt = 0;
			}
		}
	}
end;
}

morocc,159,97,4	duplicate(Monster Challenge)	Monster Challenge#2	668
payon,184,104,4	duplicate(Monster Challenge)	Monster Challenge#3	668

 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

Are you referring to the 2 hours hunt delay? And you want to see how much time you got before re-taking the quest?

Try

bindatcmd "hunt","Monster Challenge::OnhuntHour";

OnhuntHour:
	mes "^0033ff[ War Server ]^000000";
	mes "Reward Hourly Points : ^FF0000[ "+#HourlyPoints+" ]^000000";
	mes " ";
	mes ""+( HuntDelay - gettimetick(2) )+" seconds remaining.";
	end;

 

  • Upvote 1
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...