• 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.X] ONLY PLAYERS WITH GUILD WAR SKULL CAN ENTER ON TELEPORT

warmenopen

New Member
Joined
Feb 16, 2017
Messages
7
Reaction score
0
can anyone help me with this ? i need a script to do a custom war system, only players with this war skull have permission to enter on teleport

IEtPV93.png
 
well, i have this script

Lua:
local templePosition = Position(1283, 727, 6)

function onStepIn(player, item, position, fromPosition)
    if not player then
        return true
    end
    local guild = player:getGuild()
    if not player:getGuild() or player:getLevel() <= 150 then
        player:teleportTo(templePosition, false)
        player:popupFYI("[CoH] Voce nao possui uma guild ou não possui level 150+.")
        return
    end
    return true
end
that working fully fully, so its only get player guild, not if is in war :(
 
source editing works fine, my script doesn't have errors now

Lua:
local templePosition = Position(159, 51, 7)

function onStepIn(player, item, position, fromPosition)
    if not player then
        return true
    end
    local emblem = player:getEmblem()
    if not player:getEmblem() or player:getLevel() <= 150 then
        player:teleportTo(templePosition, false)
        player:popupFYI("[CoH] Voce nao possui uma guild ou não possui level 150+.")
        return
    end
    return true
end

but how i declare GUILDEMBLEM_ALLY ??
 
but how i declare GUILDEMBLEM_ALLY ??
Here's the different emblems..
Lua:
GUILDEMBLEM_NONE
GUILDEMBLEM_ALLY
GUILDEMBLEM_ENEMY
GUILDEMBLEM_NEUTRAL
GUILDEMBLEM_MEMBER
GUILDEMBLEM_OTHER
So, I'd assume you check it like this.
Lua:
local emblem = player:getEmblem()

if emblem == GUILDEMBLEM_ALLY then
-- or
if emblem == 1 then
 
Back
Top