The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
Summoning
Posted by: Summoning | June 15, 2010 @ 9:24am
Java 5 Code
[
Download
]
// Made by I2apid/Rapid for use by Rapid and Hemmy only! // The script produces cheese from albino rat by using // the scrolls. import java.awt.*; import java.awt.event.KeyEvent; import java.util.*; import org.rsbot.script.*; import org.rsbot.script.wrappers.*; import org.rsbot.bot.Bot; import org.rsbot.event.listeners.PaintListener; import org.rsbot.event.listeners.ServerMessageListener; import org.rsbot.event.events.ServerMessageEvent; @ScriptManifest(authors = "Rapid", category = "Rapid", name = "Cheese Producer ;)", version = 1.0, description = "WHAT_YOU_WANT_IT_TO_SAY_IN_DESCRIPTION") public class Summoning extends Script { //Summoning Variables public Boolean SummoningPotion; public Boolean GetPotion; public int SummoningPotionID [] = {12142, 12144, 12156}; public int SummoningPotion3 = 12142; public int SummoningPotion2 = 12144; public int SummoningPotion1 = 12156; public int CheckPotion; public int ScrollID = 12430; public int ScrollCount; public int SummoningPotionCount; //Banking Variables public Boolean BankOpen; //Object Variables public int bankBooth = 11402; public RSObject BankBooth = getNearestObjectByID(bankBooth); //Mouse Variables public int SummoningX = 691; public int SummoningY = 141; public int DepositSummoningX = 455; public int DepositSummoningY = 298; public int CloseBankX = 482; public int CloseBankY = 28; //Counters public int ClickCount; public int SpecialCount; public int ClickToBank; public int Failed; //Output Variables public int TotalCheese; public int TotalTimesBanked; public void CheckInventory(){ ScrollCount = getInventoryCount(ScrollID); SummoningPotionCount = getInventoryCount(SummoningPotionID); if (ScrollCount == 0){ log("No Scrolls found."); stopScript(); } } public void DoSummoning(){ //Using summoning special SummoningX = SummoningX + random(0, 50); SummoningY = SummoningY + random(0, 10); moveMouse(SummoningX, SummoningY); clickMouse(true); ClickCount = ClickCount + 1; SpecialCount = SpecialCount + 1; SummoningX = 691; SummoningY = 141; } public void OpenBank(){ atObject(BankBooth, "Use-quickly "); BankOpen = true; wait(random(1000, 2000)); } public void Bank(){ if (BankOpen = true) { DepositSummoningX = DepositSummoningX + random(0, 30); DepositSummoningY = DepositSummoningY + random(0, 10); moveMouse(DepositSummoningX, DepositSummoningY); clickMouse(true); DepositSummoningY = 298; DepositSummoningX = 455; wait(random(1000,2000)); if (GetPotion = true){ bank.withdraw(SummoningPotion3, 1); CloseBank(); DrinkPotion(); } } } public void CloseBank(){ if (RSInterface.getInterface(Constants.INTERFACE_BANK).isValid()){ CloseBankX = CloseBankX + random(0, 10); CloseBankY = CloseBankY + random(0, 10); moveMouse(CloseBankX, CloseBankY); clickMouse(true); CloseBankX = 482; CloseBankY = 28; wait(random(1000, 2000)); } } public void SpecialDone(){ if (SpecialCount >= 2){ DrinkPotion(); SpecialCount = 0; } if (SummoningPotion = false){ GetPotion = true; Bank(); } } public void DrinkPotion(){ if (getCurrentTab() != TAB_INVENTORY){ openTab(TAB_INVENTORY); } CheckPotion = getInventoryCount(SummoningPotion3); if (CheckPotion > 0){ atInventoryItem(SummoningPotion3, "Drink "); } if (CheckPotion == 0){ CheckPotion = getInventoryCount(SummoningPotion2); if (CheckPotion > 0){ atInventoryItem(SummoningPotion2, "Drink "); } if (CheckPotion == 0){ CheckPotion = getInventoryCount(SummoningPotion1); if (CheckPotion > 0){ atInventoryItem(SummoningPotion1, "Drink "); } if (CheckPotion == 0){ SummoningPotion = false; } } } } public int loop() { CheckInventory(); log("Checking Inventory"); DoSummoning(); log("Doing Summoning"); SpecialDone(); log("Done Special."); if (ClickCount >= random(6, 7)){ ClickCount = 0; log("Opening Bank."); OpenBank(); if (BankOpen = true){ log("Banking."); Bank(); } } return random(500, 1000); } }
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.54 / 8
35 Votes
http://codebin.yi.org/691
page generated in 0.00 seconds