Jump to content
  • 0
GubA

How to set Delay from get item...

Question

Quote

-    script    KillMon2Cash    -1,{
end;

OnNPCKillEvent:
if(rand(1,100) < 1) getitem 50001,1;
end;
}

Thank you to help.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0
-	script	KillMon2Cash	-1,{
OnNPCKillEvent:
[email protected] = gettimetick(2);
if (rand(100) < 1 && [email protected] > @delay) {
	getitem 50001,1;
	@delay = [email protected] + 60; // 60 seconds
}
end;
}

 

  • Love 1
Link to comment
Share on other sites

  • 0
On 1/17/2023 at 9:48 PM, Emistry said:
-	script	KillMon2Cash	-1,{
OnNPCKillEvent:
[email protected] = gettimetick(2);
if (rand(100) < 1 && [email protected] > @delay) {
	getitem 50001,1;
	@delay = [email protected] + 60; // 60 seconds
}
end;
}

 

Thank you too much.

Link to comment
Share on other sites

  • 0
On 1/17/2023 at 11:48 AM, Emistry said:
-	script	KillMon2Cash	-1,{
OnNPCKillEvent:
[email protected] = gettimetick(2);
if (rand(100) < 1 && [email protected] > @delay) {
	getitem 50001,1;
	@delay = [email protected] + 60; // 60 seconds
}
end;
}

 

Hello @Emistry! good day! 

How do I add a command, example: @check, and the command says how much time is left for a new drop? plss ❤️

Link to comment
Share on other sites

  • 0

maybe something like that

 

-	script	KillMon2Cash	-1,{
OnNPCKillEvent:
[email protected] = gettimetick(2);
if (rand(100) < 1 && [email protected] > @delay) {
	getitem 50001,1;
	@delay = [email protected] + 60; // 60 seconds
}
end;

OnInit:
	bindatcmd "check", "KillMon2Cash::OnCheckTime";
	end;
	
OnCheckTime:
	message strcharinfo(0),"Next drop in "+ ( @delay - [email protected] ) + " seconds.";
	end;
}

 

Link to comment
Share on other sites

  • 0
On 1/22/2023 at 12:34 PM, Angeluz said:

maybe something like that

 

-	script	KillMon2Cash	-1,{
OnNPCKillEvent:
[email protected] = gettimetick(2);
if (rand(100) < 1 && [email protected] > @delay) {
	getitem 50001,1;
	@delay = [email protected] + 60; // 60 seconds
}
end;

OnInit:
	bindatcmd "check", "KillMon2Cash::OnCheckTime";
	end;
	
OnCheckTime:
	message strcharinfo(0),"Next drop in "+ ( @delay - [email protected] ) + " seconds.";
	end;
}

 

time error 😕

image.thumb.png.8334c029bcfc64cade0679118d78bfae.png

Link to comment
Share on other sites

  • 0
3 hours ago, WillJocker said:

time error 😕

image.thumb.png.8334c029bcfc64cade0679118d78bfae.png

my bad

 

-	script	KillMon2Cash	-1,{
OnNPCKillEvent:
[email protected] = gettimetick(2);
if (rand(100) < 1 && [email protected] > @delay) {
	getitem 50001,1;
	@delay = [email protected] + 60; // 60 seconds
}
end;

OnInit:
	bindatcmd "check", "KillMon2Cash::OnCheckTime";
	end;
	
OnCheckTime:
	message strcharinfo(0),"Next drop in "+ ( @delay - gettimetick(2) ) + " seconds.";
	end;
}

 

  • Love 1
Link to comment
Share on other sites

  • 0
20 hours ago, Angeluz said:

my bad

 

-	script	KillMon2Cash	-1,{
OnNPCKillEvent:
[email protected] = gettimetick(2);
if (rand(100) < 1 && [email protected] > @delay) {
	getitem 50001,1;
	@delay = [email protected] + 60; // 60 seconds
}
end;

OnInit:
	bindatcmd "check", "KillMon2Cash::OnCheckTime";
	end;
	
OnCheckTime:
	message strcharinfo(0),"Next drop in "+ ( @delay - gettimetick(2) ) + " seconds.";
	end;
}

 

image.thumb.png.464330397ca4d85a29e57c05e483c4e5.png

in the first drop looks like this:can adjust for the first one to appear, for example: Drop available now

after passing the 60s it looks like this

and image.thumb.png.3f726e0d1bfca81dafa7ccfcaf8df835.png

counting negative

Edited by WillJocker
Link to comment
Share on other sites

  • 0

try with this

 

-	script	KillMon2Cash	-1,{
OnNPCKillEvent:
[email protected] = gettimetick(2);
if (rand(100) < 1 && [email protected] > @delay) {
	getitem 50001,1;
	@delay = [email protected] + 60; // 60 seconds
}
end;

OnInit:
	bindatcmd "check", "KillMon2Cash::OnCheckTime";
	end;
	
OnCheckTime:
  	if (( @delay - gettimetick(2)) <=0 )
		message strcharinfo(0),"Your next drop is ready!";
  	else
  		message strcharinfo(0),"Next drop in "+ ( @delay - gettimetick(2) ) + " seconds.";
	end;
}

 

  • Love 1
Link to comment
Share on other sites

  • 0
19 hours ago, Angeluz said:

try with this

 

-	script	KillMon2Cash	-1,{
OnNPCKillEvent:
[email protected] = gettimetick(2);
if (rand(100) < 1 && [email protected] > @delay) {
	getitem 50001,1;
	@delay = [email protected] + 60; // 60 seconds
}
end;

OnInit:
	bindatcmd "check", "KillMon2Cash::OnCheckTime";
	end;
	
OnCheckTime:
  	if (( @delay - gettimetick(2)) <=0 )
		message strcharinfo(0),"Your next drop is ready!";
  	else
  		message strcharinfo(0),"Next drop in "+ ( @delay - gettimetick(2) ) + " seconds.";
	end;
}

 

thx! very nicee ❤️

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...