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

Quest - help me

szajker123

New Member
Joined
May 12, 2012
Messages
195
Reaction score
0
PLEASE HELP ME
I need a script such that after the quest will be able to go into the teleporter!
| REP + + + + |^_^ ( tibia 8.54 )
 
Last edited:
Witch kind of quest is it?

If it is with NPC quest then add this in movements:

.../data/movements/movements.xml:
XML:
	<movevent type="StepIn" actionid="9555" event="script" value="dquest.lua"/>

.../data/movements/scripts/dquest.lua:
LUA:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	local qStatus = 100 -- The Quest Storage
	local qName = "Demon Sword Quest"
	if(isPlayer(cid)) then
		if(getPlayerStorageValue(cid, qStatus) > 0) then
			-- The player will be teleported to the choosen directory in RME-mapeditor
			return true
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "You haven't done the ".. qName ..".")
		end
	end
	return true
end
 
explain to me what the these options?
and how the script works
local qStatus = 100 - The Quest Storage
local qname = "Demon Sword Quest"
 
learn the basics. And take in count that function and variable names in most cases explain what are those. And if you still don't know check in lib and luascript.cpp what it does. And you know. When some line contains comnent telling you exactly what it is you shouldn't ask what it is...
 
Back
Top