hakuren Posted September 11, 2017 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 Share Posted September 11, 2017 (edited) Hi rAthena, Question : Can someone help me on how to store buff 'remaining timer' to 'setglobalreg'? I'm trying to make a global account buff Thank you in advance!! like : Quote if (type == SC_TESTBUFF) setglobalreg(sd, add_str("remainingbuff"), <remaining timer>) Edited September 11, 2017 by hakuren Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted September 12, 2017 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted September 12, 2017 (edited) try this. - script Sample -1,{ OnInit: .sc_id = SC_BLESSING; end; OnPCLoginEvent: if (#REMAINING_TIME_SC > 0) { if (getstatus(.sc_id, 5)) sc_end .sc_id; sc_start .sc_id, #REMAINING_TIME_SC, 10; dispbottom "Buff Duration Left: "+(#REMAINING_TIME_SC / 1000)+" Second(s)."; } end; OnPCLogoutEvent: #REMAINING_TIME_SC = getstatus(.sc_id,5); end; } EDIT: ops didnt realize its source support Edited September 12, 2017 by Emistry Quote Link to comment Share on other sites More sharing options...
0 hakuren Posted September 19, 2017 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 Author Share Posted September 19, 2017 (edited) On 9/12/2017 at 2:27 PM, Emistry said: try this. - script Sample -1,{ OnInit: .sc_id = SC_BLESSING; end; OnPCLoginEvent: if (#REMAINING_TIME_SC > 0) { if (getstatus(.sc_id, 5)) sc_end .sc_id; sc_start .sc_id, #REMAINING_TIME_SC, 10; dispbottom "Buff Duration Left: "+(#REMAINING_TIME_SC / 1000)+" Second(s)."; } end; OnPCLogoutEvent: #REMAINING_TIME_SC = getstatus(.sc_id,5); end; } EDIT: ops didnt realize its source support thankyou for the script @Emistry but i need script inside the source but i really appreciate your script maybe if no body answer my question i will use your script instead EDIT : and thank you i didn't notice that script command "getstatus" now i need to apply that to my script Edited September 19, 2017 by hakuren Quote Link to comment Share on other sites More sharing options...
Question
hakuren
Hi rAthena,
Question : Can someone help me on how to store buff 'remaining timer' to 'setglobalreg'?
I'm trying to make a global account buff
Thank you in advance!!
like :
Link to comment
Share on other sites
2 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.