Can someone help me to create a script.
When you put a certain item in a certain position and you pull a lever, it WILL change its Description and add uniqueid to the item.
For example i put a magic plate armor (It only works with this item) in the basin and i pull the lever, now the magic plate armor has an item description "INSERT DESCRIPTION HERE" and an uniqueid "6690"
Im using TFS 0.3.6
THANKS
I have tried to create it, but im stuck in the "doItemSetAttribute" here is what i have done
I have tried with:
When you put a certain item in a certain position and you pull a lever, it WILL change its Description and add uniqueid to the item.
For example i put a magic plate armor (It only works with this item) in the basin and i pull the lever, now the magic plate armor has an item description "INSERT DESCRIPTION HERE" and an uniqueid "6690"
Im using TFS 0.3.6
THANKS
I have tried to create it, but im stuck in the "doItemSetAttribute" here is what i have done
Code:
local config = {
material = 7410
}
local craftTable = {
{2472, 1},
{2494, 1}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = {x = 999, y = 943, z = 7}
local rnd = craftTable[math.random(1,#craftTable)]
if getTileItemById(pos, config.material).uid > 0 then
if doRemoveItem(getTileItemById(pos,config.material).uid, 1) then
if item.itemid == 9825 then
doTransformItem(item.uid, 9826)
elseif item.itemid == 9826 then
doTransformItem(item.uid, 9825)
end
doPlayerAddItem(cid, rnd[1], rnd[2])
doItemSetAttribute(item.uid 'uid', 9996)
return true
end
end
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ORANGE,"Wrong item on table.")
return true
end
I have tried with:
Code:
doItemSetAttribute(item, 'uid', 9996)
Code:
doItemSetAttribute(item.uid 'uid', 9996)
Last edited: