View Full Version : buying ammo paladin
I need ammo buyer in a connection with a label.
I have that : http://pastebin.com/M98PWCm0
but it doesnt work, does someone can help me?
Jontor
01-26-2016, 10:40 AM
local Ammo_AmmoID = 7378
local Ammo_AmmoMax = 500
registerEventListener(WALKER_SELECTLABEL, "onLabel")
function onLabel(labelName)
if (labelName == "TalkAmmo") then
if (Self.ItemCount(Ammo_AmmoID) < Ammo_AmmoMax) then
Self.SayToNpc({"hi", "trade"}, 65)
Self.ShopBuyItemsUpTo(Ammo_AmmoID, Ammo_AmmoMax)
end
end
end
local Ammo_AmmoID = 7378
local Ammo_AmmoMax = 500
registerEventListener(WALKER_SELECTLABEL, "onLabel")
function onLabel(labelName)
if (labelName == "TalkAmmo") then
if (Self.ItemCount(Ammo_AmmoID) < Ammo_AmmoMax) then
Self.SayToNpc({"hi", "trade"}, 65)
Self.ShopBuyItemsUpTo(Ammo_AmmoID, Ammo_AmmoMax)
end
end
end
it doesnt work, he goes to npc, opens trade, and closes that and goes to the next waypoints, despite that I have made a label named "TalkAmmo"
Jontor
01-29-2016, 10:20 AM
it doesnt work, he goes to npc, opens trade, and closes that and goes to the next waypoints, despite that I have made a label named "TalkAmmo"
You sure you have enough money/cap/ item is buyable at that NPC?
yes I have 1000 cap, 150k cash and npc is selling bolts arrows etc
Jontor
01-30-2016, 08:14 PM
refresh, help me :/
Are you playing on an OT?
Are you playing on an OT?
yes I play on an OT. But there are many people that use xenobot and have ammo buyer, so there must be some solution for that
Jontor
01-31-2016, 11:07 AM
yes I play on an OT. But there are many people that use xenobot and have ammo buyer, so there must be some solution for that
I forgot to stop the walker, use this one:
local Ammo_AmmoID = 7378
local Ammo_AmmoMax = 500
registerEventListener(WALKER_SELECTLABEL, "onLabel")
function onLabel(labelName)
if (labelName == "TalkAmmo") then
if (Self.ItemCount(Ammo_AmmoID) < Ammo_AmmoMax) then
Self.SayToNpc({"hi", "trade"}, 65)
while (Self.ItemCount(Ammo_AmmoID) < Ammo_AmmoMax) do
Self.ShopBuyItemsUpTo(Ammo_AmmoID, Ammo_AmmoMax)
end
end
end
end
I forgot to stop the walker, use this one:
local Ammo_AmmoID = 7378
local Ammo_AmmoMax = 500
registerEventListener(WALKER_SELECTLABEL, "onLabel")
function onLabel(labelName)
if (labelName == "TalkAmmo") then
if (Self.ItemCount(Ammo_AmmoID) < Ammo_AmmoMax) then
Self.SayToNpc({"hi", "trade"}, 65)
while (Self.ItemCount(Ammo_AmmoID) < Ammo_AmmoMax) do
Self.ShopBuyItemsUpTo(Ammo_AmmoID, Ammo_AmmoMax)
end
end
end
end
it seems to work, thank you so much :) I need only hive seller to make it work and that will be everything
Lilithwins
03-22-2016, 04:37 PM
Can you add checker on this as well?
ammo or runes would be great
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.