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

[Request] Portal

Krishna16

New Member
Joined
Mar 1, 2009
Messages
6
Reaction score
0
Is there a way to get a script to get rid of the need to teleport rooms by having 1 floor panels and a player comes and stands on one and says a monster name and is ported there? I think it would be cool...let me know :D
 
You can add a talkaction like:
/huntingplace Demons
You need to define an area where the talkaction can be used and you need to add every hunting place manually.
Also it only works if the players says exactly what you set in the script.
Example: You set 'demons' and player says 'demon' and it won't work.

PHP:
local area = {{x=1,y=1,z=1},{x=3,y=3,z=1}}
local teleport = {
	["demons"] = {x=DEMON_X,y=DEMON_Y,z=DEMON_Z}
}
function onSay(cid, words, param, channel)
	if isInRange(getPlayerPosition(cid), area[1], area[2])
		local s = teleport[param:lower]
		if not(s) then
			return doPlayerSendCancel(cid,"The huntingplace "..param.." doesn't exist.")
		end
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		doTeleportThing(cid,s)
		doSendMagicEffect(s, CONST_ME_TELEPORT)
	else
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
	end
	return true
end
 
Back
Top