Scal
RuneScape OT
- Joined
- Aug 3, 2014
- Messages
- 33
- Reaction score
- 13
Hello all,
Can someone help me, can someone change this script so it gives me 20x1 health potions rather than just 20, changed it around quite alot, but all they do is stack rather than seperate,
If someone can help it'll be very much appreciated. Cheers
Can someone help me, can someone change this script so it gives me 20x1 health potions rather than just 20, changed it around quite alot, but all they do is stack rather than seperate,
Code:
hp_id = 7618 -- Item a ser vendido
backpackhp_id = 2000 -- Backpack
custohp_id =5000 -- Valor
cargashp_id = 1 -- Cargas (Doesn't work with '20' either)
local name = getItemNameById(hp_id)
----- End Config -----
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveMoney(cid, custohp_id) == TRUE then
local bag = doPlayerAddItem(cid, backpackhp_id, 1)
doSendAnimatedText(fromPosition, "", TEXTCOLOR_YELLOW)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have purchased a backpack of ".. name .."s for ".. custohp_id .." gold.")
for i=1,20 do
doAddContainerItem(bag, hp_id, cargashp_id)
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need ".. custohp_id .." gold coins for a backpack of ".. name .."s.")
end
return FALSE
end
If someone can help it'll be very much appreciated. Cheers
Last edited by a moderator: