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

Advenced Waypoints [TFS0.3Beta2]

Marcinek123

Badboy
Joined
Jan 21, 2008
Messages
49
Reaction score
0
Location
Poland
so...
in moveevents.xml paste:
Code:
        <movevent event="StepIn" itemid="9566" script="waypoints.lua"/>
in talkactions.xml paste:
Code:
	<talkaction words="!waypoints" script="Wplist.lua"/>
	<talkaction words="!wp" script="Waypoints.lua"/>
create waypoints.lua in moveevents/scripts
and paste:
Code:
-- Created by Czaruś (marcinek123

function onStepIn(cid, position)
	local storagea = 3331
	local storageb = 3332
	local storagec = 3333
	local tmp = getPlayerPosition(cid)	
	
	if getPlayerStorageValue(cid, storagea) == -1 and (tmp.x == 207 and tmp.y == 373 and tmp.z == 7) then
	      setPlayerStorageValue(cid, storagea, 1)
	doSendMagicEffect(getPlayerPosition(cid), 14)
	
	elseif getPlayerStorageValue(cid, storageb) == -1 and (tmp.x == 537 and tmp.y == 545 and tmp.z == 7) then
			setPlayerStorageValue(cid, storageb, 1)
			doSendMagicEffect(getPlayerPosition(cid), 14)
	
	elseif getPlayerStorageValue(cid, storagec) == -1 and (tmp.x == 444 and tmp.y == 429 and tmp.z == 7) then
			setPlayerStorageValue(cid, storagec, 1)
			doSendMagicEffect(getPlayerPosition(cid), 14)

	else 
			doSendMagicEffect(getPlayerPosition(cid), 12)
		end			
	return FALSE
end
and create waypoints.lua in talkactions/scripts
and paste:
Code:
--Create by chojrak
--Edit by Czaruś (marcinek123)

function onSay(cid, words, param)
	local a = {x = 207, y = 373, z = 7}
	local b = {x = 537, y = 545, z = 7}
	local c = {x = 444, y = 429, z = 7}
	local storagea = 3331
	local storageb = 3332
	local storagec = 3333
	local tmp = getPlayerPosition(cid)
	if (tmp.x == 207 and tmp.y == 373 and tmp.z == 7) or (tmp.x == 537 and tmp.y == 545 and tmp.z == 7) or (tmp.x == 444 and tmp.y == 429 and tmp.z == 7) then 
	
	if (param == 'a') and  getPlayerStorageValue(cid, storagea) == 1 then
			doTeleportThing(cid, a, TRUE)
			doSendAnimatedText(getPlayerPosition(cid),'zZzZzZ', TEXTCOLOR_BLUE)
			doSendMagicEffect(tmp, 31)
			doSendMagicEffect(getPlayerPosition(cid), 48)
			
	elseif (param == 'dark camp') and getPlayerStorageValue(cid, storageb) == 1 then
			doTeleportThing(cid, b, TRUE)
			doSendAnimatedText(getPlayerPosition(cid),'zZzZzZ', TEXTCOLOR_BLUE)
			doSendMagicEffect(tmp, 31)
			doSendMagicEffect(getPlayerPosition(cid), 48)
			
	elseif (param == 'c') and getPlayerStorageValue(cid, storagec) == 1 then
			doTeleportThing(cid, c, TRUE)
			doSendAnimatedText(getPlayerPosition(cid),'zZzZzZ', TEXTCOLOR_BLUE)
			doSendMagicEffect(tmp, 31)
			doSendMagicEffect(getPlayerPosition(cid), 48)
	else 	
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You must at first activate this portal.")
			doSendMagicEffect(getPlayerPosition(cid), 2)
	
		end
	else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can't teleport from here.")
			doSendMagicEffect(getPlayerPosition(cid), 2)
	end
		return TRUE
end
and create wplist.lua in talkactions/scripts
and paste:
Code:
--Create by Czaruś (marcinek123)
--Edit by Marcinek paladynek
function onSay(cid, item, words)
	local storages = {
		storagea = 3331,
		storageb = 3332,
		storagec = 3333
	}
	local text = ""
	local status1 = ""
	local status2 = ""
	local status3 = ""
	local tmp = getPlayerPosition(cid)
	if (tmp.x == 207 and tmp.y == 373 and tmp.z == 7) or (tmp.x == 537 and tmp.y == 545 and tmp.z == 7) or (tmp.x == 444 and tmp.y == 429 and tmp.z == 7) then 
	if getPlayerStorageValue(cid, storages.storagea) == 1 then
		status1 = "[ACTIVE]"	
	else
		status1 = "[NOT ACTIVE]"
	end
	
	if getPlayerStorageValue(cid, storages.storageb) == 1 then
		status2 = "[ACTIVE]"	
	else
		status2 = "[NOT ACTIVE]"
	end
	
	if getPlayerStorageValue(cid, storages.storagec) == 1 then
		status3 = "[ACTIVE]"
	else
		status3 = "[NOT ACTIVE]"
	end
	text = "a - "..status1.."\nb - "..status2.."\nc - "..status3..""
	doShowTextDialog(cid, 9967, text)
	else 
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You must at first stand in any portal to see your activations.")
	end

	return TRUE
end

If you stand in teleport you active it.

Say !waypoints to see your waypoints.

To teleport say "!wp name"
(a , b , c is a name teleports ;)

HAVE FUN :)
 
Waypoints are a mark, like when you walk and you put a flag :D
Is a POINT and the script save a point and then you can use it for teleport :)
 
Back
Top