Dema
Members-
Posts
4 -
Joined
-
Last visited
-
Feedback
0%
Profile Information
-
Gender
Male
Dema's Achievements
Newbie (1/10)
3
Reputation
-
Sometimes it doesnt click at all, thats the problem, it doesnt click
-
The bot doesnt click sometimes, it just ignores it. This is annoying since my script is dependent on clicking so if it skips a click every other try, i lose time. Can someone help me make the bot CLICK properly?
-
Oh hot damn, that was a pretty stupid mistake. Thanks man, its working now.
-
Im new to scripting and i made my first script, the point is to make my character continuosly cast crumble undead from the spellbook (without a staff) on the nearest skeleton (i will add Ghosts later). The bot is opening the magic tab, then doing nothing. I have no idea what might cause this issue. import org.osbot.rs07.api.ui.Spells; import org.osbot.rs07.api.ui.Tab; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "Dema", info = "Fast magic and hitpoints exp", name = "Crumble Undead", version = 0.13, logo = "") public class main extends Script { @Override public void onStart() { log("Get money, Fuck bitches"); } private enum State { KILL, WAIT }; private State getState() { NPC skeleton = npcs.closest("Skeleton"); if (skeleton != null) return State.KILL; return State.WAIT; } @Override public int onLoop() throws InterruptedException { switch(getState()){ case KILL: NPC skeleton = npcs.closest("Skeleton"); if (skeleton.isVisible() && getTabs().getOpen().equals(magic)){ getMagic().castSpellOnEntity(Spells.NormalSpells.CRUMBLE_UNDEAD, skeleton); } else sleep(random(100,250)); getTabs().open(Tab.MAGIC); break; case WAIT: sleep(random(500,700)); break; } return random(150, 350); onLoop(); } @Override public void onExit() { log("Thanks for running my CRUMBLAH!"); } @Override public void onPaint(Graphics2D g) { } }