• 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 Tfs 1.5 Updated slot sytem

dewral

Veteran OT User
Joined
Dec 4, 2019
Messages
345
Solutions
10
Reaction score
363
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
 
Back
Top