• 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!

Lever Script

agomez

Member
Joined
Jan 28, 2009
Messages
211
Reaction score
5
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" :p
Im using TFS 0.3.6
THANKS ;)
348r7s3.jpg


I have tried to create it, but im stuck in the "doItemSetAttribute" here is what i have done :mad:

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:
Back
Top