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.
View attachment 21751View attachment 21752View attachment 21753View attachment 21754View attachment 21755
If this is what you're after I'll share some files with you.
Cheers,
Yodot.
<movevent event="StepOut" uniqueid="1000" script="tutorial01.lua"/>
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
<movevent event="StepOut" uniqueid="1001" script="tutorial02.lua"/>
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
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".
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.
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".