June 1, 20214 yr Erm it’s not going to do anything all I see is like a few methods but nothing in your onLoop did you test it?
June 1, 20214 yr Author 1 hour ago, skillerkidos1 said: Erm it’s not going to do anything all I see is like a few methods but nothing in your onLoop did you test it? No because I dont have any proxies I thought it would work ty for telling me I am a very big noob
June 1, 20214 yr Author 1 hour ago, skillerkidos1 said: Erm it’s not going to do anything all I see is like a few methods but nothing in your onLoop did you test it? 1 hour ago, skillerkidos1 said: Erm it’s not going to do anything all I see is like a few methods but nothing in your onLoop did you test it? do I just need to init it inside the onlooop?
June 1, 20214 yr 3 minutes ago, Dogcube said: do I just need to init it inside the onlooop? yea so you need to put your methods to use in onLoop() otherwise nothing will happen 😛 if(needToHeal(){ heal() }else if(canAttack(){ attack() }
June 1, 20214 yr Author 2 minutes ago, skillerkidos1 said: yea so you need to put your methods to use in onLoop() otherwise nothing will happen 😛 if(needToHeal(){ heal() }else if(canAttack(){ attack() } ok thanks I am big retard
June 1, 20214 yr 7 minutes ago, Dogcube said: ok thanks I am big retard lmao if you need any help add me on discord SkillerKido#2423
June 2, 20214 yr @Dogcube Hid your reposts. Methods like this private boolean needToHeal(){ int healPercent = 45; if(healPercent > getHpPercent()){ return true; }else{ return false; } } Can be simplified to this private boolean needToHeal() { int healPercent = 45; return healPercent > getHpPercent(); } And make sure you use braces ( these -> {} ) on your if statements. Scripting tutorial linked below. https://osbot.org/forum/topic/115124-explvs-scripting-101/
June 2, 20214 yr Author 10 hours ago, Gunman said: @Dogcube Hid your reposts. Methods like this private boolean needToHeal(){ int healPercent = 45; if(healPercent > getHpPercent()){ return true; }else{ return false; } } Can be simplified to this private boolean needToHeal() { int healPercent = 45; return healPercent > getHpPercent(); } And make sure you use braces ( these -> {} ) on your if statements. Scripting tutorial linked below. https://osbot.org/forum/topic/115124-explvs-scripting-101/ Thanks for the tip I will make sure to keep it in mind for future scripts
Create an account or sign in to comment