Ir para conteúdo
  • Cadastre-se

(Resolvido)Erro Mods Servidos


Ir para solução Resolvido por Vodkart,

Posts Recomendados

Diga em poucas palavras a base utilizada (Nome do servidor ou nome do website).

TFS 0.4SVN./ Compiled With GNU C++ 4.4.0

Base: 

Não faço ideia

 

Qual erro está surgindo/O que você procura?

 

Tentei algumas força de editar o Script mesmo assim não consegui kkk. Alguém de boa vontade poderia me ajudar?.

Você tem o código disponível? Se tiver publique-o aqui:

stor = 41319
caixa_id = 2581
bank_pos = {x = 98, y = 73, z = 7}
msgs = {
[1] = "'saldo' para ver seu saldo em conta.",
[2] = "'depositar' para depositar dinheiro em sua conta.",
[3] = "'sacar' para sacar dinheiro de sua conta.",
[4] = "'transferir' para transferir dinheiro para uma outra conta. Comando: transfer,quantia,nome",
[5] = "'sair' ou 'exit' para sair.",
}
-----------------------------------------------------------------------
domodlib('caixa')
if getPlayerStorageValue(cid, stor) ~= -1 then return true
elseif itemEx.itemid ~= caixa_id then
doPlayerSendCancel(cid, "Você só pode usar esse item em um caixa eletrônico.") return true
end

setPlayerStorageValue(cid, stor, 1)
doPlayerSetNoMove(cid, true)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Caixa Eletrônico: Olá! Digite !caixa + um dos parâmetros abaixo:")
for a, b in ipairs(msgs) do
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Caixa Eletrônico: "..b.."")
end
return true
-----------------------------------------------------------------------
domodlib('caixa')
t = string.explode(param, ",")

if getPlayerStorageValue(cid, stor) ~= 1 then return true end
if t[1] == "balance" or t[1] == "saldo" then
if t[2] then return true end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você possui "..getPlayerBalance(cid).." gold coins em sua conta bancária.")
elseif t[1] == "deposit" or t[1] == "depositar" then
if not t[2] or not tonumber(t[2]) or t[3] then
doPlayerSendCancel(cid, "Incorrect params.") return true
elseif not doPlayerDepositMoney(cid, tonumber(t[2])) then
doPlayerSendCancel(cid, "Você não possui essa quantia em dinheiro.") return true
end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você depositou "..t[2].." gold coins em sua conta. Seu saldo agora é de "..getPlayerBalance(cid).." gold coins.")
elseif t[1] == "withdraw" or t[1] == "sacar" then
if not t[2] or not tonumber(t[2]) or t[3] then
doPlayerSendCancel(cid, "Incorrect params.") return true
elseif getPlayerBalance(cid) < tonumber(t[2]) then
doPlayerSendCancel(cid, "Você não possui essa quantia de dinheiro em sua conta.") return true
end

doPlayerWithdrawMoney(cid, tonumber(t[2]))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você sacou "..t[2].." gold coins de sua conta. Seu saldo agora é de "..getPlayerBalance(cid).." gold coins.")
elseif t[1] == "transfer" or t[1] == "transferir" then
if not t[2] or not tonumber(t[2]) or not t[3] or not tostring(t[3]) or t[4] then
doPlayerSendCancel(cid, "Incorrect params.") return true
elseif getPlayerBalance(cid) < tonumber(t[2]) then
doPlayerSendCancel(cid, "Você não possui essa quantia de dinheiro em sua conta.") return true
elseif not playerExists(t[3]) then
doPlayerSendCancel(cid, "O player "..t[3].." não existe.") return true
end

doPlayerTransferMoneyTo(cid, t[3], tonumber(t[2]))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você transferiu "..t[2].." gold coins de sua conta para "..t[3]..". Seu saldo agora é de "..getPlayerBalance(cid).." gold coins.")
elseif t[1] == "trocar gold" then
if not t[2] or not tonumber(t[2]) or t[3] then
doPlayerSendCancel(cid, "Incorrect params. Specify the number of platinum coins you want to get.") return true
elseif not doPlayerRemoveItem(cid, 2148, (t[2]*100)) then
doPlayerSendCancel(cid, "Você não possui "..(t[2]*100).." gold coins.") return true
end

doPlayerAddItem(cid, 2152, t[2])
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você trocou "..(t[2]*100).." gold coins por "..t[2].." platinum coins.")
elseif t[1] == "trocar platinum" then
if t[2] == "gold" then
if not t[3] or not tonumber(t[3]) or t[4] then
doPlayerSendCancel(cid, "Incorrect params. Specify the number of platinum coins you want to change to gold coins.") return true
elseif not doPlayerRemoveItem(cid, 2152, tonumber(t[3])) then
doPlayerSendCancel(cid, "Você não possui "..t[3].." platinum coins.") return true
end

doPlayerAddItem(cid, 2148, tonumber(t[3]*100))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você trocou "..t[3].." platinum coins por "..(t[3]*100).." gold coins.")
elseif t[2] == "crystal" then
if not t[3] or not tonumber(t[3]) or t[4] then
doPlayerSendCancel(cid, "Incorrect params. Specify the number of crystal coins you want to get.") return true
elseif not doPlayerRemoveItem(cid, 2152, tonumber(t[3]*100)) then
doPlayerSendCancel(cid, "Você não possui "..(t[3]*100).." platinum coins.") return true
end

doPlayerAddItem(cid, 2160, tonumber(t[3]))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você trocou "..(t[3]*100).." platinum coins por "..t[3].." crystal coins.")
else
return doPlayerSendCancel(cid, "Incorrect params. Utilize o comando assim: trocar platinum,gold ou crystal,quantia")
end
elseif t[1] == "trocar crystal" then
if not t[2] or not tonumber(t[2]) or t[3] then
doPlayerSendCancel(cid, "Incorrect params. Specify the number of crystal coins you want to change to platinum coins.") return true
elseif not doPlayerRemoveItem(cid, 2160, tonumber(t[2])) then
doPlayerSendCancel(cid, "Você não possui "..t[2].." crystal coins.") return true
end

doPlayerAddItem(cid, 2152, tonumber(t[2]*100))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você trocou "..t[2].." crystal coins por "..(t[2]*100).." platinum coins.")
elseif t[1] == "sair" or t[1] == "exit" then
doTeleportThing(cid, bank_pos)
setPlayerStorageValue(cid, stor, -1)
doPlayerSetNoMove(cid, false)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Caixa Eletrônico: Obrigado pela visita!")
else return doPlayerSendCancel(cid, "Incorrect Params.") end
return true
/]]>

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.

8jTJu39.png

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

Meu novo projeto.

 

http://oi58.tinypic.com/2yplmrk.jpg

 

 

 

Link para o post
Compartilhar em outros sites
  • Solução
<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Caixa System" version="1.0" author="nsei" contact="none.com" enabled="yes">
<config name="caixa"><![CDATA[
stor = 41319
caixa_id = 2581
bank_pos = {x = 98, y = 73, z = 7}
msgs = {
  [1] = "'saldo' para ver seu saldo em conta.",
  [2] = "'depositar' para depositar dinheiro em sua conta.",
  [3] = "'sacar' para sacar dinheiro de sua conta.",
  [4] = "'transferir' para transferir dinheiro para uma outra conta. Comando: transfer,quantia,nome",
  [5] = "'sair' ou 'exit' para sair.",
}
]]></config>
<action itemid="2581" event="script"><![CDATA[
domodlib('caixa')
function onUse(cid, item, fromPosition, itemEx, toPosition)
  if getPlayerStorageValue(cid, stor) ~= -1 then
    return true
  elseif itemEx.itemid ~= caixa_id then
    doPlayerSendCancel(cid, "Você só pode usar esse item em um caixa eletrônico.") return true
  end
  setPlayerStorageValue(cid, stor, 1)
  doPlayerSetNoMove(cid, true)
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Caixa Eletrônico: Olá! Digite !caixa + um dos parâmetros abaixo:")
  for a, b in ipairs(msgs) do
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Caixa Eletrônico: "..b)
  end
  return true
  end]]></action>
  <talkaction words="!caixa;/caixa" event="buffer"><![CDATA[
  domodlib('caixa')
  local t = string.explode(param, ",")
  if getPlayerStorageValue(cid, stor) ~= 1 then return true end
  if t[1] == "balance" or t[1] == "saldo" then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você possui "..getPlayerBalance(cid).." gold coins em sua conta bancária.") return true

  elseif t[1] == "deposit" or t[1] == "depositar" then
    if not t[2] or not tonumber(t[2]) or t[3] then
      doPlayerSendCancel(cid, "Incorrect params.") return true
    elseif not doPlayerDepositMoney(cid, tonumber(t[2])) then
      doPlayerSendCancel(cid, "Você não possui essa quantia em dinheiro.") return true
    end
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você depositou "..t[2].." gold coins em sua conta. Seu saldo agora é de "..getPlayerBalance(cid).." gold coins.")

  elseif t[1] == "withdraw" or t[1] == "sacar" then
    if not t[2] or not tonumber(t[2]) or t[3] then
      doPlayerSendCancel(cid, "Incorrect params.") return true
    elseif getPlayerBalance(cid) < tonumber(t[2]) then
      doPlayerSendCancel(cid, "Você não possui essa quantia de dinheiro em sua conta.") return true
    end
    doPlayerWithdrawMoney(cid, tonumber(t[2]))
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você sacou "..t[2].." gold coins de sua conta. Seu saldo agora é de "..getPlayerBalance(cid).." gold coins.")

  elseif t[1] == "transfer" or t[1] == "transferir" then
    if not t[2] or not tonumber(t[2]) or not t[3] or not tostring(t[3]) or t[4] then
      doPlayerSendCancel(cid, "Incorrect params.") return true
    elseif getPlayerBalance(cid) < tonumber(t[2]) then
      doPlayerSendCancel(cid, "Você não possui essa quantia de dinheiro em sua conta.") return true
    elseif not playerExists(t[3]) then
      doPlayerSendCancel(cid, "O player "..t[3].." não existe.") return true
    end
    doPlayerTransferMoneyTo(cid, t[3], tonumber(t[2]))
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você transferiu "..t[2].." gold coins de sua conta para "..t[3]..". Seu saldo agora é de "..getPlayerBalance(cid).." gold coins.")

  elseif t[1] == "trocar gold" then
    if not t[2] or not tonumber(t[2]) or t[3] then
      doPlayerSendCancel(cid, "Incorrect params. Specify the number of platinum coins you want to get.") return true
    elseif not doPlayerRemoveItem(cid, 2148, (t[2]*100)) then
      doPlayerSendCancel(cid, "Você não possui "..(t[2]*100).." gold coins.") return true
    end
    doPlayerAddItem(cid, 2152, t[2])
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você trocou "..(t[2]*100).." gold coins por "..t[2].." platinum coins.")

  elseif t[1] == "trocar platinum" then
    if t[2] == "gold" then
      if not t[3] or not tonumber(t[3]) or t[4] then
        doPlayerSendCancel(cid, "Incorrect params. Specify the number of platinum coins you want to change to gold coins.") return true
      elseif not doPlayerRemoveItem(cid, 2152, tonumber(t[3])) then
        doPlayerSendCancel(cid, "Você não possui "..t[3].." platinum coins.") return true
      end
      doPlayerAddItem(cid, 2148, tonumber(t[3]*100))
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você trocou "..t[3].." platinum coins por "..(t[3]*100).." gold coins.")

    elseif t[2] == "crystal" then
      if not t[3] or not tonumber(t[3]) or t[4] then
        doPlayerSendCancel(cid, "Incorrect params. Specify the number of crystal coins you want to get.") return true
      elseif not doPlayerRemoveItem(cid, 2152, tonumber(t[3]*100)) then
        doPlayerSendCancel(cid, "Você não possui "..(t[3]*100).." platinum coins.") return true
      end
      doPlayerAddItem(cid, 2160, tonumber(t[3]))
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você trocou "..(t[3]*100).." platinum coins por "..t[3].." crystal coins.")
    else
      return doPlayerSendCancel(cid, "Incorrect params. Utilize o comando assim: trocar platinum,gold ou crystal,quantia")
    end

  elseif t[1] == "trocar crystal" then
    if not t[2] or not tonumber(t[2]) or t[3] then
      doPlayerSendCancel(cid, "Incorrect params. Specify the number of crystal coins you want to change to platinum coins.") return true
    elseif not doPlayerRemoveItem(cid, 2160, tonumber(t[2])) then
      doPlayerSendCancel(cid, "Você não possui "..t[2].." crystal coins.") return true
    end
    doPlayerAddItem(cid, 2152, tonumber(t[2]*100))
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Caixa Eletrônico: Você trocou "..t[2].." crystal coins por "..(t[2]*100).." platinum coins.")

  elseif t[1] == "sair" or t[1] == "exit" then
    doTeleportThing(cid, bank_pos)
    setPlayerStorageValue(cid, stor, -1)
    doPlayerSetNoMove(cid, false)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Caixa Eletrônico: Obrigado pela visita!")
  else
    doPlayerSendCancel(cid, "Incorrect Params.") return true
  end
  return true]]></talkaction>
  </mod>

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites

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.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo