• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

i need a talkaction

Angel Of Death

Rise Of Tibia ServerOwner
Joined
Mar 12, 2012
Messages
91
Reaction score
0
i need a talkaction that requests the right password before continuing with the script
 
LUA:
function onSay(cid, words, param, channel)
	if(param == "secretPaSsWoRd") then
		-- here code to execute when good password
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong password!")
	end

	return false
end
use:
!talkactionCommand secretPaSsWoRd
 
Last edited:
doesnt seem to work maby im doing it wrong

- - - Updated - - -

LUA:
function onSay(cid, words, param, channel)
	if(words == "RiseOfTibia") then
		doTeleportThing(cid,{x=1398, y=1525, z=12})
		doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"Test Hall.")
		doSendMagicEffect(getThingPos(cid),CONT_ME_TELEPORT)
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong password!")
		doSendMagicEffect(getThingPos(cid),CONT_ME_POFF)
	end
 
	return true
end
 
because you had multiple things spelled wrong..
LUA:
function onSay(cid, words, param, channel)
	if(param == "RiseOfTibia") then
		doTeleportThing(cid, {x = 1398, y = 1525, z = 12})
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Test Hall")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong password!")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	end
	return false
end
also type '/RiseOfTibia' exactly like that because it's case sensitive I think, also I made it so the words aren't said by the players so no one can see the password
 
Last edited:
My bad. It should be PARAM, not words :P
Words are words that execute talkaction, like '!online' etc. and it should return false to do not show password to all players.
Post updated.
 
Back
Top