Vibe wrote:For me botting = cheat.
void openContainer(String cName){
if(cName.toLowerCase().equals("inventory")){openInventory();}
else{
int cID = findNearest(cName.toLowerCase());
pathFinder.travelTo(cID);
ark_bot.DoClick(cID, MOUSE_RIGHT_BUTTON, 0);
}
sleep(1200);
}
void dropItem(){
ark_bot.DoClick(ark_bot.MyCoord(), MOUSE_RIGHT_BUTTON, 0);
thread.sleep(700);
}
void dropItem(Coord dropPlace){
goStraightToCoord(dropPlace);
ark_bot.DoClick(dropPlace, MOUSE_RIGHT_BUTTON, 0);
thread.sleep(700);
}
int selectItem(String gob){
int ID = 0;
while(ID == 0){
ID = ark_bot.input_get_object("Select the "+gob+" you want to use for this action")
println 'selected id : ' + ID;
if(ID==0){
ark_bot.SlenPrint('It seems you misclicked...');
thread.sleep(500);
}
}
Gob selectedObj = ark_bot.glob.oc.getgob(ID);
if(selectedObj.GetResName().indexOf(gob)<0){
ark_bot.SlenPrint(selectedObj.GetResName()+" is not a "+gob+", try again: F3 stops this loop");
sleep(1500);
selectItem(gob);
}
return ID;
}
Coord selectDropCoord(){
Coord point;
ark_bot.SlenPrint("Select DropPoint");
ark_bot.mapview.mode_select_object = true;
while (ark_bot.mapview.mode_select_object) {
sleep(200);
}
point = ark_bot.mapview.mouse_tile;
return point;
}
//Equip/Unequip (only for slot#6, left hand)
//From 0 to 15 (Left to right, top to bottom) i.e : hat, spectacles, shirt, armor, etc..
//Remember to set ark_bot.current_equip_index=0; before calling this method.
boolean next_eq_item(){
ark_bot.current_item_mode=2;
ark_bot.current_equip_index++;
if(ark_bot.current_equip_index < 0 || ark_bot.current_equip_index > 15)return false;
Item equippedItem = ark_bot.GetCurrentItem();
if(equippedItem!=null)
System.out.println("IDX="+ark_bot.current_equip_index+"->"+equippedItem.GetResName());
else
System.out.println("IDX="+ark_bot.current_equip_index+"->Nothing");
return true;
}
boolean isEquipped(String itemN){
ark_bot.current_equip_index=0;
while(next_eq_item()){
Item equipment = ark_bot.GetCurrentItem();
if(equipment!= null && equipment.GetResName().indexOf(itemN)>=0){
return true;
}
}
return false;
}
void unequip(String itemN){
System.out.println("Unequiping:"+itemN);
ark_bot.current_equip_index=0;
while(next_eq_item()){
Item equippedItem = ark_bot.GetCurrentItem();
if(equippedItem!=null && equippedItem.GetResName().indexOf(itemN)>=0){
openInventory();
ark_bot.equip(ark_bot.current_equip_index,"transfer");
}
}
}
void equip(String itemN){
ark_bot.current_equip_index=6;
ark_bot.current_item_mode=2;
Item equippedItem = ark_bot.GetCurrentItem();
System.out.println("Equipping:"+itemN);
if(equippedItem!=null){
System.out.println("Already equipped:"+equippedItem.GetResName());
unequip(equippedItem.GetResName());
}
grabFromContainer(itemN,0,"Inventory");
ark_bot.equip(6,"drop");
}
List prepareInvList(String container){
ark_bot.reset_inventory();
//Open inventory window
openContainer(container);
ark_bot.set_inventory(getWindowName(container));
TreeMap<Double,Item> sortedItems = new TreeMap<Double,Item>();
for(Item listItem:ark_bot.inventory_list){
sortedItems.put(new Double(Double.parseDouble(listItem.coord_y()+"."+listItem.coord_x())),listItem);
}
ArrayList<Item> sortedItemList = new ArrayList<Item>();
for(Map.Entry<String,Item> entry : sortedItems.entrySet()){
//System.out.println("C:"+entry.getKey()+" V:"+((Item)entry.getValue()).GetResName());
sortedItemList.add(entry.getValue());
}
return sortedItemList;
}
boolean grabFromContainer(String item,int index,String container){
ark_bot.inventory_list=prepareInvList(container);
def counter=0;
while(ark_bot.next_item()){
String itemResName = ark_bot.GetCurrentItem().GetResName();
System.out.println(itemResName+" vs "+item+":"+index+"(Idx) vs (Cntr)"+counter);
if (itemResName.toLowerCase().indexOf(item.toLowerCase())>=0){
if(index==counter){
println('taking');
ark_bot.item_click("take", 0);
thread.sleep(100);
return true;
}
counter++;
}
}
return false;
}
//needs more filling--v
String getWindowName(String cName){
if("furniture/cclosed".indexOf(cName)>=0 || "furniture/copen".indexOf(cName)>=0 || "lchest".indexOf(cName)>=0){
return "Chest";
}
if("Inventory".indexOf(cName)>=0){return "Inventory";}
}
BruThoL wrote:Of course it's cheating for you who doesn't know about coding.
But what if you were a developper?
MagicManICT wrote:BruThoL wrote:Of course it's cheating for you who doesn't know about coding.
But what if you were a developper?
Programming isn't hard. It just requires a person to do a thing that they've never actually done before in their life. Hell, I taught myself how to program at 10 (and that's when programming WAS hard). Now, you've got all of these tools that generate code automatically for you.
Hyrion wrote:Please don't derail this post with a discussion of how "programming isnt hard"
Thijssnl wrote:Hyrion wrote:Please don't derail this post with a discussion of how "programming isnt hard"
Talking about subject =/= derail
Thijssnl wrote:Shh, underling :3
SacreDoom wrote:Thijssnl wrote:Hyrion wrote:Please don't derail this post with a discussion of how "programming isnt hard"
Talking about subject =/= derailThijssnl wrote:Shh, underling :3
Sorry, I just couldn't resist.
Users browsing this forum: Claude [Bot] and 2 guests