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

Action Premium Pass/Expired

Zonet

Web Developer
Joined
Sep 1, 2008
Messages
4,393
Reaction score
52
Location
Tibia VS RL-life, guess whos back?
DONT FORGET I DID A MISTAKE! YOU SHOULD ADD THIS TO MOVEMENTS!


Here's my simple script (my second script)

If you are using a city that only premium players can enter
You should use this script for the hunt entrance... if the player go on the tile he teleports to the position you want :)
I'm using this script atm on my server:)


Here it comes.

Go to data/movements/scripts, create a lua file
name it premium.lua
Now open the script and

Add:

LUA code:
PHP:
]function onStepIn(cid, item, position, fromPosition)
	if isPremium(cid) == TRUE then
		return TRUE
else
  doPlayerSendTextMessage(cid,21, "Your Premium is Expired!.")
pos = {x=19024, y=19201, z=6} 
		doMoveCreature(cid, fromPosition)


doTeleportThing(cid,pos) 
doSendMagicEffect(pos,37)
doSendMagicEffect(pos,27)

	end
end


LUA code:
PHP:
pos = {x=1000, y=1000, z=7}<--- if dont
 got prem they will be teleported to a place..


Now go to data/movements/movements.xml


Under:
PHP:
<movements>


Add:
XML code:
PHP:
  <movevent event="StepIn" uniqueid="8062" script="expired.lua" />

XML code:
PHP:
<movevent event="StepIn" uniqueid="8062" <--- this id is 
what you should add on the tile with mapeditor(
unique ID) You can change if you want.

That was it!

Credits:
To me (Zonet) Second script.
 
Last edited:
Why are you stoping event that didnt start anywhere?
Also, your tabbing is horrible o.o
TFS' doTeleportThing structure is different, you need to add either FALSE(0) or TRUE (1) after pos (cid, pos, 0).
Why sending two effects in the same place? I guess you will see only one of them.
 
Remove "stopEvent (Time1)", because this is unnecessary, there is no Events, so why stop them?
 
Not to complain, this is a good script. You should change it into a login script, if no premium when logged in, the player gets teleported to the xyz spot.
 
Back
Top