Openkore.com

OpenKore Forums
It is currently 23 Sep 2018, 04:24

All times are UTC - 5 hours [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 11 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: [HELP] standpoint/distance
PostPosted: 21 Jun 2008, 21:04 
Offline
Noob
Noob

Joined: 21 Jun 2008, 20:14
Posts: 5
hi hello gud day

1. help about talking to kafra to use warp but the bot will not move near to her.
just like specify a standpoint or distance for selling item or buying items.
I just want my bot talk to kafra with specified distance or not moving near to her if the kafra is in vision of the bot.

2. is there a way that the bot can automatically logging-in again even if it says "incorrect password" and not force you to type your password again because In the server im playing it has some login problems even if you type your valid password.

tnx and god bless


Last edited by 6r1sw0Ld on 24 Jun 2008, 13:06, edited 7 times in total.

Top
 Profile  
 
 Post subject: Re: [HELP] about standpoint
PostPosted: 21 Jun 2008, 21:38 
Offline
Plain Yogurt
Plain Yogurt
User avatar

Joined: 04 Apr 2008, 09:49
Posts: 82
yah me too
i dont know how to configure it...
i dont know what files should i modify
ive tried to mess up Task::Route but its still the same

_________________
Image
DARKest Ninja


Top
 Profile  
 
 Post subject: Re: [HELP] standpoint/distance & about relog
PostPosted: 22 Jun 2008, 07:33 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 16 May 2008, 08:28
Posts: 218
1) My hands are full at the moment. I'll check on this some other time.

2) ignoreInvalidLogin 1

_________________
Whatever...


Top
 Profile  
 
 Post subject: Re: [HELP] standpoint/distance & about relog
PostPosted: 22 Jun 2008, 09:02 
Offline
Plain Yogurt
Plain Yogurt
User avatar

Joined: 04 Apr 2008, 09:49
Posts: 82
ok, thanks hakore

kore is at 217 92
warp npc is at 210 106
npc is on sight range of kore
but still it doesnt talk to it on that position
i dont know why kore comes near to it
if it comes near to it, could i disable it if its already on range
or could i set its standpoint

ive edited this
Code:
elsif ( Task::Route->getRoute(\@solution, $field, $char->{pos_to}, $self->{mapSolution}[0]{pos}) ) {
         # NPC is reachable from current position
         # >> Then "route" to it
         debug "Walking towards the NPC\n", "route";
         my $task = new Task::Route(
            x => $self->{mapSolution}[0]{pos}{x},
            y => $self->{mapSolution}[0]{pos}{y},
            maxTime => $self->{maxTime},
            distFromGoal => 21,
            avoidWalls => $self->{avoidWalls},
            solution => \@solution
         );
         $self->setSubtask($task);

      }
ive edited distFromGoal from 10 to 21
from my example, it doesnt move on 217,92
but it still does that "Walking towards the NPC"

_________________
Image
DARKest Ninja


Top
 Profile  
 
 Post subject: Re: [HELP] standpoint/distance & about relog
PostPosted: 22 Jun 2008, 10:24 
Offline
Noob
Noob

Joined: 21 Jun 2008, 20:14
Posts: 5
thnx hakore ^_^


Top
 Profile  
 
 Post subject: Re: [HELP] standpoint/distance & about relog
PostPosted: 22 Jun 2008, 17:26 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 16 May 2008, 08:28
Posts: 218
Regarding the standpoint thingy, may I know through which method are you talking to the NPC? Console command 'talknpc'? Or just plain map-routing that includes warp NPCs in portals.txt?

_________________
Whatever...


Top
 Profile  
 
 Post subject: Re: [HELP] standpoint/distance & about relog
PostPosted: 22 Jun 2008, 21:16 
Offline
Noob
Noob

Joined: 21 Jun 2008, 20:14
Posts: 5
just plain map-routing that includes warp npc or just like iamanoob saying about his problem


Top
 Profile  
 
 Post subject: Re: [HELP] standpoint/distance & about relog
PostPosted: 23 Jun 2008, 08:15 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 16 May 2008, 08:28
Posts: 218
Implementing map-route standpoint into Kore is quite complicated since we will have to mess with portals.txt's format.

We can probably make a config option for the desired distance from the warp NPC though, but I don't feel we need such variation in warp NPC standpoints. The hard-coded distance of 10 is already reasonable enough.

Anyways, if you feel like messing with this, there are two places you need to look at. iamanoob already pinpointed one, but he missed its counterpart:

MapRoute.pm (Line 173)
Code:
      } elsif (distance($char->{pos_to}, $self->{mapSolution}[0]{pos}) <= 10) {


MapRoute.pm (Line 206)
Code:
      } elsif ( Task::Route->getRoute(\@solution, $field, $char->{pos_to}, $self->{mapSolution}[0]{pos}) ) {
         # NPC is reachable from current position
         # >> Then "route" to it
         debug "Walking towards the NPC\n", "route";
         my $task = new Task::Route(
            x => $self->{mapSolution}[0]{pos}{x},
            y => $self->{mapSolution}[0]{pos}{y},
            maxTime => $self->{maxTime},
            distFromGoal => 10,
            avoidWalls => $self->{avoidWalls},
            solution => \@solution
         );
         $self->setSubtask($task);

In both codes, change the hardcoded number 10 to your desired distance.

This is mainly based on code logic, I didn't test this myself, so just please do the honor.

_________________
Whatever...


Top
 Profile  
 
 Post subject: Re: [HELP] standpoint/distance & about relog
PostPosted: 23 Jun 2008, 11:19 
Offline
Plain Yogurt
Plain Yogurt
User avatar

Joined: 04 Apr 2008, 09:49
Posts: 82
i really am a noob XD
i havent noticed that line 173
ive tried to modify it for 2 hours and havent seen that (i r phailed :( )

anyways thanks hakore
for distance 14
Quote:
kore is at 217 92
warp npc is at 210 106

replace 10 with 21
i dont know the reason why it was 21 but from 10-23
21 was for distance 14 from you to the warp npc


thanks again hakore!
mwah! =)

_________________
Image
DARKest Ninja


Top
 Profile  
 
 Post subject: Re: [HELP] standpoint/distance & about relog
PostPosted: 24 Jun 2008, 08:37 
Offline
Noob
Noob

Joined: 21 Jun 2008, 20:14
Posts: 5
thnx again hakore ur d best ...

one more question sir hakore, how can kore/bot talk to an npc without "talk resp".

for example talking to "npc healer" that will just heal you after talking to him without talk response.


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

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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