Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
780 B
2
Indexable
Never
function onStepIn(creature, item, position, fromPosition)
	local player = creature:getPlayer()
	if not player then
		return true
	end

	if(player:getStorageValue(200) == 5) then
		--Questlog, The New Frontier Quest "Mission 2: In Search of Survival"
		player:setStorageValue(200, 10)
		player:setStorageValue(12115, 4) -- The Inquisition Questlog- "Mission 2: In Search of Survival"
		player:say("You have found the passage through the mountains and can report about your success.", TALKTYPE_MONSTER_SAY)
	else
		player:teleportTo(fromPosition)
		position:sendMagicEffect(CONST_ME_TELEPORT)
		fromPosition:sendMagicEffect(CONST_ME_TELEPORT)
		player:setStorageValue(200, 7)
		player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You must be with the orc to enter.')
	end
	return true
end