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

Lua Message when entering teleport!

Majeski20

New Member
Joined
Apr 21, 2008
Messages
602
Reaction score
4
Location
Sweden
Hello Otland!

I need a script. When you enter a teleport and reach the destination a message should appear like
"Welcome back little soldier" like in Svargrond Arena. The text should be orange.

Thanks :)
Rep +
 
not sure if the movement script will be executed before you're teleported or after, but try this anyway
LUA:
function onStepIn( cid , item , pos , fromPos )
	if isPlayer( cid ) then
		pos = getThingPos( cid )
		if( first )then
			doSendMagicEffect( pos , CONST_ME_FIREWORK_BLUE )
			doCreatureSay( cid , 'Welcome back, little hero!' , TALKTYPE_ORANGE_1 )
		elseif( second ) then
			doSendMagicEffect( pos , CONST_ME_FIREWORK_YELLOW )
			doCreatureSay( cid , 'Congratulations, brave warrior!' , TALKTYPE_ORANGE_1 )
		else
			doSendMagicEffect( pos , CONST_ME_FIREWORK_RED )
			doCreatureSay( cid , 'Respect and honour to you, champion!' , TALKTYPE_ORANGE_1 )
		end
	end
end
 
<movevent type="StepIn" actionid="****" event="script">

function onStepIn(cid, pos)
if getPlayerPosition(cid, aftertelepos) then
doCreatureSay(cid, "Welcome back little soldier.", TALKTYPE_ORANGE_1, true, cid)
end
end
do something liek that guess you can fix the pos in the script self?
 
Last edited:
Back
Top