Anemone Client

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

Moderator: Phades

Re: Anemone Client

Postby sildarion » Tue Jan 20, 2015 3:35 pm

I wrote a piece of code to find the nearest boat but the return function doesnt seem to pass the found object correctly, i keep getting a nullpointer exception each time i use the function, even though it does seem to find a boat. Any ideas anyone?

Code: Select all
def Gob findClosestBoat(int rd){
   boat = null;
   boat = maid.doAreaFind(rd, "boat");
   if(boat == null){
      maid.doSay("No boat at range :" + rd);
      rd++;
      findClosestBoat(rd);
      maid.sleep(2000);
   }else{
      maid.doSay("\nFOUND A BOAT called: \n" + maid.getName(boat));
      maid.sleep(1000);
      return boat;
   }
}
sildarion
 
Posts: 9
Joined: Thu Nov 13, 2014 11:00 pm

Re: Anemone Client

Postby sildarion » Tue Jan 20, 2015 4:12 pm

nevermind, found my error it should be:

Code: Select all
def findClosestBoat(int rd){
   Gob boat = null;
   boat = maid.doAreaFind(rd, "boat");
   if(boat == null){
      maid.doSay("No boat at range :" + rd);
      rd++;
      boat = findClosestBoat(rd);
      
   }else{
      maid.doSay("\nFOUND A BOAT called: \n" + maid.getName(boat));
      maid.sleep(1000);
      return boat;
   }
}
sildarion
 
Posts: 9
Joined: Thu Nov 13, 2014 11:00 pm

Re: Anemone Client

Postby Prowny » Thu Jan 22, 2015 7:41 pm

I really need a guide for dummies here.
I download the files, I run maid jar and I get the "Connection refused: connect" message. :|
loftar wrote:The tears in this thread are so delicious
User avatar
Prowny
 
Posts: 412
Joined: Sun Aug 18, 2013 11:59 pm

Re: Anemone Client

Postby romovs » Thu Jan 22, 2015 8:03 pm

Create new text file inside the client folder with this inside
Code: Select all
java -Xms512m -Xmx1024m -jar maid.jar moltke.seatribe.se -r ./res

rename it to something.bat (make sure the extension .txt gets changed to .bat) and use it to start the client.
User avatar
romovs
 
Posts: 1472
Joined: Sun Sep 29, 2013 9:26 am
Location: The Tabouret

Re: Anemone Client

Postby Prowny » Thu Jan 22, 2015 8:13 pm

romovs wrote:Create new text file inside the client folder with this inside
Code: Select all
java -Xms512m -Xmx1024m -jar maid.jar moltke.seatribe.se -r ./res

rename it to something.bat (make sure the extension .txt gets changed to .bat) and use it to start the client.


Thank you... maybe this should be on your OP.
loftar wrote:The tears in this thread are so delicious
User avatar
Prowny
 
Posts: 412
Joined: Sun Aug 18, 2013 11:59 pm

Re: Anemone Client

Postby romovs » Thu Jan 22, 2015 8:47 pm

It should and is now :)
User avatar
romovs
 
Posts: 1472
Joined: Sun Sep 29, 2013 9:26 am
Location: The Tabouret

Re: Anemone Client

Postby mvgulik » Sat Jan 24, 2015 6:02 am

Scripting(Anemone/Groovy): How to find the terrain/ground type for a given tile/cord/(tree) ?
(If its possible that is ?)
mvgulik
 
Posts: 3774
Joined: Fri May 21, 2010 2:29 am

Re: Anemone Client

Postby romovs » Sat Jan 24, 2015 10:57 am

mvgulik wrote:Scripting(Anemone/Groovy): How to find the terrain/ground type for a given tile/cord/(tree) ?
(If its possible that is ?)

Code: Select all
Coord c = maid.getCoord();  // get tile at current player pos
// Coord c = someobject.rc; // get tile at 'someobject' object pos. (e.g. object found with doAreaFind())
MapView mv = maid.getWidget(MapView.class);
tile = mv.getground(c.div(11));
maid.doSay("Tile res: " + tile.getOuter().name);
User avatar
romovs
 
Posts: 1472
Joined: Sun Sep 29, 2013 9:26 am
Location: The Tabouret

Re: Anemone Client

Postby mvgulik » Sat Jan 24, 2015 1:03 pm

Roger. Thanks.

PS: Just in case. Growing tree mean a new gob(different Res). (Basic change detection working ok now) :)
mvgulik
 
Posts: 3774
Joined: Fri May 21, 2010 2:29 am

Re: Anemone Client

Postby sildarion » Wed Jan 28, 2015 10:35 pm

i've run into a problem using maid.doRightClick(coord, flag)
the flag doesnt seem to work, from what i could find in the code i should be able to use the flags to add an extra button like shift or alt or so, but this isnt working
the rightclick happens but without pressing shift if i try it with 1 as flag
maybe i've been interpreting the code wrong and it should be a different int but i tried with 1,2,3 and no change.

Any idea why the flags dont work? or how i can do a shift right click any other way?
sildarion
 
Posts: 9
Joined: Thu Nov 13, 2014 11:00 pm

PreviousNext

Return to The Wizards' Tower

Who is online

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