• 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+ I need help with Lua script

Projectz

New Member
Joined
Dec 10, 2018
Messages
1
Reaction score
0
Hello, i need help with this part of my script, how can i add one more TILESTATE with the current TILESTATE there?
I need this (TILESTATE_PROTECTIONZONE) together with (TILESTATE_NOPVPZONE)

my script part
Lua:
if not tile:hasFlag(TILESTATE_NOPVPZONE) then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "Welcome")


I've tryied
Lua:
if not tile:hasFlag(TILESTATE_NOPVPZONE) and (TILESTATE_PROTECTIONZONE) then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "Welcome")

and

Lua:
if not tile:hasFlag(TILESTATE_NOPVPZONE) or (TILESTATE_PROTECTIONZONE) then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "Welcome")
But no results
 
Hello, i need help with this part of my script, how can i add one more TILESTATE with the current TILESTATE there?
I need this (TILESTATE_PROTECTIONZONE) together with (TILESTATE_NOPVPZONE)

my script part
Lua:
if not tile:hasFlag(TILESTATE_NOPVPZONE) then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "Welcome")


I've tryied
Lua:
if not tile:hasFlag(TILESTATE_NOPVPZONE) and (TILESTATE_PROTECTIONZONE) then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "Welcome")

and

Lua:
if not tile:hasFlag(TILESTATE_NOPVPZONE) or (TILESTATE_PROTECTIONZONE) then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "Welcome")
But no results
Code:
local tilex, tiley = Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE), Tile(player:getPosition()):hasFlag(TILESTATE_NOPVPZONE)
    if tilex or tiley then
        player:getPosition():sendMagicEffect(CONST_ME_POFF)
    else
        player:sendTextMessage(MESSAGE_STATUS_SMALL, "Welcome.")
    end
 
Last edited:
Back
Top