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

Lua doTransformItem problem.

tompan

Member
Joined
Dec 13, 2008
Messages
646
Reaction score
23
Location
Sweden
This scripts works propertly buy only with uid not with actionid how come ? so im not able to move the object. =S
Code:
local event = 0
function onUse(cid, item, frompos, item2, topos)

    if item.uid == 2357 and
    item.itemid == 2357 then
    doTransformItem(item.uid,item.itemid-234)
   event = addEvent (doTransformItem,2000,item.uid,item.itemid+0)

  else
          doPlayerSendCancel(cid,"Sorry, not possible.")
    end

    return 1
    end
 
What are you trying to do?
What do you mean by it doesn't work with actionid, you mean like this?
Code:
if item.actionid == 2357 and item.itemid == 2357 then
 
ahhh...
i got an item and when you use it i want it to transform into another item for in this script 2 seconds.
so it works with the first doTransformItem, but not on addevent to turn it back to its original item.

error code item not found.
Code:
local event = 0




function onUse(cid, item, frompos, item2, topos)

    if item.actionid == 2357 and
    item.itemid == 2357 then
    doTransformItem(item.uid,item.itemid-234)
   event = addEvent (doTransformItem,2000,item.uid,item.itemid+0)

  else
          doPlayerSendCancel(cid,"Sorry, not possible.")
    end
  
    return 1
    end
 
Code:
local event = 0




function onUse(cid, item, frompos, item2, topos)

    if item.actionid == 2357 and item.itemid == 2357 then
   doTransformItem(item.uid, item.itemid-234)
  addEvent(doTransformItem,2000,item.uid,item.itemid+234)
  else
          doPlayerSendCancel(cid,"Sorry, not possible.")
    end
    return true
    end
 
Last edited:
it doesnt work. it just have truble finding out wich item its suposed to transform again in the event. seems like its impossible :D

Code:
local event = 0


local cfg = {
item1 = 2123,
item2 = 2357,
}

function onUse(cid, item, frompos, item2, topos)

    if item.actionid == 2357 and item.itemid == 2357 then
    doTransformItem(item.uid,cfg.item1)
  event = addEvent (doTransformItem,2000,item.uid,cfg.item2)

  else
          doPlayerSendCancel(cid,"Sorry, not possible.")
    end

    return 1
    end

remade it so it should be easier to work with..
 
Back
Top