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

No Rune on Position (x,y,z) - MW, Fire, pox,energy

Engradiel

Member
Joined
May 3, 2009
Messages
175
Solutions
1
Reaction score
20
Location
Brazil
I remenber that I have used on tfs 0.4 this code:

On data/spells/runes.lua

local fromPosition = {x = 32382, y = 31872, z = 7} -- top left cornor of the playground
local toPosition = {x = 32416, y = 31908, z = 7} -- bottom right cornor of the playground

if isInArea(getThingPosition(cid), fromPosition, toPosition) then
return false, doPlayerSendCancel(cid, "You're not allowed to use any rune of trap here.")
end

But I need some help to convert to tfs 1.0...

Can someone help me?
 
Code:
if isInRange(creature:getPosition(), fromPosition, toPosition) then
     creature:sendCancelMessage("You're not allowed to use any rune of trap here.")
     return false
end
 
Back
Top