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

Simple Guild Title Module [OTCV8] [TFS 1.4.2]

Klank

Althea ¤ A New World Developer
Joined
Feb 21, 2008
Messages
1,089
Reaction score
657
Location
Norway
Greetings,

A small Guild Title module, that someone might want. Modified module made by @dewral / @Avaji, here.

It can be configured from server to set Guild Name or Guild Nick, so you don’t need to update the client to change it.
Might be a easier way of doing this, but this is how i did it.

1715110591020.png1715110598608.png


How to install:

1. Copy paste module in /modules

2. Copy paste servercode “guildTitle” into your scripts folder.

3. Modify response to either “setGuildName” or “setGuildNick”:
Lua:
local data = {
   response = "SetGuildName", -- EDIT RESPONSE HERE
   creatureId = creatureID,
   name = creature:getName(),
   guildNick = creature:getGuildNick(),
   guildName = guild:getName(),
}

4. Gucci.
 

Attachments

And I had a good idea, to generate a different color between guilds... for example, the 'Draconic' of the guild that entered the game displayed in blue, okay? And another player from the same guild 'Draconic' entered, and the color that the first player entered with was still blue, working okay? Now, if another player is not in the same guild, a different color is generated... it's working perfectly. See the small and simple gif... anyone who wants to use it, feel free :)

guild cor.gif


otclient side.
look for this line.
Lua:
function updateTitle(creatureId, guildName)
to change this.

Lua:
local guildColors = {}

function updateTitle(creatureId, guildName)
    local target = g_map.getCreatureById(creatureId)
    if target then
        local color
        if guildColors[guildName] then
            color = guildColors[guildName]
        else
            local red = math.random(0, 255)
            local green = math.random(0, 255)
            local blue = math.random(0, 255)
            color = string.format("#%02X%02X%02X", red, green, blue)
            guildColors[guildName] = color
        end
        target:setTitle(guildName, titleFont, color)
    end
end
 
Love it! Gave me an idea for my small project, thanks!
 
Hey guys im not sure i did something wrong but i have this error in my terminal

ERROR: Unable to send extended opcode 134, extended opcodes are not enabled on this server.

I use TFS 1.5 nekiro downgrade
 
Hey guys im not sure i did something wrong but i have this error in my terminal

ERROR: Unable to send extended opcode 134, extended opcodes are not enabled on this server.

I use TFS 1.5 nekiro downgrade
You need to enable extended opcode on your client. game_features -> features.lua -> function updateFeature->
g_game.enableFeature(GameExtendedOpcode)
 
You need to enable extended opcode on your client. game_features -> features.lua -> function updateFeature->
g_game.enableFeature(GameExtendedOpcode)
Hmm did that I dont get any errors now but doesnt seems to work for 1.5, 7.72.
 
Back
Top Bottom