-
Posts
135 -
Joined
-
Last visited
-
Days Won
3
Everything posted by una_maquina
-
How to determine whether a player is smithing/smelting?
una_maquina replied to LoremIpsum213's topic in Support
I see, that makes sense, still though fixed sleeping times like that is unadvisable, better to always have random sleep times with Calculation.random(). As for why he's having that bug is probably due to something being wrong in the canSmelt() method. -
How to determine whether a player is smithing/smelting?
una_maquina replied to LoremIpsum213's topic in Support
Oh, maybe you can pass 3 arguments to sleepWhile and it automatically randomizes the sleep times (didn't know that), but the fact that you've put 30000 and 5000 as the other number, might be the problem, because it's 30 secs and 5 secs. -
Thanks mate 👌
- 16 replies
-
How to determine whether a player is smithing/smelting?
una_maquina replied to LoremIpsum213's topic in Support
Oh, you're passing 3 arguments to sleepWhile, you can only pass two, wrap the "30000, 5000" into Calculations.random(30000,50000), otherwise check out your canSmelt logic, it might be the problem. sleepWhile(() -> canSmelt(), Calculations.random(30000, 50000)); -
How to determine whether a player is smithing/smelting?
una_maquina replied to LoremIpsum213's topic in Support
I had this happen when I was doing a cooking script, essentially you make sure that you started animating, and then you sleep until there's no more raw resources in your inventory (ores in this case), or until you're in dialogue.