just add
under process () { in player.javaCode:DoubleExpScroll.EndExp(this):
|
|
scroll doesn't seem to deactive... wondering if someone knows how to fix it
itemsoptionone.java
DoubleExpScrollCode:case 19668: if (c.doubleScroll == false && c.getItems().playerHasItem(19668)) { c.getItems().deleteItem(19668, 1); DoubleExpScroll.OpenScroll(c); c.sendMessage("@[email protected] have activated 1 hour of double experience."); } else if (c.doubleScroll == true) { c.sendMessage("@[email protected] already activated this."); } break;
Code:package ethos.model.content; import java.util.concurrent.TimeUnit; import ethos.Config; import ethos.model.players.Player; /** * @author Aaron Whittle * @[Only registered and activated users can see links. ] Sep 22th 2019 */ public class DoubleExpScroll { public static long EXPERIENCE_TIMER = 0; public static void OpenScroll(Player player) { EXPERIENCE_TIMER = TimeUnit.SECONDS.toMillis(10); player.doubleScroll = true; } public void EndExp(Player player) { if (DoubleExpScroll.EXPERIENCE_TIMER > 0) { DoubleExpScroll.EXPERIENCE_TIMER--; if (DoubleExpScroll.EXPERIENCE_TIMER == 1) { player.sendMessage("@[email protected] are no longer on double experience."); player.doubleScroll = false; } } } }
just add
under process () { in player.javaCode:DoubleExpScroll.EndExp(this):

Trying adding a return statement, see if that works.
Code:case 19668: if (c.doubleScroll == false && c.getItems().playerHasItem(19668)) { c.getItems().deleteItem(19668, 1); DoubleExpScroll.OpenScroll(c); c.sendMessage("@[email protected] have activated 1 hour of double experience."); } else if (c.doubleScroll == true) { c.sendMessage("@[email protected] already activated this."); return; } break;









I havent worked with rsps in over a year and just getting back into it so ill have my ups and downs as I jog my memory. However, i've been around the rsps scene for quite some time this isn't all new to me either, I used to have these silly little issues with shit pi. Im trying to refresh my knowledge but also help anyone as I go lol. We all make our mistakes! =P
| « Help getting errors | Need help please come i am dieing over this! » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |