View Full Version : Adding SD's Buyer.
Czarnyhh
07-26-2014, 01:47 AM
Hello.
Somebody know's how to add a sd's buyer into a script?
I Mean, i got a script for d lair carlin, and i will to attack with sds wich means i need to bulid a needed money counter and withdrawer (to buy sds) , checkers at spawn and the sd's buyer into it.
Someone can help me with this?
Furpan
07-26-2014, 06:58 AM
Follow this example:
local MaxSD = 1000
local MaxMP = 100
registerEventListener(WALKER_SELECTLABEL, "onLabel")
function onLabel(labelName)
if (labelName == "Runes") then
Self.SayToNpc({"hi", "trade"}, 65)
wait(1000)
Self.ShopBuyItemsUpTo(3155, MaxSD) -- (id, count)
elseif (labelName == "Bank") then
local moneySD = math.max((MaxSD - Self.ItemCount(3155)) * 108, 0)
local moneyMP = math.max((MaxMP - Self.ItemCount(238)) * 120, 0)
local moneyTO = moneySD + moneyMP
Self.SayToNpc({"hi", "deposit all", "yes", "withdraw " .. moneyTO, "yes"}, 65)
end
end
Czarnyhh
07-26-2014, 10:44 AM
Should i make from it just a apart lua script?
Czarnyhh
07-26-2014, 04:52 PM
Furpan or anybody, today i got me last night voucher, so if somebody can tell me how should i use the script above i would be really thankfull.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.