MrChocolate Posted January 14, 2017 Posted January 14, 2017 Hey im new to scripting and i need help to how i code Brew+ restore script like it brews from 88hp and restores at 75hp? if anyone has code for that would be cool or if someyone can help me with that script.
Saiyan Posted January 14, 2017 Posted January 14, 2017 well it'll be hard to do it with hp values but you could do it with health percent e.g if(myPlayer().getHealthPercent <= 70) { //drink restore } you get the gist :p
MrChocolate Posted January 14, 2017 Author Posted January 14, 2017 could u help me make like it brews at 90 hp and restores at 75 hp?
Lewis Posted January 14, 2017 Posted January 14, 2017 (edited) could u help me make like it brews at 90 hp and restores at 75 hp? if(myPlayer().getHealthPercent <= 70) { inventory.interact("Drink", "Super restore" } else if(myPlayer().getHealthPercent <= 90) { inventory.interact("Drink", "Saradomin brew") } will drink super restore at 70% hp will drink sara brew at 90% hp the pot names aint correct so youll need to edit it Edited January 14, 2017 by Lewis