Brunobbing
New Member
- Joined
- Jan 11, 2009
- Messages
- 1
- Reaction score
- 0
amigos tengo un problema con la sd en mi server 8.60 las runas son apilables pero al ocupar 1 se gasta las 100
----- Config -----
local config = {
cost = 15000, -- Price
item_id = 2268, -- Rune/Potion
backpack_id = 2003 -- Backpack
}
local name = getItemNameById(2268) -- Same as item_id above
----- End Config -----
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveMoney(cid, config.cost) == TRUE then
local bp = doPlayerAddItem(cid, config.backpack_id, 10)
doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
doSendAnimatedText(fromPosition, "Comprado", TEXTCOLOR_RED)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você comprou uma backpack de ".. name .."s por ".. config.cost .." gold.")
for i=1,20 do
doAddContainerItem(bp, config.item_id, 3) -- You can edit this number, it will give shots per rune.
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa de ".. config.cost .." gold para comprar uma backpack de ".. name .."s.")
end
return TRUE
end
----- Config -----
local config = {
cost = 15000, -- Price
item_id = 2268, -- Rune/Potion
backpack_id = 2003 -- Backpack
}
local name = getItemNameById(2268) -- Same as item_id above
----- End Config -----
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveMoney(cid, config.cost) == TRUE then
local bp = doPlayerAddItem(cid, config.backpack_id, 10)
doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
doSendAnimatedText(fromPosition, "Comprado", TEXTCOLOR_RED)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você comprou uma backpack de ".. name .."s por ".. config.cost .." gold.")
for i=1,20 do
doAddContainerItem(bp, config.item_id, 3) -- You can edit this number, it will give shots per rune.
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa de ".. config.cost .." gold para comprar uma backpack de ".. name .."s.")
end
return TRUE
end