Openkore.com

OpenKore Forums
It is currently 19 Oct 2018, 03:02

All times are UTC - 5 hours [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 43 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Routing between mosk_dun02 and mosk_dun03
PostPosted: 24 May 2011, 20:19 
Offline
Developers
Developers

Joined: 24 Nov 2010, 03:08
Posts: 214
kLabMouse wrote:
the .dist file is used to calculate the route. It's build automatically from .fld file.


Actially, I use th UltraEdit to Edit the .fld file. And, remove the .dist file, let it to re-build automatically from .fld file.
Because, I get the definitions from the fields/tools/gat_to_fld2.pl, such as:
Code:
use constant {
   TILE_NOWALK => 0,
   TILE_WALK => 1,
   TILE_SNIPE => 2,
   TILE_WATER => 4,
   TILE_CLIFF => 8,
};

# conversion (ex. $TILE_TYPE[0] = TILE_WALK = 1), (ex. $TILE_TYPE[1] = TILE_NOWALK = 0)
my @TILE_TYPE = (   TILE_WALK,            # 0) Walkable
               TILE_NOWALK,         # 1) Non-walkable
               TILE_WATER,            # 2) Non-walkable water
               TILE_WALK|TILE_WATER,   # 3) Walkable water
               TILE_WATER|TILE_SNIPE,   # 4) Non-walkable water (snipable)
               TILE_CLIFF|TILE_SNIPE,   # 5) Cliff (snipable)
               TILE_CLIFF);         # 6) Cliff (not snipable)


Top
 Profile  
 
 Post subject: Re: Routing between mosk_dun02 and mosk_dun03
PostPosted: 24 May 2011, 22:25 
Offline
Developers
Developers

Joined: 05 Dec 2008, 05:42
Posts: 1811
sofax222 wrote:
the "run" of "$pathfinding" is Python program.

Isn't it in C++?

Actually, that caused this problem:
Quote:
closestWalkableSpot: find the closest position that is walkable (up to 2 blocks away)

- and the NPC portal was in more than 2 blocks from the closest walkable position. Increased to 7 blocks in r7735, should work now for mosk_dun03. It probably should search for maximum distance NPCs are visible and talkable on, but that can cause problems with misplaced portals.


Top
 Profile  
 
 Post subject: Re: Routing between mosk_dun02 and mosk_dun03
PostPosted: 25 May 2011, 04:17 
Offline
Developers
Developers

Joined: 24 Nov 2010, 03:08
Posts: 214
Quote:
Isn't it in C++?

Yes, it is in C++ !

Thanks a lot !
Now my openkore is r7677, I will try the r7735 what you say !


Top
 Profile  
 
 Post subject: Re: Routing between mosk_dun02 and mosk_dun03
PostPosted: 28 Feb 2012, 12:44 
Offline
Noob
Noob

Joined: 12 Feb 2012, 17:56
Posts: 17
Is this working for everyone else? My bot still gets stuck from moscovia --> mosk_fild01, but can navigate from mosk_fild01 --> mosk_fild02 fine. Then stands at 207 276 indefinitely, probably because the coordinates are wrong for the npc interact..idk. Help please!

Config.txt
######################################################
allowedMaps moscovia, mosk_fild01, mosk_fild02, mosk_dun01, mosk_dun02
allowedMaps_reaction 0
lockMap mosk_dun02
saveMap moscovia 223 191
saveMap_warpToBuyOrSell 1
######################################################

Portals.txt (manually added)
#moscovia --> mosk_dun02
moscovia 140 50 mosk_fild01 95 93 0 c c r0 c c c n
mosk_fild01 86 104 mosk_fild02 204 54 c c r2 c c c r1 c n
mosk_dun01 207 276 mosk_dun02 165 30 c c r0 n


Top
 Profile  
 
 Post subject: Re: Routing between mosk_dun02 and mosk_dun03
PostPosted: 06 Mar 2012, 06:28 
Offline
Developers
Developers

Joined: 24 Nov 2010, 03:08
Posts: 214
I use a macro with the setting in the portals.txt.
In the portals.txt:
Code:
moscovia 136 48 mosk_fild01 95 93
mosk_fild01 86 104 mosk_fild02 204 54 0 c c r2 c c c r1 c n
mosk_fild02 190 257 mosk_dun01 189 45
mosk_dun01 207 276 mosk_dun02 165 30 0 c c r0

And the macro:
Code:
automacro MoscoviaToMoskFld1 {
   location moscovia 136 50 140 46
   equipped 火忍西怒畢的腰帶
   inventory "古斯里琴" == 1
   console /^.*0\s{2}往鯨魚島出發.*$/i
   run-once 1
   call {
      pause 1
      do uneq 火忍西怒畢的腰帶
      pause 1
      do eq 古斯里琴
      pause 2
      do talk resp 0
      pause 1
      release all
   }
}


Top
 Profile  
 
 Post subject: Re: Routing between mosk_dun02 and mosk_dun03
PostPosted: 06 Mar 2012, 21:14 
Offline
Developers
Developers

Joined: 05 Dec 2008, 05:42
Posts: 1811
You can add openkore commands into dialog sequence (even in portals.txt) with:
Code:
a="eq something"


Top
 Profile  
 
 Post subject: Re: Routing between mosk_dun02 and mosk_dun03
PostPosted: 07 Mar 2012, 06:28 
Offline
Developers
Developers

Joined: 24 Nov 2010, 03:08
Posts: 214
EternalHarvest wrote:
You can add openkore commands into dialog sequence (even in portals.txt) with:
Code:
a="eq something"

Does it support r7762 ?
Is there any example ?
Is one "a" for one command ?
Is one "a" for commands ?
Or I can add multiple "a" pamameters ?

But this case, the openkore is inactive talking with NPC not active !


Top
 Profile  
 
 Post subject: Re: Routing between mosk_dun02 and mosk_dun03
PostPosted: 07 Mar 2012, 13:00 
Offline
Developers
Developers

Joined: 05 Dec 2008, 05:42
Posts: 1811
Quote:
Does it support r7762 ?

It's a very old feature, should work.
Quote:
Is there any example ?

No idea.
Quote:
Is one "a" for one command ?
Is one "a" for commands ?

You can put multiple commands with ";;", as usual.
Quote:
Or I can add multiple "a" pamameters ?

You can, since it's just another NPC conversation code.
Quote:
But this case, the openkore is inactive talking with NPC not active !

What?


Top
 Profile  
 
 Post subject: Re: Routing between mosk_dun02 and mosk_dun03
PostPosted: 08 Mar 2012, 06:41 
Offline
Developers
Developers

Joined: 24 Nov 2010, 03:08
Posts: 214
EternalHarvest wrote:
Quote:
But this case, the openkore is inactive talking with NPC not active !

What?


Usually, openkore start to talk to npc with "talk" or "talknpc" command !
But in this case, openkore need to walk close to the NPC,
and wait, then the NPC will actively talk to openkore !

So, in my macro, there is no any "talknpc" command, but only "talk resp" command !


Top
 Profile  
 
 Post subject: Re: Routing between mosk_dun02 and mosk_dun03
PostPosted: 08 Mar 2012, 17:22 
Offline
Moderators
Moderators
User avatar

Joined: 01 Feb 2010, 17:37
Posts: 211
Location: Brazil - MG
sofax222 wrote:
EternalHarvest wrote:
Quote:
But this case, the openkore is inactive talking with NPC not active !

What?


Usually, openkore start to talk to npc with "talk" or "talknpc" command !
But in this case, openkore need to walk close to the NPC,
and wait, then the NPC will actively talk to openkore !

So, in my macro, there is no any "talknpc" command, but only "talk resp" command !


That's right, you can't left-click the NPC ingame and you can't start talking with it by the usual way. The npc automatically starts talking with you when you get near the specified area, and this "specified area" isn't always a walkable path near the NPC, sometimes it's far from it.


EDIT: Just found out that talknpc supports a=<string>, where <string> is a console command. But even with that talknpc requires kore to start the talk sequence, where in this case it should be started by the NPC when entering the area.

_________________
Brazilian Community: http://openkore-brasil.com
BetaKore: https://code.google.com/p/betakore/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 43 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group