Jordan_August
New Member
- Joined
- Jul 24, 2012
- Messages
- 122
- Reaction score
- 4
Okay. Well, i am currently having an issue that i don't know why it exists. im using a script that i use an item on a piece of equipment to make 1 upgraded armor. For example: 3 crown armors in a backpack make a golden armor. Now for some reason this script only works with certain eq ids... and i just wanna know why. why crown armor and golden armor work but 3 pirates hats don't combine. i have no idea what allows the crown armor to work and a pirate hat cant turn into a crown helmet. this is an issue with most eq pieces. Thanks in advance for any help regarding this situation.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local upgmaterial = 2488
local upgresult = 7891
if itemEx.itemid == upgmaterial then
if getPlayerItemCount(cid, upgmaterial) == 3 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
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You must have 3 of the same item to upgrade it to the next item!")
end
end
return true
end