Created
August 9, 2015 18:10
-
-
Save lordgmage/b8b96f2fad7a7a689581 to your computer and use it in GitHub Desktop.
lordbuy
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
<?xml version="1.0" encoding="UTF-8"?> | |
<module type="JAVA_MODULE" version="4"> | |
<component name="NewModuleRootManager" inherit-compiler-output="true"> | |
<exclude-output /> | |
<content url="file://$MODULE_DIR$"> | |
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | |
</content> | |
<orderEntry type="inheritedJdk" /> | |
<orderEntry type="sourceFolder" forTests="false" /> | |
<orderEntry type="library" name="Parabot-V2.1.08-B" level="project" /> | |
</component> | |
</module> |
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
import org.parabot.environment.scripts.Category; | |
import org.parabot.environment.scripts.ScriptManifest; | |
import org.parabot.environment.scripts.framework.Strategy; | |
import strategies.BuyRunes; | |
import strategies.Openshop; | |
import java.util.ArrayList; | |
@ScriptManifest(author = "LordgMage", | |
category = Category.OTHER, | |
description = "Buyes Runes", | |
name = "LordBuy", | |
servers = { "Ikov" }, | |
version = 1.0) | |
public class LordBuy extends org.parabot.environment.scripts.Script { | |
private static ArrayList<Strategy> strategies = new ArrayList<Strategy>(); | |
public boolean onExecute() { | |
strategies.add(new BuyRunes()); | |
strategies.add(new Openshop()); | |
provide(strategies); | |
return true; | |
} | |
} |
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
package strategies; | |
import org.parabot.environment.api.utils.Time; | |
import org.parabot.environment.scripts.framework.Strategy; | |
import org.rev317.min.api.methods.Game; | |
import org.rev317.min.api.methods.Inventory; | |
import org.rev317.min.api.methods.Menu; | |
public class BuyRunes implements Strategy { | |
@Override | |
public boolean activate() { | |
return !Inventory.isFull() && Game.getOpenInterfaceId() == 3824; | |
} | |
@Override | |
public void execute() { | |
Menu.sendAction(431, 560, 0, 3823,1017,3); | |
Time.sleep(25);} | |
} | |
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
package strategies; | |
import org.parabot.environment.api.utils.Time; | |
import org.parabot.environment.scripts.framework.SleepCondition; | |
import org.parabot.environment.scripts.framework.Strategy; | |
import org.rev317.min.api.methods.Game; | |
import org.rev317.min.api.methods.Npcs; | |
import org.rev317.min.api.wrappers.Npc; | |
public class Openshop implements Strategy{ | |
Npc[] MagicMan = Npcs.getNearest(1658); | |
@Override | |
public boolean activate() { | |
return Game.getOpenInterfaceId() == -1 && MagicMan[0] !=null; | |
} | |
@Override | |
public void execute() { | |
MagicMan[0].interact(Npcs.Option.TALK_TO); | |
Time.sleep(new SleepCondition() { | |
@Override | |
public boolean isValid() { | |
return Game.getOpenInterfaceId() == 3824; | |
} | |
},2500); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment