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
 }
			
			
									
						
										
						how to use macro buy something at npc help plz
Moderator: Moderators
- 
				pattarit
 - Noob

 - Posts: 6
 - Joined: 21 Jul 2009, 07:25
 - Noob?: Yes
 
- 
				Raider
 - The Kore Devil

 - Posts: 672
 - Joined: 22 Feb 2013, 03:40
 - Noob?: No
 - Location: The Netherlands
 
- 
				pattarit
 - Noob

 - Posts: 6
 - Joined: 21 Jul 2009, 07:25
 - Noob?: Yes
 
Re: how to use macro buy something at npc help plz
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
}
???
			
			
									
						
										
						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

 - Posts: 672
 - Joined: 22 Feb 2013, 03:40
 - Noob?: No
 - Location: The Netherlands
 
Re: how to use macro buy something at npc help plz
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

 - Posts: 6
 - Joined: 21 Jul 2009, 07:25
 - Noob?: Yes
 
Re: how to use macro buy something at npc help plz
i mean in macros T T
			
			
									
						
										
						- 
				cursedxxx
 - Human

 - Posts: 25
 - Joined: 02 Aug 2009, 20:48
 - Noob?: No
 
Re: how to use macro buy something at npc help plz
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
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
			
			
									
						
										
						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 edo : 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

 - Posts: 5
 - Joined: 20 Jun 2017, 14:26
 - Noob?: Yes
 
Re: how to use macro buy something at npc help plz
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
			
			
									
						
										
						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

 - Posts: 1202
 - Joined: 16 Dec 2011, 02:53
 - Noob?: Yes
 
- 
				headlesscarmen
 - 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
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
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?
			
			
									
						
										
						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
}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?