look, this is a part of my NPC script:
I wanna make my npc sell backpack with low cap without change the potions in items.xml.
maybe a backpack of potions with 20.0oz
can somebody help me?
rep ++
Code:
-------------------------------------------------- POTIONS ----------------------------------------------------
cargas = 50
bp_mp = 2001
-- Mana Potions
mp = 7620
-- Mana Potion
elseif msgcontains(msg, "mp") then
selfSay("Esta certo da compra de 1bp de {mana potions} ao custo de {5 unamed coins}?",cid)
talkState[talkUser] = 2
elseif msgcontains(msg, "yes") and talkState[talkUser] == 2 then
if getPlayerItemCount(cid,uc) >= 5 and getPlayerFreeCap(cid) >= 1818 then
doPlayerRemoveItem(cid,uc,5)
local bpmp = doPlayerAddItem(cid,bp_mp,cargas)
for i=1,20 do
doAddContainerItem(bpmp,mp,cargas)
end
I wanna make my npc sell backpack with low cap without change the potions in items.xml.
maybe a backpack of potions with 20.0oz
can somebody help me?
rep ++