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

Custom rook tutorial?

Muzzy

New Member
Joined
Jul 8, 2008
Messages
125
Reaction score
1
Hello again!

Is this easily done? Like the tutorial on RL Tibia, except much shorter since most people already know how to play, I just want to give them some pointers.

Thanks in advance,
~Muzzy
 
Hi Muzzy,

I'm using something like this on my OT. A quick tutorial with the visual aids. Check it out if you like (the link to the OT is in my sig). Screenshots below.

tut1.jpgtut2.jpgtut3.jpgtut4.jpgtut5.jpg

If this is what you're after I'll share some files with you.

Cheers,
Yodot.
 
Before I post any files I'll just document here what's happening in the screenshots above.

First Image (tut1.jpg):
/data/movements/movements.xml
Code:
     <movevent event="StepOut" uniqueid="1000" script="tutorial01.lua"/>

The tile that the player starts on has the unique id 1000.

/data/movements/scripts/tutorial01.lua
Code:
function onStepOut(cid, item, position, fromPosition)
	queststatus = getPlayerStorageValue(cid,2008)                                                                                       -- Check if the player has already received tip.
	if queststatus == -1 then                                                                                                           -- Player hasn't received this tip.
		doSendMagicEffect({x = 999, y = 997, z = 7, stackpos = 1}, 56)                                                              -- Send magic effect (TUTORIALSQUARE, effect 56)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"Hold shift and click the sign with your left mouse button.")               -- Send message to player.
		setPlayerStorageValue(cid,2008,1)                                                                                           -- Set storage value to show player has received this tip.
	end
	return TRUE
end


Second Image (tut2.jpg):
/data/movements/movements.xml
Code:
     <movevent event="StepOut" uniqueid="1001" script="tutorial02.lua"/>

This script is called when the player walks off the tile between the two rocks before the stairs.

/data/movements/scripts/tutorial02.lua
Code:
function onStepOut(cid, item, position, fromPosition)
	queststatus = getPlayerStorageValue(cid,2001)                                                                                       -- Check if the player has already received tip.
	if queststatus == -1 then                                                                                                           -- Player hasn't received this tip.
		doSendMagicEffect({x = 1011, y = 991, z = 7, stackpos = 1}, 55)                                                             -- Send magic effect (TUTORIALARROW, effect 55)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"Simply walk towards the stairs to use them.")                              -- Send message to player.
		setPlayerStorageValue(cid,2001,1)                                                                                           -- Set storage value to show player has received this tip.
	end
	return TRUE
end

Hopefully these examples will be all you'll need to get started on adding tutorials to your server. If you have any problems or questions then please let me know and I'll help you get sorted out.

- - - Updated - - -

Here's another command you might like for your tutorials/tips. This adds map markers to the players mini map.

Code:
     markerPos = {x=1077, y=1062, z=7}              -- The position where the marker is to indicate on the minimap.
     doAddMapMark(cid, MarkerPos, 19, "Map Mark")   -- Adds the Marker (type 19, in this case the green arrow pointing down, check your lib for the MAPMARKS codes) to the players (cid) minimap with the text "Map Mark".

Cheers,
Yodot.
 
Last edited:
Before I post any files I'll just document here what's happening in the screenshots above.

First Image (tut1.jpg):
/data/movements/movements.xml
Code:
     <movevent event="StepOut" uniqueid="1000" script="tutorial01.lua"/>

The tile that the player starts on has the unique id 1000.

/data/movements/scripts/tutorial01.lua
Code:
function onStepOut(cid, item, position, fromPosition)
	queststatus = getPlayerStorageValue(cid,2008)                                                                                       -- Check if the player has already received tip.
	if queststatus == -1 then                                                                                                           -- Player hasn't received this tip.
		doSendMagicEffect({x = 999, y = 997, z = 7, stackpos = 1}, 56)                                                              -- Send magic effect (TUTORIALSQUARE, effect 56)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"Hold shift and click the sign with your left mouse button.")               -- Send message to player.
		setPlayerStorageValue(cid,2008,1)                                                                                           -- Set storage value to show player has received this tip.
	end
	return TRUE
end


Second Image (tut2.jpg):
/data/movements/movements.xml
Code:
     <movevent event="StepOut" uniqueid="1001" script="tutorial02.lua"/>

This script is called when the player walks off the tile between the two rocks before the stairs.

/data/movements/scripts/tutorial02.lua
Code:
function onStepOut(cid, item, position, fromPosition)
	queststatus = getPlayerStorageValue(cid,2001)                                                                                       -- Check if the player has already received tip.
	if queststatus == -1 then                                                                                                           -- Player hasn't received this tip.
		doSendMagicEffect({x = 1011, y = 991, z = 7, stackpos = 1}, 55)                                                             -- Send magic effect (TUTORIALARROW, effect 55)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"Simply walk towards the stairs to use them.")                              -- Send message to player.
		setPlayerStorageValue(cid,2001,1)                                                                                           -- Set storage value to show player has received this tip.
	end
	return TRUE
end

Hopefully these examples will be all you'll need to get started on adding tutorials to your server. If you have any problems or questions then please let me know and I'll help you get sorted out.

- - - Updated - - -

Here's another command you might like for your tutorials/tips. This adds map markers to the players mini map.

Code:
     markerPos = {x=1077, y=1062, z=7}              -- The position where the marker is to indicate on the minimap.
     doAddMapMark(cid, MarkerPos, 19, "Map Mark")   -- Adds the Marker (type 19, in this case the green arrow pointing down, check your lib for the MAPMARKS codes) to the players (cid) minimap with the text "Map Mark".

Cheers,
Yodot.

Oh god, I love you. It works just the way I hoped it would!

I have two questions though, first where do I add this?
Code:
     markerPos = {x=1077, y=1062, z=7}              -- The position where the marker is to indicate on the minimap.
     doAddMapMark(cid, MarkerPos, 19, "Map Mark")   -- Adds the Marker (type 19, in this case the green arrow pointing down, check your lib for the MAPMARKS codes) to the players (cid) minimap with the text "Map Mark".

Second, is it possible to make another message appear; not by walking on a square, but by killing a monster(rat), or when I reach a certain level or maybe even when I get low on hp?

Thanks again! This is awesome. :D
 
Last edited:
Back
Top