Lua Tfs 1.5 Updated slot sytem

dewral

Intermediate OT User
Joined
Dec 4, 2019
Messages
211
Solutions
9
Reaction score
109
Hello guys!
Im trying to use CreatureEvent - [TFS 1.3] updated Slot System (https://otland.net/threads/tfs-1-3-updated-slot-system.267624/)
But having a little problem, there is no errors at all but this don't really work.
Did i register it wrong in events or what could be the issue here?

Lua:
function Player:onLook(thing, position, distance)
    local description = ""
        if thing:isItem() then
        local stats = thing:displayStats()
        if stats ~= "" then
            description = description .. "\n" .. stats
        end
    end
    if hasEventCallback(EVENT_CALLBACK_ONLOOK) then
        description = EventCallback(EVENT_CALLBACK_ONLOOK, self, thing, position, distance, description)
    end
    self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end

Lua:
function Player:onLookInTrade(partner, item, distance)
    local description = "You see " .. item:getDescription(distance)
    local stats = item:displayStats()
        if stats ~= "" then
            description = description .. "\n" .. stats
        end
    if hasEventCallback(EVENT_CALLBACK_ONLOOKINTRADE) then
        description = EventCallback(EVENT_CALLBACK_ONLOOKINTRADE, self, partner, item, distance, description)
    end
    self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end

Lua:
function Player:onItemMoved(item, count, fromPosition, toPosition, fromCylinder, toCylinder)
    self:stat_onItemMoved(item, fromPosition, toPosition)
    if hasEventCallback(EVENT_CALLBACK_ONITEMMOVED) then
        EventCallback(EVENT_CALLBACK_ONITEMMOVED, self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)
    end
end
 
Top