Ir para conteúdo
  • Cadastre-se

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


Posts Recomendados

1 minuto atrás, thigriku disse:

@login12, poderia adicionar pra mim?

 

Quando adiciono aparece o erro na distro:

[Warning - Events::load] Can not load script: player.lua
data/events/scripts/player.lua:260: 'then' expected near 'if'

 

Meu players.lua:
player.lua

 

Ops, foi um erro meu... desculpe.

Copie novamente o script e tente.

 

@This life is filled with hurt

When happiness doesn't work

Trust me and take my hand

When the lights go out you will understand

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

 

@Jaurez e @Nicrox, porque o "fish" não é o peixe de comer?

como faço pra colocar o food no lugar desse item?

 

@login12, seu script deu um probleminha...

 

Os chars não conseguem colocar itens no corpo ou nas bags/bps, mesmo com cap sobrando.

Fiz algo de errado?

Editado por thigriku (veja o histórico de edições)

amera_banner.gif.29bbf8f5ce75868cb628288e527ef273.gif

www.Amera-Global.com - Rádio Amera ATS • TeamSpeak 3 • Cliente 10.99 e 11.00

Link para o post
Compartilhar em outros sites

@login12, este é meu player_OLD.lua

Adiciona pra mim fazendo favor seu código pra eu testar? valeu!

@login12 olha o erro com seu código na hora de tentar colocar algum item na BP:

 

Lua Script Error: [Event Interface]
data/events/scripts/player.lua:Player@onMoveItem
data/events/scripts/player.lua:235: attempt to index a nil value
stack traceback:
        [C]: in function '__index'
        data/events/scripts/player.lua:235: in function <data/events/scripts/player.lua:233>
 

amera_banner.gif.29bbf8f5ce75868cb628288e527ef273.gif

www.Amera-Global.com - Rádio Amera ATS • TeamSpeak 3 • Cliente 10.99 e 11.00

Link para o post
Compartilhar em outros sites

@ADM Argel, instala esse pack de programas e testa depois...

 

https://www.computerbase.de/downloads/systemtools/all-in-one-runtimes/
 

Você poderia me passar o player.lua com limitador de items por SQM funcionando?

amera_banner.gif.29bbf8f5ce75868cb628288e527ef273.gif

www.Amera-Global.com - Rádio Amera ATS • TeamSpeak 3 • Cliente 10.99 e 11.00

Link para o post
Compartilhar em outros sites

@Jaurez, qual caminho voce deixa no seu config? e qual o caminho no vps?

amera_banner.gif.29bbf8f5ce75868cb628288e527ef273.gif

www.Amera-Global.com - Rádio Amera ATS • TeamSpeak 3 • Cliente 10.99 e 11.00

Link para o post
Compartilhar em outros sites
Em 07/02/2017 ás 21:56, Leandro Marcondes disse:

Baixei aqui, abri o config Lua, coloquei MEU IP. Salvei

 

Abro o executável, ele fecha 2 segundos depois, alguém sabe o que pode ser?

@Leandro Marcondes Você usa XAMPP ou programa similar pra conectar o server?

Você tem a database com nome de usuário e senha? 

Você colocou o nome de usuário e senha no arquivo config.lua?

Pode ser que esteja faltando apenas um detalhe para resolver.

Seria interessante você ler um tutorial.

ATT,

Jaurez

Link para o post
Compartilhar em outros sites

@thigriku

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

-- Internal Use
STONE_SKIN_AMULET = 2197
ITEM_STORE_INBOX = 26052

function Player:onBrowseField(position)
	return true
end

function Player:onLook(thing, position, distance)
	local description = 'You see '
	if thing:isItem() then
		if thing.actionid == 5640 then
			description = description .. 'a honeyflower patch.'
		elseif thing.actionid == 5641 then
			description = description .. 'a banana palm.'
		else
			description = description .. thing:getDescription(distance)
		end
	else
		description = description .. thing:getDescription(distance)
	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

	if self:getGroup():getAccess() then
		if thing:isItem() then
			description = string.format('%s\nItem ID: %d', description, thing.itemid)

			local actionId = thing.actionid
			if actionId ~= 0 then
				description = string.format('%s, Action ID: %d', description, actionId)
			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

			description = description .. '.'
			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() and thing:isPlayer() then
			description = string.format('%s\nIP: %s.', description, Game.convertIpToString(thing:getIp()))
		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:onMoveCreature(creature, fromPosition, toPosition)
	return true
end

function Player:onTurn(direction)
	return true
end

function Player:onTradeRequest(target, item)
	if isInArray({1738, 1740, 1747, 1748, 1749, 8766}, item.itemid) and item.actionid > 0 or item.actionid == 5640 then
		self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
		return false
	end
	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 = 61398
local BONUS_EXP_MULT = 1.3

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

	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

function Player:onMoveItem(item, count, fromPosition, toPosition, fromCylinder, toCylinder)
	-- 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

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

	-- SSA exhaust
	local exhaust = { } -- SSA exhaust
	if toPosition.x == CONTAINER_POSITION and toPosition.y == CONST_SLOT_NECKLACE and item:getId() == STONE_SKIN_AMULET 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

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

	if toPosition ~= nil then
	    if Tile(toPosition):getItemCount() > 6 then -- Checagem se o tile possui mais de 6 items...
	        self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
	        return false
	    end
	end

	return true
end

 

Tente isso ^

 

@This life is filled with hurt

When happiness doesn't work

Trust me and take my hand

When the lights go out you will understand

Link para o post
Compartilhar em outros sites

 

@Juarez

Oi, você conseguiu resolver todos esses erros no console? E também, por que ele congela toda vez que eu viajo para outra cidade ou eu entro em um teletransporte? Ele apenas congela, mas eu posso enviar comandos de Deus, como / cidade. Você poderia tentar fazer "/town rathleton" andando e então enviando "/town thais"? Ele depura para mim tão desapontado por causa deste erro. desde já, obrigado

 

Desculpe pelo meu horrível português, não é minha língua nativa

Link para o post
Compartilhar em outros sites
11 horas atrás, thigriku disse:

@ADM Argel, instala esse pack de programas e testa depois...

 

https://www.computerbase.de/downloads/systemtools/all-in-one-runtimes/
 

Você poderia me passar o player.lua com limitador de items por SQM funcionando?

 

Use esse meu amigo, é o que uso e está funcionando perfeitamente o limitador de itens por stack. quanto ao programa que você me informou vou testar agora.

Spoiler

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

-- Internal Use
STONE_SKIN_AMULET = 2197
ITEM_STORE_INBOX = 26052

function Player:onBrowseField(position)
    return true
end

function Player:onLook(thing, position, distance)
    local description = 'You see '
    if thing:isItem() then
        if thing.actionid == 5640 then
            description = description .. 'a honeyflower patch.'
        elseif thing.actionid == 5641 then
            description = description .. 'a banana palm.'
        else
            description = description .. thing:getDescription(distance)
        end
    else
        description = description .. thing:getDescription(distance)
    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

    if self:getGroup():getAccess() then
        if thing:isItem() then
            description = string.format('%s\nItem ID: %d', description, thing.itemid)

            local actionId = thing.actionid
            if actionId ~= 0 then
                description = string.format('%s, Action ID: %d', description, actionId)
            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

            description = description .. '.'
            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() and thing:isPlayer() then
            description = string.format('%s\nIP: %s.', description, Game.convertIpToString(thing:getIp()))
        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:onMoveCreature(creature, fromPosition, toPosition)
    return true
end

function Player:onTurn(direction)
    return true
end

function Player:onTradeRequest(target, item)
    if isInArray({1738, 1740, 1747, 1748, 1749, 8766}, item.itemid) and item.actionid > 0 or item.actionid == 5640 then
        self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
        return false
    end
    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 = 61398
local BONUS_EXP_MULT = 2.0

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

    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

function Player:onMoveItem(item, count, fromPosition, toPosition, fromCylinder, toCylinder)
        
    -- 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
    
    -- Do not stop trying this test
    -- 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 > 20 items
    
    local tile = Tile(toPosition)
    if tile and tile:getItemCount() > 20 then
        self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
        return false
    end
    
    -- SSA Exaust Tibiapost
    if item:getId() == 2197 and toPosition.y == CONST_SLOT_NECKLACE then
            if (os.time() - self:getStorageValue(100)) >= 5 then
                self:setStorageValue(100, os.time())
            else
                self:sendCancelMessage("You can't push stone skin amulet so fast!")
                return false
            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

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

    -- 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
    
    if tile and tile:getItemById(370) then -- Trapdoor
        self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
        self:getPosition():sendMagicEffect(CONST_ME_POFF)
        return false
    end

    
    return true
end
 

 

Link para o post
Compartilhar em outros sites

@ADM Argel, seu script funcionou 100%! Obrigado!

 

Esse programa instalada e atualiza todos os softwares que rodam jogos e alguns programas como, Java, Flash, C++, .Net Framework, Direct X...

Acredito que vai resolver seu problema com os gráficos.

 

Caso não resolva, pode atualizar os drivers tbm.

amera_banner.gif.29bbf8f5ce75868cb628288e527ef273.gif

www.Amera-Global.com - Rádio Amera ATS • TeamSpeak 3 • Cliente 10.99 e 11.00

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