hakuren Posted September 11, 2017 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
0 Emistry Posted September 12, 2017 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
0 hakuren Posted September 19, 2017 Author 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
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 :
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.