How do I access boat slot with union script (solved)

Ask, answer and discuss any and all topics about the hows, whys, wheres and whens of playing Haven & Hearth.

How do I access boat slot with union script (solved)

Postby rosukaruklame » Sat May 24, 2014 8:12 am

I want to use boat slot in union script bot.
but I could not access boat slot by code like the following.
how do I access boat slot ?

Code: Select all
var boat = jFindObjectByName("boat", rad);
jDoClick(boat.getID(), 3, 0);
if(jWaitPopup(actionTimeout)){
    jSelectContextMenu("Open");
}
jSleep(2000);
var inv_boat = jGetWindow("Boat").getInventories();
jPrint(inv_boat[0]); // undefined
Last edited by rosukaruklame on Sun May 25, 2014 10:01 pm, edited 2 times in total.
rosukaruklame
 
Posts: 4
Joined: Tue Feb 25, 2014 7:09 pm

Re: How do I access boat slot with union script

Postby rosukaruklame » Sun May 25, 2014 9:06 pm

I found a method called jImgClick from the document.
so I try using this method to solve the problem of topic.
I will also post a code if it works.
Thank you for reading.
rosukaruklame
 
Posts: 4
Joined: Tue Feb 25, 2014 7:09 pm

Re: How do I access boat slot with union script (prob solved

Postby rosukaruklame » Sun May 25, 2014 10:01 pm

The problem solved with very simple code. (below)

Code: Select all
jImgClick("Boat", 1, 1, 0); // load or unload left slot
jImgClick("Boat", 2, 1, 0); // load or unload right slot


Note.
- There is a need to open "Boat" window.
- jImgClick does not work correctly on an old union client.
rosukaruklame
 
Posts: 4
Joined: Tue Feb 25, 2014 7:09 pm


Return to How do I?

Who is online

Users browsing this forum: Ahrefs [Bot], Barkrowler [Bot], Claude [Bot] and 1 guest