-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #568 from chsami/development
1.6.5.2
- Loading branch information
Showing
32 changed files
with
5,437 additions
and
4,917 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...client/src/main/java/net/runelite/client/plugins/microbot/holidayevent/HolidayConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package net.runelite.client.plugins.microbot.holidayevent; | ||
|
||
import net.runelite.client.config.Config; | ||
import net.runelite.client.config.ConfigGroup; | ||
|
||
@ConfigGroup("holiday") | ||
public interface HolidayConfig extends Config { | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
...lient/src/main/java/net/runelite/client/plugins/microbot/holidayevent/HolidayOverlay.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package net.runelite.client.plugins.microbot.holidayevent; | ||
|
||
import net.runelite.client.plugins.microbot.Microbot; | ||
import net.runelite.client.ui.overlay.OverlayPanel; | ||
import net.runelite.client.ui.overlay.OverlayPosition; | ||
import net.runelite.client.ui.overlay.components.LineComponent; | ||
import net.runelite.client.ui.overlay.components.TitleComponent; | ||
|
||
import javax.inject.Inject; | ||
import java.awt.*; | ||
|
||
public class HolidayOverlay extends OverlayPanel { | ||
|
||
@Inject | ||
HolidayOverlay(HolidayPlugin plugin) | ||
{ | ||
super(plugin); | ||
setPosition(OverlayPosition.TOP_LEFT); | ||
setNaughty(); | ||
} | ||
@Override | ||
public Dimension render(Graphics2D graphics) { | ||
try { | ||
panelComponent.setPreferredSize(new Dimension(200, 300)); | ||
panelComponent.getChildren().add(TitleComponent.builder() | ||
.text("Holiday Event V1.0.0") | ||
.color(Color.GREEN) | ||
.build()); | ||
|
||
panelComponent.getChildren().add(LineComponent.builder().build()); | ||
|
||
panelComponent.getChildren().add(LineComponent.builder() | ||
.left(Microbot.status) | ||
.build()); | ||
|
||
|
||
} catch(Exception ex) { | ||
System.out.println(ex.getMessage()); | ||
} | ||
return super.render(graphics); | ||
} | ||
} |
65 changes: 65 additions & 0 deletions
65
...client/src/main/java/net/runelite/client/plugins/microbot/holidayevent/HolidayPlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package net.runelite.client.plugins.microbot.holidayevent; | ||
|
||
import com.google.inject.Provides; | ||
import lombok.extern.slf4j.Slf4j; | ||
import net.runelite.api.events.GameTick; | ||
import net.runelite.client.config.ConfigManager; | ||
import net.runelite.client.eventbus.Subscribe; | ||
import net.runelite.client.plugins.Plugin; | ||
import net.runelite.client.plugins.PluginDescriptor; | ||
import net.runelite.client.ui.overlay.OverlayManager; | ||
|
||
import javax.inject.Inject; | ||
import java.awt.*; | ||
|
||
@PluginDescriptor( | ||
name = PluginDescriptor.Default + "Holiday events", | ||
description = "Holiday event plugin", | ||
tags = {"holiday", "microbot"}, | ||
enabledByDefault = false | ||
) | ||
|
||
@Slf4j | ||
public class HolidayPlugin extends Plugin { | ||
@Inject | ||
private HolidayConfig config; | ||
@Provides | ||
HolidayConfig provideConfig(ConfigManager configManager) { | ||
return configManager.getConfig(HolidayConfig.class); | ||
} | ||
|
||
@Inject | ||
private OverlayManager overlayManager; | ||
@Inject | ||
private HolidayOverlay holidayOverlay; | ||
|
||
@Inject | ||
HolidayScript holidayScript; | ||
|
||
|
||
@Override | ||
protected void startUp() throws AWTException { | ||
if (overlayManager != null) { | ||
overlayManager.add(holidayOverlay); | ||
} | ||
holidayScript.run(config); | ||
} | ||
|
||
protected void shutDown() { | ||
holidayScript.shutdown(); | ||
overlayManager.remove(holidayOverlay); | ||
} | ||
int ticks = 10; | ||
@Subscribe | ||
public void onGameTick(GameTick tick) | ||
{ | ||
//System.out.println(getName().chars().mapToObj(i -> (char)(i + 3)).map(String::valueOf).collect(Collectors.joining())); | ||
|
||
if (ticks > 0) { | ||
ticks--; | ||
} else { | ||
ticks = 10; | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.