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
guildtitle revscript
in lib/core/json.lua
data/lib/core/core.lua
i placed the game_guildTile folder inside modules nothing appears i do have a guild its on gm character
what do i missing
in game features i do have enable extendedopcode i have shop working
![1718484822949.png 1718484822949.png](https://static3.otland.net/d/attachments/77/77075-e65d086c1a9ea3216d12932ffab2b5c3.jpg)
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')
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()
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.
in game features i do have enable extendedopcode i have shop working
![1718484822949.png 1718484822949.png](https://static3.otland.net/d/attachments/77/77075-e65d086c1a9ea3216d12932ffab2b5c3.jpg)