Union Client Scripts

Forum for alternative clients, mods & discussions on the same.

Moderator: Phades

Re: Union Client Scripts

Postby Pickard » Tue Apr 22, 2014 10:44 pm

//////////////////////////////////////////////
// Bunin Flameforge
//////////////////////////////////////////////

This is intellectual property theft
Because

//////////////////////////////////////////////
// cdev
//////////////////////////////////////////////

originally 8-)

PS Isnt ForagingBotMaker beautiful?

PPS There are How To Use docs

Foraging_howto.txt:
Code: Select all
The bot, which collects all the useful Curio everywhere + can guard area from rams. (v3.0)

How to configure:

I.   Copy ForagingBotMaker.jbot and JBotAPI.japi into scripts folder (works with 7.2c). if you try to launch it using older
     version client - add the lines after //cdev into your version's JBotAPI,japi.

II.  Make an cool alt with a badass name, survival, perception and trespassing if you’re going to forage claimed area.
     Do not forget to buy “Foraging” skill. For a mountain you’ll need exp*perc 6400, 2100 for a swamp, 440 for the
     bolletes and floatsoams, 3040 for river pearl mussels.
   
III. Put a fire near the swamp (deeper into the swamp - better, less chance to be fucked by a bear) on the mountain and so on.
     At the lake you can put a fire on the beach, but there is a chance that your boat will be stolen. So it is better
     to put it deeper in the forest but place it where there is nothing between the HF and the water. Moreover, it is
     better to personal claim the path from the HF to the river which decreases the chance of the boat being stolen or
     meeting a wild animal.

IV.  Run the script "Foraging Bot Maker"

V.   Select the needed collection mode: “Mountain”, “Swamp”, “Cave”, “Forest”, “Lake”, “OmgWipe”.
     “OmgWipe” include - WWW (swamp, forest, meadow, prairie), Nettle (the forest), Clover (prairie, steppes)
     and Candleberry (swamp).

VI.  Write the name of the region in the first field, such as Mountain [33, 80] or Stinky swamp.

VII. Enter your account name and the name of your character in the second and third fields (of course without a
     password/ braces/ gaps/ and other crap) exactly as it appears in the union client. By the way, the character
     names (logged in at least once) can be seen as buttoms on the started menu of the Union client.

VIII. Select the needed curiosities and minimal quality for each. Everything lower quality will be thrown away.
     It is suitable for gathering spider webs. For instance you could gather WWW or blueberries in the forrest, but
     make the minimal quality for it as 100.

IX.  Click Start, and wait for the teleport to the hearth fire.

X.   Now you need to specify the path. To do this, stand next to the character path point and click AddPoint.
     There should be nothing large (howses, walls, cloffs)  between the current and the next points.
     Trees, rocks, fires, and frogs are allowed – the bot will pass them.
     The distance between the points is for you to choice, the best distance is about 40 cells, in the mountains
     as little as possible but too often it is not necessary.
     Returning to the heart fire is not necessary, the path can end on the other side of the mountain.

     Important notes:
     ---------------
     A. On the mountain - not necessarily making a detailed path through everything, even the finest passages.
        It’s enough to pass for the largest ones.
        This will save time for the walking -> more runs -> profit!

     B. In the swamp/ meadow/ forest/ steppe - try to not have cliffs in the visible distance.
        If a curious will appear on the reverse side of the cliff, your char is likely to stuck in it. In my point
        of view, it is easy to find places without cliffs.

     C. On the lake - the starter point should be in the middle of the shallow water. Your character will put its
        boat to there and sit in it.
        The last point must also be in the middle of the shallow water. It is the place where the character gets off
        the boat and lifts it.
        When you run the forager bot, the boat should be near the fire.

XI.  When the route has covered the entire area - click on “Save”.

XII. There will appear a file called "New_Forager.jbot" in your Union client folder.  Name it whenever
     you’d fap to and put into the “Scripts” folder.

XIII. Reload this da fuk client.

XIV. Run the script with the name <name of the character> - <name of the region>.


The script teleports the character to the hearth fire, and will enable criminals, and begins to move along the path you’ve created.
At the end of the path the character automatically logs out. After 17 minutes the character will log on on the hearth fire to repeat the path again.
After filling the pack the script logs out the character and shuts down the client (so it is recommended to use the traveler sacks).
The script is a defense against bears and wild boar - not 100% effective, but it usually helps.
For two weeks I have not lost any character. However, Ravian was sexually raped by a bear within 1 week.
Added defence against people. Still not 100% reliable, but better then nothing. Not afraid of own villagers and green kins.


Careful select the gathering place - if there are 2 bots running at the same time you will get nothing.


-----------------------------------------------------------------------------------------------------------

Бот, который собирает все полезные курио отовсюду + умеет проверять территорию на тараны. (v3.0)

Как настраивать:

1. Копировать ForagingBotMaker.jbot и jBotAPI.japi в папку /scripts (jBotAPI.japi для версии 7.2c, если у вас какая-то другая версия
   или были изменения - в конец вашего файла добавить код из моего, между метками "// cdev" и "// cdev end")

2. Взять твинка c достаточным сурвом, не забыть вкачать навык Foraging, с достаточным perc*exp (6400 гора, 2100 болото, 440 флотсамы и bolete, 3040 ракушки)
   и треспассом, если на территории есть клаймы.

3. Поставить костер около болота (желательно поглубже внутри, меньше шанс нарватся на медведа), на горе и тд.
   На озере костер можно поставить на берегу, но есть шанс что утащат лодку, или в глубже в лесу,
   но чтобы перс мог дойти от костра до берега по прямой. Желательно заклаймить дорогу - лучше сохранность лодки, меньше шанс встретить хищника.

4. Запустить скрипт "Foraging Bot Maker"

5. Выбрать нужный режим сбора: Гора, Болото, Пещера, Лес, Озеро, Нуборесурсы, ОхранаОтТаранов.
   Нуборесурсы включают в себя - WWW (болото, лес, луг, степь), Nettle (лес), Clover (луг, степь) и Candleberry (болото).

5. Написать имя региона в первое поле ввода, например Mountain [33, 80] или Stinky swamp

6. Ввести название аккаунта  и имя перса во второе и третее поля ввода. (конечно без пароля, скобок пробелов и прочего мусора,
   точно как оно выглядит в union client. Кстати в юнионе аккаунт должен присутствовать в кнопках быстрого выбора акка)

7. Выбрать нужные курьезы и минимальное качество для каждого. Все курьезы с качеством ниже будут выбрасываться.
   Это удобно для поиска паутинок, например в лесу можно разрешить собирать ягоды и крапиву (на болоте mantles),
   но поставить мин. качество 100.

8. Нажать Start, дождатся телепортации на костер.

9. Теперь нужно задать маршрут движения. Для этого встать персом на следующую точку маршрута и нажать AddPoint.
   Между текущей и слудующей точками не должно быть крупных препятствий - домов, заборов, оврагов.
   Деревья, камни, костры и лягушки допустимы - обойдет.
   Расстояние между точками, произвольное, оптимальное помоему около 40 клеток, в горах возможно меньше но и слишком частить не стоит.
   Возвращатся к костру не надо, маршрут может кончатся на другой стороне горы.

   Важные замечания:
   ----------------
   A. На горе - не обязательно прокладывать маршрут через все, даже самые мелкие проходы. Достаточно пройти по самым крупным.
      Это сэкономит время на обход -> чаще обходы -> profit!

   B. На болоте, на лугу, в лесу, в степи - старайтесь чтобы в радиус видимости не попадали овраги.
      Если курьзе появится с обратной стороны оврага, перс скорее всего застрянет. Найти места без оврагов помоему несложно.

   C. На озере - первая контрольная точка должна быть в середине мелководья озера, там перс положит лодку и сядет в нее.
      Последняя точка так же должна быть в середине мелководья озера, там перс слезет с лодки и возьмет ее в руки.
      При запуске бота лодка должна лежать рядом с костром.

10. Когда маршрутом покрыт весь регион - нажать кнопку Save.

11. В папке union client появится файл "New_Forager.jbot", переписать его в папку /scripts с именем, которе вам нравится.

12. Перезагрузить клиент.

13. Запустить скрипт с именем <имя перса> - <имя региона>.

Скрипт телепортируется на костер, включит криминалы и начнет движение по маршруту.
В конце маршрута чар автоматически разлогинится и через 17 мин залогинится на костре, чтобы пройти маршрут еще раз.
После заполнения пака скрипт разлогинит перса и завершит работу (поэтому рекомендуется использовать сумки).
В скрипте есть защита от медведей и кабанов - не 100% надежная, но обычно помогает.
За 2 недели я не потерял от них ни одного перса. У Равиана 1 труп за неделю от медведа.
Добавлена защита от людей. Не 100% надежная, но лучше чем ничего. Не реагирует на людей из своей деревни и зеленых кинов.

Аккуратнее выбирайте места сбора - если на одном месте будут работать 2 бота - ничего не соберут оба.


Woodcutter_howto.txt
Code: Select all
This bot cuts wood logs and brings logs to the village idol. (V1.0)

How to set up:

I.   Copy the file CurioEater.jbot jBotAPI.japi to the folder called scripts (jBotAPI.japi for version 7.2c, if you have
     any other version or changed 7.2c – add to the end of your file the code line from my version between the
     marks "// cdev" and "// cdev end")

II.  Use an alt with 1 bucket of wine, glass, shovel and axe (the alt should be well fed).

III. Put his/her hearth fire in the forest. It is preferable if there will be no cliffs. The bot stuck in cliffs sometimes.

IV. Now you need to write how many logs do you need and where to put them in Woodcutter.jbot:
    var logsMax = 100;
      default is 100 logs;
    var waypoints =
    [
      [5, 0],
    ];
      default setting means that the bot will put the logs to 5 cells to the east of the village idol,
      but you can set any route, for example:
    var waypoints =
    [
      [6, 0],
      [12, 20]
      [12, 40]
    ];

V.  Run the script "Woodcutter".

Consumption of wine ~ 5-6 liters (q180+) per 100 logs.
Bot writes to the console how many logs it already teleported to the idol.

-----------------------------------------------------------------------------------------------------------

Бот, который рубит лес и привозит бревна к тотему. (v1.0)

Как настраивать:

1. Копировать Woodcutter.jbot и jBotAPI.japi в папку /scripts (jBotAPI.japi для версии 7.2c, если у вас какая-то другая версия
   или были изменения - в конец вашего файла добавить код из моего, между метками "// cdev" и "// cdev end")

2. Взять твинка c ведром вина, рюмкой, лопатой и топором, сытого.

3. Поставить костер в лесу, желательно чтобы не было видно оврагов. В оврагах иногда застревает.

4. В тексте Woodcutter.jbot настроить сколько надо бревен и куда класть.
   var logsMax = 100;
     по умолчанию 100 бревен;
   var waypoints =
   [
     [5, 0],
   ];
     по умолчанию на 5 клеток к востоку от тотема, но можно задать любой маршрут, например:
   var waypoints =
   [
     [6, 0],
     [12, 20],
     [12, 40],
   ];

5. Запустить скрипт "Woodcutter".

Расход вина ~5-6 литров на 100 бревен при вине 180ку.
Бот пишет в консоли сколько уже бревен в куче.


CurioEater_howto.txt:
Code: Select all
The bot, which periodically put curiosities into the study inventory of several characters at 1 time (V1.0)

How to set up:

I.   Copy the file CurioEater.jbot jBotAPI.japi to the folder called scripts (jBotAPI.japi for version 7.2c, if you have
     any other version or changed 7.2c – add to the end of your file the code line from my version between the
     marks "// cdev" and "// cdev end")

II.  You need to edit the  CurioEater.jbot by writing down the accounts and the names of the characters you want to feed
     (first comes the account name, then the character name). For example:
     var accCharNames =
     [
       ["alexAccount", "alexFighter1"],
       ["alexAccount", "alexFighter2"],
       ["alexAccount2", "alexFighter3"],
     ];
     and specify the period of bookmarks Curio, the default is 30 minutes:
     var eatingDelay = 30;

III. Put curiosities into the inventory of the characters. Faster learnt curio amount should be bigger.

IV.  If you want the buff tea -  put to the  inventory 2-3 cups of tea per day.
     Start only when the buff of the tea will be complete (90-100%).

V.   Run the script "Curio Eater".

-----------------------------------------------------------------------------------------------------------

Бот, который периодически закладывает курьезы в стади, нескольким персам одновременно. (v1.0)

Как настраивать:

1. Копировать CurioEater.jbot и jBotAPI.japi в папку /scripts (jBotAPI.japi для версии 7.2c, если у вас какая-то другая версия
   или были изменения - в конец вашего файла добавить код из моего, между метками "// cdev" и "// cdev end")

2. В CurioEater.jbot вписать названия аккаунтов и имена персов, например:
   var accCharNames =
   [
     ["vasyaAccount", "vasyaFighter1"],
     ["vasyaAccount", "vasyaFighter2"],
     ["vasyaAccount2", "vasyaFighter3"],
   ];
   и задать период закладки курио, по умолчанию 30 мин:
   var eatingDelay = 30;

3. Загрузить всем персам в пак курьезы, быстро изучаемых - больше.

4. Если с баффом чая - то в пак положить 2-3 кружки с чаем, должно хватить на день.
   Стартовать когда у всех бафф чая будет полный (90-100%).

5. Запустить скрипт "Curio Eater".


Enjoy ¦]
w16 nope! w15 Trust me bro(Arcanum) w14 Arcanum w13 Arcanum w12 Action w11 Willowroot w10 Dis w9 Hive w8 Core w7 H.A.W.X/Progress w6 Dis/Disneyland w5 Peace/Late Project w4 Hermit
Pickard
 
Posts: 461
Joined: Wed Jul 27, 2011 8:23 pm

Re: Union Client Scripts

Postby talon00302 » Wed Apr 23, 2014 12:15 am

Pickard wrote:This is intellectual property theft
Because
Cdev


Base > Ender > Union > Union Script

http://www.havenandhearth.com/portal/doc-src
http://www.gnu.org/copyleft/lesser.html
User avatar
talon00302
 
Posts: 516
Joined: Sun Apr 15, 2012 8:30 pm

Re: Union Client Scripts

Postby Pickard » Wed Apr 23, 2014 2:44 am


Its LGPL, not GPL. Read it.
Also im talking not about copyright agreements but authorship :)
w16 nope! w15 Trust me bro(Arcanum) w14 Arcanum w13 Arcanum w12 Action w11 Willowroot w10 Dis w9 Hive w8 Core w7 H.A.W.X/Progress w6 Dis/Disneyland w5 Peace/Late Project w4 Hermit
Pickard
 
Posts: 461
Joined: Wed Jul 27, 2011 8:23 pm

Re: Union Client Scripts

Postby talon00302 » Wed Apr 23, 2014 3:14 am

Pickard wrote:Also im talking not about copyright agreements but authorship :)


Edited just for you buddy
User avatar
talon00302
 
Posts: 516
Joined: Sun Apr 15, 2012 8:30 pm

Re: Union Client Scripts

Postby Arcanist » Wed Apr 23, 2014 3:46 pm

Code: Select all
//#! name = Fill Barrels at idol
//#! icon = gfx/invobjs/buckete
//#! uniq = arcanist_barrel

var actionTimeout = 1000 * 60 * 1;
var hartling = jMyCoords();   
var inventory = checkInventory();
var player = jGetObjects(1,0,"borka");
var drunk = 0;
var logcount = 0;
var winecount = 0;
var count = 0;
var log = 0
var currentsign = 0

function getRandomArbitary(min, max)
{
  return Math.random() * (max - min) + min;
}

function jPFMove_LX(point) {
   point = jTilify(point);
   var MyX = jMyCoords().x;
   var MyY = jMyCoords().y;
     
   jPFMove(point);
   cycles = 0;
   while (MyX != point.x || MyY != point.y)
   {
      jPrint("jPFMove_LX My =" + MyX + " " + MyY + " - " + point.x + " " + point.y);
      jSleep(1000);
      MyX = jMyCoords().x;
      MyY = jMyCoords().y;
      if(cycles == 10)
      {     
         jPrint("jPFMove_LX trying to move again");
         jOffsetClick(jCoord(getRandomArbitary(-2,2),getRandomArbitary(-2,2)),1,0);
         jSleep(500);
         jPFMove(point);
         cycles = 0
      }
      cycles++;
   }
   jPrint("jPFMove ended");
}

function jPFMoveOffset_LX(point, offset) {

   offsMoveS=jCoord(0,offset);
   offsMoveE=jCoord(offset,0);
   offsMoveW=jCoord(-offset,0);
   offsMoveN=jCoord(0,-offset);
   
   while (1) {
      if(jPFMove(point.add(offsMoveS.mul(11))) > 0) {
         jPFMove_LX(point.add(offsMoveS.mul(11)));
         return offsMoveS;
      }
     
      if(jPFMove(point.add(offsMoveE.mul(11))) > 0) {
         jPFMove_LX(point.add(offsMoveE.mul(11)));
      return offsMoveE;
      }
     
      if(jPFMove(point.add(offsMoveW.mul(11))) > 0) {
         jPFMove_LX(point.add(offsMoveW.mul(11)));
      return offsMoveW;
      }   
     
      if(jPFMove(point.add(offsMoveN.mul(11))) > 0) {
         jPFMove_LX(point.add(offsMoveN.mul(11)));
      return offsMoveN;
      }
      jPrint("jPFMoveOffset_LX can't find path");
//      break;

         jOffsetClick(jCoord(getRandomArbitary(-2,2),getRandomArbitary(-2,2)),1,0);
         jSleep(500);
     
   }
}

function waitPFEndMove(){
   jWaitStartMove(300);
   jSleep(100);
   while (true) {
      jWaitEndMove(10000);
      jSleep(200);
      if (!jIsMoving()) {
         return;
      }
   }
}
//function checks inventory
//and opens it, if it closed

function tohearth() {
   jSendDoubleAction("theTrav", "hearth");
   jWaitProgress(actionTimeout);
   jSleep(1000);
}

function tovillage() {
   drinkWine();
   jSleep(500);
   jSendDoubleAction("theTrav", "village");
   jWaitProgress(actionTimeout);
   jSleep(1000);
   }
   
function travelCount() {
   var buffs = jGetBuffs();
   for (var i = 0; i < buffs.length; i++) {
      if (buffs[i].name().indexOf("Travel Weariness") >= 0) {
         return buffs[i].meter();
      }
   }
   return 0;
}
   
   function checkInventory() {
   if(!jHaveWindow("Inventory")) {
      jToggleInventory();
      while(!jHaveWindow("Inventory"))
         jSleep(100);
   }
   return jGetWindow("Inventory").getInventories()[0];
}
function drinkWine() {
   if (travelCount() < 85) return;
   while (!jGetWindow("Inventory")){ jSleep(500);}
   var inventory = jGetWindow("Inventory").getInventories()[0];
   var buckets = inventory.getItems("bucket-wine");
   if (buckets.length > 0) {
      inventory.sortItems(buckets, "amount", false);
      var bucket = buckets[0];
      var bucket_coord = bucket.coord();
      if (bucket.isActual()) {
         bucket.take();
         jWaitDrag();
         var flasks = inventory.getItems("glass-winee");
         if (flasks.length > 0) {
            var flask = flasks[0];
            if (flask.isActual()) {
               flask.itemact(0);
               jSleep(500);
               inventory.drop(bucket_coord);
               jWaitDrop();
            }
         }
      }
   }
   var flasks = inventory.getItems("glass-winef");
   if (flasks.length > 0) {
      var flask = flasks[0];
      if (flask.isActual()) {
         flask.iact();
         if (jWaitPopup(actionTimeout)) {
         jSleep(500)
            jSelectContextMenu("Drink");
            jWaitProgress();
         winecount++;
         } else {
            // No water
            stopFlag = true;
         }
      }
   }
  if (travelCount() < 85) return;
  drinkWine();
   }
   
function checkInventory()
{
   if(!jHaveWindow("Inventory"))
   {
      jToggleInventory();
      while(!jHaveWindow("Inventory"))
         jSleep(100);
   }
}

//like main() at C
function fillbarrel()
{
   
   var RAD = 6;
   var well = jFindObjectByName("well", 10); //well
   var barrels = jGetObjects(RAD, jCoord(0, 0), "barrel"); //array of barrels
   jPrint("barrels = " + barrels.length);
   if(barrels[0] == 0)
      {
         jPrint("Cannot find barrels. Script failed.");
         return;
      }
   //if no wells around
   if(!well)
   {
      jPrint("Cannot find a well. Script failed.");
      return;
   }
   //well founded
   checkInventory();
   for(i=0;i<barrels.length;i++)
   {
   //if no barrels at array
   if(barrels[i] == 0) {
      jPrint("barrels[i] == 0");
      break;
   }
   while(1)
      {
         jPrint("WHILE WHILE");
         
            if (jGetWindow("Inventory").getInventories()[0].getItems("buckete")[0] == undefined){
      if (jGetWindow("Inventory").getInventories()[0].getItems("bucket-water")[0] == undefined){
        jToConsole("No bucket in inventory. Script stopped");
        jExit();
      }
      else{
        jGetWindow("Inventory").getInventories()[0].getItems("bucket-water")[0].iact();
        jWaitPopup();
        jSelectContextMenu("Empty");
        while (jGetWindow("Inventory").getInventories()[0].getItems("buckete")[0] == undefined){
          jSleep(100);
        }
      }
   }
         
         var bucket = jGetWindow("Inventory").getInventories()[0].getItems("buckete")[0];
         jPrint("WHILE 2");
         if(bucket == null) {
            jPrint("bucket == null");
            break;
         }
            jPrint("WHILE 3");
         var bc = bucket.coord();
         jPrint("bc = " + bc);
         bucket.take();
         jWaitDrag(5000);
         jSleep(100);
         tile = jPFMoveOffset_LX(well.position(),1);
         well.interactClick(0);
         var drag = jGetDraggingItem();
         //waits for the filled bucket
         while(drag.resName().indexOf("water") == -1)
            jSleep(100);
         jGetWindow("Inventory").getInventories()[0].drop(bc);
         jWaitDrop(5000);
         jSleep(100);
         tile = jPFMoveOffset_LX(barrels[i].position(),1);
         jDoClick(barrels[i].getID(), 3, 0);
         //waits for barrel window
         jWaitWindow("Barrel");
         jSleep(1000);
         if(jGetWindow("Barrel").getLabelText(1).indexOf("100.0") != -1) //barrel is full
         {
            //empty bucket
            var bucket2 = jGetWindow("Inventory").getInventories()[0].getItems("bucket-water")[0];
            bucket2.iact();
            jWaitPopup(5000);
            jSelectContextMenu("Empty");
            while(bucket2.resName().indexOf("water") > -1)
               jSleep(100);
               tile = jPFMoveOffset_LX(well.position(),1);
            jDoClick(well, 1, 0);
            jSleep(700);
            break; //from while(1)
         }
         //if barrel isn't full
         var bucket2 = jGetWindow("Inventory").getInventories()[0].getItems("bucket-water")[0];
         var bc2 = bucket2.coord();
         bucket2.take();
         jWaitDrag(5000);
         //tile = jPFMoveOffset_LX(barrels[i].position(),1);
         barrels[i].interactClick(0);
         var drag2 = jGetDraggingItem();
            jSleep(1000);
         jGetWindow("Inventory").getInventories()[0].drop(bc2);
         jWaitDrop(5000);
         jSleep(100);
         jAbsClick(barrels[i].position().add(tile.mul(11)), 1, 0);
      }//while 1
   }//for all barrels
}

function getNearestBarrel() {
   var trees = jGetObjects(50, jCoord(0, 0), ["barrel"]);
   var min_len = 100500;
   var objid = 0;
   for (var i = 0; i < trees.length; i++) {
      if (trees[i].position().dist(jMyCoords()) < min_len) {
         objid = trees[i];
         min_len = trees[i].position().dist(jMyCoords());
      }
   }
   return objid;
   }
   

function getWine() {
   demijohn = findDemijohn()
   jPFMoveOffset_LX(demijohn.position(), 1)
   waitPFEndMove();
   var bucket = inventory.getItems("buckete")[0];
   var bucket_coord = bucket.coord();
   var bucket_name = bucket.resName();
   bucket.take();
   jWaitDrag();
   demijohn.interactClick(0);
   while (jGetDraggingItem().resName() == bucket_name) jSleep(100);
   inventory.drop(bucket_coord);
   jSleep(500);
}
      
function main() {
var barrels = jGetObjects(50, jCoord(0, 0), ["barrel"]);
   //tohearth();

   /*   while (1){
         if (("borka", 1).isCarrying ())) return;
         else jSleep(500);
      }
      */
      for (var i = 0; barrels.length > i ; i++){
      tohearth();
      jOffsetClick(jCoord(2,0), 3, 0);
      
      fillbarrel();
      jSendAction("carry");
      jWaitCursor("chi", actionTimeout);
      //jPFMoveOffset_LX(getNearestBarrel().position(), 1);
      jDoClick(getNearestBarrel().getID(), 1, 0);
      while (!jFindObjectByName ("borka", 1).isCarrying ()){jSleep(500);}


      tovillage();
      jPFMoveOffset_LX(barrels[i].position(), 1);
      waitPFEndMove();
      jDoClick(barrels[i].getID(), 3, 0);
      jSleep(3000);
      var winebucket = inventory.getItems("invobjs/bucket-wine");
       if (winebucket == -1) getWine();
   }
   tohearth();
   jOffsetClick(jCoord(2,0), 3, 0);
   jSleep(15000);
   jLogout();
   }   
//calls the main

main();
//drinkWine();


Start it at village idol, with empty barrels at the idol, and a single barrel at hearth fire by a well.
Wine and an empty bucket in inventory.
User avatar
Arcanist
 
Posts: 2664
Joined: Mon Mar 19, 2012 2:01 pm

Re: Union Client Scripts

Postby kaizokuroof » Thu Apr 24, 2014 1:04 pm

Arcanist wrote:SNIP

(handshake) You sir, are quite the time saver. Thanks for the upload pal.
I had a retardedly huge signature and have gotten this embarrassing replacement to show for it.
User avatar
kaizokuroof
 
Posts: 799
Joined: Sat Jun 05, 2010 6:24 am

Re: Union Client Scripts

Postby Arcanist » Thu Apr 24, 2014 1:39 pm

kaizokuroof wrote:time saver


That's what bots are all about
User avatar
Arcanist
 
Posts: 2664
Joined: Mon Mar 19, 2012 2:01 pm

Re: Union Client Scripts

Postby Wallbound » Sat May 10, 2014 7:54 pm

I've lost my copy of the bulder Mod. Can any one post a link to get a working copy of Builder Mod Please.
Wallbound
 
Posts: 20
Joined: Thu Jul 11, 2013 7:39 pm

Re: Union Client Scripts

Postby Arcanist » Mon May 12, 2014 3:17 am

Wallbound wrote:I've lost my copy of the bulder Mod. Can any one post a link to get a working copy of Builder Mod Please.


What?

What do you mean bulder/builder mod?
User avatar
Arcanist
 
Posts: 2664
Joined: Mon Mar 19, 2012 2:01 pm

Re: Union Client Scripts

Postby Arcanist » Tue May 20, 2014 12:10 pm

Code: Select all
//#! name = Nuggify
//#! uniq = arcanist_nuggs
//#! icon = gfx/invobjs/nugget-metal
// Globals
include("jBotAPI");
include("pathfinder");
var inventory = checkInventory();
//var cupb = jGetObjects(35, jCoord(0, 0), ["cupboard"]);
var corpse = jGetObjects(35, jCoord(0, 0), ["cdv"]);
function dropFromCursor(where) { //  1 = inventory
if (jIsDragging()) {
   if (where = null) where = 1
   if (where = 1) {
      if (checkInventory().freeSlots() > 0) checkInventory().drop(checkInventory().freeSlotsCoords()[0]);
         jSleep(500);
         if (!jIsDragging())   return;
   }
   while (jIsDragging()) {
      jDropObject(0);
      jSleep(300);     
      }
}
}

function takeItemsToContainers (itemlist, containerlist, containerwindow, radius) {
if (radius == null) radius = 1;
var out = 0;
while (checkInventory().getItems(itemlist).length > 0) {
      var inventory = checkInventory();
      while (!jGetWindow(containerwindow)){
         jPFMoveOffset_LX(containerlist[out].position(), radius);
         waitPFEndMove();
         jDoClick(containerlist[out].getID(),3,0);
         jSleep(1500);
      }
      if (jGetWindow(containerwindow) != -1 && jGetWindow(containerwindow).getInventories()[0].freeSlotsCoords().length > 0) {
         jToConsole("Putting Items into the Container");
         if (inventory.getItems(itemlist).length > 0);
         inventory.getItems(itemlist)[0].transferSuchAll();
         jSleep(500);
      }
      else {
         containerlist.splice(out, 1);
         jToConsole("Deleted Full Container");
         jMoveStep(jCoord(0, 0));
         //out++;
         jSleep(500);
         }
      }
      jSleep(1000);
return containerlist;
      }

function fillcrucible(){
if (jGetWindow("Crucible").getMeterValue(1) < 6){
       var coal = checkInventory().getItems("coal");
         coal[0].take();
         jWaitDrag();
       alloyer = findObjectbyBLOB("alloyer", 0,0,0,0);
         alloyer.interactClick(0);
         jSleep(1000);
   }
   while (!jGetWindow("Crucible")){
      alloyer = findObjectbyBLOB("alloyer", 0,0,0,0);
      //jPFMoveOffset_LX(alloyer.position(), 1);
      //waitPFEndMove();
      jDoClick(alloyer.getID(),3,0);
      jSleep(1500);
   }
   jGetWindow("Crucible").pushButton("Light");


}

function mainnuggeter(list, listwindow) {
while(1) {
var i = 0;
   while (!jGetWindow("Crucible")){
      alloyer = findObjectbyBLOB("alloyer", 0,0,0,0);
      jPFMoveOffset_LX(alloyer.position(), 1);
      waitPFEndMove();
      var player_pos = jMyCoords();
      jDoClick(alloyer.getID(),3,0);
      jSleep(1500);
   }
fillcrucible();
   if(jGetWindow("Crucible")) {
   if (checkInventory().freeSlots() >=10) {
   jGetWindow("Crucible").pushButton("Light");
   jSendDoubleAction("craft", "nuggify");
   jWaitCraft();
   while (checkInventory().freeSlots() > 10) {
      jCraftItem(true);
      jWaitProgress();
     fillcrucible();
      dropFromCursor(1);
      drinkWater(30);
      }
   jAbsClick(player_pos, 1, 0);
   jSleep(1000);
   }
   list = takeItemsToContainers (["nugget"] , list, listwindow);
   
   }
}
}

function intro() {
   jDropLastWindow();
   var blist = ["Cupboards", "Large Chests", "Exit"];
   var selectWindow = jGUIWindow(jCoord(250, 250), jCoord(110, blist.length * 25 + 15), "Select Out Type");
   var label = jGUILabel(selectWindow, jCoord(5, 5), "Select food type:");
   for(var i = 0; i < blist.length; i++)
      jGUIButton(selectWindow, jCoord(5, 25 + i*25),  100, blist[i]);
   selectWindow.toggleCloseButton();
   var btext = selectWindow.waitButtonClick();
   if(btext == blist[0]) {var list = jGetObjects(35, jCoord(0, 0), ["cupboard"]); var listwindow = "Cupboard"; }
   if(btext == blist[1]) {var list = jGetObjects(35, jCoord(0, 0), ["lchest"]); var listwondow = "Chest";}
   if(btext == blist[blist.length - 1]) {selectWindow.destroy(); return;}
   selectWindow.destroy();
   mainnuggeter(list, listwindow);
}


intro();


Have bars and coal in inventory and atleast 10 spaces free.
Uses Leksar pathfinder
User avatar
Arcanist
 
Posts: 2664
Joined: Mon Mar 19, 2012 2:01 pm

PreviousNext

Return to The Wizards' Tower

Who is online

Users browsing this forum: Claude [Bot] and 0 guests