Belfahar
New Member
- Joined
- Jul 21, 2016
- Messages
- 25
- Reaction score
- 3
Hey guys!
Now i'm trying to create a very simple system. The player uses the hammer (37171) on the demon shield and it receives some attributes. However, it doesn't work.
The player receives the success message, but nothing happens. Not even an error is indicated on the client.
Now i'm trying to create a very simple system. The player uses the hammer (37171) on the demon shield and it receives some attributes. However, it doesn't work.
Lua:
local ForgeCreation = Action()
function ForgeCreation.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if target.itemid == 3420 then
item:setAttribute(DEFENSE, 88)
item:setAttribute(DESCRIPTION, "Defense Upgrade")
item:setAttribute(TIER, 3)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Upgrade sucess.')
return true
end
end
ForgeCreation:id(37171)
ForgeCreation:register()
The player receives the success message, but nothing happens. Not even an error is indicated on the client.