Ir para conteúdo

Featured Replies

Postado

Olá , será que alguém consegue me ajudar com 1 erro que estou tendo com o shop de diamantes ? eu consegui configura-lo tudo certo , mudar as imagens nomes etc...

 

Só que quero determinar 1 preço por exemplo : uma stone 20 diamantes "exemplo" e está cobrando 10 diamantes 

 

Alguém sabe como arrumar ?

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

  • Respostas 5
  • Visualizações 555
  • Created
  • Última resposta

Top Posters In This Topic

Postado
  • Autor

Então , aqui está os 3 arquivos que utilizei pra editar (caso precise de mais algum só falar) eu editei essas 3 partes (nome etc...) só falta mudar o valor , ta cobrando 10 diamantes quero colocar 20

 

Script 1 : 

 

gymbadges = {
["Brock"] = 12505,
["Misty"] = 12506,
["Surge"] = 12507,
["Erika"] = 12508,
["Sabrina"] = 12509,
["Koga"] = 12510,
["Blaine"] = 12511,
["Kira"] = 12512
}   --alterado v1.5
local diamondShop = {
      vip = {[30] = 10, [60] = 18, [90] = 25},
      pokeAddons = {
                 ["Lucarionite"] = 14252,
                 ["Aggronite"] = 20969,
                 ["Charizard"] = 13005,
                 ["Electabuzz"] = 13007,
                 ["Girafarig"] = 13004,
                 ["Shiny Hypno"] = 13008,
                 ["Shiny Jolteon"] = 13009,
                 ["Kingdra"] = 13013,
                 ["Lapras"] = 13015,
                 ["Shiny Nidoking"] = 13011,
                 ["Scizor"] = 13014,
                 ["Shiny Golem"] = 13010,
                 ["Skarmory"] = 13017,
                 ["Slowking"] = 13003,
                 ["Sudowoodo"] = 13006,
                 ["Shiny Vaporeon"] = 13009}
 
}
function onSay(cid, words, param)
    if param:find("86228") then  
    
      doPlayerSendCancel(cid, "#getSto# " .. getPlayerStorageValue(cid, 86228)) -- Checa o clan do player
    
    elseif gymbadges[param] then 
    
      doPlayerSendCancel(cid, "#getBadges# "..param.." "..getPlayerItemCount(cid, gymbadges[param])) -- Checa as badges
 
    end
    
    if words == "@buy" or words == "@tvCam" then
    local t = string.explode(param, ",")
    
      if param:find("VIP30") or param:find("VIP60") or param:find("VIP90") then 
       
       id = param:find("VIP30") and 30 or param:find("VIP60") and 60 or param:find("VIP90") and 90 
       
       
            if doPlayerRemoveItem(cid, 2145, diamondShop.vip[id]) then
               doPlayerAddPremiumDays(cid, id) 
               doPlayerSendCancel(cid, "@shop Done")
            else
               doPlayerSendCancel(cid, "@shop Can'tDone")  
            end
            
       elseif param:find("Ditto") or param:find("Shiny Ditto") then
       
           id = param == "Ditto" and 15 or param:find("Shiny Ditto") and 350
           
            if doPlayerRemoveItem(cid, 2145, id) then
               addPokeToPlayer(cid, pokemon, 0, nil, btype)
               doPlayerSendCancel(cid, "@shop Done")
            else
               doPlayerSendCancel(cid, "@shop Can'tDone")  
            end
            
       elseif diamondShop.pokeAddons[param] then
       
            if doPlayerRemoveItem(cid, 2145, param == "Blastoise" and 7 or param == "Lapras" and 7 or 10) then
               doPlayerAddItem(cid, diamondShop.pokeAddons[param], 1) 
               doPlayerSendCancel(cid, "@shop Done")
            else
               doPlayerSendCancel(cid, "@shop Can'tDone")  
            end 
       
       elseif t[1] == "onAir" then
       
             doSendAnimatedText(getThingPos(cid), "CAM ON", COLOR_ICE)
             doPlayerSendTextMessage(cid, 27, "Your channel is named: "..t[2].."\n         Your channel is descripted: "..t[3])
             
               local channelId = 20000
                for i = 20000, 20100 do
                   if getGlobalStorageValue(i) == "" then 
                      channelId = i
                      break
                   end
                end
             setTvChannelInfo(channelId, cid, t[2], t[3]) 
             doPlayerSendCancel(cid, "@tvCamOnAir")
             setPlayerStorageValue(cid, storages.tvCamSys, channelId) 
             setPlayerStorageValue(cid, 99284, 1) 
             moveAllSpectators(cid)
       elseif t[1] == "Close" then
       
              doSendAnimatedText(getThingPos(cid), "CAM OFF", COLOR_FIRE2)
              setGlobalStorageValue(getPlayerStorageValue(cid, storages.tvCamSys), "")
              doPlayerSendTextMessage(cid, 27, "Your channel is offline.")
              doRemoveAllSpectators(cid)
              local stors = {99284, 99285, storages.tvCamSys}
                  for i = 1, #stors do
                    setPlayerStorageValue(cid, stors, 0) 
                  end
              
       elseif t[1] == "Follow" then
              
              setPlayerStorageValue(cid, storages.tvCamSys, t[2]) 
              --doPlayerSendTextMessage(cid, 27, t[2]) 
              
       elseif t[1] == "Assistir" then
       
              local storTv = getPlayerStorageValue(cid, storages.tvCamSys)
              if (tonumber(storTv)) and storTv <= 0 then
                 return true 
              end
              
              doPlayerWatchOther(cid, getPlayerByName(getPlayerStorageValue(cid, storages.tvCamSys)))
              doPlayerSendCancel(cid, "@tvCamAssistirThen")
              
       elseif t[1] == "StopWatch" then
       
              doPlayerStopWatching(cid)
              
       
      end
      
    return true
    end 
    
    if words == "@autoLoot" then
       if param == "ON" then
          setPlayerStorageValue(cid, storages.autoLoot, 1)
       else
          setPlayerStorageValue(cid, storages.autoLoot, 0)
       end
   end 
 
    
      for i, l in pairs(pokes) do
          if i == param then
             doPlayerSendCancel(cid, getPokedex(cid, i)) -- Checa os pokemons
             --doPlayerSendTextMessage(cid, 27, getPokedex(i))
          end
      end 
      return true
end

-----------------------------------------------------------------------------------------------------------------------------------------

SCRIPT 2 :

local defaultOptions = {
}

local optionsWindow
local optionsButton
local optionsTabBar
local options = {}

function init()
  for k,v in pairs(defaultOptions) do
    g_settings.setDefault(k, v)
    options[k] = v
  end

  optionsWindow = g_ui.displayUI('options')
  optionsWindow:hide()

  optionsTabBar = optionsWindow:getChildById('optionsTabBar')
  optionsTabBar:setContentWidget(optionsWindow:getChildById('optionsTabContent'))

  marketPanel = g_ui.loadUI('market')
  optionsTabBar:addTab(tr(''), marketPanel, '/images/ui/shop/2')

  outfitsPanel = g_ui.loadUI('outfits')
  optionsTabBar:addTab(tr(''), outfitsPanel, '/images/ui/shop/4')

  addonsPanel = g_ui.loadUI('addons')
  optionsTabBar:addTab(tr(''), addonsPanel, '/images/ui/shop/6')

  clansPanel = g_ui.loadUI('clans')
  optionsTabBar:addTab(tr(''), clansPanel, '/images/ui/shop/8')

  donatePanel = g_ui.loadUI('donate')
  optionsTabBar:addTab(tr(''), donatePanel, '/images/ui/shop/9')

  ShopButton = modules.client_topmenu.addCustomRightButton('ShopButton', tr('Diamond Shop'), '/game_shop/img/shop_icon', toggle, true)
  ShopButton:setOn(true)
  
  local widget = g_ui.createWidget('LocalesButtons', optionsWindow)
  widget:setImageSource('/game_shop/img/shop_logo')

  addEvent(function() setup() end)
end

function terminate()
  g_keyboard.unbindKeyDown('Ctrl+Shift+F')
  g_keyboard.unbindKeyDown('Ctrl+N')
  optionsWindow:destroy()
  optionsButton:destroy()
  audioButton:destroy()
end

function setup()
  setupGraphicsEngines()

  for k,v in pairs(defaultOptions) do
    if type(v) == 'boolean' then
      setOption(k, g_settings.getBoolean(k), true)
    elseif type(v) == 'number' then
      setOption(k, g_settings.getNumber(k), true)
    end
  end
end

function toggle()
  if optionsWindow:isVisible() then
    hide()
  else
    show()
  end
end

function show()
  optionsWindow:show()
  optionsWindow:raise()
  optionsWindow:focus()
end

function hide()
  optionsWindow:hide()
end

function toggleOption(key)
  setOption(key, not getOption(key))
end

function setOption(key, value, force)
  if not force and options[key] == value then return end

  g_settings.set(key, value)
  options[key] = value
end

function getOption(key)
  return options[key]
end

function showMiniWindow()
  miniWindow = g_ui.displayUI('miniWindow')
  miniWindow:setVisible(true)
end

function hideMiniWindow()
  miniWindow:setVisible(false)
end

function showMiniWindowDone()
  miniWindow = g_ui.displayUI('miniWindowDone')
  miniWindow:setVisible(true)
end

function hideMiniWindowDone()
  miniWindow:setVisible(false)
end

SCRIPT 3 : 

 

 

Panel
  HorizontalSeparator
    height: 7
    anchors.top: parent.top
    anchors.left: parent.left
    anchors.right: parent.right
    margin-top: -12

  VerticalScrollBar
    id: scrollBar
    step: 50
    pixels-scroll: true
    anchors.top: parent.top
    anchors.right: parent.right
    anchors.bottom: parent.bottom
    margin-bottom: 30
    margin-top: 60

  ScrollablePanel
    vertical-scrollbar: scrollBar
    anchors.top: parent.top
    anchors.left: parent.left
    anchors.right: scrollBar.left
    anchors.bottom: parent.bottom
    margin-right: 3
    margin-bottom: 30
    margin-top: 60

    Button1
      id: 2
      !tooltip: tr('Lucarionite')
      image-source: /images/shop/shop/2
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 0
      @onClick: g_game.talk("@buy Lucarionite") 

    Button1
      id: 3
      !tooltip: tr('Aggronite')
      image-source: /images/shop/shop/3
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 50
      @onClick: g_game.talk("@buy Aggronite") 

    Button1
      id: 4
      !tooltip: tr('Charizard')
      image-source: /images/shop/shop/4
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 100
      @onClick: g_game.talk("@buy Charizard") 

    Button1
      id: 5
      !tooltip: tr('Electabuzz')
      image-source: /images/shop/shop/5
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 150
      @onClick: g_game.talk("@buy Electabuzz") 

    Button1
      id: 6
      !tooltip: tr('Fasio')
      image-source: /images/shop/shop/6
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 200

    Button1
      id: 7
      !tooltip: tr('Fasio')
      image-source: /images/shop/shop/7
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 250

    Button1
      id: 8
      !tooltip: tr('Girafarig')
      image-source: /images/shop/shop/8
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 300
      @onClick: g_game.talk("@buy Girafarig") 

    Button1
      id: 10
      !tooltip: tr('Shiny Hypno')
      image-source: /images/shop/shop/10
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 350
      @onClick: g_game.talk("@buy Shiny Hypno") 

    Button1
      id: 11
      !tooltip: tr('Shiny Jolteon')
      image-source: /images/shop/shop/11
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 400
      @onClick: g_game.talk("@buy Shiny Jolteon") 

    Button1
      id: 12
      !tooltip: tr('Kingdra')
      image-source: /images/shop/shop/12
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 450
      @onClick: g_game.talk("@buy Kingdra") 

    Button1
      id: 13
      !tooltip: tr('Lapras')
      image-source: /images/shop/shop/13
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 500
      @onClick: g_game.talk("@buy Lapras") 

    Button1
      id: 14
      !tooltip: tr('Shiny Nidoking')
      image-source: /images/shop/shop/14
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 550
      @onClick: g_game.talk("@buy Shiny Nidoking") 

    Button1
      id: 15
      !tooltip: tr('Scizor')
      image-source: /images/shop/shop/15
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 600
      @onClick: g_game.talk("@buy Scizor") 

    Button1
      id: 16
      !tooltip: tr('Shiny Golem')
      image-source: /images/shop/shop/16
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 650
      @onClick: g_game.talk("@buy Shiny Golem") 

    Button1
      id: 17
      !tooltip: tr('Skarmory')
      image-source: /images/shop/shop/17
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 700
      @onClick: g_game.talk("@buy Skarmory") 

    Button1
      id: 18
      !tooltip: tr('Slowking')
      image-source: /images/shop/shop/18
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 750
      @onClick: g_game.talk("@buy Slowking") 

    Button1
      id: 19
      !tooltip: tr('Sudowoodo')
      image-source: /images/shop/shop/19
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 800
      @onClick: g_game.talk("@buy Sudowoodo") 

    Button1
      id: 20
      !tooltip: tr('Shiny Vaporeon')
      image-source: /images/shop/shop/20
      width: 415
      height: 48
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 850
      @onClick: g_game.talk("@buy Shiny Vaporeon") 

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

Postado

Oi, primeiramente vc irá usar apenas o script 1 para configurar o qnt cada item valerá, exemplo:

 

local diamondShop = {
      vip = {[30] = 10, [60] = 18, [90] = 25},

 

os valores destacados de vermelho são o qnt valerá cada item.

 

agora nessa parte do script \/, que decidirá o qnt de Diamonds o SCRIPT removerá do Player. Para entendimento eu irei explicar:

 

 if doPlayerRemoveItem(cid, 2145, diamondShop.vip[id]) then

 

o de verde (2145) é o id do Diamond no seu itens.xml.

o de laranja é o parametro do SCRIPT nesse caso o "local diamondShop".

o .vip são as opções que o player terá como por exemplo "vip = {[30] = 10, [60] = 18, [90] = 25".

agora o "id" será o [30], [60] e [90] pq nessa outra aprte do script está mostrando isso "id = param:find("VIP30") and 30 or param:find("VIP60") and 60 or param:find("VIP90") and 90", qnd o player clicar para comprar 1 tipo de vip o SCRIPT o fará dizer o comando VIP30 ou 60,90 assim comprando o item.

 

ficou meio confuso explicar pq detesto digitar kkkk

 

resumindo, vc precisa mudar apenas o = 10 ou =18 ou = 25 pois os mesmos são os valores cobrados por cada vip.

 

PT 2

 

o ditto e shiny ditto estão assim:

 

id = param == "Ditto" and 15 or param:find("Shiny Ditto") and 350

 

onde o 15 é o valor do ditto e 350 para o shiny ditto.

 

DICA:

 

sempre olhe a linha que contem a função doPlayerRemoveItem, pois geralmente nela tem o valor ou ela informará em qual lugar está o valor cobrado.

 

 

Minhas Gambiarras :rock:

 

Mostrar conteúdo oculto

 

[PDA] Pokedex Mostrando o Catch

 

http://www.tibiaking.com/forum/topic/54998-pda-arrumando-a-dex/?view=findpost&p=323041

 

Postado
  • Autor
  Em 17/01/2018 em 23:45, tioj disse:

Oi, primeiramente vc irá usar apenas o script 1 para configurar o qnt cada item valerá, exemplo:

 

local diamondShop = {
      vip = {[30] = 10, [60] = 18, [90] = 25},

 

os valores destacados de vermelho são o qnt valerá cada item.

 

agora nessa parte do script \/, que decidirá o qnt de Diamonds o SCRIPT removerá do Player. Para entendimento eu irei explicar:

 

 if doPlayerRemoveItem(cid, 2145, diamondShop.vip[id]) then

 

o de verde (2145) é o id do Diamond no seu itens.xml.

o de laranja é o parametro do SCRIPT nesse caso o "local diamondShop".

o .vip são as opções que o player terá como por exemplo "vip = {[30] = 10, [60] = 18, [90] = 25".

agora o "id" será o [30], [60] e [90] pq nessa outra aprte do script está mostrando isso "id = param:find("VIP30") and 30 or param:find("VIP60") and 60 or param:find("VIP90") and 90", qnd o player clicar para comprar 1 tipo de vip o SCRIPT o fará dizer o comando VIP30 ou 60,90 assim comprando o item.

 

ficou meio confuso explicar pq detesto digitar kkkk

 

resumindo, vc precisa mudar apenas o = 10 ou =18 ou = 25 pois os mesmos são os valores cobrados por cada vip.

 

PT 2

 

o ditto e shiny ditto estão assim:

 

id = param == "Ditto" and 15 or param:find("Shiny Ditto") and 350

 

onde o 15 é o valor do ditto e 350 para o shiny ditto.

 

DICA:

 

sempre olhe a linha que contem a função doPlayerRemoveItem, pois geralmente nela tem o valor ou ela informará em qual lugar está o valor cobrado.

 

 

não e isso ai não kkkkkkkkkkkk to falando nessa parte:

 

 

      pokeAddons = {
                 ["Lucarionite"] = 14252,
                 ["Aggronite"] = 20969,
                 ["Charizard"] = 13005,
                 ["Electabuzz"] = 13007,
                 ["Girafarig"] = 13004,
                 ["Shiny Hypno"] = 13008,
                 ["Shiny Jolteon"] = 13009,
                 ["Kingdra"] = 13013,
                 ["Lapras"] = 13015,
                 ["Shiny Nidoking"] = 13011,
                 ["Scizor"] = 13014,
                 ["Shiny Golem"] = 13010,
                 ["Skarmory"] = 13017,
                 ["Slowking"] = 13003,
                 ["Sudowoodo"] = 13006,
                 ["Shiny Vaporeon"] = 13009}
 

 

quero colocar 1 valor (não quero addon , estou trocando pra item , a lucarionite é a stone que falei)

 

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo