Mr BrycE Posted May 29, 2013 Posted May 29, 2013 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 Quote
Jaburak Posted May 29, 2013 Posted May 29, 2013 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; } 1 Quote
Drakkus Posted May 29, 2013 Posted May 29, 2013 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. Quote
Patskie Posted May 29, 2013 Posted May 29, 2013 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 Quote
Capuche Posted May 29, 2013 Posted May 29, 2013 @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; } 1 Quote
Emistry Posted May 30, 2013 Posted May 30, 2013 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; } 2 Quote
Capuche Posted May 31, 2013 Posted May 31, 2013 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~ Quote
Mr BrycE Posted June 1, 2013 Author Posted June 1, 2013 but the effects for 3,2,1 will be gone , (it's cool) . is the 1st script bad for the server? Quote
Capuche Posted June 1, 2013 Posted June 1, 2013 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. Quote
Question
Mr BrycE
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.