Postado Maio 30, 2016 9 anos Olá pessokal tenho um scrip do shop ja feita mas n sei como adicionar novos itens se alguem puder ajudar: shopWindow = nil shopButton = nil function init() connect(g_game, { onGameStart = refresh, onGameEnd = offline }) shopButton = modules.client_topmenu.addRightGameToggleButton('shopButton', tr('Shinobi World Shop') .. ' (Ctrl+Y)', '/images/topbuttons/skills', toggle) shopButton:setOn(true) g_keyboard.bindKeyDown('Ctrl+E', toggle) shopWindow = g_ui.loadUI('shop', modules.game_interface.getMapPanel()) shopWindow:disableResize() refresh() shopWindow:setup() shopWindow:close() shopButton:setOn(false) end function terminate() disconnect(g_game, { onGameStart = refresh, onGameEnd = offline }) g_keyboard.unbindKeyDown('Ctrl+Y') shopWindow:destroy() shopButton:destroy() end function refresh() local player = g_game.getLocalPlayer() if not player then return end end function getIndex(table, value) for _,v in pairs(table) do if(v == value)then return _ end end return false end function toggle() if shopButton:isOn() then refresh() shopWindow:close() shopButton:setOn(false) else shopWindow:open() refresh() shopButton:setOn(true) end end function onMiniWindowClose() shopButton:setOn(false) end function requestInfo() local player = g_game.getLocalPlayer() if not player then return end local protocolGame = g_game.getProtocolGame() if protocolGame then protocolGame:sendExtendedOpcode(55, 1) end end Editado Maio 30, 2016 9 anos por vitinho2300 (veja o histórico de edições)
Postado Junho 1, 2016 9 anos por gentileza poste todos os arquivos da pasta module para que eu possa ver como esta formulado e editar para vc acrescentar com facilidade
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.