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

[Solved]Mark and Recall LUA script.

Bintzer

One Love
Joined
Dec 19, 2007
Messages
1,763
Reaction score
30
Location
Orlando
If anyone has played Elder Scrolls 3 you should know what I'm talking about. I want a script that when you say !mark it will save your position to a storage value maybe using like 3 different storage values, then when you say !recall it will teleport you back to the position you "marked". This doesn't seem to hard but I wouldn't know where to start. TIA
 
Last edited by a moderator:
Here you are :D

PHP:
function onSay(cid, words, param)
local a = getPlayerStorageValue(cid, 6441)
local b = getPlayerStorageValue(cid, 6442)
local c = getPlayerStorageValue(cid, 6443)
local position = getPlayerPosition(cid)
	if param == "call" then
		setPlayerStorageValue(cid, 6441, position.x)
		setPlayerStorageValue(cid, 6442, position.y)
		setPlayerStorageValue(cid, 6443, position.z)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "New call succesfuly marked.")
		doSendMagicEffect(position, 4)
	elseif param == "recall" then
	recall = {x = a, y = b, z = c}
		doTeleportThing(cid, recall)
		doSendMagicEffect(position, 10)
		doSendMagicEffect(recall, 10)
	end
	return TRUE
end
 
Here you are :D

PHP:
function onSay(cid, words, param)
local a = getPlayerStorageValue(cid, 6441)
local b = getPlayerStorageValue(cid, 6442)
local c = getPlayerStorageValue(cid, 6443)
local position = getPlayerPosition(cid)
	if param == "call" then
		setPlayerStorageValue(cid, 6441, position.x)
		setPlayerStorageValue(cid, 6442, position.y)
		setPlayerStorageValue(cid, 6443, position.z)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "New call succesfuly marked.")
		doSendMagicEffect(position, 4)
	elseif param == "recall" then
	recall = {x = a, y = b, z = c}
		doTeleportThing(cid, recall)
		doSendMagicEffect(position, 10)
		doSendMagicEffect(recall, 10)
	end
	return TRUE
end


Where is the PHP File? In the compiler or in the Server?
 
He just put the lua script in PHP tags. It's comfortable to do in forums as the code is presented more nicely. It's not a PHP code, it's lua. You have to create a .lua file with this code in the respective folder of your OTServ distro.
 
Back
Top