Jump to content

Question

Posted
prontera,155,184,5	script	Healer	909,{
OnTouch:
skilleffect 28,32000;
skilleffect 34,0;
skilleffect 29,0;
percentheal 100,100;
sc_start SC_BLESSING,360000,10;
sc_start SC_INCREASEAGI,360000,10;
end;
}


how to put timer, on player after he touched and must wait for 3secs before touching again the npc

10 answers to this question

Recommended Posts

Posted


prontera,155,184,5 script Healer 909,{

set .@t, 3; // Set Delay Seconds.

if (@t2 > gettimetick(2)) end;

OnTouch:

skilleffect 28,32000;

skilleffect 34,0;

skilleffect 29,0;

percentheal 100,100;

sc_start SC_BLESSING,360000,10;

sc_start SC_INCREASEAGI,360000,10;

if (.@t) set @t2, gettimetick(2)+.@t;

while ( .@t ) {

dispbottom "You can use me again in "+ .@t +" second"+ ( ( .@t > 1 ) ? "s" : "" ) +".";

sleep2 1000 ;

set .@t, .@t - 1;

}

end;

}

  • Upvote 1
Posted
prontera,155,184,5	script	Healer	909,{
set .@t, 3;	// Set Delay Seconds.
if (@t2 > gettimetick(2)) end;

OnTouch:
skilleffect 28,32000;
skilleffect 34,0;
skilleffect 29,0;
percentheal 100,100;
sc_start SC_BLESSING,360000,10;
sc_start SC_INCREASEAGI,360000,10;
if (.@t) set @t2, gettimetick(2)+.@t;
while ( .@t ) {
dispbottom "You can use me again in "+ .@t +" second"+ ( ( .@t > 1 ) ? "s" : "" ) +".";
sleep2 1000 ;
set .@t, .@t - 1;
}
end;
}

 

Hello, how do i make this free below Lv 99, when Lv 100 there should be pay if possible please add variable for the payments^^

Thank you.

Posted

 

prontera,155,184,5	script	Healer	909,{
set .@t, 3;	// Set Delay Seconds.
if (@t2 > gettimetick(2)) end;

OnTouch:
skilleffect 28,32000;
skilleffect 34,0;
skilleffect 29,0;
percentheal 100,100;
sc_start SC_BLESSING,360000,10;
sc_start SC_INCREASEAGI,360000,10;
if (.@t) set @t2, gettimetick(2)+.@t;
while ( .@t ) {
dispbottom "You can use me again in "+ .@t +" second"+ ( ( .@t > 1 ) ? "s" : "" ) +".";
sleep2 1000 ;
set .@t, .@t - 1;
}
end;
}

 

Hello, how do i make this free below Lv 99, when Lv 100 there should be pay if possible please add variable for the payments^^

Thank you.

http://pastebin.com/raw.php?i=H55QtB20 try

Posted

@Patskie

You forgot a ;

set .@zeny, 1000000 // 1,000,000 zeny

and you need to check the zeny to prevent negative value.

 

 

prontera,155,184,5	script	Healer2	909,{
	if (@t2 > gettimetick(2)) end;
	set .@t, 3;	// Set Delay Seconds.
	set .@zeny, 1000000; // 1,000,000 zeny

	if (BaseLevel  > 99) {
		if ( Zeny < .@zeny ) {
			dispbottom "I need "+ .@zeny +" Zeny to buff you !";
			end;
		}
		set Zeny, Zeny - .@zeny;
	}
	skilleffect 28,32000;
	skilleffect 34,0;
	skilleffect 29,0;
	percentheal 100,100;
	sc_start SC_BLESSING,360000,10;
	sc_start SC_INCREASEAGI,360000,10;
	if (.@t) set @t2, gettimetick(2)+.@t;
	while ( .@t ) {
		dispbottom "You can use me again in "+ .@t +" second"+ ( ( .@t > 1 ) ? "s" : "" ) +".";
		sleep2 1000 ;
		set .@t, .@t - 1;
	}
	end;
}
  • Upvote 1
Posted
	while ( .@t ) {
		dispbottom "You can use me again in "+ .@t +" second"+ ( ( .@t > 1 ) ? "s" : "" ) +".";
		sleep2 1000 ;
		set .@t, .@t - 1;
	}

 

this part.....useless ......why ? because ....every time the player click on the NPC....it will execute all the script before this part. ...mean..player still get buffed...and time refreshed everytime they click on it...

and...why use a loop for these ?? hmm ..

 

just a simple check like this is enough..

if( @t2 > gettimetick(2) ){
    dispbottom "Delaying "+( @t2 - gettimetick(2) )+" seconds.";
    end;
}
  • Upvote 2
Posted

this part.....useless ......why ? because ....every time the player

click on the NPC....it will execute all the script before this part.

...mean..player still get buffed...and time refreshed everytime they

click on it...

Yeah it's true

 

Well me I like this count on a loop, interesting idea~

Posted

No at all

It's just a bit strange to have a countdown about 'when you could re-click to buff' just after being buff, since you don't need to be re-buff.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...