MagicManICT wrote:There was an interesting experiment with a program called "Eliza" back in the late 60s. If I recall right, only about 50% of the people in an experiment with this program could distinguish it for what it was.
The program simply responded to something the user typed in and restated it as a question. I forget the all the details, though. I just remember running across the program when I was in school in the 80s in a collection of programs from Byte magazine.
So, could the bot carry on an intelligent conversation? No, but it might be able to fool anyone trying to figure out if it was a bot or a live player.
d_datica wrote:Get the damn server back up before I go back to having a life
USER WAS PUT ON PROBATION FOR THIS POST
import haven.CharWnd
import haven.RootWidget
import haven.Speedget
import haven.ark_bot
import haven.Coord
import haven.Gob
import haven.Drawable;
import util.PathFinder;
import haven.UI
import java.util.logging.Logger;
import java.util.logging.Level;
import java.util.logging.ConsoleHandler
class LamberJack {
def thread
Speedget speedget
PathFinder pathFinder
private final static Logger LOGGER = Logger.getLogger(LamberJack.class.getName());
final static int MOUSE_LEFT_BUTTON = 1
final static int MOUSE_RIGHT_BUTTON = 3
final int wineChestId;
final int waterBarrelId;
final int postId;
LamberJack(thread){
this.thread = thread
this.pathFinder = new PathFinder(thread)
LOGGER.setLevel(Level.FINE)
}
void run(){
println '.....................................................'
ark_bot.ui.widgets.each { key, value ->
if (value instanceof Speedget){
speedget = (Speedget)value;
}
}
this.speedget.uimsg("cur", 1);
def pauseTime = 4000;
ark_bot.SlenPrint('----- LOG BOT ----- Revisited by BruThoL');
thread.sleep(pauseTime);
ark_bot.SlenPrint('1 - To your village, have a barrel with water, a chest with wine into bucket and food, and a palisade cornerpost for stacking woodblocks.');
thread.sleep(pauseTime);
ark_bot.SlenPrint('2 - Equip bot with axe, and have a wine glass + bottle and a flask in your inventory.');
thread.sleep(pauseTime);
ark_bot.SlenPrint('3 - Build your Hearth Fire near a [safe] trees spot. (outside your village)');
thread.sleep(pauseTime);
ark_bot.SlenPrint('4 - ...');
thread.sleep(pauseTime);
ark_bot.SlenPrint('5 - Profit. ;)');
thread.sleep(pauseTime);
while(this.wineChestId == 0){
this.wineChestId = ark_bot.input_get_object("Select the chest in which i can find wine bucket")
println 'winebarrel id : ' + this.wineChestId;
if(this.wineChestId==0){
ark_bot.SlenPrint('It seems you missclicked...');
thread.sleep(pauseTime);
}
}
while(this.waterBarrelId == 0){
this.waterBarrelId = ark_bot.input_get_object("select the barrel/well for water")
println 'waterbarrel id : ' + this.waterBarrelId;
if(this.waterBarrelId==0){
ark_bot.SlenPrint('It seems you missclicked...');
thread.sleep(pauseTime);
}
}
while(this.postId == 0){
this.postId = ark_bot.input_get_object("select the signpost for stacking the wood blocks")
println 'signpost id : ' + this.waterBarrelId;
if(this.postId==0){
ark_bot.SlenPrint('It seems you missclicked...');
thread.sleep(pauseTime);
}
}
def i=0;
while(i<20){
i = i+1;
this.checkTravelWeariness();
this.fillWine();
this.fillStamina();
//this.fillFood();
this.teleportToHearthFire();
this.getALog();
this.checkTravelWeariness();
this.teleportToVillage();
this.stackLog();
}
println '.....................................................'
}
void checkTravelWeariness(){
ark_bot.reset_buff_iterator()
while(ark_bot.next_buff()){
if (ark_bot.is_buff_name("Weariness"))
if(ark_bot.buff_meter() > 50){
this.drinkWine();
}
}
}
void drinkWine(){
ark_bot.reset_inventory();
this.openInventory();
ark_bot.set_inventory("Inventory");
println '-------inventory-------'
while(ark_bot.next_item()){
String itemResName = ark_bot.GetCurrentItem().GetResName();
println itemResName;
if (itemResName.endsWith('glass-winef')){
//flask = new Coord(ark_bot.item_coord_x(), ark_bot.item_coord_y());
ark_bot.item_click("iact", 0);
thread.sleep(500);
this.waitForContextMenu();
ark_bot.SelectFlowerMenuOpt("Drink");
this.waitForHourglass();
thread.sleep(200);
this.fillGlassWithBottle();
}
}
}
void fillGlassWithBottle(){
def bottle = null;
ark_bot.reset_inventory();
this.openInventory();
ark_bot.set_inventory("Inventory");
println '-------inventory-------'
while(ark_bot.next_item()){
String itemResName = ark_bot.GetCurrentItem().GetResName();
println itemResName;
if (itemResName.endsWith('bottle-winef')){
bottle = new Coord(ark_bot.item_coord_x(), ark_bot.item_coord_y());
thread.sleep(500);
ark_bot.item_click("take", 0);
thread.sleep(500);
}
}
if (bottle){
ark_bot.reset_inventory();
this.openInventory();
ark_bot.set_inventory("Inventory");
println '-------inventory-------'
while(ark_bot.next_item()){
String itemResName = ark_bot.GetCurrentItem().GetResName();
println itemResName;
if (itemResName.endsWith('glass-winee')){
ark_bot.item_click("itemact", 0);
}
}
ark_bot.item_drop(bottle);
}
}
void fillWine(){
def wineBucket = null;
ark_bot.SlenPrint('Filling wine.');
pathFinder.travelTo(this.wineChestId);
ark_bot.DoClick(this.wineChestId, MOUSE_LEFT_BUTTON, 0);
thread.sleep(400);
this.openInventory();
thread.sleep(400);
ark_bot.DoClick(this.wineChestId, MOUSE_RIGHT_BUTTON, 0);
thread.sleep(400);
ark_bot.reset_inventory();
ark_bot.set_inventory("Chest");
thread.sleep(400);
println '-------chest-------'
while(ark_bot.next_item()){
String itemResName = ark_bot.GetCurrentItem().GetResName();
println itemResName;
if (itemResName.endsWith('bucket-wine')){
wineBucket = new Coord(ark_bot.item_coord_x(), ark_bot.item_coord_y());
ark_bot.item_click("take", 0);
thread.sleep(500);
}
}
ark_bot.reset_inventory();
ark_bot.set_inventory("Inventory");
println '-------inventory-------'
while(ark_bot.next_item()){
String itemResName = ark_bot.GetCurrentItem().GetResName();
println itemResName;
if (itemResName.endsWith('bottle-winee')){
ark_bot.item_click("itemact", 0);
thread.sleep(400);
}
if (itemResName.endsWith('glass-winee')){
ark_bot.item_click("itemact", 0);
thread.sleep(400)
}
}
ark_bot.set_inventory("Chest");
ark_bot.item_drop(wineBucket);
thread.sleep(2000)
}
void fillStamina(){
def flask = null;
while(ark_bot.Stamina < 70){
pathFinder.travelTo(this.waterBarrelId);
ark_bot.reset_inventory();
this.openInventory();
ark_bot.set_inventory("Inventory");
println '-------inventory-------'
while(ark_bot.next_item()){
String itemResName = ark_bot.GetCurrentItem().GetResName();
println itemResName;
if (itemResName.endsWith('waterflask')){
flask = new Coord(ark_bot.item_coord_x(), ark_bot.item_coord_y());
ark_bot.item_click("iact", 0);
thread.sleep(500);
this.waitForContextMenu();
ark_bot.SelectFlowerMenuOpt("Drink");
this.waitForHourglass();
thread.sleep(200);
ark_bot.item_click("take", 0);
thread.sleep(500);
ark_bot.DoClick(this.waterBarrelId, MOUSE_LEFT_BUTTON, 0);
thread.sleep(1000);
ark_bot.item_drop(flask);
}
}
}
}
void fillFood(){
//todo. problem with select in flower menu.
println 'hungry : ' + ark_bot.Hungry;
if(ark_bot.Hungry < 50 && 1==0){
pathFinder.travelTo(this.wineChestId);
ark_bot.DoClick(this.wineChestId, MOUSE_LEFT_BUTTON, 0);
thread.sleep(400);
ark_bot.DoClick(this.wineChestId, MOUSE_RIGHT_BUTTON, 0);
thread.sleep(400);
ark_bot.reset_inventory();
ark_bot.set_inventory("Chest");
thread.sleep(400);
println '-------chest-------'
while(ark_bot.next_item()){
String itemResName = ark_bot.GetCurrentItem().GetResName();
println itemResName;
if(ark_bot.Hungry < 50){
ark_bot.item_click("iact",0);
this.wait_for_context_menu();
ark_bot.SelectFlowerMenuOpt("Eat");
sleep(300);
}
}
}
}
void getALog(){
int logID = ark_bot.find_object_by_name("trees/log", 200);
if (logID){
ark_bot.SlenPrint('Wow! Logggg! <3');
pathFinder.travelTo(logID);
ark_bot.SendAction("carry");
this.waitChiCursor();
ark_bot.DoClick(logID, MOUSE_LEFT_BUTTON, 0);
while(ark_bot.mapview.player_moving){thread.sleep(10)}
if(ark_bot.cursor_name == "chi"){ //log uncarriable, maybe on edge, or on another tree. Recommend loging far of edges.
this.cutATree();this.getALog();
println "no carriable log around (is it crossing a tree? or edge?), cutting another tree...";
}
}else{
this.cutATree();
this.getALog();
}
}
void cutATree(){
int treeId = ark_bot.find_object_by_type("tree", 50);
pathFinder.travelTo(treeId);
actTree(treeId, "Chop");
processStump();
}
void actTree(treeId, act){
ark_bot.DoClick(treeId, MOUSE_RIGHT_BUTTON, 0)
waitForContextMenu();
ark_bot.SlenPrint("I'll " + act + ' you!!');
ark_bot.SelectFlowerMenuOpt(act);
thread.sleep(200);
while(ark_bot.mapview.player_moving){thread.sleep(10)}
waitForHourglass();
thread.sleep(500)
}
void stackLog(){
//ark_bot.DoClick(ark_bot.MyCoord(), MOUSE_RIGHT_BUTTON, 0);
stockPileLogs(); //à reprendre
}
void processStump(){
int stumpID = ark_bot.find_object_by_name("stump", 10);
if (stumpID){
//pathFinder.travelTo(stumpID);
actTree(stumpID, "Remove");
}
thread.sleep(2000)
}
/*
* Need to be rebuilt for player to choose the place he wants the log stack.
*/
void stockPileLogs(){
ark_bot.SlenPrint("Stockpiling logs");
def claimID = ark_bot.find_object_by_name("vclaim", 100);
if (claimID){
def claim = ark_bot.glob.oc.getgob(claimID);
Coord claimC = ark_bot.mapview.tilify(claim.getc());
Coord offset = claimC.add(new Coord(99, 99));
pathFinder.travelToMapLocation(offset);
ark_bot.DoClick(ark_bot.MyCoord(), MOUSE_RIGHT_BUTTON, 0); // drop log
thread.sleep(300);
} else {
ark_bot.exit_command();
}
this.speedget.uimsg("cur", 1);
ark_bot.SlenPrint('Stacking woodblocks...');
pathFinder.travelTo(this.postId);
thread.sleep(200)
ark_bot.DoClick(this.postId, MOUSE_RIGHT_BUTTON, 0)
while(ark_bot.mapview.player_moving){thread.sleep(10)}
thread.sleep(500);
ark_bot.set_inventory("Inventory")
while(ark_bot.next_item()){
String itemResName = ark_bot.GetCurrentItem().GetResName()
if (itemResName.endsWith('wood')){
ark_bot.item_click("transfer", 0)
thread.sleep(200)
}
}
thread.sleep(500);
}
/*
*
*
* ************ useful funcs ***********
*
*/
void openInventory(){
if(!ark_bot.isInventoryOpen()){
ark_bot.OpenInventory();
thread.sleep(500)
openInventory();
}
}
void waitForContextMenu(){
while(!ark_bot.isFlowerMenuReady()) {thread.sleep(100)}
}
void waitForHourglass(){
LOGGER.fine ' ' * 10 + '|| waitForHourglass started ['
while(!ark_bot.HourGlass){thread.sleep(100)}
while(ark_bot.HourGlass) {thread.sleep(100)}
LOGGER.fine ' ' * 10 + '|| waitForHourglass finished ]'
}
void teleportToVillage(){
ark_bot.SendAction("theTrav", "village");
thread.sleep(500);
}
void teleportToHearthFire(){
ark_bot.SendAction("theTrav", "hearth");
thread.sleep(500);
}
void waitChiCursor(){
while(!(ark_bot.cursor_name == "chi")) thread.sleep(100);
}
}
new LamberJack(thread=currentThread).run();
BruThoL wrote:Good idea!
Though I was meaning, ideas for other types of bot.
I think i'll make one for farming.
In particular flax, and make linen clothes (though there is already some code done for that)
DatOneGuy wrote:I'm working on a farming bot myself atm, running into some problems that are annoying.
A farming bot is very good especially flax. I was working on a flax bot earlier but the biggest issue was to make it streamlined to do it all on several bots, but every bot be the same. My plan was to have 25 tile wide fields, a loom on one side, a banner sign on the other. :V
Still think it could work, just need to get all the work going, food will probably be an issue depending on size of field.
Butko wrote:What I would only use that bot would be botting hunger. Anyone has new groovy script for that?
plow field until stamina drop too low, drink from flask, fill flask from bucket or barrel and continue on same spot.
Possible?
Butko wrote:I blame new bot users for lag on server, sending too much requests in too short time as with normal playing wouldn't be case.
BruThoL wrote:Butko wrote:What I would only use that bot would be botting hunger. Anyone has new groovy script for that?
plow field until stamina drop too low, drink from flask, fill flask from bucket or barrel and continue on same spot.
Possible?
Of course it is.Butko wrote:I blame new bot users for lag on server, sending too much requests in too short time as with normal playing wouldn't be case.
But are you serious or just kidding us?
Users browsing this forum: Claude [Bot], Google [Bot] and 0 guests