Louis T Steinhil Posted June 16, 2024 Group: Members Topic Count: 37 Topics Per Day: 0.01 Content Count: 177 Reputation: 33 Joined: 06/22/13 Last Seen: Saturday at 11:49 PM Share Posted June 16, 2024 This is the code that i found searching but it's not right when displaying it on icon timer. if ( vip_status(1) ) { set .@timer, vip_status(2) - gettimetick(2); fakeIcon(getcharid(0),EFST_VIPSTATE2,.@timer,1); set MaxWeight, MaxWeight + 2000; hateffect 19,true; dispbottom "Server Time: "+gettimestr("%H:%M:%S", 10)+""; dispbottom "============================================="; dispbottom "Account Status : Premium Account"; dispbottom "Account Status : Exp & Job Increase 100%"; dispbottom "Account Status : Drop Increase 100%"; dispbottom "Time left : "+ callfunc("Time2Str",vip_status(VIP_STATUS_EXPIRE)); dispbottom "============================================="; end; } it's always 1 minute Quote Link to comment Share on other sites More sharing options...
0 Louis T Steinhil Posted June 16, 2024 Group: Members Topic Count: 37 Topics Per Day: 0.01 Content Count: 177 Reputation: 33 Joined: 06/22/13 Last Seen: Saturday at 11:49 PM Author Share Posted June 16, 2024 Nevermind I edited the src. Anyone interested here it is, this also fix the icon not going away and entering negative values for timer. // Script.cpp +/* +* fakeIcon +* fakeIcon(CHAR_ID,ICON_ID,TIME,STATE) +*/ +BUILDIN_FUNC(fakeIcon) +{ + int16 icon = EFST_BLANK; + TBL_PC* sd = map_charid2sd(script_getnum(st, 2)); + FETCH(3, icon); + int time = 1000 * abs(script_getnum(st, 4)); + bool state = (script_getnum(st, 5) == 1); + + if (sd == NULL) + return SCRIPT_CMD_FAILURE; + + if (icon <= EFST_BLANK || icon >= EFST_MAX) + icon = EFST_BLANK; + + clif_status_change(&sd->bl, (enum efst_type)icon, state, time, 0, 0, 0); + + return SCRIPT_CMD_SUCCESS; +} BUILDIN_FUNC(addrid) // Script.cpp ++BUILDIN_DEF(fakeIcon,"iiii"), BUILDIN_DEF(goto,"l"), Quote Link to comment Share on other sites More sharing options...
0 Chaos92 Posted June 16, 2024 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 1826 Reputation: 288 Joined: 08/03/12 Last Seen: 12 hours ago Share Posted June 16, 2024 47 minutes ago, Louis T Steinhil said: This is the code that i found searching but it's not right when displaying it on icon timer. if ( vip_status(1) ) { set .@timer, vip_status(2) - gettimetick(2); fakeIcon(getcharid(0),EFST_VIPSTATE2,.@timer,1); set MaxWeight, MaxWeight + 2000; hateffect 19,true; dispbottom "Server Time: "+gettimestr("%H:%M:%S", 10)+""; dispbottom "============================================="; dispbottom "Account Status : Premium Account"; dispbottom "Account Status : Exp & Job Increase 100%"; dispbottom "Account Status : Drop Increase 100%"; dispbottom "Time left : "+ callfunc("Time2Str",vip_status(VIP_STATUS_EXPIRE)); dispbottom "============================================="; end; } it's always 1 minute that is stateicon description. the code you show is displaybottom which will be display at chat. 1 Quote Link to comment Share on other sites More sharing options...
0 Louis T Steinhil Posted June 16, 2024 Group: Members Topic Count: 37 Topics Per Day: 0.01 Content Count: 177 Reputation: 33 Joined: 06/22/13 Last Seen: Saturday at 11:49 PM Author Share Posted June 16, 2024 1 hour ago, UptoYou said: No need diff just script! บันทึก_2024_06_16_11_49_47_300.mp4 Pls share script Quote Link to comment Share on other sites More sharing options...
0 oneandonlyblake Posted November 27, 2024 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 3 Reputation: 0 Joined: 11/15/24 Last Seen: March 7 Share Posted November 27, 2024 On 6/16/2024 at 11:13 AM, Louis T Steinhil said: Nevermind I edited the src. Anyone interested here it is, this also fix the icon not going away and entering negative values for timer. // Script.cpp +/* +* fakeIcon +* fakeIcon(CHAR_ID,ICON_ID,TIME,STATE) +*/ +BUILDIN_FUNC(fakeIcon) +{ + int16 icon = EFST_BLANK; + TBL_PC* sd = map_charid2sd(script_getnum(st, 2)); + FETCH(3, icon); + int time = 1000 * abs(script_getnum(st, 4)); + bool state = (script_getnum(st, 5) == 1); + + if (sd == NULL) + return SCRIPT_CMD_FAILURE; + + if (icon <= EFST_BLANK || icon >= EFST_MAX) + icon = EFST_BLANK; + + clif_status_change(&sd->bl, (enum efst_type)icon, state, time, 0, 0, 0); + + return SCRIPT_CMD_SUCCESS; +} BUILDIN_FUNC(addrid) // Script.cpp ++BUILDIN_DEF(fakeIcon,"iiii"), BUILDIN_DEF(goto,"l"), Can you share the script? It's not working on my end. I've already added the source code, but the timer continues running even after I logout. Proof: Quote Link to comment Share on other sites More sharing options...
0 jessipinkman Posted November 28, 2024 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 1 Reputation: 0 Joined: 11/28/24 Last Seen: November 28, 2024 Share Posted November 28, 2024 no way Quote Link to comment Share on other sites More sharing options...
Question
Louis T Steinhil
This is the code that i found searching but it's not right when displaying it on icon timer.
if ( vip_status(1) ) { set .@timer, vip_status(2) - gettimetick(2); fakeIcon(getcharid(0),EFST_VIPSTATE2,.@timer,1); set MaxWeight, MaxWeight + 2000; hateffect 19,true; dispbottom "Server Time: "+gettimestr("%H:%M:%S", 10)+""; dispbottom "============================================="; dispbottom "Account Status : Premium Account"; dispbottom "Account Status : Exp & Job Increase 100%"; dispbottom "Account Status : Drop Increase 100%"; dispbottom "Time left : "+ callfunc("Time2Str",vip_status(VIP_STATUS_EXPIRE)); dispbottom "============================================="; end; }
it's always 1 minute
Link to comment
Share on other sites
5 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.