• 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!

TFS 1.X+ simple guild title otcv8 module problem

ForgottenNot

Member
Joined
Feb 10, 2023
Messages
221
Reaction score
23
hi im having problem with this Simple Guild Title Module [OTCV8] [TFS 1.4.2] (https://otland.net/threads/simple-guild-title-module-otcv8-tfs-1-4-2.288941/)

what i have done or how thins are configured
global.lua
Lua:
math.randomseed(os.time())
dofile('data/lib/lib.lua')
dofile('data/lib/core/json.lua')
guildtitle revscript
Code:
local LoginEvent = CreatureEvent("guildTitle_Login")
function LoginEvent.onLogin(player)
    player:registerEvent("guildTitle")
    return true
end
LoginEvent:register()
local OPCODE_GUILDTITLE = 134

local guildTitle = CreatureEvent("guildTitle")
guildTitle:type("extendedopcode")
function guildTitle.onExtendedOpcode(player, opcode, buffer)
    if opcode and opcode == OPCODE_GUILDTITLE then
        local json_status, json_data =
        pcall(
            function()
                return json.decode(buffer)
            end
        )
        local creatureID = json_data.creature
        local creature = Creature(creatureID)
        if creature and creature:isPlayer() then
            local guild = creature:getGuild()
            if guild ~= nil then
                local data = {
                    response = "setGuildNick",
                    creatureId = creatureID,
                    name = creature:getName(),
                    guildNick = creature:getGuildNick(),
                    guildName = guild:getName(),
                }
                player:sendExtendedOpcode(OPCODE_GUILDTITLE,json.encode(data))
            end
        end
    end
end
guildTitle:register()
in lib/core/json.lua
data/lib/core/core.lua
Code:
dofile('data/lib/core/json.lua')

i placed the game_guildTile folder inside modules nothing appears i do have a guild its on gm character

Code:
16:50 You see yourself. You are god. You are the Leader of the Paster, which has 1 member, 1 of them online.
Health: 1095 / 1095, Mana: 1095 / 1095.
Position: 31741, 32399, 7
IP: xxx.xxx.xx.xx PING: 0 FPS: 0.
what do i missing
in game features i do have enable extendedopcode i have shop working
1718484822949.png
 
Back
Top