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

If premium ends and position between X1,X2 and Y1,Y2 -> Tp to the temple

Ancore

New Member
Joined
Jul 6, 2012
Messages
216
Reaction score
1
Hello, I am looking for a script that contains the following function:

When someone is premium, his premium ends and he was in a position between X1-X2 and Y1-Y2 (like in the image) he gets teleported to the temple, otherwise, if his premium ends but he was not between that positions, he logins on the same position.

w9Er0X.png


Here is the end premium and get teleports to the temple script, without the condition of the position:
´
Code:
if getPlayerPremiumDays(cid) < 1 then
    doTeleportThing(cid,getPlayerMasterPos(cid))
    doPlayerSendTextMessage(cid,MESSAGE_FIRST,'You got teleported to temple, as your premium has expired.')
    doSendMagicEffect(getThingPos(cid),CONST_ME_TELEPORT)
end

Thanks,
Ancore.
 
Code:
local fromPosition = {x = 32000, y = 31600, z = 0} -- north west corner (remember using z= 0 coz players might be on a higher floor)
local toPosition = {x = 32600, y = 32700, z = 15} -- south east corner (remember using z= 15 coz players might be on a lower floor)
if getPlayerPremiumDays(cid) < 1 and isInRange(getThingPosition(cid), fromPosition, toPosition) then
    doTeleportThing(cid,getPlayerMasterPos(cid))
    doPlayerSendTextMessage(cid,MESSAGE_FIRST,'You got teleported to temple, as your premium has expired.')
    doSendMagicEffect(getThingPos(cid),CONST_ME_TELEPORT)
end
 
Back
Top