Hi. Like in title. How to get uniqueID from target in TFS 1.2?
In functions i only found item:getUniqueId() but how to define ItemEx.Uid like in old tfs?
I was trying to make it in many ways but everytime nothing happend, no errors in console.
I set UID in map editor and make this:
In functions i only found item:getUniqueId() but how to define ItemEx.Uid like in old tfs?
I was trying to make it in many ways but everytime nothing happend, no errors in console.
I set UID in map editor and make this:
Code:
<action uniqueid="10699" script="special/chargelich.lua" />
Code:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local skull = item:getId()
local lavafountain = target:getUniqueId()
if (skull == 2320 and lavafountain == 10699) then
doSendMagicEffect(toPosition, 40)
doPlayerSendTextMessage(player,MESSAGE_EVENT_ADVANCE,"All the grief of this world has been condensed in the skull.")
doRemoveItem(item.uid, 1)
doPlayerAddItem(player,12596,1) -- new skull
else
doPlayerSendCancel(player, 'Sorry, not possible.')
doSendMagicEffect(toPosition, CONST_ME_POFF)
end
return true
end