• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua -=[TFS]=- 0.4 8.60 teleports the player only in the protect zone to the temple

samuel157

Intermediate OT User
Joined
Mar 19, 2010
Messages
616
Solutions
4
Reaction score
122
Location
São Paulo, Brazil
GitHub
Samuel10M
LUA:
function onSay(cid, words, param)

local pos = {x=154, y=51, z=7}
 
 if getCreatureCondition(cid, CONDITION_INFIGHT) then
  doPlayerSendCancel(cid, "Voce nao pode fazer isso em luta")

 else
 
         doSendMagicEffect(getPlayerPosition(cid),53)
         doPlayerSendCancel(cid,"Parabens Voce foi teleportado Com Sucesso")
         doTeleportThing(cid,pos)
end

return true
end
 
replace
LUA:
if getCreatureCondition(cid, CONDITION_INFIGHT) then

with
LUA:
if getTilePzInfo(getPlayerPosition(cid)) == false then

Also, if you use Visual studio code please do ctrl shift + P and write "Reindent lines", makes it look much more readable.
If you don't use visual studio code, download it.
 
Back
Top