Created
August 10, 2012 21:50
-
-
Save TheBatScripts/3318322 to your computer and use it in GitHub Desktop.
mordaut
This file contains hidden or 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 scripts; | |
| import java.awt.Color; | |
| import java.awt.Point; | |
| import java.awt.Rectangle; | |
| import java.awt.event.KeyEvent; | |
| import org.tribot.api.DTMs; | |
| import org.tribot.api.ScreenModels; | |
| import org.tribot.api.input.Keyboard; | |
| import org.tribot.api.input.Mouse; | |
| import org.tribot.api.types.ScreenModel; | |
| import org.tribot.api.types.colour.ColourPoint; | |
| import org.tribot.api.types.colour.DTM; | |
| import org.tribot.api.types.colour.DTMPoint; | |
| import org.tribot.api.types.colour.DTMSubPoint; | |
| import org.tribot.api.types.colour.Tolerance; | |
| import org.tribot.script.Script; | |
| import org.tribot.script.ScriptManifest; | |
| @ScriptManifest (authors = { "TheBat" }, category = "Randoms", name = "Mordaut") | |
| public class Mordaut extends Script{ | |
| final Rectangle VIEWPORT = new Rectangle(3, 3, 513, 334); | |
| final Rectangle CHATBOX = new Rectangle(3, 338, 513, 140); | |
| final long dragon = 916788859L, chalkBoard = 693935642L; | |
| final long [] weaponSet = {2770198177L,781732845L,4290349677L,710641971L}; | |
| DTMPoint CHAT_DTM_PT = new DTMPoint(new Color(72, 117, 26), new Tolerance(20, 20, 20)); | |
| DTMSubPoint [] CHAT_DTM_PTS = { new DTMSubPoint(new ColourPoint(new Point(1, 7), new Color( 27, 66, 9)), new Tolerance(20, 20, 20),1)}; | |
| DTM dtmChatAdv = new DTM(CHAT_DTM_PT, CHAT_DTM_PTS); | |
| public void run() { | |
| while(ScreenModels.find(chalkBoard).length < 1){ | |
| chatLoop(); | |
| } | |
| findSet(); | |
| } | |
| private void findSet() { | |
| } | |
| private void chatLoop() { | |
| do{ | |
| if(DTMs.find(dtmChatAdv, CHATBOX.x, CHATBOX.y, CHATBOX.x+CHATBOX.width, CHATBOX.y+CHATBOX.height).length < 1){ | |
| int k = -1; | |
| ScreenModel [] dragonM = null; | |
| while(k < 0){ | |
| try{ | |
| Keyboard.pressKey((char)KeyEvent.VK_DOWN); | |
| Keyboard.pressKey((char)KeyEvent.VK_RIGHT); | |
| while((dragonM = ScreenModels.find(dragon)).length < 0 || !VIEWPORT.contains(dragonM[0].base_point)){ | |
| sleep(75,125); | |
| } | |
| Keyboard.releaseKey((char)KeyEvent.VK_RIGHT); | |
| Keyboard.releaseKey((char)KeyEvent.VK_DOWN); | |
| k = 3; | |
| }catch(Exception e){ | |
| k = -1; | |
| } | |
| } | |
| Mouse.click(dragonM[0].base_point,1); | |
| while(DTMs.find(dtmChatAdv, CHATBOX.x, CHATBOX.y, CHATBOX.x+CHATBOX.width, CHATBOX.y+CHATBOX.height).length < 1){ | |
| sleep(75,125); | |
| } | |
| } | |
| Mouse.clickBox(225,462,293,473,1); | |
| sleep(775,925); | |
| }while(DTMs.find(dtmChatAdv, CHATBOX.x, CHATBOX.y, CHATBOX.x+CHATBOX.width, CHATBOX.y+CHATBOX.height).length > 0); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment