Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ default boolean hasCapability(Capability... capabilities) {
// LOW = 0, MEDIUM = 1, HIGH = 2, BEST = 3, AUTO_LOW = 4, AUTO_HIGH = 5
void setQuality(GameAPI.Handler.GameQuality quality);

// Show red marker on the screen where the mouse cursor is, when enabled
void setCursorMarker(boolean enable);

long lastInternetReadTime();
//</editor-fold>
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ default void setTransparency(int transparency) {}
default void setVolume(int volume) {} // 0 - 100
// LOW = 0, MEDIUM = 1, HIGH = 2, BEST = 3, AUTO_LOW = 4, AUTO_HIGH = 5
default void setQuality(int quality) {}
// Show red marker on the screen where the mouse cursor is, when enabled
default void setCursorMarker(boolean enable) {}

default long lastInternetReadTime() {
return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,11 @@ public void setQuality(GameAPI.Handler.GameQuality quality) {
handler.setQuality(quality.ordinal());
}

@Override
public void setCursorMarker(boolean enable) {
throw new UnsupportedOperationException("setCursorMarker not implemented!");
}

@Override
public long lastInternetReadTime() {
return handler.lastInternetReadTime();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ public TanosAdapter(StartupParams params,
Capability.LOGIN,
Capability.INITIALLY_SHOWN,
Capability.CREATE_WINDOW_THREAD,
Capability.ALL_KEYBINDS_SUPPORT,
Capability.DIRECT_ENTITY_SELECT,
Capability.DIRECT_MOVE_SHIP,
Capability.DIRECT_COLLECT_BOX,
Capability.DIRECT_POST_ACTIONS,
Capability.DIRECT_REFINE,
Capability.DIRECT_USE_ITEM,
Capability.DIRECT_CALL_METHOD);
Expand All @@ -56,6 +58,21 @@ public boolean useItem(Item item) {
return false;
}

@Override
public void setCursorMarker(boolean enable) {
handler.setCursorMarker(enable);
}

@Override
public void postActions(long... actions) {
window.postActions(actions);
}

@Override
public void pasteText(String text, long... actions) {
window.pasteText(text, actions);
}

public static class DirectInteractionManager extends NoopAPIAdapter.NoOpDirectInteraction
implements Utils.SignatureChecker {

Expand Down
5 changes: 5 additions & 0 deletions src/main/java/eu/darkbot/api/DarkTanos.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class DarkTanos implements GameAPI.Window, GameAPI.Handler, GameAPI.Memor
public native boolean isValid();
public native long getMemoryUsage();
public native int getVersion();
// Show red marker on the screen where the mouse cursor is, when enabled
public native void setCursorMarker(boolean enable);

public native void keyClick (int keyCode);
public native void sendText (String text);
Expand All @@ -30,6 +32,9 @@ public class DarkTanos implements GameAPI.Window, GameAPI.Handler, GameAPI.Memor
public native void mouseUp (int x, int y);
public native void mouseClick(int x, int y);

public native void postActions(long... actions);
public native void pasteText(String text, long... actions);

public native int readInt (long address);
public native long readLong (long address);
public native double readDouble (long address);
Expand Down
Loading