• 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 Add actionid and attribute set name on the same item on a corpse

nefinoo

Carnage.flv
Joined
Sep 11, 2010
Messages
554
Solutions
1
Reaction score
61
Location
Lo Mochis, Sinaloa
Lua:
corpse:addItem(index.itemList[rand][1], math.random(index.itemList[rand][2], index.itemList[rand][3])):setActionId(1212):setAttribute(ITEM_ATTRIBUTE_NAME, "Death Key")

corpse:addItem((index.itemList[rand][1], math.random(index.itemList[rand][2], index.itemList[rand][3])):setActionId(1212)):setAttribute(ITEM_ATTRIBUTE_NAME, "DEath key")

I try on this 2 ways and nothing work :(
 
Solution
Lua:
local item = Game.createItem(id, count)
if item then
    item:setActionId(actionId)
    item:setAttribute(ITEM_ATTRIBUTE_NAME, name)
    corpse:addItemEx(item)
end
Lua:
local item = Game.createItem(id, count)
if item then
    item:setActionId(actionId)
    item:setAttribute(ITEM_ATTRIBUTE_NAME, name)
    corpse:addItemEx(item)
end
 
Solution
Back
Top