Anemone Client

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

Moderator: Phades

sildarion
Posts: 9
Joined: Thu Nov 13, 2014 11:00 pm

Re: Anemone Client

Post by sildarion »

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

Post by sildarion »

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;
   }
}
User avatar
Prowny
Posts: 412
Joined: Sun Aug 18, 2013 11:59 pm

Re: Anemone Client

Post by Prowny »

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
romovs
Posts: 1472
Joined: Sun Sep 29, 2013 9:26 am
Location: The Tabouret

Re: Anemone Client

Post by romovs »

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
Prowny
Posts: 412
Joined: Sun Aug 18, 2013 11:59 pm

Re: Anemone Client

Post by Prowny »

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
romovs
Posts: 1472
Joined: Sun Sep 29, 2013 9:26 am
Location: The Tabouret

Re: Anemone Client

Post by romovs »

It should and is now :)
mvgulik
Posts: 4090
Joined: Fri May 21, 2010 2:29 am

Re: Anemone Client

Post by mvgulik »

Scripting(Anemone/Groovy): How to find the terrain/ground type for a given tile/cord/(tree) ?
(If its possible that is ?)
User avatar
romovs
Posts: 1472
Joined: Sun Sep 29, 2013 9:26 am
Location: The Tabouret

Re: Anemone Client

Post by romovs »

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);
mvgulik
Posts: 4090
Joined: Fri May 21, 2010 2:29 am

Re: Anemone Client

Post by mvgulik »

Roger. Thanks.

PS: Just in case. Growing tree mean a new gob(different Res). (Basic change detection working ok now) :)
sildarion
Posts: 9
Joined: Thu Nov 13, 2014 11:00 pm

Re: Anemone Client

Post by sildarion »

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?

Return to “The Wizards' Tower”