how to use macro buy something at npc help plz

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

Post Reply
Message
Author
pattarit
Noob
Noob
Posts: 6
Joined: 21 Jul 2009, 07:25
Noob?: Yes

how to use macro buy something at npc help plz

#1 Post by pattarit »

so is this right ?

macro buy weapon {
do buy @npc x y blade[3] 1 or do talknpc x y 4(if the item is #4) 1
}

Raider
The Kore Devil
The Kore Devil
Posts: 672
Joined: 22 Feb 2013, 03:40
Noob?: No
Location: The Netherlands

Re: how to use macro buy something at npc help plz

#2 Post by Raider »


pattarit
Noob
Noob
Posts: 6
Joined: 21 Jul 2009, 07:25
Noob?: Yes

Re: how to use macro buy something at npc help plz

#3 Post by pattarit »

thx so much but i want to use macros becuz i try to do nov>monk and it have to buy the weapon
so if use the config should be like this


do conf buyAuto morning star
do conf maxAmount 1
do conf npc prt_church x y
do conf distance 5
pause 2
do reload conf
pause 10
do eq .........
pause 5
do conf buyAuto
do conf maxAmount
do conf npc
do conf distance 5
pause 2
do reload conf
}

???

Raider
The Kore Devil
The Kore Devil
Posts: 672
Joined: 22 Feb 2013, 03:40
Noob?: No
Location: The Netherlands

Re: how to use macro buy something at npc help plz

#4 Post by Raider »

pattarit wrote:
do conf buyAuto morning star
do conf maxAmount 1
do conf npc prt_church x y
do conf distance 5
pause 2
do reload conf
pause 10
do eq .........
pause 5
do conf buyAuto
do conf maxAmount
do conf npc
do conf distance 5
pause 2
do reload conf
}

???


Code: Select all

buyAuto Morning Star  {
maxAmount 1
minAmount 0
npc prt_church 108 124
distance  5
}

pattarit
Noob
Noob
Posts: 6
Joined: 21 Jul 2009, 07:25
Noob?: Yes

Re: how to use macro buy something at npc help plz

#5 Post by pattarit »

i mean in macros T T

cursedxxx
Human
Human
Posts: 25
Joined: 02 Aug 2009, 20:48
Noob?: No

Re: how to use macro buy something at npc help plz

#6 Post by cursedxxx »

ehm this may be somewhat really late, but i was trying to do something similiar
essentially this was my line (in macro) to buy 100 white potions at the npc
i used 2 lines for the buying of items : 1 line to move to the npc and another to buy the item

Code: Select all

do talknpc 126 76 b b5,100 e
as simple explaination of what what does
do : tells it to run this command
talknpc : tells it you're talking to an npc
126 : x coordinate of the npc
76 : y coordinate of the npc
b : tell it you want to open the buy section
b5,100 : b5 = item 5(list starts with 0 so it's the 6th item in the list) , to seperate them and 100 : ammount
e : end the conversation with the npc


well it's a really late response im guessing you'll probably not need it again but maybe someone needs something similiar someday
have a nice day

blodycandy
Noob
Noob
Posts: 5
Joined: 20 Jun 2017, 14:26
Noob?: Yes

Re: how to use macro buy something at npc help plz

#7 Post by blodycandy »

1. use this automacro before,Your character standing near the NPC
automacro buy {
call {
do talk @npc (100 100)
do buy 4 1
stop
}
}

2.use this macro, openkore enter macro buy

macro buy {
do talk @npc (100 100)
do buy 4 1
stop
}

try it

SkylorD
Moderators
Moderators
Posts: 1163
Joined: 16 Dec 2011, 02:53
Noob?: Yes
Location: Brazil

Re: how to use macro buy something at npc help plz

#8 Post by SkylorD »

Why don't use buyAuto ?
Learn rules

headlesscarmen
Noob
Noob
Posts: 17
Joined: 08 Oct 2018, 15:54
Noob?: Yes
Location: Kuala Lumpur,Malaysia

Re: how to use macro buy something at npc help plz

#9 Post by headlesscarmen »

So i got the same problem when bulk buying armor for armor enhancement/enchant , and here is how i fix it.
this is my macro

Code: Select all

automacro checkeq {
  console /Buy completed./i
  call {
  call buyarmor
}
}
  
macro buyarmor {
do talknpc 341 85 b b35,1 n
}
for the first step, u have to manually enter "macro buyarmor" in the openkore console for the first purchase hence triggering the automacro through the console "Buy completed."

its a little crude but it get the job done. Haha altough i supposed a more advance/better automacro supposed to check for item amount (as a hook) but using console hook works the same for me.

im still pondering the usage of "run-once , exclusive" are they important in someway?

Post Reply