• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Add actionid and attribute set name on the same item on a corpse

nefinoo

Carnage.flv
Joined
Sep 11, 2010
Messages
566
Solutions
1
Reaction score
65
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
F
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

Similar threads

Back
Top