Mod Scripts Manager - Novo para otclient


Faramir

Recommended Posts

Boa tarde,

 

Tem um script no tópico:
Aonde o GuGu redigiu para estou os pots vazios: 

esse script dropa suas potions vazias, é só colocar o id da potion desejada, eu já deixei comentado ali no script

--[[ script de dropar potions
id das potions = {283 = Strong ,284 = Great, 285 = Normal}
]]

cycleEvent( function() 
	if g_game.isOnline() then
		local id = '284'
		local player = g_game.getLocalPlayer()
		local mypos = player:getPosition()
		local flask = player:getItem(id)
		
		if flask == nil then
			return
		elseif flask:getCount() > 0 then
			g_game.move(flask, mypos, flask:getCount())
		end
	end
end, 1000/2) 

 

Gostaria de saber se é possível otimizar para que estoure as potions dentro da BP?

Ficaria muito melhor porque com esse script antigo o bot reseta o waypoint a cada potion vazia que ele encontra no chão. Se ele estourasse dentro da BP o Client rodaria muito mais liso.

Link to comment
Share on other sites

Em 11/04/2019 at 15:09, Tigerson disse:

Boa tarde,

 

Tem um script no tópico:
Aonde o GuGu redigiu para estou os pots vazios: 

esse script dropa suas potions vazias, é só colocar o id da potion desejada, eu já deixei comentado ali no script


--[[ script de dropar potions
id das potions = {283 = Strong ,284 = Great, 285 = Normal}
]]

cycleEvent( function() 
	if g_game.isOnline() then
		local id = '284'
		local player = g_game.getLocalPlayer()
		local mypos = player:getPosition()
		local flask = player:getItem(id)
		
		if flask == nil then
			return
		elseif flask:getCount() > 0 then
			g_game.move(flask, mypos, flask:getCount())
		end
	end
end, 1000/2) 

 

Gostaria de saber se é possível otimizar para que estoure as potions dentro da BP?

Ficaria muito melhor porque com esse script antigo o bot reseta o waypoint a cada potion vazia que ele encontra no chão. Se ele estourasse dentro da BP o Client rodaria muito mais liso.

Fiz um aqui... da pra configurar mais ids e a quantidade que você precisa ter do item pra desintegrar.

 

local desintegrate = {283, 284, 285}
local countToDesintegrate = 50

cycleEvent(function()
	if g_game.isOnline() then
		local self = g_game.getLocalPlayer()
		local moneyrune = 3193
		for i = 1, #desintegrate do
			local item = self:getItem(desintegrate[i])
			if item ~= nil then
				if item:getCount() >= countToDesintegrate then
					g_game.useInventoryItemWith(moneyrune, item)
					break
				end
			end
		end
	end
end, 200)

 

  • Like 4
Link to comment
Share on other sites

16 horas atrás, ThiagoMetal disse:

Fiz um aqui... da pra configurar mais ids e a quantidade que você precisa ter do item pra desintegrar.

 


desintegrate = {283, 284, 285}
countToDesintegrate = 50

cycleEvent(function()
	if g_game.isOnline() then
		self = g_game.getLocalPlayer()
		moneyrune = 3193
		for i = 1, #desintegrate do
			item = self:getItem(desintegrate[i])
			if item ~= nil then
				if item:getCount() >= countToDesintegrate then
					g_game.useInventoryItemWith(moneyrune, item)
					break
				end
			end
		end
	end
end, 200)

 

Acabei de testar.

Funcionou perfeitamente.

Muito obrigado!

  • Like 1
Link to comment
Share on other sites

Com base na script do @ThiagoMetal fiz uma de estourar gems:

 

desintegrate = {283, 284, 285, 1781, 3039, 3038, 1782, 3036, 1780, 3041, 3037}
countToDesintegrate = 1

cycleEvent(function()
    if g_game.isOnline() then
        self = g_game.getLocalPlayer()
        moneyrune = 3193
        for i = 1, #desintegrate do
            item = self:getItem(desintegrate)
            if item ~= nil then
                if item:getCount() >= countToDesintegrate then
                    g_game.useInventoryItemWith(moneyrune, item)
                    break
                end
            end
        end
    end
end, 200)

Edited by Tigerson
Refinei o código pois não estava funcionando em conjunto com o estoura potion vazia
Link to comment
Share on other sites

On 12/04/2019 at 11:53 PM, ThiagoMetal said:

Fiz um aqui... da pra configurar mais ids e a quantidade que você precisa ter do item pra desintegrar.

 


local desintegrate = {283, 284, 285}
local countToDesintegrate = 50

cycleEvent(function()
	if g_game.isOnline() then
		local self = g_game.getLocalPlayer()
		local moneyrune = 3193
		for i = 1, #desintegrate do
			local item = self:getItem(desintegrate[i])
			if item ~= nil then
				if item:getCount() >= countToDesintegrate then
					g_game.useInventoryItemWith(moneyrune, item)
					break
				end
			end
		end
	end
end, 200)

 

nao funfa com potao

Link to comment
Share on other sites

17 horas atrás, Uzumaki Naruto disse:

oi, tem pra usa obsidian nos dragao?

Não consegui testar muito bem, mas parece estar funcionando, fiz pra usar obsidian knife e tambem blessed wooden stake.

local skinableCorpses = {4011,4047,4052,4057,4062,4272,4286,4321,4324,4327,8106,4112,4212}
local stakeableCorpses = {4097,4138}
local knifeID = 5908
local stakeID = 5942

function isInArray(array, item)
	for k, v in ipairs(array) do
		if v == item then
			return k
		end
	end
	return false
end

cycleEvent(function()
	if g_game.isOnline() then
		local self = g_game.getLocalPlayer()
		local selfPos = self:getPosition()
		for x = -1, 1 do
			for y = -1, 1 do
				local pos = {x = selfPos.x + x, y = selfPos.y + y, z = selfPos.z}
				local tile = g_map.getTile(pos)
				if tile ~= nil then
					local item = tile:getTopThing()
					if isInArray(skinableCorpses, item:getId()) then
						g_game.useInventoryItemWith(knifeID, item)
						break
					elseif isInArray(stakeableCorpses, item:getId()) then
						g_game.useInventoryItemWith(stakeID, item)
						break
					end
				end
			end
		end
	end
end, 200)

 

  • Like 1
Link to comment
Share on other sites

17 hours ago, ThiagoMetal said:

Não consegui testar muito bem, mas parece estar funcionando, fiz pra usar obsidian knife e tambem blessed wooden stake.


local skinableCorpses = {4011,4047,4052,4057,4062,4272,4286,4321,4324,4327,8106,4112,4212}
local stakeableCorpses = {4097,4138}
local knifeID = 5908
local stakeID = 5942

function isInArray(array, item)
	for k, v in ipairs(array) do
		if v == item then
			return k
		end
	end
	return false
end

cycleEvent(function()
	if g_game.isOnline() then
		local self = g_game.getLocalPlayer()
		local selfPos = self:getPosition()
		for x = -1, 1 do
			for y = -1, 1 do
				local pos = {x = selfPos.x + x, y = selfPos.y + y, z = selfPos.z}
				local tile = g_map.getTile(pos)
				if tile ~= nil then
					local item = tile:getTopThing()
					if isInArray(skinableCorpses, item:getId()) then
						g_game.useInventoryItemWith(knifeID, item)
						break
					elseif isInArray(stakeableCorpses, item:getId()) then
						g_game.useInventoryItemWith(stakeID, item)
						break
					end
				end
			end
		end
	end
end, 200)

 

funfo joul vlw

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Pessoal que manja das linguagens de programação, eu tentei, mas não consegui.

 

Será que teria como fazer um script para que, quando o monstro estiver com life inferior a uma determinada porcentagem, o boneco comece a atacar com uma determinada magia?

 

Por exemplo, trapei os Juggernaut e quero que, quando ele chegue a 30% de vida, meu boneco comece a atacar com exori fur.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
  • 5 months later...
  • brendoonh unfeatured this topic
  • 1 year later...
5 horas atrás, lukasplis disse:

Eu fiz isso e não consigo mais logar na conta, da erro kkkk

image.png.93a5dba39266e594e367946700c6e0e3.png

Se vc baixou o cliente recentemente, ele já estava vindo com o manager não estava precisando fazer, se vc quiser eu posso te ajudar com algumas coisas nas confg dele, so vc mandar uma msg pra mim e a gente marca um horario 

Link to comment
Share on other sites

Em 18/12/2021 at 16:46, Teemo disse:

Se vc baixou o cliente recentemente, ele já estava vindo com o manager não estava precisando fazer, se vc quiser eu posso te ajudar com algumas coisas nas confg dele, so vc mandar uma msg pra mim e a gente marca um horario 

era isso mesmo, eu percebi recente que o fórum está com algumas informações bem antigas, então nem toda "alteração" eu vou poder levar em conta...

 

mas mano, eu sinto que o OTC n cura direito, vejo vários momentos que meu personagem não cura quando deveria... n consigo imaginar se algo está dando exhausted ou se ele simplesmente falha as vezes... vc n teria algum script de heal% pra eu adicionar como um suporte pra cura original do bototc?

Link to comment
Share on other sites

Em 26/12/2021 at 01:40, lukasplis disse:

era isso mesmo, eu percebi recente que o fórum está com algumas informações bem antigas, então nem toda "alteração" eu vou poder levar em conta...

 

mas mano, eu sinto que o OTC n cura direito, vejo vários momentos que meu personagem não cura quando deveria... n consigo imaginar se algo está dando exhausted ou se ele simplesmente falha as vezes... vc n teria algum script de heal% pra eu adicionar como um suporte pra cura original do bototc?

Eu nunca tive problemas com a cura do otc teria que olhar com vc certinho como esta configurando entre outras coisas

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...