• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction Write code/password - get teleported

Eazy M

Developer
Joined
Oct 17, 2010
Messages
911
Reaction score
61
Location
.
Write !code ~~~~ to get teleported to another position (you must stay on a special position). Change in the script. :)

LUA:
function onSay(cid, words, param)

local oldPos = {x=680,y=267,z=5} -- you must stay here, write the right code, get teleported
local newPos = {x=685,y=267,z=5} -- to position
local player = getPlayerPosition(cid)

	if(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The code is incorrect, please try again.")
		return true
	end
	
	if(param == 'CODE HERE') then
		if(player.x == oldPos.x and player.y == oldPos.y and player.z == oldPos.z) then
			doSendMagicEffect(oldPos, 10)
			doTeleportThing(cid,newPos)
			doSendMagicEffect(newPos, 10)
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The code is correct! Good job.")
		else
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are not on the right position.")
			return true
			end
		else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The code is incorrect, please try again.")	
		return true
	end
	return true
end

Script made by me.

Rep++ please if you like it / using it! :)

Please, don't post your own version here. Respect!

No hatin' please ;s
 
Last edited:
What's the point of the script? What will it be used for rather than abusing your own character or another GM's character?
 
Good Work :)

Also, maybe use lua tags instead of code tags.

LUA:
[-/lua]
 
I like it, i can prolly find a use for it in a figure out the code then you can finish the quest in a RPG quest thanks rep++
 
Btw, the code don't shows in default channel?
 
wouldnt
LUA:
if param == 'secret code' then
if player == oldPos then
doTeleportThing(cid,newpos)

also work?
 
Back
Top