As the title says, how can I set charges on the rune I get in the backpack?
get_id = id of the rune/potion you get when you pull the switch.
so it would be great if you could add like
Thanks on advance.
Solved, thanks to my brilliant brain!
get_id = id of the rune/potion you get when you pull the switch.
so it would be great if you could add like
Lua:
local charges = 10
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local container = 0
local cost = 5000
local get_id = 2268
--> local charges = 10 <--
local backpack_id = 2003
if(item.itemid == 1945) then
if(doPlayerRemoveMoney(cid, cost) == TRUE) then
doTransformItem(item.uid, item.itemid+1)
container = doPlayerAddItem(cid, backpack_id, 1)
for i = 1, 20 do
doAddContainerItem(container, get_id, --> charges <--)
end
else
doPlayerSendCancel(cid,"Sorry, you don't have enough money.")
end
elseif(item.itemid == 1946) then
doTransformItem(item.uid, item.itemid-1)
end
return TRUE
end
Thanks on advance.
Solved, thanks to my brilliant brain!
Last edited: