How to buy from npc located in house? [Solved]

All resolved question will be found here. It is recommended that you browse / search through this section first and see if your question has been answered before

Moderators: Moderators, Documentation Writers

Message
Author
palancho
Human
Human
Posts: 39
Joined: 28 Mar 2017, 03:08
Noob?: Yes

How to buy from npc located in house? [Solved]

#1 Post by palancho »

Hello. I am trying to buy ammo for my gunslinger in Alberta. Using this script:

buyAuto Bloody Shell {
maxAmount 4000
minAmount 50
npc alberta_in 176 81
distance 8
}
but is does not work, probably becouse of coords. How to make this script working- to make a bot to go to alberta-> house-> npc

THX a lot!
Last edited by palancho on 31 Mar 2017, 09:49, edited 1 time in total.

Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Re: How to buy from npc located in house?

#2 Post by Mortimal »

I do not see price line in there...(u need to put it in your buyAuto block) maybe your bot don't have money?

if all is ok with zeny...

Check tables/portals.txt for line - alberta 98 153 alberta_in 189 89. If line is there...
try setting: distance 3.
Please use pin function for uploading your file contents!

palancho
Human
Human
Posts: 39
Joined: 28 Mar 2017, 03:08
Noob?: Yes

Re: How to buy from npc located in house?

#3 Post by palancho »

Thx for reply! :)
Bot goes to Alberta, but instead to go to house where npc is located and talk to him inside he goes here:

alberta 176 81

There are seperate coordinates to overall map and to place located inside the house in Alberta.
I don't know how to make bot to go inside the house and just there being already inside to go to this coordinates: 176 81.

This merchant coordinates describe the position of this npc inside the house in Alberta not on the overall map of Alberta I think:/

Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Re: How to buy from npc located in house?

#4 Post by Mortimal »

That is strange because bot knows how to get to any npc no matter where it stands if coordinates provided correctly...

Maybe there is one more buyAuto Bloody Shell block with incorrect coordinates? If not....

Try this:

Code: Select all

buyAuto Bloody Shell {
	maxAmount 4000
	minAmount 50
	npc alberta_in 176 81
	standpoint alberta_in 176 80
	price 30
}
Please use pin function for uploading your file contents!

palancho
Human
Human
Posts: 39
Joined: 28 Mar 2017, 03:08
Noob?: Yes

Re: How to buy from npc located in house?

#5 Post by palancho »

Mortimal wrote:That is strange because bot knows how to get to any npc no matter where it stands if coordinates provided correctly...

Maybe there is one more buyAuto Bloody Shell block with incorrect coordinates? If not....

Try this:

Code: Select all

buyAuto Bloody Shell {
	maxAmount 4000
	minAmount 50
	npc alberta_in 176 81
	standpoint alberta_in 176 80
	price 30
}

Thank You, works :)

Locked