Ir para conteúdo
  • Cadastre-se

11.x [WIP] OTXServer 12.31 Global Full + Kilmaresh (Issavi) + BESTIARY - QUICKLOOT


Posts Recomendados

3 horas atrás, Felipe Malischeski disse:

Uma pergunta aleatória: onde tá o arquivo .s3db desse server?

Esse server é mysql, use o xampp ou outro similar...

Link para o post
Compartilhar em outros sites
  • Respostas 5k
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

OTXServer Global Full Kilmaresh by Malucooo   [CLIENTS COMPATÍVEIS]   http://www.gitlab.com/guilhermesidney/cliente10/   [DOWNLOAD] BAIXEM EM: https://github.com/malucooo

Adicionado Imbuing System, Inspection System por Charles (Eternal-Scripts) Corrigido e atualizado Prey System por Charles (Eternal-Scripts)   Obrigado pela colaboração, acredito que no

Atualizações de Médio Porte:   - Items.otb 11.31 (adicionado os novos barris de potion e mais uns 700 items adicionado..) - Client 10 Atualizado - Adicionado a categoria carpet...

Posted Images

15 horas atrás, Esbuma disse:

Screenshot_1.thumb.png.b3ce2935efd6b760a9020fa513410e1c.png

 

Dei look no player e nos itens na BP

Mano, você tá fazendo algo errado, pois já foi testado o Double EXP, e ele está funcionando normalmente

Link para o post
Compartilhar em outros sites
9 horas atrás, FlavioHulk disse:

Mano, você tá fazendo algo errado, pois já foi testado o Double EXP, e ele está funcionando normalmente

O double xp funciona de boa quando coloquei o atualizado o look deu problema, ai pra resolver de downgrade na versão para a anterior e atualizei na mão as mudanças.

Link para o post
Compartilhar em outros sites

Depois que fiz essa atualização aqui?

 

https://github.com/malucooo/Otxserver-New/pull/30/files

 

começou a dar esse warning

Screenshot_1.thumb.png.d08aebfdb60cb0415ca74454a601d175.png

 

Quando voltei pra versão anterior da data/actions/lib/actions.lua o warning sumiu.

 

actions.lua que esta sem o warnig

local holeId = {
	294, 369, 370, 383, 392, 408, 409, 410, 427, 428, 430, 462, 469, 470, 482,
	484, 485, 489, 924, 3135, 3136, 7933, 7938, 8170, 8286, 8285, 8284, 8281,
	8280, 8279, 8277, 8276, 8567, 8585, 8596, 8595, 8249, 8250, 8251,
	8252, 8253, 8254, 8255, 8256, 8592, 8972, 9606, 9625, 13190, 14461, 19519, 21536
}

local holes = {468, 481, 483, 7932, 23712} 

local JUNGLE_GRASS = { 2782, 3985, 19433 }
local WILD_GROWTH = { 1499, 11099, 2101, 1775, 1447, 1446} 

local fruits = {2673, 2674, 2675, 2676, 2677, 2678, 2679, 2680, 2681, 2682, 2684, 2685, 5097, 8839, 8840, 8841}

local lava = {
	Position(32808, 32336, 11),
	Position(32809, 32336, 11),
	Position(32810, 32336, 11),
	Position(32808, 32334, 11),
	Position(32807, 32334, 11),
	Position(32807, 32335, 11),
	Position(32807, 32336, 11),
	Position(32807, 32337, 11),
	Position(32806, 32337, 11),
	Position(32805, 32337, 11),
	Position(32805, 32338, 11),
	Position(32805, 32339, 11),
	Position(32806, 32339, 11),
	Position(32806, 32338, 11),
	Position(32807, 32338, 11),
	Position(32808, 32338, 11),
	Position(32808, 32337, 11),
	Position(32809, 32337, 11),
	Position(32810, 32337, 11),
	Position(32811, 32337, 11),
	Position(32811, 32338, 11),
	Position(32806, 32338, 11),
	Position(32810, 32338, 11),
	Position(32810, 32339, 11),
	Position(32809, 32339, 11),
	Position(32809, 32338, 11),
	Position(32811, 32336, 11),
	Position(32811, 32335, 11),
	Position(32810, 32335, 11),
	Position(32809, 32335, 11),
	Position(32808, 32335, 11),
	Position(32809, 32334, 11),
	Position(32809, 32333, 11),
	Position(32810, 32333, 11),
	Position(32811, 32333, 11),
	Position(32806, 32338, 11),
	Position(32810, 32334, 11),
	Position(32811, 32334, 11),
	Position(32812, 32334, 11),
	Position(32813, 32334, 11),
	Position(32814, 32334, 11),
	Position(32812, 32333, 11),
	Position(32810, 32334, 11),
	Position(32812, 32335, 11),
	Position(32813, 32335, 11),
	Position(32814, 32335, 11),
	Position(32814, 32333, 11),
	Position(32813, 32333, 11)
}

local function revertItem(position, itemId, transformId)
	local item = Tile(position):getItemById(itemId)
	if item then
		item:transform(transformId)
	end
end

local function removeRemains(toPosition)
	local item = Tile(toPosition):getItemById(2248)
	if item then
		item:remove()
	end
end

local function revertCask(position)
	local caskItem = Tile(position):getItemById(2249)
	if caskItem then
		caskItem:transform(5539)
		position:sendMagicEffect(CONST_ME_MAGIC_GREEN)
	end
end

function destroyItem(player, item, fromPosition, target, toPosition, isHotkey)
	if type(target) ~= "userdata" or not target:isItem() then
		return false
	end

	if target:hasAttribute(ITEM_ATTRIBUTE_UNIQUEID) or target:hasAttribute(ITEM_ATTRIBUTE_ACTIONID) then
		return false
	end

	if toPosition.x == CONTAINER_POSITION then
		player:sendCancelMessage(Game.getReturnMessage(RETURNVALUE_NOTPOSSIBLE))
		return true
	end

	local targetId = target.itemid
	local destroyId = ItemType(targetId):getDestroyId()
	if destroyId == 0 then
		return false
	end

	if math.random(7) == 1 then
		local item = Game.createItem(destroyId, 1, toPosition)
		if item ~= nil then
			item:decay()
		end

		-- Against The Spider Cult (Spider Eggs)
		if targetId == 7585 then
			local eggStorage = player:getStorageValue(Storage.TibiaTales.AgainstTheSpiderCult)
			if eggStorage >= 1 and eggStorage < 5 then
				player:setStorageValue(Storage.TibiaTales.AgainstTheSpiderCult, math.max(1, eggStorage) + 1)
			end

			Game.createMonster("Giant Spider", Position(33181, 31869, 12))
		end

		-- Move items outside the container
		if target:isContainer() then
			for i = target:getSize() - 1, 0, -1 do
   				local containerItem = target:getItem(i)
				if containerItem then
					containerItem:moveTo(toPosition)
				end
			end
		end

		target:remove(1)
	end

	toPosition:sendMagicEffect(CONST_ME_POFF)
	return true
end

function onUseRope(player, item, fromPosition, target, toPosition, isHotkey)
	if toPosition.x == CONTAINER_POSITION then
		return false
	end

	local targetId = target.itemid

	local tile = Tile(toPosition)
	local ground = tile:getGround()
	if ground and table.contains(ropeSpots, ground.itemid) or tile:getItemById(14435) then
		player:teleportTo(toPosition:moveUpstairs())
		if targetId == 8592 then
			if player:getStorageValue(Storage.RookgaardTutorialIsland.tutorialHintsStorage) < 22 then
				player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have successfully used your rope to climb out of the hole. Congratulations! Now continue to the east.')
			end
		end
		return true
	elseif table.contains(holeId, targetId) then
		toPosition.z = toPosition.z + 1
		tile = Tile(toPosition)
		if tile then
			local thing = tile:getTopVisibleThing()
			if thing:isItem() and thing:getType():isMovable() then
				return thing:moveTo(toPosition:moveUpstairs())
			elseif thing:isCreature() and thing:isPlayer() then
				return thing:teleportTo(toPosition:moveUpstairs())
			end
		end

		player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
		return true
	end

	return false
end

function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey)
	local targetId, targetActionId = target.itemid, target.actionid
	if table.contains(holes, targetId) then
		target:transform(targetId + 1)
		target:decay()

	elseif table.contains({231, 9059}, targetId) then
		local rand = math.random(100)
		if target.actionid == 100 and rand <= 20 then
			target:transform(489)
			target:decay()
		elseif rand == 1 then
			Game.createItem(2159, 1, toPosition)
		elseif rand > 95 then
			Game.createMonster("Rat", toPosition)
		end
		toPosition:sendMagicEffect(CONST_ME_POFF)

	-- Wrath of the emperor quest
	elseif targetId == 351 and targetActionId == 8024 then
		player:addItem(12297, 1)
		player:say("You dig out a handful of earth from this sacred place.", TALKTYPE_MONSTER_SAY)

	-- RookgaardTutorialIsland
	elseif targetId == 8579 and player:getStorageValue(Storage.RookgaardTutorialIsland.tutorialHintsStorage) < 20 then
		player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You dug a hole! Walk onto it as long as it is open to jump down into the forest cave.')
		player:setStorageValue(Storage.RookgaardTutorialIsland.tutorialHintsStorage, 19)
		Position(32070, 32266, 7):sendMagicEffect(CONST_ME_TUTORIALARROW)
		Position(32070, 32266, 7):sendMagicEffect(CONST_ME_TUTORIALSQUARE)
		target:transform(469)
		addEvent(revertItem, 30 * 1000, toPosition, 469, 8579)

	-- Gravedigger Quest
	elseif targetActionId == 4654 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission49) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission50) < 1 then
		player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You found a piece of the scroll. You pocket it quickly.')
		player:getPosition():sendMagicEffect(CONST_ME_POFF)
		player:addItem(21250, 1)
		player:setStorageValue(Storage.GravediggerOfDrefia.Mission50, 1)

	elseif targetActionId == 4668 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission69) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission70) < 1 then
		player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'A torn scroll piece emerges. Probably gnawed off by rats.')
		player:getPosition():sendMagicEffect(CONST_ME_POFF)
		player:addItem(21250, 1)
		player:setStorageValue(Storage.GravediggerOfDrefia.Mission70, 1)

	-- ???
	elseif targetActionId == 50118 then
		local wagonItem = Tile(Position(32717, 31492, 11)):getItemById(7131)
		if wagonItem then
			Game.createItem(8749, 1, wagonItem:getPosition())
			toPosition:sendMagicEffect(CONST_ME_POFF)
		end

	elseif targetId == 8749 then
		local coalItem = Tile(Position(32699, 31492, 11)):getItemById(8749)
		if coalItem then
			coalItem:remove()
			toPosition:sendMagicEffect(CONST_ME_POFF)

			local crucibleItem = Tile(Position(32699, 31494, 11)):getItemById(8642)
			if crucibleItem then
				crucibleItem:setActionId(50119)
			end
		end

	elseif table.contains({9632, 20230, 17672, 18586, 18580}, targetId) then
		if player:getStorageValue(Storage.SwampDiggingTimeout) >= os.time() then
			toPosition:sendMagicEffect(CONST_ME_POFF)
			return false
		end

		local config = { {from = 1, to = 39, itemId = 2817}, {from = 40, to = 79, itemId = 2145}, {from = 80, to = 100, itemId = 20138} }
		local chance = math.random(100)

		for i = 1, #config do
			local randItem = config[i]
			if chance >= randItem.from and chance <= randItem.to then
				player:addItem(randItem.itemId, 1)
				player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You dug up a ' .. ItemType(randItem.itemId):getName() .. '.')
				player:setStorageValue(Storage.SwampDiggingTimeout, os.time() + 604800)
				toPosition:sendMagicEffect(CONST_ME_GREEN_RINGS)
				break
			end
		end

	elseif targetId == 103 and targetActionId == 4205 then
		if player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) ~= 1 then
			return false
		end

		local remains = Game.createItem(2248, 1, toPosition)
		if remains then
			remains:setActionId(4206)
		end
		toPosition:sendMagicEffect(CONST_ME_HITAREA)
		addEvent(removeRemains, 60000, toPosition)

	elseif targetId == 22674 then
		if not player:removeItem(5091, 1) then
			return false
		end

		target:transform(5731)
		target:decay()
		toPosition:sendMagicEffect(CONST_ME_POFF)
	else
		return false
	end

	return true
end

function onUsePick(player, item, fromPosition, target, toPosition, isHotkey)
	local targetId, targetActionId = target.itemid, target.actionid
	if table.contains({354, 355}, targetId) and (target:hasAttribute(ITEM_ATTRIBUTE_UNIQUEID) or target:hasAttribute(ITEM_ATTRIBUTE_ACTIONID)) then
		target:transform(392)
		target:decay()
		toPosition:sendMagicEffect(CONST_ME_POFF)

		--elseif targetId == 23759 then
		--target:remove()
		--toPosition:sendMagicEffect(CONST_ME_POFF)
		--player:addItem(23760, 1)
		--player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You picked a beautiful lion's mane flower.")
		
		-- FIZ ESSE LIXO AQUI
		elseif targetId == 11227 then
		target:remove()
		toPosition:sendMagicEffect(CONST_ME_POFF)
		player:addItem(2152, 10)
	
		elseif targetId == 7200 then
		target:transform(7236)
		target:decay()
		toPosition:sendMagicEffect(CONST_ME_HITAREA)
		
		elseif targetId == 468 then
		target:transform(469)
		target:decay()
		toPosition:sendMagicEffect(CONST_ME_HITAREA)
		
		elseif targetId == 23712 then
		target:transform(23713)
		target:decay()
		toPosition:sendMagicEffect(CONST_ME_HITAREA)
		
		elseif targetId == 481 then
		target:transform(482)
		target:decay()
		toPosition:sendMagicEffect(CONST_ME_HITAREA)
		
		elseif targetId == 483 then
		target:transform(484)
		target:decay()
		toPosition:sendMagicEffect(CONST_ME_HITAREA)
		
		elseif targetId == 7932 then
		target:transform(7933)
		target:decay()
		toPosition:sendMagicEffect(CONST_ME_HITAREA)
		
	--The Ice Islands Quest, Nibelor 1: Breaking the Ice
		elseif targetId == 3621 and targetActionId == 12026 then
		local missionProgress, pickAmount = player:getStorageValue(Storage.TheIceIslands.Mission02), player:getStorageValue(Storage.TheIceIslands.PickAmount)
		if missionProgress < 1 or pickAmount >= 3 or player:getStorageValue(Storage.TheIceIslands.Questline) ~= 3 then
			return false
		end

		player:setStorageValue(Storage.TheIceIslands.PickAmount, math.max(0, pickAmount) + 1)
		player:setStorageValue(Storage.TheIceIslands.Mission02, missionProgress + 1) -- Questlog The Ice Islands Quest, Nibelor 1: Breaking the Ice

		if pickAmount >= 2 then
			player:setStorageValue(Storage.TheIceIslands.Questline, 4)
			player:setStorageValue(Storage.TheIceIslands.Mission02, 4) -- Questlog The Ice Islands Quest, Nibelor 1: Breaking the Ice
		end

		local crackItem = Tile(toPosition):getItemById(7185)
		if crackItem then
			crackItem:transform(7186)
			addEvent(revertItem, 60 * 1000, toPosition, 7186, 7185)
		end

		local chakoyas = {"chakoya toolshaper", "chakoya tribewarden", "chakoya windcaller"}
		Game.createMonster(chakoyas[math.random(#chakoyas)], toPosition)
		toPosition:sendMagicEffect(CONST_ME_TELEPORT)

		elseif targetId == 1304 then
	--The Pits of Inferno Quest
		if target.uid == 1022 then
			for i = 1, #lava do
				Game.createItem(5815, 1, lava[i])
			end
			target:transform(2256)
			toPosition:sendMagicEffect(CONST_ME_SMOKE)

	-- naginata quest
		elseif targetActionId == 50058 then
			local stoneStorage = Game.getStorageValue(GlobalStorage.NaginataStone)
			if stoneStorage ~= 5 then
				Game.setStorageValue(GlobalStorage.NaginataStone, math.max(0, stoneStorage) + 1)
			elseif stoneStorage == 5 then
				target:remove()
				Game.setStorageValue(GlobalStorage.NaginataStone)
			end

			toPosition:sendMagicEffect(CONST_ME_POFF)
			doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -31, -39, CONST_ME_NONE)
		end

	 --The Banshee Quest
		elseif targetId == 9025 and targetActionId == 101 then
		target:transform(392)
		target:decay()
		toPosition:sendMagicEffect(CONST_ME_POFF)

	 -- The Hidden City of Beregar Quest
		elseif targetActionId == 50090 then
		--if player:getStorageValue(Storage.hiddenCityOfBeregar.WayToBeregar) == 1 then
			player:teleportTo(Position(32566, 31338, 10))
		--end

		elseif targetActionId == 50114 then
		if Tile(Position(32617, 31513, 9)):getItemById(1027) and Tile(Position(32617, 31514, 9)):getItemById(1205) then
			local rubbleItem = Tile(Position(32619, 31514, 9)):getItemById(5709)
			if rubbleItem then
				rubbleItem:remove()
			end
		else
			player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You can't remove this pile since it's currently holding up the tunnel.")
		end

	-- Pythius The Rotten (Firewalker Boots)
		elseif targetActionId == 50127 then
		if player:getStorageValue(Storage.QuestChests.FirewalkerBoots) == 1 then
			return false
		end

		target:remove()

		local stoneItem = Tile(toPosition):getItemById(1304)
		if stoneItem then
			stoneItem:remove()
		end

		iterateArea(
			function(position)
				local groundItem = Tile(position):getGround()
				if groundItem and groundItem.itemid == 598 then
					groundItem:transform(5815)
				end
			end,
			Position(32550, 31373, 15),
			Position(32551, 31379, 15)
		)
		iterateArea(
			function(position)
				position:sendMagicEffect(CONST_ME_POFF)
			end,
			Position(32551, 31374, 15),
			Position(32551, 31379, 15)
		)

		local portal = Game.createItem(1387, 1, Position(32551, 31376, 15))
		if portal then
			portal:setActionId(50126)
		end

	-- Wrath of the emperor quest
		elseif targetId == 12296 then
		player:addItem(12295, 1)
		player:say("The cracked part of the table lets you cut out a large chunk of wood with your pick.", TALKTYPE_MONSTER_SAY)

		elseif targetId == 22671 then
		target:transform(392)
		target:decay()
		else
		return false
	end
--Lower Roshamuul
if (target ~= nil) and target:isItem() and (target:getId() == 22469) then
    if math.random(100) > 50 then
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Crushing the stone produces some fine gravel.")
        target:transform(22467)
        target:decay()
    else
        Game.createMonster("Frazzlemaw", toPosition)
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Crushing the stone yields nothing but slightly finer, yet still unusable rubber.")
        target:transform(22468)
        target:decay()
    end
    	return true
    end
end
	
function onUseMachete(player, item, fromPosition, target, toPosition, isHotkey)
	local targetId = target.itemid
	if table.contains(JUNGLE_GRASS, targetId) then
		target:transform(targetId == 19433 and 19431 or targetId - 1)
		target:decay()
		return true
	end

	if table.contains(WILD_GROWTH, targetId) then
		toPosition:sendMagicEffect(CONST_ME_POFF)
		target:remove()
		return true
	end

	return destroyItem(player, item, fromPosition, target, toPosition, isHotkey)
end

function onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey)
	if not table.contains({2416, 10515}, item.itemid) then
		return false
	end

	local targetActionId, targetUniqueId = target.actionid, target.uid

	-- In Service Of Yalahar Quest
	if targetUniqueId == 3071 then
		if player:getStorageValue(Storage.InServiceofYalahar.SewerPipe01) < 1 then
			doSetMonsterOutfit(player, 'skeleton', 3 * 1000)
			fromPosition:sendMagicEffect(CONST_ME_ENERGYHIT)
			player:setStorageValue(Storage.InServiceofYalahar.SewerPipe01, 1)
			player:setStorageValue(Storage.InServiceofYalahar.Mission01, player:getStorageValue(Storage.InServiceofYalahar.Mission01) + 1) -- StorageValue for Questlog 'Mission 01: Something Rotten'
			local position = player:getPosition()
			for x = -1, 1 do
				for y = -1, 1 do
					position = position + Position(x, y, 0)
					position:sendMagicEffect(CONST_ME_YELLOWENERGY)
				end
			end
		end

	elseif targetUniqueId == 3072 then
		if player:getStorageValue(Storage.InServiceofYalahar.SewerPipe02) < 1 then
			player:setStorageValue(Storage.InServiceofYalahar.SewerPipe02, 1)
			player:setStorageValue(Storage.InServiceofYalahar.Mission01, player:getStorageValue(Storage.InServiceofYalahar.Mission01) + 1) -- StorageValue for Questlog 'Mission 01: Something Rotten'
			local position = player:getPosition()
			for x = -1, 1 do
				for y = -1, 1 do
					if math.random(2) == 2 then
						position = position + Position(x, y, 0)
						Game.createMonster('rat', position)
						position:sendMagicEffect(CONST_ME_TELEPORT)
					end
				end
			end
		end

	elseif targetUniqueId == 3073 then
		if player:getStorageValue(Storage.InServiceofYalahar.SewerPipe03) < 1 then
			player:say('You have used the crowbar on a grate.', TALKTYPE_MONSTER_SAY)
			player:setStorageValue(Storage.InServiceofYalahar.SewerPipe03, 1)
			player:setStorageValue(Storage.InServiceofYalahar.Mission01, player:getStorageValue(Storage.InServiceofYalahar.Mission01) + 1) -- StorageValue for Questlog 'Mission 01: Something Rotten'
		end

	elseif targetUniqueId == 3074 then
		if player:getStorageValue(Storage.InServiceofYalahar.SewerPipe04) < 1 then
			doSetMonsterOutfit(player, 'bog raider', 5 * 1000)
			player:say('You have used the crowbar on a knot.', TALKTYPE_MONSTER_SAY)
			player:setStorageValue(Storage.InServiceofYalahar.SewerPipe04, 1)
			player:setStorageValue(Storage.InServiceofYalahar.Mission01, player:getStorageValue(Storage.InServiceofYalahar.Mission01) + 1) -- StorageValue for Questlog 'Mission 01: Something Rotten'
		end

	elseif targetActionId == 100 then
		local targetId = target.itemid

		-- Postman Quest
		if targetId == 2593 then
			if player:getStorageValue(Storage.postman.Mission02) == 1 then
				player:setStorageValue(Storage.postman.Mission02, 2)
				toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE)
			end

		-- The Ape City - Mission 7
		elseif targetId == 5539 then
			local cStorage = player:getStorageValue(Storage.TheApeCity.Casks)
			if cStorage < 3 then
				player:setStorageValue(Storage.TheApeCity.Casks, math.max(0, cStorage) + 1)
				target:transform(2249)
				toPosition:sendMagicEffect(CONST_ME_EXPLOSIONAREA)
				addEvent(revertCask, 3 * 60 * 1000, toPosition)
			end
		end

	-- Secret Service Quest
	elseif targetActionId == 12566 and player:getStorageValue(Storage.secretService.TBIMission06) == 1 then
		local yellPosition = Position(32204, 31157, 8)
		if player:getOutfit().lookType == 137 then -- amazon lookType
			player:setStorageValue(Storage.secretService.TBIMission06, 2)
			Game.createMonster('barbarian skullhunter', yellPosition) -- say
			player:say("Nooooo! What have you done??", TALKTYPE_MONSTER_SAY, false, 0, yellPosition)
			yellPosition.y = yellPosition.y - 1
			Game.createMonster('barbarian skullhunter', yellPosition)
		end
	else
		return false
	end

	return true
end

function onUseSpoon(player, item, fromPosition, target, toPosition, isHotkey)
	local targetId = target.itemid

	--The Ice Islands Quest
	if targetId == 388 then
		if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then
			if player:getStorageValue(Storage.TheIceIslands.SulphurLava) < 1 then
				player:addItem(8301, 1)
				player:setStorageValue(Storage.TheIceIslands.SulphurLava, 1)
				toPosition:sendMagicEffect(CONST_ME_MAGIC_RED)
				player:say('You retrive a fine sulphur from a lava hole.', TALKTYPE_MONSTER_SAY)
			end
		end

	elseif targetId == 4184 then
		if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then
			if player:getStorageValue(Storage.TheIceIslands.SporesMushroom) < 1 then
				player:addItem(7251, 1)
				player:setStorageValue(Storage.TheIceIslands.SporesMushroom, 1)
				toPosition:sendMagicEffect(CONST_ME_MAGIC_RED)
				player:say('You retrive spores from a mushroom.', TALKTYPE_MONSTER_SAY)
			end
		end

	-- What a foolish Quest - Mission 8 (Sulphur)
	elseif targetId == 8573 then
		if player:getStorageValue(Storage.WhatAFoolishQuest.Questline) ~= 21
				or player:getStorageValue(Storage.WhatAFoolishQuest.InflammableSulphur) == 1 then
			return false
		end

		player:setStorageValue(Storage.WhatAFoolishQuest.InflammableSulphur, 1)
		player:addItem(8204, 1)
		toPosition:sendMagicEffect(CONST_ME_YELLOW_RINGS)
	else
		return false
	end

	return true
end

function onUseScythe(player, item, fromPosition, target, toPosition, isHotkey)
	if not table.contains({2550, 10513}, item.itemid) then
		return false
	end
	
	if target.itemid == 5465 then
		target:transform(5464)
		target:decay()
		Game.createItem(5467, 1, toPosition)
		return true
	end
		
	if target.itemid == 2739 then
		target:transform(2737)
		target:decay()
		Game.createItem(2694, 1, toPosition)
		return true
	end

	return destroyItem(player, item, fromPosition, target, toPosition, isHotkey)
end

function onUseKitchenKnife(player, item, fromPosition, target, toPosition, isHotkey)
	if not table.contains({2566, 10511, 10515}, item.itemid) then
		return false
	end

	local targetId = target.itemid

	-- by vikingtibia
	if targetId == 2992 then
		--if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then
			--if player:getStorageValue(cid, 41600) >= 0  then
				player:addItem(13159, 1)
				target:transform(2993)
				--player:setStorageValue(Storage.TheIceIslands.FrostbiteHerb, 1)
				toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE)
				player:say('You cut a Rabbits Foot from a rabbit.', TALKTYPE_MONSTER_SAY)
			
		end
		
	--The Ice Islands Quest
	if targetId == 7261 then
		if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then
			if player:getStorageValue(Storage.TheIceIslands.FrostbiteHerb) < 1 then
				player:addItem(7248, 1)
				player:setStorageValue(Storage.TheIceIslands.FrostbiteHerb, 1)
				toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE)
				player:say('You cut a leaf from a frostbite herb.', TALKTYPE_MONSTER_SAY)
			end
		end

	elseif targetId == 2733 then
		if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then
			if player:getStorageValue(Storage.TheIceIslands.FlowerCactus) < 1 then
				player:addItem(7245, 1)
				player:setStorageValue(Storage.TheIceIslands.FlowerCactus, 1)
				target:transform(2723)
				addEvent(revertItem, 60 * 1000, toPosition, 2723, 2733)
				toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN)
				player:say('You cut a flower from a cactus.', TALKTYPE_MONSTER_SAY)
			end
		end

	elseif targetId == 4017 then
		if player:getStorageValue(Storage.TheIceIslands.Questline) >= 21 then
			if player:getStorageValue(Storage.TheIceIslands.FlowerBush) < 1 then
				player:addItem(7249, 1)
				player:setStorageValue(Storage.TheIceIslands.FlowerBush, 1)
				target:transform(4014)
				addEvent(revertItem, 60 * 1000, toPosition, 4014, 4017)
				toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN)
				player:say('You cut a flower from a bush.', TALKTYPE_MONSTER_SAY)
			end
		end

	-- What a foolish Quest (Mission 1)
	elseif target.actionid == 4200 then
		if toPosition.x == 32349 and toPosition.y == 32361 and toPosition.z == 7 then
			player:addItem(7476, 1)
			player:say('The stubborn flower has ruined your knife but at least you got it.', TALKTYPE_MONSTER_SAY, false, player, toPosition)
			item:remove()
		else
			player:say('This flower is too pathetic.', TALKTYPE_MONSTER_SAY, false, player, toPosition)
		end

	-- What a foolish Quest (Mission 5)
	elseif targetId == 7480 then
		if player:getStorageValue(Storage.WhatAFoolishQuest.EmperorBeardShave) == 1 then
			player:say('God shave the emperor. Some fool already did it.', TALKTYPE_MONSTER_SAY)
			return true
		end

		player:setStorageValue(Storage.WhatAFoolishQuest.EmperorBeardShave, 1)
		player:say('This is probably the most foolish thing you\'ve ever done!', TALKTYPE_MONSTER_SAY)
		player:addItem(7479, 1)
		Game.createMonster('dwarf guard', Position(32656, 31853, 13))

	-- What a foolish Quest (Mission 8)
	elseif targetId == 4008 then
		if player:getStorageValue(Storage.WhatAFoolishQuest.Questline) ~= 22
				or player:getStorageValue(Storage.WhatAFoolishQuest.SpecialLeaves) == 1 then
			return false
		end

		player:setStorageValue(Storage.WhatAFoolishQuest.SpecialLeaves, 1)
		player:addItem(8109, 1)
		toPosition:sendMagicEffect(CONST_ME_BLOCKHIT)

	elseif table.contains(fruits, targetId) and player:removeItem(6278, 1) then
		target:remove(1)
		player:addItem(6279, 1)
		player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
	else
		return false
	end

	return true
end

Aquele que esta com o warning se encontra no link do começo.

Editado por Esbuma (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Olá, baixei esse ot e estou com um problema na experiencia, eu aumento ela nos arquivo config.lua e stage ja alterei os 2 e continua 1x.

sera q alguem pode me ajudar

Link para o post
Compartilhar em outros sites
3 horas atrás, Rock disse:

Olá, baixei esse ot e estou com um problema na experiencia, eu aumento ela nos arquivo config.lua e stage ja alterei os 2 e continua 1x.

sera q alguem pode me ajudar

A stage vc deve arrumar no arquivo data/xml/stages.xml

Link para o post
Compartilhar em outros sites
16 horas atrás, Math2017latos disse:

Ola manow, ae pq estou tendo esse probleminha aqui? pf me ajude só esse que me impede de loga normal no global ae :wacko:

Screenshot_1.png

ja esta dizendo, a tabela de live cast não existe, 

tenta colocar essa tabela, quem sabe de certo.

CREATE TABLE IF NOT EXISTS `live_casts` (
`player_id` int(11) NOT NULL,
`cast_name` varchar(255) NOT NULL,
`password` boolean NOT NULL DEFAULT false,
`description` varchar(255),
`spectators` smallint(5) DEFAULT 0,
UNIQUE KEY `player_id_2` (`player_id`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB;

 

3 horas atrás, Rock disse:

Olá, baixei esse ot e estou com um problema na experiencia, eu aumento ela nos arquivo config.lua e stage ja alterei os 2 e continua 1x.

sera q alguem pode me ajudar

 

3 horas atrás, Rock disse:

Olá, baixei esse ot e estou com um problema na experiencia, eu aumento ela nos arquivo config.lua e stage ja alterei os 2 e continua 1x.

sera q alguem pode me ajudar

posta a tua stage.xml ae, coloca em code e spoiler.

Link para o post
Compartilhar em outros sites

<?xml version="1.0" encoding="UTF-8"?>
<stages>
    <config enabled="0" />  ->AQUI JA DEIXEI 1TBM E NAO RESOLVEU
    <stage minlevel="1" maxlevel="8" multiplier="50" />
    <stage minlevel="9" maxlevel="50" multiplier="400" />    
    <stage minlevel="51" maxlevel="80" multiplier="300" />
    <stage minlevel="81" maxlevel="100" multiplier="250" />
    <stage minlevel="101" maxlevel="140" multiplier="200" />
    <stage minlevel="141" maxlevel="160" multiplier="150" />
    <stage minlevel="161" maxlevel="180" multiplier="100" />
    <stage minlevel="181" maxlevel="200" multiplier="80" />
    <stage minlevel="201" maxlevel="230" multiplier="40" />
    <stage minlevel="231" maxlevel="250" multiplier="20" />
    <stage minlevel="251" maxlevel="280" multiplier="10" />
    <stage minlevel="281" maxlevel="300" multiplier="8" />
    <stage minlevel="301" maxlevel="320" multiplier="6" />
    <stage minlevel="321" maxlevel="340" multiplier="4" />
    <stage minlevel="341" maxlevel="350" multiplier="3" />
    <stage minlevel="351" maxlevel="399" multiplier="2" />
    <stage minlevel="400" multiplier="1,5" />
</stages>

 

 

E CONFIG.LUA SE PRECISAR

 

-- Combat settings
-- NOTE: valid values for worldType are: "pvp", "no-pvp" and "pvp-enforced"
worldType = "pvp"
hotkeyAimbotEnabled = true
protectionLevel = 100
pzLocked = 60 * 1000
removeChargesFromRunes = true
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 15 * 60 * 1000
stairJumpExhaustion = 2 * 1000
experienceByKillingPlayers = false
expFromPlayersLevelRange = 75
dayKillsToRedSkull = 3
weekKillsToRedSkull = 5
monthKillsToRedSkull = 10
redSkullDuration = 30
blackSkullDuration = 45
orangeSkullDuration = 7

-- Connection Config
-- NOTE: maxPlayers set to 0 means no limit
ip = "127.0.0.1"
bindOnlyGlobalAddress = false
loginProtocolPort = 7171
gameProtocolPort = 7172
statusProtocolPort = 7171
maxPlayers = 0
motd = "Welcome to The Belobra Global Server!"
onePlayerOnlinePerAccount = true
allowClones = false
serverName = "Belobra-Global"
statusTimeout = 5 * 1000
replaceKickOnLogin = true
maxPacketsPerSecond = 1500

-- Version Manual
clientVersionMin = 1098
clientVersionMax = 1099
clientVersionStr = "Only clients with protocol 10.98/99 or allowed!"

-- Depot Limit
freeDepotLimit = 2000
premiumDepotLimit = 10000
depotBoxes = 17

-- Casting System 
enableLiveCasting = true
liveCastPort = 7173

-- Deaths
-- NOTE: Leave deathLosePercent as -1 if you want to use the default
-- death penalty formula. For the old formula, set it to 10. For
-- no skill/experience loss, set it to 0.
deathLosePercent = -1

-- Houses
-- NOTE: set housePriceEachSQM to -1 to disable the ingame buy house functionality
housePriceEachSQM = 1000
houseRentPeriod = "weekly"

-- Item Usage
timeBetweenActions = 200
timeBetweenExActions = 1000

-- Map
-- NOTE: set mapName WITHOUT .otbm at the end
mapName = "global"
mapAuthor = "cipsoft"

-- Market
marketOfferDuration = 30 * 24 * 60 * 60
premiumToCreateMarketOffer = true
checkExpiredMarketOffersEachMinutes = 60
maxMarketOffersAtATimePerPlayer = 100

-- MySQL
mysqlHost = "localhost"
mysqlUser = "root"
mysqlPass = ""
mysqlDatabase = "global"
mysqlPort = 3306
passwordType = "sha1"
mysqlSock = ""

-- Misc.
allowChangeOutfit = true
freePremium = true
kickIdlePlayerAfterMinutes = 15
maxMessageBuffer = 4
emoteSpells = false
classicEquipmentSlots = false
allowWalkthrough = true
coinPacketSize = 25
coinImagesURL = "http://localhost/store/"

-- Rates
-- NOTE: rateExp is not used if you have enabled stages in data/XML/stages.xml
rateExp = 100
rateSkill = 40
rateLoot = 10
rateMagic = 20
rateSpawn = 5

-- Monsters
deSpawnRange = 2
deSpawnRadius = 50

-- Stamina
staminaSystem = true

-- Scripts
warnUnsafeScripts = true
convertUnsafeScripts = true

-- Startup
-- NOTE: defaultPriority only works on Windows and sets process
-- priority, valid values are: "normal", "above-normal", "high"
defaultPriority = "high"
startupDatabaseOptimization = true

-- Status server information
ownerName = ""
ownerEmail = ""
url = "/"
location = "Brazil"
 

Link para o post
Compartilhar em outros sites
9 minutos atrás, Rock disse:
Spoiler

 

<?xml version="1.0" encoding="UTF-8"?>
<stages>
    <config enabled="0" />  ->AQUI JA DEIXEI 1TBM E NAO RESOLVEU
    <stage minlevel="1" maxlevel="8" multiplier="50" />
    <stage minlevel="9" maxlevel="50" multiplier="400" />    
    <stage minlevel="51" maxlevel="80" multiplier="300" />
    <stage minlevel="81" maxlevel="100" multiplier="250" />
    <stage minlevel="101" maxlevel="140" multiplier="200" />
    <stage minlevel="141" maxlevel="160" multiplier="150" />
    <stage minlevel="161" maxlevel="180" multiplier="100" />
    <stage minlevel="181" maxlevel="200" multiplier="80" />
    <stage minlevel="201" maxlevel="230" multiplier="40" />
    <stage minlevel="231" maxlevel="250" multiplier="20" />
    <stage minlevel="251" maxlevel="280" multiplier="10" />
    <stage minlevel="281" maxlevel="300" multiplier="8" />
    <stage minlevel="301" maxlevel="320" multiplier="6" />
    <stage minlevel="321" maxlevel="340" multiplier="4" />
    <stage minlevel="341" maxlevel="350" multiplier="3" />
    <stage minlevel="351" maxlevel="399" multiplier="2" />
    <stage minlevel="400" multiplier="1,5" />
</stages>

 

 

E CONFIG.LUA SE PRECISAR

 

<spoiler>

-- Combat settings
-- NOTE: valid values for worldType are: "pvp", "no-pvp" and "pvp-enforced"
worldType = "pvp"
hotkeyAimbotEnabled = true
protectionLevel = 100
pzLocked = 60 * 1000
removeChargesFromRunes = true
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 15 * 60 * 1000
stairJumpExhaustion = 2 * 1000
experienceByKillingPlayers = false
expFromPlayersLevelRange = 75
dayKillsToRedSkull = 3
weekKillsToRedSkull = 5
monthKillsToRedSkull = 10
redSkullDuration = 30
blackSkullDuration = 45
orangeSkullDuration = 7

-- Connection Config
-- NOTE: maxPlayers set to 0 means no limit
ip = "127.0.0.1"
bindOnlyGlobalAddress = false
loginProtocolPort = 7171
gameProtocolPort = 7172
statusProtocolPort = 7171
maxPlayers = 0
motd = "Welcome to The Belobra Global Server!"
onePlayerOnlinePerAccount = true
allowClones = false
serverName = "Belobra-Global"
statusTimeout = 5 * 1000
replaceKickOnLogin = true
maxPacketsPerSecond = 1500

-- Version Manual
clientVersionMin = 1098
clientVersionMax = 1099
clientVersionStr = "Only clients with protocol 10.98/99 or allowed!"

-- Depot Limit
freeDepotLimit = 2000
premiumDepotLimit = 10000
depotBoxes = 17

-- Casting System 
enableLiveCasting = true
liveCastPort = 7173

-- Deaths
-- NOTE: Leave deathLosePercent as -1 if you want to use the default
-- death penalty formula. For the old formula, set it to 10. For
-- no skill/experience loss, set it to 0.
deathLosePercent = -1

-- Houses
-- NOTE: set housePriceEachSQM to -1 to disable the ingame buy house functionality
housePriceEachSQM = 1000
houseRentPeriod = "weekly"

-- Item Usage
timeBetweenActions = 200
timeBetweenExActions = 1000

-- Map
-- NOTE: set mapName WITHOUT .otbm at the end
mapName = "global"
mapAuthor = "cipsoft"

-- Market
marketOfferDuration = 30 * 24 * 60 * 60
premiumToCreateMarketOffer = true
checkExpiredMarketOffersEachMinutes = 60
maxMarketOffersAtATimePerPlayer = 100

-- MySQL
mysqlHost = "localhost"
mysqlUser = "root"
mysqlPass = ""
mysqlDatabase = "global"
mysqlPort = 3306
passwordType = "sha1"
mysqlSock = ""

-- Misc.
allowChangeOutfit = true
freePremium = true
kickIdlePlayerAfterMinutes = 15
maxMessageBuffer = 4
emoteSpells = false
classicEquipmentSlots = false
allowWalkthrough = true
coinPacketSize = 25
coinImagesURL = "http://localhost/store/"

-- Rates
-- NOTE: rateExp is not used if you have enabled stages in data/XML/stages.xml
rateExp = 100
rateSkill = 40
rateLoot = 10
rateMagic = 20
rateSpawn = 5

-- Monsters
deSpawnRange = 2
deSpawnRadius = 50

-- Stamina
staminaSystem = true

-- Scripts
warnUnsafeScripts = true
convertUnsafeScripts = true

-- Startup
-- NOTE: defaultPriority only works on Windows and sets process
-- priority, valid values are: "normal", "above-normal", "high"
defaultPriority = "high"
startupDatabaseOptimization = true

-- Status server information
ownerName = ""
ownerEmail = ""
url = "/"
location = "Brazil"
</spoiler>

 

 

    "<stage minlevel="400" multiplier="1,5" />" tenta mudar pra <stage minlevel="400" multiplier="1.5" />

Editado por Guivalladao (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
Em 09/03/2016 ás 15:21, malucooo disse:

 

 

Links Atualizados! desculpa!

Atualizados agora!!! Desculpa...

 

Corrigido!

CADE O LINK CARA!! ATUALIZA POH :boos:

Link para o post
Compartilhar em outros sites
2 horas atrás, adrianodec disse:

CADE O LINK CARA!! ATUALIZA POH :boos:

não vejo motivo para estresse, os links estão funcionando.

https://github.com/malucooo/Otxserver-New

CONHEÇA MEU PROJETO:

WWW.ETERNUS-GLOBAL.COM

 

tibia-logo.gif

Link para o post
Compartilhar em outros sites

 

9 horas atrás, Guivalladao disse:

    "<stage minlevel="400" multiplier="1,5" />" tenta mudar pra <stage minlevel="400" multiplier="1.5" />

nao deu certo

Editado por Rock (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
13 horas atrás, sirarcken disse:

ja esta dizendo, a tabela de live cast não existe, 

tenta colocar essa tabela, quem sabe de certo.


CREATE TABLE IF NOT EXISTS `live_casts` (
`player_id` int(11) NOT NULL,
`cast_name` varchar(255) NOT NULL,
`password` boolean NOT NULL DEFAULT false,
`description` varchar(255),
`spectators` smallint(5) DEFAULT 0,
UNIQUE KEY `player_id_2` (`player_id`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB;

 

 

posta a tua stage.xml ae, coloca em code e spoiler.

ve se ta certo pf, e tenho esse problema da etapa 4 do gesiorsabe como resolver pf?

Screenshot_1.png

Screenshot_3.png

Editado por Math2017latos (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

qnd tento entra no nesse ot aparece isso alguem sabe oq pode ser o erro? ja coloquei os ip que utilizo aqui e nao consigo entrar

Sem título.png

Link para o post
Compartilhar em outros sites
19 horas atrás, Rock disse:

 

nao deu certo

substitui isso:

event/player.lua

Spoiler

-- No move items with actionID 8000
-- Players cannot throw items on teleports if set to true
local blockTeleportTrashing = true

-- Internal Use
ITEM_STORE_INBOX = 26052

function Player:onBrowseField(position)
	return true
end

function Player:onLook(thing, position, distance)
	local description = "You see " .. thing:getDescription(distance)
	if self:getGroup():getAccess() then
		if thing:isItem() then
			description = string.format("%s\nItem ID: %d", description, thing:getId())

			local actionId = thing:getActionId()
			if actionId ~= 0 then
				description = string.format("%s, Action ID: %d", description, actionId)
			end
	
	-- KD look 
	 if thing:isCreature() and thing:isPlayer() then
        description = string.format("%s\n [PVP Kills: %d] \n [PVP Deaths: %d] \n",
            description, math.max(0, thing:getStorageValue(167912)), math.max(0, thing:getStorageValue(167913)))
    end
	
	-- MARRY 
	if LOOK_MARRIAGE_DESCR and thing:isCreature() then
	if thing:isPlayer() then
	description = description .. self:getMarriageDescription(thing)
	end
end

			local uniqueId = thing:getAttribute(ITEM_ATTRIBUTE_UNIQUEID)
			if uniqueId > 0 and uniqueId < 65536 then
				description = string.format("%s, Unique ID: %d", description, uniqueId)
			end

			local itemType = thing:getType()

			local transformEquipId = itemType:getTransformEquipId()
			local transformDeEquipId = itemType:getTransformDeEquipId()
			if transformEquipId ~= 0 then
				description = string.format("%s\nTransforms to: %d (onEquip)", description, transformEquipId)
			elseif transformDeEquipId ~= 0 then
				description = string.format("%s\nTransforms to: %d (onDeEquip)", description, transformDeEquipId)
			end

			local decayId = itemType:getDecayId()
			if decayId ~= -1 then
				description = string.format("%s\nDecays to: %d", description, decayId)
			end
		elseif thing:isCreature() then
			local str = "%s\nHealth: %d / %d"
			if thing:getMaxMana() > 0 then
				str = string.format("%s, Mana: %d / %d", str, thing:getMana(), thing:getMaxMana())
			end
			description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. "."
		end

		local position = thing:getPosition()
		description = string.format(
			"%s\nPosition: %d, %d, %d",
			description, position.x, position.y, position.z
		)

		if thing:isCreature() then
			if thing:isPlayer() then
				description = string.format("%s\nIP: %s.", description, Game.convertIpToString(thing:getIp()))
			end
		end
	end
	self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end

function Player:onLookInBattleList(creature, distance)
	local description = "You see " .. creature:getDescription(distance)
	if self:getGroup():getAccess() then
		local str = "%s\nHealth: %d / %d"
		if creature:getMaxMana() > 0 then
			str = string.format("%s, Mana: %d / %d", str, creature:getMana(), creature:getMaxMana())
		end
		description = string.format(str, description, creature:getHealth(), creature:getMaxHealth()) .. "."

		local position = creature:getPosition()
		description = string.format(
			"%s\nPosition: %d, %d, %d",
			description, position.x, position.y, position.z
		)

		if creature:isPlayer() then
			description = string.format("%s\nIP: %s", description, Game.convertIpToString(creature:getIp()))
		end
	end
	-- KD look 
	 if creature:isPlayer() and creature:isCreature() then
        description = string.format("%s\n [PVP Kills: %d] \n [PVP Deaths: %d] \n",
            description, math.max(0, creature:getStorageValue(167912)), math.max(0, creature:getStorageValue(167913)))
    end
	
	-- MARRY  
	if LOOK_MARRIAGE_DESCR and creature:isCreature() then
if creature:isPlayer() then
description = description .. self:getMarriageDescription(creature)
end
end
	self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end

function Player:onLookInTrade(partner, item, distance)
	self:sendTextMessage(MESSAGE_INFO_DESCR, "You see " .. item:getDescription(distance))
end

function Player:onLookInShop(itemType, count)
	return true
end

function Player:onMoveItem(item, count, fromPosition, toPosition, fromCylinder, toCylinder)

--- LIONS ROCK START 

if self:getStorageValue(lionrock.storages.playerCanDoTasks) - os.time() < 0 then
        local p, i = lionrock.positions, lionrock.items
        local checkPr = false
        if item:getId() == lionrock.items.ruby and toPosition.x == p.ruby.x
                and toPosition.y == p.ruby.y  and toPosition.z == p.ruby.z then
            -- Ruby
            self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You place the ruby on the small socket. A red flame begins to burn.")
            checkPr = true
            if lionrock.taskactive.ruby ~= true then
                lionrock.taskactive.ruby = true
            end
           
            local tile = Tile(p.ruby)
            if tile:getItemCountById(i.redflame) < 1 then
                Game.createItem(i.redflame, 1, p.ruby)
            end
        end
       
        if item:getId() == lionrock.items.sapphire and toPosition.x == p.sapphire.x
                and toPosition.y == p.sapphire.y  and toPosition.z == p.sapphire.z then
            -- Sapphire
            self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You place the sapphire on the small socket. A blue flame begins to burn.")
            checkPr = true
            if lionrock.taskactive.sapphire ~= true then
                lionrock.taskactive.sapphire = true
            end
           
            local tile = Tile(p.sapphire)
            if tile:getItemCountById(i.blueflame) < 1 then
                Game.createItem(i.blueflame, 1, p.sapphire)
            end
        end
       
        if item:getId() == lionrock.items.amethyst and toPosition.x == p.amethyst.x
                and toPosition.y == p.amethyst.y  and toPosition.z == p.amethyst.z then
            -- Amethyst
            self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You place the topaz on the small socket. A yellow flame begins to burn.")
            checkPr = true
            if lionrock.taskactive.amethyst ~= true then
                lionrock.taskactive.amethyst = true
            end
           
            local tile = Tile(p.amethyst)
            if tile:getItemCountById(i.yellowflame) < 1 then
                Game.createItem(i.yellowflame, 1, p.amethyst)
            end
        end
       
        if item:getId() == lionrock.items.topaz and toPosition.x == p.topaz.x
                and toPosition.y == p.topaz.y  and toPosition.z == p.topaz.z then
            -- Topaz
            self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You place the amethyst on the small socket. A violet flame begins to burn.")
            checkPr = true
            if lionrock.taskactive.topaz ~= true then
                lionrock.taskactive.topaz = true
            end
           
            local tile = Tile(p.topaz)
            if tile:getItemCountById(i.violetflame) < 1 then
                Game.createItem(i.violetflame, 1, p.topaz)
            end
        end
       
        if checkPr == true then
            -- Adding the Fountain which gives present
            if lionrock.taskactive.ruby == true and lionrock.taskactive.sapphire == true
                and lionrock.taskactive.amethyst == true and lionrock.taskactive.topaz == true then
               
                local fountain = Game.createItem(i.rewardfountain, 1, { x=33073, y=32300, z=9})
                fountain:setActionId(41357)
               local stone = Tile({ x=33073, y=32300, z=9}):getItemById(3608)
			if stone ~= nil then
			stone:remove()
			end
                self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Something happens at the centre of the room ...");
            end
           
            -- Removing Item
            item:remove(1)
        end
    end
	
	---- LIONS ROCK END 

	local exhaust = { } -- SSA exhaust
    if toPosition.x == CONTAINER_POSITION and toPosition.y == CONST_SLOT_NECKLACE and item:getId() == 2197 then
        local pid = self:getId()
        if exhaust[pid] then   
            self:sendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED)    
            return false
        else
            exhaust[pid] = true
            addEvent(function() exhaust[pid] = false end, 2000, pid)
            return true
        end
    end

	-- Store Inbox
	local containerIdFrom = fromPosition.y - 64
	local containerFrom = self:getContainerById(containerIdFrom)
	if (containerFrom) then
		if (containerFrom:getId() == ITEM_STORE_INBOX and toPosition.y >= 1 and toPosition.y <= 11 and toPosition.y ~= 3) then
			self:sendCancelMessage(RETURNVALUE_CONTAINERNOTENOUGHROOM)
			return false
		end
	end

	local containerTo = self:getContainerById(toPosition.y-64)
	if (containerTo) then
		if (containerTo:getId() == ITEM_STORE_INBOX) then
			self:sendCancelMessage(RETURNVALUE_CONTAINERNOTENOUGHROOM)
			return false
		end
	end

	-- No move items with actionID 8000
	if item:getActionId() == NOT_MOVEABLE_ACTION then
		self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
		return false
	end

	-- Check two-handed weapons 
	if toPosition.x ~= CONTAINER_POSITION then
		return true
	end

	if item:getTopParent() == self and bit.band(toPosition.y, 0x40) == 0 then	
		local itemType, moveItem = ItemType(item:getId())
		if bit.band(itemType:getSlotPosition(), SLOTP_TWO_HAND) ~= 0 and toPosition.y == CONST_SLOT_LEFT then
			moveItem = self:getSlotItem(CONST_SLOT_RIGHT)	
		elseif itemType:getWeaponType() == WEAPON_SHIELD and toPosition.y == CONST_SLOT_RIGHT then
			moveItem = self:getSlotItem(CONST_SLOT_LEFT)
			if moveItem and bit.band(ItemType(moveItem:getId()):getSlotPosition(), SLOTP_TWO_HAND) == 0 then
				return true
			end
		end

		if moveItem then
			local parent = item:getParent()
			if parent:getSize() == parent:getCapacity() then
				self:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_CONTAINERNOTENOUGHROOM))
				return false
			else
				return moveItem:moveTo(parent)
			end
		end
	end

	-- Reward System
	if toPosition.x == CONTAINER_POSITION then
		local containerId = toPosition.y - 64
		local container = self:getContainerById(containerId)
		if not container then
			return true
		end

		-- Do not let the player insert items into either the Reward Container or the Reward Chest
		local itemId = container:getId()
		if itemId == ITEM_REWARD_CONTAINER or itemId == ITEM_REWARD_CHEST then
			self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
			return false
		end

		-- The player also shouldn't be able to insert items into the boss corpse
		local tile = Tile(container:getPosition())
		for _, item in ipairs(tile:getItems() or { }) do
			if item:getAttribute(ITEM_ATTRIBUTE_CORPSEOWNER) == 2^31 - 1 and item:getName() == container:getName() then
				self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
				return false
			end
		end
	end

	-- Do not let the player move the boss corpse.
	if item:getAttribute(ITEM_ATTRIBUTE_CORPSEOWNER) == 2^31 - 1 then
		self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
		return false
	end

	-- Players cannot throw items on reward chest
	local tile = Tile(toPosition)
	if tile and tile:getItemById(ITEM_REWARD_CHEST) then
		self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
		self:getPosition():sendMagicEffect(CONST_ME_POFF)
		return false
	end

	-- Players cannot throw items on teleports
	if blockTeleportTrashing and toPosition.x ~= CONTAINER_POSITION then
		local thing = Tile(toPosition):getItemByType(ITEM_TYPE_TELEPORT)
		if thing then
			self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
			self:getPosition():sendMagicEffect(CONST_ME_POFF)
			return false
		end
	end

	-- No move parcel very heavy
	if item:getWeight() > 90000 and item:getId() == ITEM_PARCEL then 
		self:sendCancelMessage('YOU CANNOT MOVE PARCELS TOO HEAVY.')
		return false 
	end

	-- No move if item count > 26 items
	if tile and tile:getItemCount() > 26 then
		self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
		return false
	end

	if tile and tile:getItemById(370) then -- Trapdoor
		self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
		self:getPosition():sendMagicEffect(CONST_ME_POFF)
		return false
	end 
	return true
end

function Player:onMoveCreature(creature, fromPosition, toPosition)
	return true
end

function Player:onReport(message, position, category)
	if self:getAccountType() == ACCOUNT_TYPE_NORMAL then
		return false
	end

	local name = self:getName()
	local file = io.open("data/reports/" .. name .. " report.txt", "a")

	if not file then
		self:sendTextMessage(MESSAGE_EVENT_DEFAULT, "There was an error when processing your report, please contact a gamemaster.")
		return true
	end

	io.output(file)
	io.write("------------------------------\n")
	io.write("Name: " .. name)
	if category == BUG_CATEGORY_MAP then
		io.write(" [Map position: " .. position.x .. ", " .. position.y .. ", " .. position.z .. "]")
	end
	local playerPosition = self:getPosition()
	io.write(" [Player Position: " .. playerPosition.x .. ", " .. playerPosition.y .. ", " .. playerPosition.z .. "]\n")
	io.write("Comment: " .. message .. "\n")
	io.close(file)

	self:sendTextMessage(MESSAGE_EVENT_DEFAULT, "Your report has been sent to " .. configManager.getString(configKeys.SERVER_NAME) .. ".")
	return true
end

function Player:onTurn(direction)
	if self:getGroup():getAccess() and self:getDirection() == direction then
		local nextPosition = self:getPosition()
		nextPosition:getNextPosition(direction)

		self:teleportTo(nextPosition, true)
	end

	return true
end

function Player:onTradeRequest(target, item)
	return true
end

function Player:onTradeAccept(target, item, targetItem)
	return true
end

local soulCondition = Condition(CONDITION_SOUL, CONDITIONID_DEFAULT)
soulCondition:setTicks(4 * 60 * 1000)
soulCondition:setParameter(CONDITION_PARAM_SOULGAIN, 1)

local function useStamina(player)
	local staminaMinutes = player:getStamina()
	if staminaMinutes == 0 then
		return
	end

	local playerId = player:getId()
	local currentTime = os.time()
	local timePassed = currentTime - nextUseStaminaTime[playerId]
	if timePassed <= 0 then
		return
	end

	if timePassed > 60 then
		if staminaMinutes > 2 then
			staminaMinutes = staminaMinutes - 2
		else
			staminaMinutes = 0
		end
		nextUseStaminaTime[playerId] = currentTime + 120
	else
		staminaMinutes = staminaMinutes - 1
		nextUseStaminaTime[playerId] = currentTime + 60
	end
	player:setStamina(staminaMinutes)
end

	-- exp card
    local BONUS_EXP_STORAGE = 1234
    local BONUS_EXP_MULT = 1.3
    -- exp card
 
function Player:onGainExperience(source, exp, rawExp)
 
     if not source or source:isPlayer() then
         return exp
     end
       
   
    -- Soul regeneration
    local vocation = self:getVocation()
    if self:getSoul() < vocation:getMaxSoul() and exp >= self:getLevel() then
        soulCondition:setParameter(CONDITION_PARAM_SOULTICKS, vocation:getSoulGainTicks() * 1000)
        self:addCondition(soulCondition)
    end
 
    -- Apply experience stage multiplier
    exp = exp * Game.getExperienceStage(self:getLevel())
	

    -- Stamina modifier
    if configManager.getBoolean(configKeys.STAMINA_SYSTEM) then
        useStamina(self)
 
        local staminaMinutes = self:getStamina()
        if staminaMinutes > 2400 and self:isPremium() then	
			exp = exp * 1.5
        elseif staminaMinutes <= 840 then
            exp = exp * 0.5
        end
    end

   
   -- exp card
 if self:getStorageValue(BONUS_EXP_STORAGE) - os.time() > 0 then
  exp = exp * BONUS_EXP_MULT
 end
    -- exp card
 
    return exp
	

end
 
 
function Player:onLoseExperience(exp)
    return exp
end

function Player:onGainSkillTries(skill, tries)
	if APPLY_SKILL_MULTIPLIER == false then
		return tries
	end

	if skill == SKILL_MAGLEVEL then
		return tries * configManager.getNumber(configKeys.RATE_MAGIC)
	end
	return tries * configManager.getNumber(configKeys.RATE_SKILL)
end

 

 

e isso actions/scripts/exp.lua:

 

Spoiler

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local player = Player(cid)
    if player:getStorageValue(1234) >= os.time() then
	player:sendTextMessage(MESSAGE_INFO_DESCR, "You already have double exp!")
        return true
    end
   
    player:setStorageValue(1234, os.time() + 3600)
    Item(item.uid):remove(1)
	player:sendTextMessage(MESSAGE_INFO_DESCR, "You've activated Experience Card.") 
	player:getPosition():sendMagicEffect(15)
    return true
end

 

 

Link para o post
Compartilhar em outros sites
  • Erimyth pinned this tópico
  • Erimyth featured this tópico
  • Erimyth unfeatured e unpinned this tópico

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por Johncore
      Olá galera, é com muita dedicação que trago para este forum uma exclusividade que só eu tinha.
      Mapa Dragonsouls 11x 99%, tem alguns detalhes de sqm ou borda que você possa precisar fazer,
      Dragonsouls é um servidor ATS Custom, baseado em senhor dos aneis. via muita gente perguntando por esse mapa e eu tinha a muitos anos, resolvi converter.
      mas ele está 99% pronto para uso.
       
      Esse mapa é 100% compativel para rodar na Datapack Otg Server 11,
      Otg Server é um projeto que trabalha com varias datapacks de tibia rl e ATS Custom.
       
      Github:
      https://github.com/otg-br/
       
      Participe do grupo Otg Server:  
      https://chat.whatsapp.com/EWV3dVvS6nt1em7q23FGu7
       
       
      MAPA:
       
      INICIAL ISLAND

       
      CARLIN

       
      CIDADE TIRITH

       
      CIDADE BREE

       
       
       
       
      world.zip
    • Por Johncore
      Olá pessoas, estou disponibilizando aqui mais uma exclusividade que é o Mapa Evolunia, ele é baseado no servidor Evolunia.net
       
      Esse mapa é 100% compativel para rodar na Datapack Otg Server 11x,
      Otg Server é um projeto que trabalha com varias datapacks de tibia rl e ATS Custom.
       
      Participe do grupo Otg Server:  
      https://chat.whatsapp.com/EWV3dVvS6nt1em7q23FGu7
       
      Creditos:
      evolunia
      world.zip
    • Por Johncore
      Otg Server é um projeto fork do The Forgotten Server 1.3, feito por brasileiros que visam sempre por estabilidade, um código mais clean, temos no projeto várias Datapacks como
      Global 11.0, Global 8.6, Global 8.0, RadBR 11.0, Evolutions 11.0, Yurots Classic 11.0, nossa base também é excelente para rodar projetos que são mapa Baiak ou ATS Custom pelo baixissimo uso de cpu e fix do Decay de itens.

      Todos são bem vindos para colaborar com o projeto... que não visa nenhum lucro financeiro, queremos apenas colaborar com a comunidade OTSERV,
      temos ouvido de muitas pessoas que procuram uma base estável, limpa, esse é o nosso objetivo nesse projeto.
       
      Estamos a procura de programadores/dev/webmaster que queiram ajudar / que tenham tempo e serão recompensados por isso.
       
      Nossa Datapack principal Global 11.00 contem as seguintes features:
      CAST SYSTEM ✅
      AUTOLOOT ✅
      WINTER UPDATE 2023 ✅
      SUMMER UPDATE 2023 ✅
      ADDONS 13.22 UPDATE ✅
      MONTARIAS 13.22 UPDATE ✅
      ITEMS 13.22 UPDATE ✅
      DAILY REWARD ✅
      IMBUEMENTS ✅
      PREY ✅
      EXERCISE WEAPONS ✅
      HIRELINGS NPCS ✅
      ANTI ROLLBACK ✅
       
       
      Github Global 11x:  💾
      https://github.com/otg-br/global-11x
      Clients e outras ferramentas:  💾
      https://github.com/otg-br/tools
      Github Otg Gesior:  💾
      https://github.com/otg-br/gesior
      Github Otg Otclientv8:  💾
      https://github.com/otg-br/otclientv8
      Wiki Otg:  💾
      https://github.com/otg-br/global-11x/wiki
       
       
      Creditos:
      TFS Team Erick Nunes Gui Bruxo Worthdavi LuSKT Leo Pereira Luan Luciano Cjaker Comedinhas Nekiro OTG Colaborators
    • Por Dnzk21
      COMO POSSO IMPORTAR UMA CITY EMCIMA DE OUTRA CITY SEM PERDER AS HOUSES
      ALGUEM PODE M,E AJUDAR 
      E A MESMA CITY MJAIS QUANDO IMPORTO PERDE TODAS CASAS QUANDO SALVA E ABRE O SERVIDOR
    • Por Johncore
      Arcadia é uma cidade custom bem bonita que pode ser encontrada no servidor AureraGlobal,
      Por ter esse conteudo aqui em primeira mão, resolvi disponibilizar para a comunidade.
       


       
      Creditos:
      Aurera Team
      Johncorex
      Arcadia-spawn.xml Arcadia-house.xml Arcadia.otbm

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo