Ir para conteúdo
Propaganda

"Sistema" Dropar Pokémon no Chão


Posts Recomendados

Gostaria de saber se alguém tem esse "sistema/codigo" para disponibilizar
Ele da um aviso previo para o player, quando ele tenta jogar um pokemon no chão.

 

image.png

  • Like 3
  • Thanks 1
Link para o comentário
Compartilhar em outros sites

15 horas atrás, Rgziin disse:

Gostaria de saber se alguém tem esse "sistema/codigo" para disponibilizar
Ele da um aviso previo para o player, quando ele tenta jogar um pokemon no chão.

 

image.png

na base do poke light tem isso ai so pegar e botsr no teu sv

Link para o comentário
Compartilhar em outros sites

21 minutos atrás, PokeXTibia disse:

na base do poke light tem isso ai so pegar e botsr no teu sv

Poderia me passar o link porfavor?

Link para o comentário
Compartilhar em outros sites

Boa, também quero, hoje está tendo perguntas boas aqui

Link para o comentário
Compartilhar em outros sites

2 horas atrás, Rgziin disse:

Poderia me passar o link porfavor?

sim, um istante

 

Link para o comentário
Compartilhar em outros sites

 

Em 30/04/2024 em 21:15, Rgziin disse:

Gostaria de saber se alguém tem esse "sistema/codigo" para disponibilizar
Ele da um aviso previo para o player, quando ele tenta jogar um pokemon no chão.

 

image.png

Em modules\game_interface\game_interface.lua procure por if g_game.isOnline() then
    show()
 e adicione antes do ultimo end:
 

Spoiler
aWindow = g_ui.displayUI('a')
  hideDropWindow()

 


Depois adicione:

Spoiler
function hideDropWindow()
	aWindow:hide()
	return true
end

function showDropWindow(item, pos)
	aWindow:setVisible(true)
	aWindow:show()
	aWindow:raise()
	aWindow:focus()
	aWindow.onEnter = function() g_game.move(item, pos, 1) hideDropWindow() end
	aWindow:getChildById('yesButton').onClick = function() g_game.move(item, pos, 1) hideDropWindow() end
	return true
end

 

Em modules\game_interface\widgets\uigamemap.lua adicione:
 

Spoiler
local function isP(id) -- ClientID 
	-- if id >= 12248 and id <= 12719 then return true end
	-- if id == 13913 or id == 16038 then return true end
	-- if id >= 14571 and id <= 14600 then return true end
	-- if id >= 14617 and id <= 14618 then return true end
	-- if id >= 15183 and id <= 15384 then return true end
	-- if id >= 15437 and id <= 15451 then return true end
	-- if id >= 16017 and id <= 16019 then return true end
	if id >= 1 and id <= 65000 then return true end
	return false
end

 

Procure por function UIGameMap:onDrop(widget, mousePos) e substitua  tudo por:
 

Spoiler
function UIGameMap:onDrop(widget, mousePos)
  if not self:canAcceptDrop(widget, mousePos) then return false end

  local tile = self:getTile(mousePos)
  if not tile then return false end

  local thing = widget.currentDragThing
  local toPos = tile:getPosition() --Tem certeza que deseja jogar seu Pokémon ou mochila no chão?

  local frombag
  local thingPos = thing:getPosition()
  if thingPos.x == toPos.x and thingPos.y == toPos.y and thingPos.z == toPos.z then
    return false
  elseif tonumber(thingPos.x) and tonumber(thingPos.x) == 65535 then
	frombag = true
  else
	frombag = false
  end

	print("getId: "..thing:getId())

  if thing:isItem() and thing:getCount() > 1 then
    modules.game_interface.moveStackableItem(thing, toPos)
  elseif frombag and (thing:isContainer() or isP(thing:getId())) then
	showDropWindow(thing, toPos)
  else
    g_game.move(thing, toPos, 1)
  end

  return true
end

 

EDIT esqueci do arquivo a.otui na pasta modules\game_interface\

a.otui

  • Like 2
  • Thanks 2
Link para o comentário
Compartilhar em outros sites

9 horas atrás, carluccio disse:

 

Em modules\game_interface\game_interface.lua procure por if g_game.isOnline() then
    show()
 e adicione antes do ultimo end:
 

  Mostrar conteúdo oculto
aWindow = g_ui.displayUI('a')
  hideDropWindow()

 


Depois adicione:

  Mostrar conteúdo oculto
function hideDropWindow()
	aWindow:hide()
	return true
end

function showDropWindow(item, pos)
	aWindow:setVisible(true)
	aWindow:show()
	aWindow:raise()
	aWindow:focus()
	aWindow.onEnter = function() g_game.move(item, pos, 1) hideDropWindow() end
	aWindow:getChildById('yesButton').onClick = function() g_game.move(item, pos, 1) hideDropWindow() end
	return true
end

 

Em modules\game_interface\widgets\uigamemap.lua adicione:
 

  Mostrar conteúdo oculto
local function isP(id) -- ClientID 
	-- if id >= 12248 and id <= 12719 then return true end
	-- if id == 13913 or id == 16038 then return true end
	-- if id >= 14571 and id <= 14600 then return true end
	-- if id >= 14617 and id <= 14618 then return true end
	-- if id >= 15183 and id <= 15384 then return true end
	-- if id >= 15437 and id <= 15451 then return true end
	-- if id >= 16017 and id <= 16019 then return true end
	if id >= 1 and id <= 65000 then return true end
	return false
end

 

Procure por function UIGameMap:onDrop(widget, mousePos) e substitua  tudo por:
 

  Mostrar conteúdo oculto
function UIGameMap:onDrop(widget, mousePos)
  if not self:canAcceptDrop(widget, mousePos) then return false end

  local tile = self:getTile(mousePos)
  if not tile then return false end

  local thing = widget.currentDragThing
  local toPos = tile:getPosition() --Tem certeza que deseja jogar seu Pokémon ou mochila no chão?

  local frombag
  local thingPos = thing:getPosition()
  if thingPos.x == toPos.x and thingPos.y == toPos.y and thingPos.z == toPos.z then
    return false
  elseif tonumber(thingPos.x) and tonumber(thingPos.x) == 65535 then
	frombag = true
  else
	frombag = false
  end

	print("getId: "..thing:getId())

  if thing:isItem() and thing:getCount() > 1 then
    modules.game_interface.moveStackableItem(thing, toPos)
  elseif frombag and (thing:isContainer() or isP(thing:getId())) then
	showDropWindow(thing, toPos)
  else
    g_game.move(thing, toPos, 1)
  end

  return true
end

 

EDIT esqueci do arquivo a.otui na pasta modules\game_interface\

a.otuiIndisponível

Muito bom mano, obrigado, funcionou certinho ❤️

Link para o comentário
Compartilhar em outros sites

10 horas atrás, carluccio disse:

 

Em modules\game_interface\game_interface.lua procure por if g_game.isOnline() then
    show()
 e adicione antes do ultimo end:
 

  Mostrar conteúdo oculto
aWindow = g_ui.displayUI('a')
  hideDropWindow()

 


Depois adicione:

  Mostrar conteúdo oculto
function hideDropWindow()
	aWindow:hide()
	return true
end

function showDropWindow(item, pos)
	aWindow:setVisible(true)
	aWindow:show()
	aWindow:raise()
	aWindow:focus()
	aWindow.onEnter = function() g_game.move(item, pos, 1) hideDropWindow() end
	aWindow:getChildById('yesButton').onClick = function() g_game.move(item, pos, 1) hideDropWindow() end
	return true
end

 

Em modules\game_interface\widgets\uigamemap.lua adicione:
 

  Mostrar conteúdo oculto
local function isP(id) -- ClientID 
	-- if id >= 12248 and id <= 12719 then return true end
	-- if id == 13913 or id == 16038 then return true end
	-- if id >= 14571 and id <= 14600 then return true end
	-- if id >= 14617 and id <= 14618 then return true end
	-- if id >= 15183 and id <= 15384 then return true end
	-- if id >= 15437 and id <= 15451 then return true end
	-- if id >= 16017 and id <= 16019 then return true end
	if id >= 1 and id <= 65000 then return true end
	return false
end

 

Procure por function UIGameMap:onDrop(widget, mousePos) e substitua  tudo por:
 

  Mostrar conteúdo oculto
function UIGameMap:onDrop(widget, mousePos)
  if not self:canAcceptDrop(widget, mousePos) then return false end

  local tile = self:getTile(mousePos)
  if not tile then return false end

  local thing = widget.currentDragThing
  local toPos = tile:getPosition() --Tem certeza que deseja jogar seu Pokémon ou mochila no chão?

  local frombag
  local thingPos = thing:getPosition()
  if thingPos.x == toPos.x and thingPos.y == toPos.y and thingPos.z == toPos.z then
    return false
  elseif tonumber(thingPos.x) and tonumber(thingPos.x) == 65535 then
	frombag = true
  else
	frombag = false
  end

	print("getId: "..thing:getId())

  if thing:isItem() and thing:getCount() > 1 then
    modules.game_interface.moveStackableItem(thing, toPos)
  elseif frombag and (thing:isContainer() or isP(thing:getId())) then
	showDropWindow(thing, toPos)
  else
    g_game.move(thing, toPos, 1)
  end

  return true
end

 

EDIT esqueci do arquivo a.otui na pasta modules\game_interface\

a.otui 860 B · 2 downloads

Você saberia botar para aparecer o item dentro do slot ali? peguei o msm do countwindow e apareceu somente o fundo

image.png.d4037f89256081f9ea8d3a81ac371fdc.png

Link para o comentário
Compartilhar em outros sites

14 horas atrás, carluccio disse:

 

Em modules\game_interface\game_interface.lua procure por if g_game.isOnline() then
    show()
 e adicione antes do ultimo end:
 

  Mostrar conteúdo oculto
aWindow = g_ui.displayUI('a')
  hideDropWindow()

 


Depois adicione:

  Mostrar conteúdo oculto
function hideDropWindow()
	aWindow:hide()
	return true
end

function showDropWindow(item, pos)
	aWindow:setVisible(true)
	aWindow:show()
	aWindow:raise()
	aWindow:focus()
	aWindow.onEnter = function() g_game.move(item, pos, 1) hideDropWindow() end
	aWindow:getChildById('yesButton').onClick = function() g_game.move(item, pos, 1) hideDropWindow() end
	return true
end

 

Em modules\game_interface\widgets\uigamemap.lua adicione:
 

  Mostrar conteúdo oculto
local function isP(id) -- ClientID 
	-- if id >= 12248 and id <= 12719 then return true end
	-- if id == 13913 or id == 16038 then return true end
	-- if id >= 14571 and id <= 14600 then return true end
	-- if id >= 14617 and id <= 14618 then return true end
	-- if id >= 15183 and id <= 15384 then return true end
	-- if id >= 15437 and id <= 15451 then return true end
	-- if id >= 16017 and id <= 16019 then return true end
	if id >= 1 and id <= 65000 then return true end
	return false
end

 

Procure por function UIGameMap:onDrop(widget, mousePos) e substitua  tudo por:
 

  Mostrar conteúdo oculto
function UIGameMap:onDrop(widget, mousePos)
  if not self:canAcceptDrop(widget, mousePos) then return false end

  local tile = self:getTile(mousePos)
  if not tile then return false end

  local thing = widget.currentDragThing
  local toPos = tile:getPosition() --Tem certeza que deseja jogar seu Pokémon ou mochila no chão?

  local frombag
  local thingPos = thing:getPosition()
  if thingPos.x == toPos.x and thingPos.y == toPos.y and thingPos.z == toPos.z then
    return false
  elseif tonumber(thingPos.x) and tonumber(thingPos.x) == 65535 then
	frombag = true
  else
	frombag = false
  end

	print("getId: "..thing:getId())

  if thing:isItem() and thing:getCount() > 1 then
    modules.game_interface.moveStackableItem(thing, toPos)
  elseif frombag and (thing:isContainer() or isP(thing:getId())) then
	showDropWindow(thing, toPos)
  else
    g_game.move(thing, toPos, 1)
  end

  return true
end

 

EDIT esqueci do arquivo a.otui na pasta modules\game_interface\

a.otuiIndisponível

Estou usando otcv8 e deu erro na função isP, mas antes queria saber se funcionaria no mobile, e ate consegui fazer 1 aqui funcionar no otcv8 mas no mobile ele não funciona

Link para o comentário
Compartilhar em outros sites

Participe da Conversa

Você pode postar agora e se cadastrar mais tarde. Cadastre-se Agora para publicar com Sua Conta.

Visitante
Responder

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

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.

×
  • Criar Novo...