• 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+ tfs 1.3 set skull war

roriscrave

Advanced OT User
Joined
Dec 7, 2011
Messages
1,210
Solutions
35
Reaction score
206
Is possible to set player skull/shield war?
if player have guild and login, set this shield war?
1566587677244.png
 
Solution
Working on code right now to get/set guild emblems. I originally had made this for monsters but I never expanded it to include other creatures as well.

Usage: creature:getEmblem(), creature:setEmblem(emblem)
Valid emblems:
Code:
GUILDEMBLEM_NONE
GUILDEMBLEM_ALLY
GUILDEMBLEM_ENEMY
GUILDEMBLEM_NEUTRAL
GUILDEMBLEM_MEMBER
GUILDEMBLEM_OTHER
He should send war invitation first and the other guild accepts his war invitation so both gets the shields/skulls.
Yes, I know that.
But I want to know if there is any function to add this skull / shield.. without needing the guild to be invoked for war
 
Unfortunately guild emblems aren't "set" by function, inside player.cpp you can see that type of guild emblem which is returned bases on current
relationship between player and its spectator

C++:
GuildEmblems_t Player::getGuildEmblem(const Player* player) const
{
    if (!player) {
        return GUILDEMBLEM_NONE;
    }

    const Guild* playerGuild = player->getGuild();
    if (!playerGuild) {
        return GUILDEMBLEM_NONE;
    }

    if (player->getGuildWarVector().empty()) {
        if (guild == playerGuild) {
            return GUILDEMBLEM_MEMBER;
        } else {
            return GUILDEMBLEM_OTHER;
        }
    } else if (guild == playerGuild) {
        return GUILDEMBLEM_ALLY;
    } else if (isInWar(player)) {
        return GUILDEMBLEM_ENEMY;
    }

    return GUILDEMBLEM_NEUTRAL;
}

If you want to "set" guild emblem type, you need to replace this function with another which will apply other rules for choosing which emblem will be returned.
 
Working on code right now to get/set guild emblems. I originally had made this for monsters but I never expanded it to include other creatures as well.

Usage: creature:getEmblem(), creature:setEmblem(emblem)
Valid emblems:
Code:
GUILDEMBLEM_NONE
GUILDEMBLEM_ALLY
GUILDEMBLEM_ENEMY
GUILDEMBLEM_NEUTRAL
GUILDEMBLEM_MEMBER
GUILDEMBLEM_OTHER
 
Solution
Back
Top