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

Lua Laver Quest (Who can make ?)

Zool

Banned User
Joined
Jun 9, 2009
Messages
742
Reaction score
5
Location
Poland/St Wola
I make new quest on Ots and i need this script :



Need 4 players :
Posidions :

1088 1004 8 -- 1090 1004 8
1088 1006 8 -- 1090 1006 8

When Players put items (on screen u see were put and what items put)

Push Laver and they teleportet to posidion :
1)1149 1079 10
2)1050 1079 10
3)1049 1080 10
4)1050 1080 10

Make it Pls :)
 
I make new quest on Ots and i need this script :



Need 4 players :
Posidions :

1088 1004 8 -- 1090 1004 8
1088 1006 8 -- 1090 1006 8

When Players put items (on screen u see were put and what items put)

Push Laver and they teleportet to posidion :
1)1149 1079 10
2)1050 1079 10
3)1049 1080 10
4)1050 1080 10

Make it Pls :)

Lets make a game out of this, we each make a part of the script untill its done! xD!

I Start

Lua:
local config = {
		level = 100, -- Level needed for this quest
		tileactionID1 = 8300, -- First Tile
		tileactionID2 = 8302, -- Second Tile
		tileactionID3 = 8303, -- Third Tile
		tileactionID4 = 8304, -- Fourth tile
	}
		
		function onUse(cid, item, fromPosition, itemEx, toPosition) 
    local positions = { 
        {x=50, y=100, z=100},  --Tile1 Pos
        {x=50, y=100, z=100},  --Tile2 Pos
        {x=50, y=100, z=100},  --tile3 Pos
        {x=50, y=100, z=100}   --tile4 Pos

Brb, going to get a coke!, somebody continue on my work!
 
Code:
local config = {
	-- level needed to make the quest
	level = 20,
	-- if players should be able to do the quest unlimited amount of times (not conflicting quest rewards)
	redo = {
		status = true, -- true = unlimited, false = once
		storageValue = 4535 -- only if status is false this will be used
	},
	-- vocation requirement, positions and item configuration
	{
		vocations = {1, 5}, -- sorc
		itemId = 2175,
		playerPos = {x=32677, y=32089, z=8},
		newPos = {x=32671, y=32069, z=8},
		itemPos = {x=32679, y=32089, z=8}
	},
	{
		vocations = {2, 6}, -- druid
		itemId = 2674,
		playerPos = {x=32669, y=32089, z=8},
		newPos = {x=32672, y=32069, z=8},
		itemPos = {x=32667, y=32089, z=8}
	},
	{
		vocations = {3, 7}, -- paladin
		itemId = 2455,
		playerPos = {x=32673, y=32085, z=8},
		newPos = {x=32671, y=32070, z=8},
		itemPos = {x=32673, y=32083, z=8}
	},
	{
		vocations = {4, 8}, -- knight
		itemId = 2376,
		playerPos = {x=32673, y=32093, z=8},
		newPos = {x=32672, y=32070, z=8},
		itemPos = {x=32673, y=32094, z=8}
	}
}
function onUse(cid)
	local players = {}
	for _, v in ipairs(config) do
		local player = getTopCreature(v.playerPos).uid
		if isPlayer(player) == FALSE then
			return doPlayerSendCancel(cid, "There are not enough players.")
		elseif getPlayerLevel(player) < config.level then
			players.level = true
		elseif isInArray(v.vocations, getPlayerVocation(player)) == FALSE then
			players.vocation = true
		elseif config.redo.status and getPlayerStorageValue(cid, config.redo.storageValue) ~= TRUE then
			players.done = true
		else
			if getTileItemById(v.itemPos, v.itemId) < 1 then
				players.item = true
			else
				table.insert(players, player)
			end
		end
	end
	if players.level then
		doPlayerSendCancel(cid, "All players need to be level " .. config.level .. " or above.")
	elseif players.vocation then
		doPlayerSendCancel(cid, "All players must stand on the correct tiles.")
	elseif players.done then
		doPlayerSendCancel(cid, "A player in your team has already done this quest.")
	elseif players.item then
		doPlayerSendCancel(cid, "All items must be on the correct positions.")
	else
		for k, player in ipairs(players) do
			doSendMagicEffect(getCreaturePosition(player), CONST_ME_POFF)
			doTeleportThing(player, config[k].newPos)
			doSendMagicEffect(getCreaturePosition(player), CONST_ME_TELEPORT)
		end
	end
	return TRUE
end
 
Back
Top