• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Noob Help] Item Combiner

Jordan_August

New Member
Joined
Jul 24, 2012
Messages
122
Reaction score
4
I am creating a new 8.6 OT, and I need a script that I can use a lever that will combine 3 of the same equipment into a new armor. Every combination script only does two items or some shit about adding extra stats. For example if I have three crown armors in a bag in xyz position. When you use the lever it will make create a golden armor. And then you could have 3 golden armors in a bag to create a demon armor. 3 demon armors into a magic plate armor. And so on and so fourth. I just need it to be configurable and be able to add more equipment to it. I also need this to be able to do it for every equipment piece.. so helmets, boots, shields, and legs. This is a crucial part and would be very much appreciated.
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local upgmaterial = 2487
local upgresult = 2466
    if itemEx.itemid == upgmaterial then
    if getPlayerItemCount(cid, upgmaterial) > 1 then
        doTransformItem(itemEx.uid, upgresult)
        doPlayerRemoveItem(cid, upgmaterial, 2)
        doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
        doSendAnimatedText(getPlayerPosition(cid), "Upgrade!", 210)
    elseif getPlayerItemCount(cid, upgmaterial) < 3 then
        doPlayerSendCancel(cid, "You must have 3 of the same item to upgrade it to the next item!")
        end
        end
return true
end
Hope it helps
 
Last edited:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local upgmaterial = 2487
local upgresult = 2466
    if itemEx.itemid == upgmaterial then
    if getPlayerItemCount(cid, upgmaterial) > 1 then
        doTransformItem(itemEx.uid, upgresult)
        doPlayerRemoveItem(cid, upgmaterial, 2)
        doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
        doSendAnimatedText(getPlayerPosition(cid), "Upgrade!", 210)
    elseif getPlayerItemCount(cid, upgmaterial) < 3 then
        doPlayerSendCancel(cid, "You must have 3 of the same item to upgrade it to the next item!")
        end
        end
return true
end
Hope it helps
Thanks! ill make sure to test it out.
 
Back
Top