Jump to content
  • 0

OnTouch


Mr BrycE

Question


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

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

Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  


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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

thanks man, working fine.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

 

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

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

@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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Yea right hahaha

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

	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
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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~

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

but the effects for 3,2,1 will be gone :(, (it's cool) .

is the 1st script bad for the server? 

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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.

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