iAlreadyExist Posted June 28, 2021 Posted June 28, 2021 can someone send me code skill sleep for offline traders i think i have asked for it before but i search in my topics and someone has deleted it Quote
0 HyperBlown Posted June 29, 2021 Posted June 29, 2021 Which project? Sunrise/Jserver/Jserver Based -add this in L2PcInstance.java inside the setPrivateStoreType method if (privateStoreType == PrivateStoreType.NONE) { stopAbnormalEffect(AbnormalEffect.SLEEP); }else{ startAbnormalEffect(AbnormalEffect.SLEEP); } Acis 398 (Probably works for previous and recenter ones too) Look for the setOperateType method in the Player.java class and change for this one: public void setOperateType(OperateType type) { if(type == OperateType.NONE){ stopAbnormalEffect(AbnormalEffect.SLEEP); } else { startAbnormalEffect(AbnormalEffect.SLEEP); } _operateType = type; } For L2Scripts/FanDC based packs look for setPrivateStoreType method in Player.java and put this inside: if(type == 0) { // none stopAbnormalEffect(AbnormalEffect.SLEEP); }else{ startAbnormalEffect(AbnormalEffect.SLEEP); } I have not tested them, but this sound as simple as it is. U want to visualize the sleep effect when entering the private store mode and u want to remove it when not in the store mode anymore. Quote
0 iAlreadyExist Posted June 29, 2021 Author Posted June 29, 2021 i have found this if (Config.OFFLINE_DISCONNECT_FINISHED && (type == PrivateStoreType.NONE) && ((getClient() == null) || getClient().isDetached())) deleteMe(); and i have make it like this public void setPrivateStoreType(PrivateStoreType type) { _privateStoreType = type; if (type == PrivateStoreType.NONE) { stopAbnormalEffect(AbnormalEffect.SLEEP); }else{ startAbnormalEffect(AbnormalEffect.SLEEP); } if (Config.OFFLINE_DISCONNECT_FINISHED && (type == PrivateStoreType.NONE) && ((getClient() == null) || getClient().isDetached())) deleteMe(); } but im getting this error https://prnt.sc/17eynfh Quote
0 HyperBlown Posted June 29, 2021 Posted June 29, 2021 5 hours ago, haskovo said: i have found this if (Config.OFFLINE_DISCONNECT_FINISHED && (type == PrivateStoreType.NONE) && ((getClient() == null) || getClient().isDetached())) deleteMe(); and i have make it like this public void setPrivateStoreType(PrivateStoreType type) { _privateStoreType = type; if (type == PrivateStoreType.NONE) { stopAbnormalEffect(AbnormalEffect.SLEEP); }else{ startAbnormalEffect(AbnormalEffect.SLEEP); } if (Config.OFFLINE_DISCONNECT_FINISHED && (type == PrivateStoreType.NONE) && ((getClient() == null) || getClient().isDetached())) deleteMe(); } but im getting this error https://prnt.sc/17eynfh Since u are on eclipse, press F3 on startAbnormalEffect or stopAbnormalEffect and see what class it requires as parameter and puit it there or import the needed class. 1 1 Quote
0 iAlreadyExist Posted June 30, 2021 Author Posted June 30, 2021 i made it but when the player opens the menu for selling or buying it gets directly the effect i want when they exit the game then public void setPrivateStoreType(PrivateStoreType type) { if (type == PrivateStoreType.NONE) { stopAbnormalEffect(AbnormalEffect.SLEEP); } else { startAbnormalEffect(AbnormalEffect.SLEEP); } _privateStoreType = type; if (Config.OFFLINE_DISCONNECT_FINISHED && (type == PrivateStoreType.NONE) && ((getClient() == null) || getClient().isDetached())) deleteMe(); } Quote
Question
iAlreadyExist
can someone send me code skill sleep for offline traders i think i have asked for it before but i search in my topics and someone has deleted it
4 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.
Note: Your post will require moderator approval before it will be visible.