AndrossiS Posted November 30, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 9 Reputation: 0 Joined: 11/20/12 Last Seen: December 11, 2012 Share Posted November 30, 2012 Greetings! I'm requesting a healer that'd act as usual, unless the player was level 70 or above. In the event the player is level 70 or above, it'd only do a 100% HP and SP every 5 minutes. If the player is below level 70, it'd be just a regular healer. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Omnipotent Posted December 1, 2012 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 71 Reputation: 25 Joined: 11/23/11 Last Seen: May 16, 2024 Share Posted December 1, 2012 prontera,100,100,4 Healer 100,{ if ( BaseLevel < 70 || set ( .@t, gettimetick ( 2 ) - heal_delay ) >= (5 * 60) ) { percentheal 100, 100; if ( BaseLevel >= 70 ) set heal_delay, gettimetick ( 2 ); } else { set .@m, .@t / 60; set .@s, .@t % 60; dispbottom "Please wait for "+ .@m +" min(s) "+ .@s ? .@s +" seconds" : ""; } end ; } Quote Link to comment Share on other sites More sharing options...
AndrossiS Posted December 1, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 9 Reputation: 0 Joined: 11/20/12 Last Seen: December 11, 2012 Author Share Posted December 1, 2012 (edited) I tried this, but for some reason it does not work. Yes, I did relocate the NPC. Thanks for your hardwork regardless. edit: Ah, I added "script" between the name and the position and now it works. But it doesn't display a chatbox or anything, just says "X seconds." in the regular chat. X being the time since you last used the NPC. Edited December 1, 2012 by AndrossiS Quote Link to comment Share on other sites More sharing options...
Omnipotent Posted December 1, 2012 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 71 Reputation: 25 Joined: 11/23/11 Last Seen: May 16, 2024 Share Posted December 1, 2012 Forget 1 line. prontera,100,100,4 script Healer 100,{ if ( BaseLevel < 70 || set ( .@t, gettimetick ( 2 ) - heal_delay ) >= (5 * 60) ) { percentheal 100, 100; if ( BaseLevel >= 70 ) set heal_delay, gettimetick ( 2 ); } else { set .@t, (5 * 60) - .@t; set .@m, .@t / 60; set .@s, .@t % 60; dispbottom "Please wait for "+ .@m +" min(s) "+ .@s ? .@s +" seconds" : ""; } end ; } 1 Quote Link to comment Share on other sites More sharing options...
AndrossiS Posted December 1, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 9 Reputation: 0 Joined: 11/20/12 Last Seen: December 11, 2012 Author Share Posted December 1, 2012 (edited) Hello and thank you for all your help. The NPC now counts down, but only 60 and downwards. If there's longer than 60 seconds left, it'll just keep looking 60 seconds each minute. Edited December 1, 2012 by AndrossiS Quote Link to comment Share on other sites More sharing options...
GmOcean Posted December 1, 2012 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 666 Reputation: 93 Joined: 04/27/12 Last Seen: August 17, 2015 Share Posted December 1, 2012 Hmm, i never would have though of using ' set ' in an ( if ) statement.. didn't think the system could proccess that lol. *Keeps an eye on you* I'm looking forward to seeing other things you'll do lol. @AndrossiS - I really don't see any problem with the script... Quote Link to comment Share on other sites More sharing options...
AndrossiS Posted December 1, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 9 Reputation: 0 Joined: 11/20/12 Last Seen: December 11, 2012 Author Share Posted December 1, 2012 It's not a problem per see. The NPC works wonderfully, if not for the timer. Instead of saying 300 seconds left, it says 60 seconds left, and just does it 5 times. So players are a bit confused "wait, it said 60 seconds 60 seconds ago! and now it says it again!". But other than that, great job and I'm very thankful. Quote Link to comment Share on other sites More sharing options...
Ryokem Posted December 1, 2012 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 205 Reputation: 19 Joined: 10/12/12 Last Seen: November 7, 2013 Share Posted December 1, 2012 Hello and thank you for all your help. The NPC now counts down, but only 60 and downwards. If there's longer than 60 seconds left, it'll just keep looking 60 seconds each minute. Yeah, you have to put some brackets. dispbottom "Please wait for "+ .@m +" min(s) "+ ( (.@s) ? .@s +" seconds" : ""); Hmm, i never would have though of using ' set ' in an ( if ) statement.. didn't think the system could proccess that lol. *Keeps an eye on you* I'm looking forward to seeing other things you'll do lol. Do not forget that all commands are monitored by a source function, and regardless from what they do, they always have some values as return, most of them are booleans (true, false), another good part is integers or float/double (not in e/rAthena case as those kind of variables are not really implemented). Quote Link to comment Share on other sites More sharing options...
AndrossiS Posted December 1, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 9 Reputation: 0 Joined: 11/20/12 Last Seen: December 11, 2012 Author Share Posted December 1, 2012 Works perfectly, thanks for all the help, everyone. Quote Link to comment Share on other sites More sharing options...
GmOcean Posted December 1, 2012 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 666 Reputation: 93 Joined: 04/27/12 Last Seen: August 17, 2015 Share Posted December 1, 2012 @Ryokem - Ahh, I see. That does make a bit more sense. I should have known this was possible since I can already retrieve information in an IF statement, it'd only make sense that the setting information would also be possible, since I can use: ' if( select) ' and the such. Quote Link to comment Share on other sites More sharing options...
Tio Akima Posted December 1, 2012 Group: Members Topic Count: 94 Topics Per Day: 0.02 Content Count: 191 Reputation: 138 Joined: 09/24/12 Last Seen: March 21 Share Posted December 1, 2012 sorry, this healer also works on eAthena? Quote Link to comment Share on other sites More sharing options...
Euphy Posted December 1, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted December 1, 2012 sorry, this healer also works on eAthena? Yes. Quote Link to comment Share on other sites More sharing options...
Question
AndrossiS
Greetings!
I'm requesting a healer that'd act as usual, unless the player was level 70 or above. In the event the player is level 70 or above, it'd only do a 100% HP and SP every 5 minutes. If the player is below level 70, it'd be just a regular healer.
Thanks in advance.
Link to comment
Share on other sites
11 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.