Ir para conteúdo

Líderes

Conteúdo Popular

Mostrando conteúdo com a maior reputação desde 07/28/24 em todas áreas

  1. Strogman

    Projeto PokeTfs 1.7

    Github: Strogman/PokeTfs1.7 (github.com) PokeTibia 1.7 // PokeTfs 1.7 PokeTfs 1.7 é uma base de Poketibia desenvolvida a partir do TFS 1.7, modificado por Muniz GitHub(https://github.com/TibiaDev/forgottenserver-downgrades). Este projeto visa atualizar o código dos Poketibia open-source, que frequentemente utilizam sistemas e códigos desatualizados do TFS 0x. Optamos por construir o projeto sobre um downgrade de protocolo, em vez de usar o protocolo atual, para garantir compatibilidade com mapas, itens, e outros recursos das versões mais antigas. Objetivo O projeto PokeTfs 1.7 permite utilizar itens, sprites, arquivos DAT, e mapas das versões anteriores do protocolo, enquanto mantém o código atualizado. Embora o sistema esteja baseado em um downgrade de protocolo, será possível atualizar para a versão mais recente do protocolo de forma rápida e simples, se desejado. No entanto, essa atualização exigirá reconfiguração completa da arquitetura de itens, sprites, e mapas, devido às diferenças no protocolo atual. Funcionalidades pokeballs config Goback Tradicional: ✅ Completo Pokeballs: 🔄 Em progresso Pokedex: 🔄 Em progresso Catch: 🔄 Em progresso Pokeball limit: 🔲 Não iniciado Pokemon Status: 🔲 Não iniciado Order Movements: 🔲 Não iniciado Fishing: 🔲 Não iniciado Fly: 🔲 Não iniciado Ride: 🔲 Não iniciado Surf: 🔲 Não iniciado Dig: 🔲 Não iniciado Rock Smash: 🔲 Não iniciado Cut: 🔲 Não iniciado Control Mind: 🔲 Não iniciado Teleport: 🔲 Não iniciado Blinks: 🔲 Não iniciado Icon System Avançado: 🔲 Não iniciado Advanced Goback: 🔲 Não iniciado Pokebar Avançada: 🔲 Não iniciado Moves Bar: 🔲 Não iniciado Geração 1: 🔲 Não iniciado Geração Moveset 1: 🔲 Não iniciado Como Contribuir https://www.vakinha.com.br/vaquinha/poketibia-tfs-1-7? Contribuições são bem-vindas! Se você deseja contribuir para o projeto, por favor, siga estas etapas: Faça um fork do repositório. Crie uma branch para sua feature ou correção. Faça suas alterações e teste-as. Envie um pull request descrevendo suas mudanças. Se você precisar de mais alguma coisa ou ajustes adicionais, é só me avisar!
    4 pontos
  2. Primeiramente gostaria de esclarecer algumas polemicas relacionas a base na época (2019) em que estava online comigo. O "SERVIDOR" (nome PokemonRoxy com grupo no facebook de 600 pessoas e pagina) foi vendido na época por 500 reais, sendo que a mesma estava com uma média de 50 players diarios com donaters ativos, chegou a atingir o limite de 140 players simultanêos. Quando vendi a base avisei ao comprador que a venda do servidor não limitaria a minha venda da BASE, tenho prints que comprovam. Nessa vendi uma copia da base por 100 reais na época e acabaram vazando (copias da base que estão em outros forums) Pessoas mal intensionadas colocaram um monte de trap na source pra disponibilizar a base e ganhar vendendo a source original. O pokemon roxy pra quem não sabe foi feito a partir da base do PokemonChampions, foi corrigido todos bugs criticos da base, source e mapa refeitos do 0. A source que acompanha é a original Vamos um ajudar o outro pra comunidade crescer cada dia mais e aumentar o nivel sempre 😉 O intuito do servidor era realmente ser algo diferente do estilo PxG da vida, algo um pouco mas casual mas ainda sim um servidor serio. porém tenho certeza que a base tem capacidade pra um projeto serio com outra proprosta de jogo. E tem gente que tem projeto excelente e promissor com a base como por exemplo pokegenerations que será lançada em breve CRÉDITOS: Eu (MORDUK) que fiz praticamente tudo no servidor, desde mapa que refiz do 0, até a maioria dos scripts em lua e investi alto em alguns sistemas Kevin L Ajudou bastante na parte de sprites e alguns modulos Carlos Guiminha Sempre ajudou o servidor in-game e com sprites Se tiver mais alguem manda msg pois não me lembro PRINTS ANTIGAS DE QUANDO O SERVIDOR ESTAVA ONLINE (MESMOS ARQUIVOS DAQUI): CONTEÚDO: -Site (100% funcional, com shop entregando in-game automaticamente) -Source do OTCLIENT -Source do OTCLIENT com criptografia -Source do Servidor -Codeblocks usado para compilar DOWNLOAD: https://www.4shared.com/rar/DrHxw3cYiq/pokemon_roxy__1_.html? SENHA DOS ARQUIVOS: 12roxy12 SCAN: https://www.virustotal.com/gui/file/d1da37db89197ab2633488005da040bff25d126b086e8b440ff6b0f1a5642226 DATABASE: Usar a mysteryous.sql que está na base do servidor Sou mapper, todas as ilhas do mapa e maioria das quests foram feitas por mim. Faço trampo de copia também, a hunt de altaria foi feita por mim 100% igual da PXG, até mesmo os detalhes! faço por encomenda também! Também faço scripts em lua Posso ajudar com suporte a alguns problemas Ótima base para retirada de sistemas em lua, c++ e modulos do client ESPERO AJUDAR A COMUNIDADE E ESPERO QUE CRESÇAMOS CADA DIA MAIS UM AJUDANDO AO OUTRO.
    3 pontos
  3. Gengo

    [OTClient] Player Info OTPokemon

    [OTClient] Health Player Info OTPokemon Eae galerinha do xtibia, hoje venho trazer mais uma contribuição para a comunidade, um módulo indêntico ao do OtPokemon. Mesmo que seja simples a instalação, tem sempre aquele que não sabe onde deve colocar o módulo, peço então que tenha paciência quanto a esse simples tutorial, aos demais aqueles que já sabem, peço que ao menos leia a Observações do módulo. 1º Faça o download do módulo. 2º Extraia o módulo para a pasta do seu otClient em /modules ficando assim: Feito o passo 1 e 2 creio que já estará funcionando, isto se você fez tudo certinho. •Observações do módulo• Demonstrativo do módulo no jogo.
    2 pontos
  4. Desenvolvi por muito tempo uma base Pokémon do 0 (parti do TFS 1.2 e fui implementando tudo até chegar nessa versão que estou disponibilizando). O resultado é um servidor extremamente leve e estável (já testado com 100+ players e por mais de 1 mês sem cair). Basicamente, ele suporta tranquilamente 1k+ players e não tem nenhum bug conhecido que faça com que ele caia. Esse servidor ficou no ar por muito tempo (mais de 2 anos) e era conhecido como PokeDash. Acabei ficando sem tempo para administrar o servidor, o que fez com que a maioria dos players parassem de jogar e com que eu fechasse de vez. Pensei por muito tempo sobre o que fazer com ele, e decidi disponibilizar para a comunidade. Trata-se de algo único (eu ao menos nunca vi um servidor de Pokémon construído a partir do TFS 1.2)! Como desenvolvi todos os sistemas do 0, tomei cuidado para fazer tudo da melhor maneira possível e para que possa ser facilmente modificado e atualizado. Basicamente, os Pokémons podem ser criados a partir de um único arquivo XML (como monstros do Tibia), e nesse arquivo você pode especificar tudo, desde level máximo e mínimo de spawn, loots, tipos (fogo, agua, etc), se ele pode usar habilidades (surf, fly, etc), moves (quando alguém captura), ataques (quando selvagem), evoluções, chance de catch, etc. Exemplo de Pokemon Resumo de alguns sistemas (tem muita coisa, então coloquei os principais) ✅ Pokemons com level, status e boost. O level do player/boost também influencia no status dos pokes. ✅ Sistema de Love (seu poke fica mais forte que os demais quando upa de level matando pokemons mais fortes que ele). ✅ Base propria com Shinys e Ancients. ✅ Cada player pode conseguir ancient stone para evoluir 1 shiny para ancient através de quest. ✅ Moves bar e pokemon bar (troca de pokemon com 1 click). ✅ Autoloot agrupando em bags. ✅ Ganho de exp ao capturar/dar dex em pokes com um bonus adicional para o primeiro catch de cada poke. ✅ Mapa original com mais de 40 quests, incluindo outland com Ancients. ✅ Eventos diários automáticos: Futebol todo dia 19:30, arena PVP todo dia 20:00, golden arena aos sabados 17:00, bag premiada aos domingos/feriados 17:00. ✅ Profissões (facilmente customizáveis): Catcher: 3.5% mais chance de capturar um Pokemon. Hunter: 10% mais status de dano para o seu Pokemon (tanto magico quanto fisico). Blocker: 25% mais vida para seus Pokemons. Healer: 100% mais cura que aplica tanto em potions quando moves dos seus Pokemons. Explorer: 15% mais experiencia para seu personagem durante a caça. ✅ Task diária de catch/loot dando Tokens. Os tokens podem ser trocados por itens raros (dentre eles premier ball e bags personalizadas) além de pagar seu curso com o NPC Job Manager para aprender uma das profissões acima. Uma das maneiras de conseguir tokens é fazendo tasks diárias. ✅ Muito mais! Screenshots Download Baixe o pack contendo o servidor, cliente, site, editor de mapa e editor de itens clique aqui!. Caso considere minha contribuição interessante para a comunidade, considere realizar uma doação para a chave pix: server.pokedash@gmail.com GM account: gm/gmgmgm O projeto será atualizado em sua homepage: https://pokedashpota.vercel.app/ SCAN Sources Download sources SCAN ----- Edit Problemas e soluções GroupID não existe ao tentar logar no server. Erros ao importar o schema.sql. Comando /cb não funcionando.
    1 ponto
  5. Venho divulgar o mais novo servidor de Tibia 10.98 2024 ⚒️ Mineração, 🌿 Herborista, 🪓 Lenhador, 🛠️ Artesanato, 🎴 Sistema de Decks, 🧙‍♂️ Sistema Ancestral, 🗺️ Pontos de Passagem, 🎖️ Insígnias, 🐉 Chefes Mundiais, 📜 Missões, 🏝️ Ilhas, 🏆 Tiers, 🌍 Expansão, 🚢 Sistema de Navios (Navegação por todo o continente com um navio!), 💠 Portais Azure e muito mais! 💥 SKILL RATE: 12X | ✨ MAGIC RATE: 10X | 🎁 LOOT RATE: 3X 🌐 Site oficial: www.tibiaconquest.com 💬 Discord: discord.com/invite/Aq9TJBDnzu
    1 ponto
  6. * ws q * News quest * Bugs corrigidos 95,3% * Client Específico (V8) * Mobile (SDK 29 (Android 10) ) -- version 10, roda acima dessas versions! * Site já vem com system de doação Pix (Token PicPay) -- deve ser trocado pelo seu token --- * Site 98,9% atualizado (Troque, pois a marca já possuí proprietário) * Franquia Antiga da OTP. (Sprite todas compiladas e configuradas)! Site Original: https://otpokesalense.online Após o Pagamento Será liberado o Download Automaticamente. O Produto vai com uma liçenca do Proprietario. Att: Carlos! contato para instalação do servidor: (27) 998931903 --(Programador do Server). Distribuido em Windows+Linux Portifólio do Programador: https://otservprogramacao.mystrikingly.com Comprar: https://files.fm/f/67zjnrt42v Servidor+DB+Site+ObjectBuild+ClientDescompilado+SchemaZnote+SytemDoaçãoPicpay+Source+MapEditor+ItemEditor+Mobile. uest
    1 ponto
  7. Discord: odranoels.s VIDEOS DO SISTEMA FUNCIONANDO https://imgur.com/qjg5a41
    1 ponto
  8. El Rusher

    Sala Boss!

    Esse script define a dungeon na qual o jogador entrou e armazena essa informação na storage do player. Ele também teleporta o jogador para a posição inicial da dungeon.(Action 17003) function onUse(player, item, fromPosition, target, toPosition) local dungeonId = 1 -- ID da dungeon, altere conforme a dungeon específica local dungeonEntryPosition = Position(100, 100, 7) -- Defina a posição da entrada da dungeon (x, y, z) -- Armazena o ID da dungeon no storage do player player:setStorageValue(12345, dungeonId) -- 12345 é o storage para a dungeon atual -- Teleporta o player para a posição inicial da dungeon player:teleportTo(dungeonEntryPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Você entrou na Dungeon " .. dungeonId .. ".") return true end Esse script verifica qual dungeon o jogador entrou, e com base nisso, ele spawna o boss correspondente à dungeon naquela sala, se ela estiver disponível. (Action 14400) function onUse(player, item, fromPosition, target, toPosition) local dungeonId = player:getStorageValue(12345) -- Recupera o ID da dungeon do player local bossPosition = Position(105, 105, 7) -- Posição onde o boss vai ser spawnado (x, y, z) local playerBossRoomPosition = Position(110, 110, 7) -- Posição para onde o player será teleportado na sala do boss local bossId -- Verifica se o jogador tem um dungeonId válido if dungeonId == -1 then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Você não entrou em nenhuma dungeon.") return false end -- Define o boss de acordo com o ID da dungeon if dungeonId == 1 then bossId = "Boss1" -- Nome do Boss 1 elseif dungeonId == 2 then bossId = "Boss2" -- Nome do Boss 2 elseif dungeonId == 3 then bossId = "Boss3" -- Nome do Boss 3 else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Dungeon inválida.") return false end -- Checa se a sala do boss está disponível (sem criaturas) if not Tile(bossPosition):getTopCreature() then -- Spawna o boss na posição definida Game.createMonster(bossId, bossPosition) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, bossId .. " apareceu!") -- Teleporta o player para a sala do boss player:teleportTo(playerBossRoomPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "A sala do boss já está ocupada.") end return true end Explicação dos Scripts: Entrada na Dungeon (17003): Armazena o ID da dungeon na storage 12345 do player. Teleporta o player para a posição inicial da dungeon. Exibe uma mensagem informando que ele entrou na dungeon. Entrada na sala do Boss (14400): Verifica qual dungeon o jogador entrou usando o valor armazenado na storage 12345. Com base no ID da dungeon, seleciona o boss correto e tenta spawná-lo na sala do boss. Se a sala estiver disponível (sem criaturas), spawna o boss e teleporta o jogador para a sala. Se a sala estiver ocupada, exibe uma mensagem de erro. Modificações que você pode fazer: IDs de Dungeon e Boss: Altere os IDs das dungeons e os nomes dos bosses de acordo com o que você quiser. Posições: Ajuste as posições de entrada da dungeon, sala do boss, e local de teleporte para o que for necessário no seu mapa. Cooldown ou reset: Se precisar de um cooldown para respawnar o boss ou resetar a sala, esse sistema pode ser facilmente estendido.
    1 ponto
  9. Soul System: ok!, action: ok!, auras: ok!, creaturescript: ok!, soul: ok! conclusao: Certifique-se de que o item que você está tentando encantar está listado em L_Soul.enchant.weapons. Cada item deve ter o ID correto correspondente. Atributos do Item: Verifique se os atributos como "Soul" estão sendo corretamente definidos no item durante o processo de encantamento. Pode haver um problema de manipulação de atributos. Tipos de Danos e Efeitos: Confira se os tipos de danos e efeitos estão definidos corretamente em L_Soul.souls para garantir que o encantamento aplique o efeito esperado. Garanta que as funções externas, como L_Soul.souls, L_Soul.creatures, L_Soul.lang, e L_Soul.language, estejam devidamente carregadas e acessíveis.
    1 ponto
  10. em data/actions/scripts/water_action.lua: local waterOutfit = {lookType = 134} -- ID da outfit para o navio local originalVoc = 1 -- Vocação original que o player retorna ao sair da água function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return true end -- Verifica se o jogador já está na outfit de navio if player:getOutfit().lookType ~= waterOutfit.lookType then player:setStorageValue(12345, player:getVocation():getId()) -- Salva a vocação original do jogador player:setOutfit(waterOutfit) -- Altera para a outfit de navio player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Você entrou na água e agora está em modo de navegação!") end return true end function onStepOut(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return true end local originalVocationId = player:getStorageValue(12345) if originalVocationId > 0 then player:setVocation(Vocation(originalVocationId)) -- Retorna à vocação original player:setOutfit({lookType = player:getSex() == PLAYERSEX_FEMALE and 136 or 128}) -- Outfit padrão baseado no sexo do jogador player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Você saiu da água e voltou ao modo normal.") end return true end Adicione o seguinte ao seu arquivo actions.xml que fica em data/actions/actions.xml: <action actionid="1001" script="water_action.lua"/> No seu editor de mapas, configure os tiles da área de água que o jogador vai entrar para a ActionID 1001. Observações A waterOutfit pode ser alterada para qualquer ID de outfit que você deseja usar para o "modo navio". Lembre-se de ajustar os IDs de acordo com as vocações e outfits que você quer utilizar. Ao pisar na água, a outfit do jogador mudará, e ao sair, ele retornará à sua vocação e outfit originais. Isso deve lhe dar uma base para começar a implementar a funcionalidade de navegação que você deseja!
    1 ponto
  11. Eai galera, blz? Bom, vim trazer pra vcs a versão 1.0 do mod de pokedex que eu desenvolvi mês passado visando aprendizado no mundo de OTC, com o objetivo também de mostrar que o otclient é flexível suficiente para se fazer muitas coisas sem a necessidade das sources nem do servidor e nem do client... Para aqueles que não conhecem, vejam o Show Off desse trabalho. Atualizações: 1. Adicionado um pack com 276 imagens de pokemons (16,1MB); 2. Pokemons shiny tem a exibição da imagem de pokemons normais (para alterar, basta remover a linha 75 do arquivo game_pokedex.lua, na pasta modules/game_pokedex de seu client); 3. Pokedex fecha ao se deslogar do char com ela aberta [créditos a @@Soulviling pela ideia]; Bom, sem mais delongas; Instalação fácil: Passo 1. Faça o download do arquivo RAR (download no final do tópico); Passo 2. Copie a pasta modules pro seu client; Passo 3. "Deseja substituir?" [X]Sim [ ]Não Passo 4. Só vai até o passo 3; Bom, segue uma imagem ATUALIZADA Download e Scan
    1 ponto
  12. local config = { [17003] = { nameDz = "Bronze", chave = 2155, count = 1, areas = { {fromx = 1712, fromy = 1211, fromz = 15, tox = 1966, toy = 1303, toz= 15}, {fromx = 1970, fromy = 1319, fromz = 15, tox = 2248, toy = 1303, toz= 15}, {fromx = 1712, fromy = 1211, fromz = 14, tox = 1966, toy = 1303, toz= 14}, {fromx = 1970, fromy = 1319, fromz = 14, tox = 2248, toy = 1303, toz= 14} }, teleport = { {x = 1789, y = 1288, z = 15}, {x = 2062, y = 1288, z = 15}, {x = 1789, y = 1288, z = 14}, {x = 2062, y = 1288, z = 14} }, pokemons = {"Elder Zubat", "Elder Rattata"}, finish = 15 * 60 * 1000, spawnCount = 64, -- Corrigido para 64 }, -- Outros níveis de Dungeon configurados aqui } -- Função para verificar se o local é walkable function isWalkable(pos, creature, proj, pz, water) if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if isWater(getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid) and water then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end -- Função para spawnar Pokémons na área correta function spawnPokemons(area, pokemons, spawnCount) local spawnedCount = 0 for i = 1, spawnCount do local posX = math.random(area.fromx, area.tox) local posY = math.random(area.fromy, area.toy) local posZ = area.fromz local position = {x = posX, y = posY, z = posZ} if isWalkable(position) then local chosenPokemon = pokemons[math.random(1, #pokemons)] doCreateMonster(chosenPokemon, position) spawnedCount = spawnedCount + 1 end end return spawnedCount end function onUse(cid, item, fromPosition, itemEx, toPosition) local cfg = config[item.actionid] if not cfg then return true end if isRiderOrFlyOrSurf(cid) then doPlayerSendCancel(cid, "Saia do ride ou fly para acessar a dungeon.") return true end if getPlayerStorageValue(cid, 468703) - os.time() > 0 then doPlayerSendCancel(cid, "Aguarde "..convertTime(getPlayerStorageValue(cid, 468703) - os.time()).." para entrar na Dungeon.") return true end if getPlayerItemCount(cid, cfg.chave) >= cfg.count then for i, area in ipairs(cfg.areas) do if #getPlayersInArea(area) < 1 then -- Remove monstros existentes e inicia os novos spawns removeNpcInArea({x = area.fromx, y = area.fromy, z = area.fromz}, {x = area.tox, y = area.toy, z = area.toz}, true, false) creatureInSurvival({x = area.fromx, y = area.fromy, z = area.fromz}, {x = area.tox, y = area.toy, z = area.toz}, true, false) -- Teleporta o jogador para a área correspondente doTeleportThing(cid, cfg.teleport[i]) setPlayerStorageValue(cid, 2154610, 1) doPlayerRemoveItem(cid, cfg.chave, cfg.count) -- Spawnar os pokémons na área correta local spawnedPokemons = spawnPokemons(area, cfg.pokemons, cfg.spawnCount) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Foram spawnados "..spawnedPokemons.." pokémons na dungeon.") end end return true else doPlayerSendCancel(cid, "Você precisa de "..cfg.count.." "..getItemNameById(cfg.chave).." para entrar.") end return true end Neste script: A função spawnPokemons foi ajustada para tentar spawnar um total de 64 pokémons por área (ou o número especificado em spawnCount). Foram feitas correções para garantir que apenas posições "walkable" sejam consideradas para o spawn. O número de pokémons spawnados é mostrado ao jogador após o teleporte.
    1 ponto
  13. 1. Corrigir o erro do gsub: O erro de gsub ocorre quando o tipo de dado passado para ele não é válido. No caso do erro que você está recebendo, parece que o sistema está esperando uma string, mas recebeu outro tipo de valor. 2. Verificar o erro Creature not found: Esse erro sugere que o NPC está tentando interagir com uma criatura (cid) que não existe ou foi removida do jogo. Pode ser resolvido verificando se o cid é uma criatura válida antes de tentar interagir com ele. Sugestões de ajustes no código: Função teleportPlayerToPositionReborn: function teleportPlayerToPositionReborn(cid) if not isCreature(cid) then selfSay('Player not found.', cid) return false end local playerRebornPositionX = getPlayerStorageValue(cid, PLAYER_REBORN_POSITION_X) local playerRebornPositionY = getPlayerStorageValue(cid, PLAYER_REBORN_POSITION_Y) local playerRebornPositionZ = getPlayerStorageValue(cid, PLAYER_REBORN_POSITION_Z) if playerRebornPositionX == -1 or playerRebornPositionY == -1 or playerRebornPositionZ == -1 then selfSay('You have not died yet.', cid) return false end doTeleportThing(cid, {x = playerRebornPositionX, y = playerRebornPositionY, z = playerRebornPositionZ}) return true end isCreature(cid): Verifica se o cid ainda é uma criatura válida antes de tentar acessá-la. Isso ajuda a evitar o erro Creature not found. Função onThink: Certifique-se de que o onThink está bem implementado no NPC: function onThink() if not npcHandler:isFocused() then return false end npcHandler:onThink() return true end
    1 ponto
  14. até da... mas vai dar um trampo.. geralmente é um arquivo LUA responsavel pela invocação dos pokemons, de modo mais facil era melhor dar um ctrl + f e procurar pela função doSummonCreature() e remover ou comentar ela.. -- doSummonCreature("nome_do_pokemon", pos) poketibia tambem tem bastante client mod que teria que ser removido.. ai você vai ter que adicionar vocações e sprites personalizaçao de mapa e por fim balanceamento..
    1 ponto
  15. No Tibia, os efeitos gráficos são chamados de projectiles ou magic effects. Para criar o Kamehameha, você precisará usar um projectile que se move em uma direção. Aqui está um exemplo simples de como fazer isso: function onCastSpell(creature, variant) local position = creature:getPosition() -- Posição inicial do Goku local direction = creature:getDirection() -- Direção do Kamehameha local distance = 7 -- Distância que o ataque vai percorrer local damage = math.random(200, 300) -- Defina o dano do Kamehameha -- Definir o efeito gráfico do Kamehameha local projectileEffect = CONST_ANI_ENERGYBALL -- Escolha um efeito gráfico adequado -- Criação de um loop que movimenta o ataque for i = 1, distance do local newPosition = position:getNextPosition(direction, i) -- Calcula a posição seguinte creature:say("KAMEHAMEHA!", TALKTYPE_MONSTER_SAY) -- Grito de ataque, opcional -- Cria o projectile e o efeito creature:getPosition():sendDistanceEffect(newPosition, projectileEffect) -- Dano no alvo que está na posição do efeito local target = Tile(newPosition):getTopCreature() if target and target:isPlayer() then target:addHealth(-damage) target:getPosition():sendMagicEffect(CONST_ME_EXPLOSIONAREA) -- Efeito de explosão ao atingir end -- Intervalo para a movimentação do projectile addEvent(function() newPosition:sendMagicEffect(CONST_ME_ENERGYHIT) -- Efeito na posição final end, i * 100) -- Ajusta o intervalo da animação end return true end
    1 ponto
  16. local function getWalkablePositions(area, maxPositions) local walkablePositions = {} for i = 1, #area do if #walkablePositions >= maxPositions then break -- Limitar o número de posições end local pos = area[i] if isWalkable(pos, true, false, true, true) then table.insert(walkablePositions, pos) end end return walkablePositions end -- Usar a função para obter exatamente 64 posições local positions = getWalkablePositions(area, 64)
    1 ponto
  17. Para evitar a criação de monstros em paredes, você precisa verificar se o local gerado aleatoriamente é um local "walkable" (ou seja, acessível para o monstro andar). O TFS tem uma função chamada isWalkable que pode ser usada para validar as posições antes de gerar um Pokémon. local config = { [17003] = { nameDz = "Bronze", chave = 2155, count = 1, areas = { -- Criei uma tabela de áreas para simplificar {fromx = 1712, fromy = 1211, fromz = 15, tox = 1966, toy = 1303, toz= 15}, {fromx = 1712, fromy = 1319, fromz = 15, tox = 1966, toy = 1411, toz= 15}, {fromx = 1712, fromy = 1427, fromz = 15, tox = 1966, toy = 1519, toz= 15}, {fromx = 1712, fromy = 1535, fromz = 15, tox = 1966, toy = 1627, toz= 15} }, teleport = { -- Criado teleporte para cada área {x = 1789, y = 1288, z = 15}, {x = 1789, y = 1396, z = 15}, {x = 1789, y = 1504, z = 15}, {x = 1789, y = 1612, z = 15} }, pokemons = {"Elder Zubat", "Elder Rattata", "Shiny Golbat", "Shiny Raticate"}, spawnCount = 64 } } -- Função para verificar se o local é walkable function isPositionWalkable(pos) local tile = Tile(pos) return tile and not tile:hasFlag(TILESTATE_PROTECTIONZONE) and not tile:getCreatureCount() > 0 end -- Função para spawnar Pokémons na área correta function spawnPokemons(area, pokemons, spawnCount) for i = 1, spawnCount do local posX = math.random(area.fromx, area.tox) local posY = math.random(area.fromy, area.toy) local posZ = area.fromz local position = {x = posX, y = posY, z = posZ} -- Verifica se a posição é "walkable" if isPositionWalkable(position) then local chosenPokemon = pokemons[math.random(1, #pokemons)] doCreateMonster(chosenPokemon, position) else i = i - 1 -- Se a posição não for válida, tenta novamente end end end function onUse(cid, item, fromPosition, itemEx, toPosition) local cfg = config[item.actionid] if not cfg then return true end if isRiderOrFlyOrSurf(cid) then doPlayerSendCancel(cid, "Saia do ride ou fly para acessar a dungeon.") return true end if getPlayerStorageValue(cid, 468703) - os.time() > 0 then doPlayerSendCancel(cid, "Aguarde "..convertTime(getPlayerStorageValue(cid, 468703) - os.time()).." para entrar na Dungeon.") return true end if getPlayerItemCount(cid, cfg.chave) >= cfg.count then for i, area in ipairs(cfg.areas) do if #getPlayersInArea(area) < 1 then -- Remove monstros existentes e inicia os novos spawns removeNpcInArea({x = area.fromx, y = area.fromy, z = area.fromz}, {x = area.tox, y = area.toy, z = area.toz}, true, false) creatureInSurvival({x = area.fromx, y = area.fromy, z = area.fromz}, {x = area.tox, y = area.toy, z = area.toz}, true, false) -- Teleporta o jogador para a área correspondente doTeleportThing(cid, cfg.teleport[i]) setPlayerStorageValue(cid, 2154600, 1) doPlayerRemoveItem(cid, cfg.chave, cfg.count) addEvent(doTeleportFinish2, 15 * 60 * 1000, cid) doSendPlayerExtendedOpcode(cid, 133, 899) -- Spawna os Pokémons spawnPokemons(area, cfg.pokemons, cfg.spawnCount) return true end end doPlayerSendCancel(cid, "Nao tem Zonas disponiveis no momento, tente mais tarde!") else doPlayerSendCancel(cid, "Você precisa de uma Bronze Dimensional Key para acessar essa Dungeon.") end return true end Validação de Local Walkable: Foi adicionada a função isPositionWalkable para garantir que o Pokémon não seja criado em locais inacessíveis (como paredes). Identificação da Sala: Cada sala tem uma área e um ponto de teleporte definidos. A função percorre as áreas (cfg.areas) e verifica se há jogadores. Se não houver, o jogador é teleportado e os Pokémons são gerados nessa área. Loop para Encontrar Área Livre: O script agora percorre todas as áreas da configuração e tenta encontrar uma disponível para o jogador entrar. Novo Teleporte e Spawn para Cada Sala: Cada área tem seu próprio teleporte, e os Pokémons são gerados na área correspondente. Esse ajuste deve resolver os problemas de criação em áreas incorretas e o erro de geração em paredes.
    1 ponto
  18. red X

    Interface de Poketibia

    🌞 Bom dia a todos! Ofereço meu trabalho como designer de UI para criar a parte gráfica da interface do OTC ou OTCv8, seja para Tibia, PokéTibia, NTO, DBO, entre outros. ⚠️ Importante: Faço apenas o design da interface, não a programação 🎨 Cores e Personalização: Posso usar as cores que vocês preferirem e ajustar o design ao logo ou imagem que enviarem. 💰 Formas de Pagamento: Pix Wise Vou deixar a chave Pix abaixo. 💼 Valores: O valor depende da interface. Exemplos: 🛠️ Inventário 🎟️ Battle Pass 🎁 Daily Gift 📚 Pokédex 🏗️ Workshop 📦 Entrega: Envio uma prévia da interface para ajustes. Após o pagamento, envio as imagens recortadas em .rar ou .zip com: Interface em PNG; Layouts organizados; Documento de Licença ou Créditos. 🔒 Confidencialidade: As imagens não serão usadas no meu portfólio para evitar spoilers ou vazamento de informações. 💬 Contato: Uso mais o Discord : arcadeazulo #azulo 6734. Pode me chamar lá! Moro fora do Brasil, então temos diferença de fuso horário, mas sempre leio minhas mensagens.
    1 ponto
  19. você pode seguir essa lógica: -- Defina a área e a lista de Pokémons local area1 = { fromx = 1712, fromy = 1211, fromz = 15, tox = 1966, toy = 1303, toz = 15 } local pokemons = {"Bulbasaur", "Charmander", "Squirtle", "Torchic", "Treecko", "Mudkip", "Totodile", "Chikorita", "Cyndaquil"} local spawnCount = 64 -- Número de Pokémons a serem gerados function spawnPokemons() for i = 1, spawnCount do -- Gere coordenadas aleatórias dentro da área local posX = math.random(area1.fromx, area1.tox) local posY = math.random(area1.fromy, area1.toy) local posZ = area1.fromz -- Mantenha a mesma altura (z) local position = {x = posX, y = posY, z = posZ} -- Escolha um Pokémon aleatoriamente da lista local chosenPokemon = pokemons[math.random(1, #pokemons)] -- Crie o Pokémon na posição escolhida doCreateMonster(chosenPokemon, position) end end -- Chame a função para spawnar os Pokémons spawnPokemons() Explicação do Script Área de Spawn: A área é definida pelas coordenadas fromx, fromy, fromz (canto superior esquerdo) e tox, toy, toz (canto inferior direito). Lista de Pokémons: A lista pokemons contém os nomes dos Pokémons que podem ser gerados. Função spawnPokemons: Gera 64 posições aleatórias dentro da área especificada. Seleciona aleatoriamente um Pokémon da lista para cada posição. Usa a função doCreateMonster para criar o Pokémon na posição especificada. Execução: A função spawnPokemons é chamada para executar o spawn dos Pokémons.
    1 ponto
  20. local chance_percent = 100 -- Chance percentual para headshot local extra_damage_percent = 1000 -- Percentual de dano extra function onLogin(cid) registerCreatureEvent(cid, "HeadshotCritical") return true end function onStatsChange(cid, attacker, type, combat, value) if type ~= STATSCHANGE_HEALTHLOSS then return true end if isPlayer(attacker) and getPlayerStorageValue(cid, 71257) < 1 then if math.random(100) <= chance_percent then local dmg = value * (extra_damage_percent / 100) setPlayerStorageValue(cid, 71257, 1) doTargetCombatHealth(attacker, cid, combat, -dmg, -dmg, 255) setPlayerStorageValue(cid, 71257, -1) -- Verifica se o dano causado é letal if getCreatureHealth(cid) <= dmg then doCreatureSay(cid, "HEADSHOT!", TALKTYPE_MONSTER) end return false end end return true end Como o script funciona: Chance de Headshot: O código mantém a chance de "headshot" e o dano adicional, como no script original. Verificação de Morte: Antes de exibir a mensagem "HEADSHOT!", o script verifica se o dano causado é suficiente para matar o alvo (getCreatureHealth(cid) <= dmg). Se for letal, a mensagem é exibida. Mensagem de "HEADSHOT!": A mensagem só aparecerá se o jogador morrer pelo ataque que causou o dano crítico. Como usar: Adicione o script ao seu servidor. Registre o evento no creaturescripts.xml: <event type="statschange" name="HeadshotCritical" script="headshot.lua"/> Reinicie o servidor para que as alterações entrem em vigor. Com essas alterações, o efeito "HEADSHOT!" só aparecerá quando um jogador matar outro jogador com um ataque crítico. Isso evita que a mensagem apareça a cada ataque, melhorando a experiência de jogo.
    1 ponto
  21. XZero

    PokéEssence

    PokéEssence está 2 anos online. Links: https://linktr.ee/pokeessence ⚠️Temos um Servidor Easy para jogadores causais e um Hard que foi lançado dia 20/06/2024 para jogadores mais competitivos. Tentamos atender a todos os públicos. ⚠️O PokéEssence tem vários sistemas bem legais, irei resumir alguns deles: ⚙️(Sistema de Tarefas) 📌O primeiro sistema que o tem player contato ao entrar no jogo. ✅Conclua as tarefas, ganhe EXP para o player e Pokémon, além de vários itens para progredir no jogo. ✅Com o sitema de tarefas você acompanha a história do jogo, desde o começo ao final. ⚙️(Sistema de Zonas Especiais) 📌È possível passar apenas 1 hora em cada Zona por dia. ✅Upe mais rapido na zona de up. ✅Farme mais na zona de farm. ✅Temos uma zona de pesca, focada na pesca e com boas premiações ✅Zona Boss, totalmente PvP e focado em progresso de pokémons. ⚙️(Sistema de Raid Boss) 📌Local aberto para todo o servidor competir pelo rank de dano no boss. 📌Quanto maior o seu dano, maior seu rank e mais chance de obter itens. 📌As zonas são dividas em ranks de pokémons, você só poderá usar pokémons no local do rank solicitado. ⚙️(Bot Ajudante) 📌Sistema para facilitar a jogabilidade. 📌O jogo é ajustado para que esse tipo de sistema não seja prejudicial. ✅Uso automático de Potions e Revives. ✅Uso automático dos movimentos dos pokémons. ✅Venda automático de loots. ⚙️(Sistema de Profissões e Acessórios) 📌Temos um sistema únicos de profissões desde forjador a pescador. 📌Ultilize o sistema de profissões para criar acessórios e materiais para progredir no jogo, fique cada vez mais forte. ⚠️Este é um pequeno resumo do PokéEssence, existem inumeros outros sistemas esperando você, por isso não deixe de esperimentar esse incrível jogo. 🎁Use o comando "/cupom 2anos" para receber 20 Boxs de Aniversário ao entrar no game, valído até o dia 20/07/2024.
    1 ponto
  22. Hirxzsxop

    Base pokemon LS com Mobile

    Salve pessoal, aqui e o HirxSxOp vim aqui postar uma base que foi recentemente postada no YouTube, com mobile+site+server+client e vim aqui postar com vocês A base e um pouco alaska, muitos gostam então irei postar aqui o download Estou com a internet horrível, não consigo fazer o Scan se alguém poder fazer irei agradecer Não sou suporte.. boa noite Tem algumas sistemas, robô irei mandar o vídeo dele aqui e vocês podem ver! https://youtu.be/6pggTYT4vzo Links: Mobile Site https://www.mediafire.com/file/oyzw54teto3l5m4/novols.apk/file https://www.mediafire.com/file/lpbq1yksls5mof2/htdocs.rar/file Server https://www.mediafire.com/file/qrwle9c82y9dib9/testels.rar/file Client https://www.mediafire.com/file/orktvwtejckemgj/client_ls.rar/file Source mandada por Poke Hero ( comunidade agradece ) Link https://mega.nz/file/bddilLiA?fbclid=IwAR2kq1Vj9wPH9gcHBe4p2TcPQ7Miki4phT9-298hr757t8_kWPF0ByFPX8w#G_5DgS8fJGR5UCuk3lkJuNUxd_YPbNvJ-Y-QbHTFcts Um poketibia com bastante potencial, mas infelizmente o dono estava sem tempo! Boa sorte nos seus projetos pessoal.
    1 ponto
  23. Poke Hero

    [Base] Pokémon Mythology [2023]

    Bom tava com um projetinho a um tempo atras mas como eu resolvi parar com ele resolvi trazer aqui pra vcs. Sim tem a maioria das coisas que a DXP tem porem tem bastante bugs removidos, o servidor fica online sem algum tipo de queda. esta estavel para por online alem de ter um mapa unico tem um cliente lido d+ :3 meu orgulho huahuahua mais em fim vamos ao que interessa Informações Basicas Duel System. Nick System. Autoloot System. Block Respaw System. Mega Evolução Ssystem. Auto Stacking System. Player passa por dentro de outros Players(Não sei o nome deste sistema kk). Ditto Memory System. Player pode usar potions, revive, soltar poke andando sem parar. Limite de efeitos aumentados nas sources até 380(Podendo aumentar muito mais) Transparência. Cliente criptografado(Acompanha OBD único para o cliente). Sistemas básicos como fly, ride, surf, order etc. Held System(Não tem todos, falta fazer alguns, ja tem o x-luck). Fishing trocando o outfit automaticamente. Icone System. Varias Pokeballs novas. Task System. Guild System. NPC dialogo E muito+, não testei o servidor todo. podem ter sistemas no server que eu esqueci de colocar aqui na lista. em mais coisas mas não me lembro ao certo de tudo que eu coloquei ;-; ? Bugs Irei postar os que eu sei, podem haver mais. Gym System não esta funcionando. O famoso bug do autoloot '- Pokemons da 3 geração todos arrumados porem pode dar revive mesmo com ele pra fora da ball scizor ao ser chamado de volta pra ball fica com o icon de shiny scizor Alguns erros no cliente que faz dar umas speed pra frente Que eu saiba e só isso mas provavelmente tenha mais que eu não estou ciente :C Prints Dowload [2023] MEDIAFIRE NOVO DOWNLOAD: https://www.mediafire.com/file/f4250q1caxg6t0z/Servidor_Mythology_(_17_de_agosto_2017_).rar/file [2023] MEGA NOVO DOWNLOAD: https://mega.nz/file/ozQB2KaQ#AUDDO8pCE5LgLJoP0kvCjlZL4x99e4zyADtUCcBSShE Senha : domviniciusbr Créditos CipSoft Nintendo TFS Team Dark X Poke PXG Tom Lukz (Smix) Allan Harlen (Kttallan/lordsorte) Eduardo Meskita (FuuinFake) Noninhouh Tony Araujo Taiger/Dudu Drakopoulos Justiceiro751 Vinicius Clel (Walox) DeadPool Marshmello Deyvid/Zeon Punchlines Nemmo E a todos que tiveram alguma participação em sistemas, server, site, cliente etc. Se estiver faltando algo como créditos, má formatação etc, por favor me avisem, é meu primeiro post de server. Se Algum Administrador Tiver Online Poder Aceitar Meu Tópico Agradeço
    1 ponto
  24. [CREATURESCRIPT] Exp Aura System (OTP Based) Autor: Tony Araújo (OrochiElf) Vídeo demonstrativo: https://imgur.com/8OFTfL8 (por algum motivo não carregou link direto kk) Eai rapeize, beleza? Espero que sim. Bom, hoje vim trazer a vocês o sistema de Exp Aura, fiz ele baseado no do OTPokemon. Bom, o sistema funciona da seguinte forma, você mata um monstro e tem uma chance desse monstro criar uma aura, que no caso será um efeito que ficará se repetindo por determinado tempo, ou caso preferência, até o corpo do monstro sumir, caso apareça essa aura, você precisa ficar na posição do efeito para coletar esse bônus. É um sistema bem simples, porém legal (acredito eu kkkkkk). Bom, vamos lá. 1. Vá em [data/creaturescripts/scripts] e lá crie um arquivo chamado (CODDINGS-ExpAura.lua), e dentro adicione: LINK DO HASTEBIN AQUI A configuração é bem simples, vamos lá: local EXPAURA = { aura_effect = 11, -- É o ID do efeito que irá ficar se repetindo, até o bonus ser coletado. gain_effect = 14, -- É o ID do efeito que irá aparecer quando o bonus for coletado. spawn_chance = 25, -- É a chance que este bônus tem de acontecer, sendo 25 = 25% use_specific_time = 15 -- Aqui você configura por quanto tempo o bônus esperará ser coletado, em segundos, porém caso prefira que espere até o corpo sumir, troque o número por false } 2. Continuando dentro do scripts, vá em (login.lua) e procure por: registerCreatureEvent E acima do primeiro resultado, você adicione: registerCreatureEvent(cid, "ExpAura+") 3. Agora vá no creaturescripts.xml e adicione a tag: <event type="kill" name="ExpAura+" event="script" value="CODDINGS-ExpAura.lua"/> Bom galera, feito isso, está pronto para se divertir. Espero que gostem e façam bom proveito.
    1 ponto
  25. @thepotaSegue minha contribuição que trabalhei esses dias... criado um slot unico para colocar as balls / verificação no go/back para que só permita utilizar os pokémons dentro do slot Remake de sprites Otimizado sistema de go/back do summon com verificações mais limpas Corrigido no mapa os CP, montado corretamente https://mega.nz/file/Sg0R0a7T#4mcj5-aGJpgYCLFJfNo17A49GYy2uL2Xp-yIvogHJk8
    1 ponto
  26. ivan2801

    POKEMON ARENA

    Site: pokemon.servegame.com:8090 (remover o espaço) Otserverlist: https://brazil.otservlist.org/ots/1644864/summary Discord: https://discord.gg/xpp6SyHqbk Venho apresentar o mais novo pokemon! Temos diversas novidades, somos uma equipe dedicada 100% ao servidor. PokeDex toda refeita, com balanceamento dos pokemons e atualizações constantes para melhor jogabilidade. VENHAM FAZER PARTE DO ARENA POKEMON! (INICIADO 20/02/2022) - AUTO LOOT "!AUTOLOOT ON" - SHINY DITTO - DITTO MEMORY - MEGA POKEMON - BOSSES - SHINY CHARM SYSTEM - VARIAS QUESTS COMO CYBER E CLONES - DAILY QUESTS - 3° GERAÇÃO - SISTEMA DE CLAN E DUNGEUN DE CLAN - EMBEDDED TOWER - BROTHERHOOD E MUITO MAIS COISAS. VENHAM CONFERIR!
    1 ponto
  27. rafersiq

    [BASE] PokeRoxy

    link pra download do pokeroxy https://www.mediafire.com/file/0bnqfpakjge6v2n/pokeRoxy.rar/file
    1 ponto
  28. Novo Servidor De Poketibia Base Shiny/Virus/Old MMORPG ONLINE!! Informações do Servidor: Imagens: Discord https://discordapp.com/invite/ZwPe7EK Site http://pokemonwind.com.br
    1 ponto
  29. Opa, fala xTibia '-'.. Vi que muitas pessoas estavam querendo fazer um site para seu servidor e não sabem como fazer... Então resolvi postar um tutorial completíssimo aqui.. O que vamos precisar? -&amp;gt; Xampp ( 1.6.5 ) - Download - http://www.oldapps.com/xampp.php?old_xampp=38 -&amp;gt; Gesior Acc. Maker ( 0.3.8 ) - Download - http://www.mediafire.com/?u0bao9bcp9ua5vr -&amp;gt; Um servidor de sua escolha.Pode ser qualquer um desde que tenha o arquivo .mysql. PS: NÃO RESPONDO A QUEM TIVER O ERRO DO INSTALL.PHP . ESSE ERRO É CAUSADO POR CAUSA DA UTILIZAÇÃO DE OUTRA VERSÃO DO XAMPP E DO GESIOR, POR ESSE MOTIVO EU COLOQUEI O XAMPP 1.6.5 QUE ESTÁ FUNCIONANDO! NÃO USE A VERSÃO MAIS RECENTE DO XAMPP! Vamos ao tutorial! Espere... vai criar um site sem saber como funciona? O site de seu servidor será feito em PHP. E o que vai ter nele? Os jogadores de seu servidor poderão criar suas contas, ver notícias do servidor, ver outros jogadores, criar guildas, e muito mais dependendo de como você manusear seu website. OBS1 : É altamente recomendável que escolha uma forte senha para sua conta de Admin. Pois se seu servidor tiver sucesso, certamente "hackers" tentarão atacar sua database e seu servidor. OBS 2: Seu site ficará online apenas quando o Xampp estiver ativo com o Apache e MySQL sendo executados, ou seja, apenas quando você estiver no computador. Para seu site ficar online 24 horas, você precisaria de uma hospedagem para php. Agora que já temos tudo, vamos começar !! 1°) Abra o instalador do XamPP, e instale-o. 2°) Selecione aonde a pasta do XamPP ficará salva. (de preferência algum lugar de fácil acesso) 3°) Deixe apenas a primeira e a segunda opções marcadas e clique em Next. 4°) Aguarde o fim da instação e provavelmente uma tela preta irá aparecer. 5°) Após o fim da instalação, clique em Yes para abrir o XamPP e dê Start em Apache e MySQL. 6°) Clique em Admin do Apache. Você será redirecionado para a sua localhost (endereço que apenas você entra). Clique em Português (Brasil). 7°) No canto esquerdo do site , clique na Aba Segurança. Vá descendo até achar " http://localhost/sec...mppsecurity.php " . Clique. OBS : Se você não conseguiu abrir a página de Segurança, vá na pasta do seu Xampp/security/htdocs/lang e renomeie o arquivo pt para pt_br . 8°) Após ter clicado, deverá ser redirecionado para uma página parecida com essa: OBS :Faça o numero 1 e depois clique em Alterar Senha. Depois Faça o numero 3 e clique em Tornar Seguro o Diretorio do XamPP. 9°) Após ter feito isso, dê Stop no MySql (no XamPP) e dê Start denovo. Agora vá em seu navegador e digite : localhost/phpmyadmin 10°) Digite a senha que foi criada há pouco tempo que eu disse que era para a criação do banco de dados. 11°) Minimize seu navegador e vá na pasta de seu servidor, e abra o arquivo config.lua. Tire todos os espaços iniciais e as "frases" iniciadas com o sinal de " - " . Veja : 12°) Não feche o config.lua ainda, vá descendo até achar informações sobre a database de seu servidor ... algo parecido com isto : sqlType = "mysql" &amp;lt;- se estiver em sqlite, mude para mysql sqlHost = "localhost" sqlPort = 3306 sqlUser = "root" sqlPass = "123456" &amp;lt; - coloque a senha que foi criada para entrar no banco de dados. sqlDatabase = "otserv" &amp;lt; - coloque o nome de sua database , coloque " otserv " para facilitar. sqlFile = "otserv.s3db" &amp;lt; - de prefencia, coloque " otserv.s3db " ( o mesmo nome de sua database ) sqlKeepAlive = 0 mysqlReadTimeout = 10 mysqlWriteTimeout = 10 encryptionType = "plain" 13°) Salve e feche o config.lua. Agora vamos voltar a pagina minimizada (localhost/phpmyadmin) : 14°) Clique na aba Importar na parte superior da tela. 15°) Agora Selecione o Arquivo para Importar. Selecione o arquivo terminado em .sql que fica na pasta de seu servidor e clique em Executar no canto inferior direito. 16°) Pronto !! A database de seu servidor foi criada. Agora vamos instalar os arquivos do site. 17°) Abra a pasta do XamPP/htdocs. Apague tudo que tem dentro de htdocs e cole tudo o que veio dentro da pasta do Gesior ACC. 18°) Abra o XamPP novamente e clique em Admin do Apache. 19°) Uma nova pagina foi aberta, agora você terá que fazer mais 5 passos rápidos. 19.1) Set Server Path Coloque o diretório da pasta de seu servidor. Ex : C:\Users\user\Desktop\Tibia Server Clique em Set Server Path. 19.2) Check database connection 19.3) Add tables and columns to DB 19.4) Agora desça e clique no botão. 19.5) Set Admin Account Coloque uma senha SEGURA pois esse será o password do administrador do site e servidor. 19.6) Load Monsters from OTS Carregue os monstros do servidor. 19.7) Load Spells from OTS Carregue as magias do servidor. 20°) Agora você deverá ser redirecionado para seu site, e você pode acessá-lo pelo localhost ou pelo ip do seu servidor. Para acessar sua database, digite em seu navegador : localhost/phpmyadmin Pronto !! Seu site foi criado :] Colocando seu site online pelo 8090 e Desbloqueando a porta 8090 : 1° - Acesse a pasta do XamPP/apache/conf e abra o arquivo httpd com o bloco de notas. Procure por : Listen 80 E por : ServerName localhost:80 Substitua todos os 80 por 8090. 2° - Dentro da pasta conf, abra a pasta extra, e em seguida abra httpd-ssl e procure por : Listen 443 E por: <virtualhost _default_:443=""> Substitua esses 443 por 4499. Agora vá em seu firewall e Adicione a Porta 8090 e Porta 80 e marca a opção TCP. Se usar Roteador, desbloqueie as portas também. Site por porta 80 localhost Site por porta 8090 localhost:8090 Colocando seu site online pela porta 80 (A porta 80 seria o ip normal de seu servidor. Exemplo : teste.servegame.com. ) A porta 80 não necessita de nada no final. Para que as pessoas entrem pela porta 80, não necessita mudar nada na pasta do Xampp. Pois ela ja está configurada para entrarem. Só é necessário desbloquear a porta 80 no seu modem ou roteador. E desbloquear a porta 80 pelo Firewall também. VIDEO AULA - FEITA EM 2/4/2012 (DESCULPA , AS VEZES TENHO QUE PENSAR QUANDO FALO EM PORTUGUES, PORQUE NAO MORO NO BRASIL)!! Créditos : 100% por Mim :] Não mexo mais com Tibia, mas ainda respondo a qualquer dúvida que eu esteja capacitado a responder (:
    1 ponto
  30. doukxxt

    BAIAK 12.00

    Hj trago um projeto baiak que eu comecei mais nao terminei por falta de recursos,e pq eu estava sozinho nesse projeto. Foi o motivo maior de ter desistido de continuar. Com certeza vai haver bugs e falta bastante coisa para terminar como: Treiners Bosses (comecei a fazer) Tasks eventos Algumas areas de hunts Npcs Quests Todas as ferramentas e tutorias para editar esse servidor vc vai encontrar aki no xtibia. Coisas q ja possui: Imbuimentos prey Store recompensa diaria Reward de bosses entre outras coisas Algumas Prints: TEMPLO Depot Offline Treiners teleports Downloads: Servidor: Scan: Client 12.00 Scan Site q usei e login para entrar no cliente 12. Programa q usei para criar a db foi Uniserver Zero XIII Scan: Creditos: Agradecer a comunidade em especial pq td oq a neste servidor foi de conteudo gratuido conseguido aki agradecer a equipe OTX pelas soucers. A equipe Myacc pelo site e login. As pessoas q disponibilizaram varias areas de hunts aki entre outras coisas q a no servidor q td foi conseguido aki.
    1 ponto
  31. JuininhoOFC

    NTOLEGENDS 2.5 + CLIENT 854

    SERVER NTO LEGENDS 2.5 + CLIENT 854 Acredito que muitos já conheçam o meu servidor, pois houve um período de grande acensão por volta de 2012-2015, antigo NtoWar como foi conhecido no começo. Servidor não possui nenhum bug que eu conheça pois foi 3 anos online e não foi exposto nenhum Bug. Acredito que seja uma das melhores bases atualmente no fórum. Existe vários NPCs de tasks espalhados pelo mapa. Área Vip Unica Mais de 10 Main quests e 56 sub quests Alguns sistemas únicos Além das vocações "Padrões" também contém algumas como, Suigetsu Orochimaru Tsunade Deidara Anbu Danzou Hidan Kabuto Shikaku Entre outros... Pvp Balanceado Versão 8.54 Algumas Prints do servidor Mais informações ou duvidas acesse nossa página oficial do facebook ou skype. Facebook: https://www.facebook.com/NtoBattleOFICIAL Skype: nto.legends Link Server+Client: http://www.mediafire.com/file/v8i5vfyn8yq5nfo/NtoLegends.rar Scan: https://www.virustotal.com/pt/url/de55757ea85e92ab0d08970460b45b4708ee181a5c23fa098b4ecd046535a9ae/analysis/1493719136/ Créditos: Base - Sky Dark Edition - Eu (Junichi Fusijaku)
    1 ponto
  32. Hudsin

    Como arrumar Imagens

    Vai no estilo .mundo_links e muda o atributo left para left: 1110px; Em seguida no .community_links3 e realiza o mesmo procedimento left: 1110px; Aqui funcionou. Caso não resolver me da um toque ?
    1 ponto
  33. subyth

    PokeProject v0.1

    Este servidor será atualizado sempre que surgir correções e melhorias para o mesmo. O Servidor é um update do famoso DxP(DarkXPoke) e o novo Mythology(recentemente vazado). Estou postando para que toda a comunidade do xTibia ajude com o projeto. Ele é livre para todos, peço apenas que não postem em outro fórum. DATABASE Do servidor está dentro da pasta SERVER. Conta do ADM: admin/admin Servidor testado apenas com Site. O site disponibilizado utiliza ModernAcc atualizado e template v4 do otpokemon com minhas correções. (Shop Retirado do Site - Possível Bug de clonagem, não achei necessário ter shop no site pois existe shop in-game) OBS: Por favor, olhem a citação de BUGs para ajudarem a corrigir. Vou criar um mapa bem melhor para o servidor. Quero parecido com o da PxG (eu mesmo vou fazer). Preciso refazer todos os NPC's pois estão todos bugados. Muitos npcs não dizem Bye ao sair e quando um jogador fala hi, ele se sobrepõe à outros jogadores. Não cite este tópico completo em sua resposta para não poluir o tópico. Ajude o projeto, poste bugs encontrados e correções. Mantenha o tópico organizado. Ao postar uma correção, por favor, utilize o Pastebin e poste apenas as linhas modificadas para que todos possam identificar. Este servidor não possui o BUG do DxP com Dedicados/VPS. O mesmo está liso e rodando perfeitamente. (não testei em linux) Créditos:
    1 ponto
  34. Nogard

    Free For Use!

    Pacote de sprites gratuitas doadas pelos artistas: Frenvius Weto Miller Wise Rose Ryoks
    1 ponto
  35. <?PHP //CREATE ACCOUNT FORM PAGE if($action == "") { $main_content .= '<script type="text/javascript"> var accountHttp; //sprawdza czy dane konto istnieje czy nie function checkAccount() { if(document.getElementById("account_name").value=="") { document.getElementById("acc_name_check").innerHTML = \'<b><font color="red">Please enter account name.</font></b>\'; return; } accountHttp=GetXmlHttpObject(); if (accountHttp==null) { return; } var account = document.getElementById("account_name").value; var url="ajax/check_account.php?account=" + account + "&uid="+Math.random(); accountHttp.onreadystatechange=AccountStateChanged; accountHttp.open("GET",url,true); accountHttp.send(null); } function AccountStateChanged() { if (accountHttp.readyState==4) { document.getElementById("acc_name_check").innerHTML=accountHttp.responseText; } } var emailHttp; //sprawdza czy dane konto istnieje czy nie function checkEmail() { if(document.getElementById("email").value=="") { document.getElementById("email_check").innerHTML = \'<b><font color="red">Please enter e-mail.</font></b>\'; return; } emailHttp=GetXmlHttpObject(); if (emailHttp==null) { return; } var email = document.getElementById("email").value; var url="ajax/check_email.php?email=" + email + "&uid="+Math.random(); emailHttp.onreadystatechange=EmailStateChanged; emailHttp.open("GET",url,true); emailHttp.send(null); } function EmailStateChanged() { if (emailHttp.readyState==4) { document.getElementById("email_check").innerHTML=emailHttp.responseText; } } function validate_required(field,alerttxt) { with (field) { if (value==null||value==""||value==" ") {alert(alerttxt);return false;} else {return true} } } function validate_email(field,alerttxt) { with (field) { apos=value.indexOf("@"); dotpos=value.lastIndexOf("."); if (apos<1||dotpos-apos<2) {alert(alerttxt);return false;} else {return true;} } } function validate_form(thisform) { with (thisform) { if (validate_required(account_name,"Please enter name of new account!")==false) {account_name.focus();return false;} if (validate_required(email,"Please enter your e-mail!")==false) {email.focus();return false;} if (validate_email(email,"Invalid e-mail format!")==false) {email.focus();return false;} if (verifpass==1) { if (validate_required(passor,"Please enter password!")==false) {passor.focus();return false;} if (validate_required(passor2,"Please repeat password!")==false) {passor2.focus();return false;} if (passor2.value!=passor.value) {alert(\'Repeated password is not equal to password!\');return false;} } if (verifya==1) { if (validate_required(verify,"Please enter verification code!")==false) {verify.focus();return false;} } if(rules.checked==false) {alert(\'To create account you must accept server rules!\');return false;} } } </script>'; $main_content .= 'To play on '.$config['server']['serverName'].' you need an account. All you have to do to create your new account is to enter your email address, password to new account, verification code from picture and to agree to the terms presented below. If you have done so, your account name, password and e-mail address will be shown on the following page and your account and password will be sent to your email address along with further instructions.<BR><BR> <FORM ACTION="?subtopic=createaccount&action=saveaccount" onsubmit="return validate_form(this)" METHOD=post> <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Create a '.$config['server']['serverName'].' Account</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLSPACING=8 CELLPADDING=0> <TR><TD> <TABLE BORDER=0 CELLSPACING=5 CELLPADDING=0>'; $main_content .= '<TR><TD width="150" valign="top"><B>Account name: </B></TD><TD colspan="2"><INPUT id="account_name" NAME="reg_name" onkeyup="checkAccount();" VALUE="" SIZE=30 MAXLENGTH=50><BR><font size="1" face="verdana,arial,helvetica">(Please enter your new account name)</font></TD></TR> <TR><TD width="150"><b>Name status:</b></TD><TD colspan="2"><b><div id="acc_name_check">Please enter your account name.</div></b></TD></TR> <TR><TD width="150" valign="top"><B>Email address: </B></TD><TD colspan="2"><INPUT id="email" NAME="reg_email" onkeyup="checkEmail();" VALUE="" SIZE=30 MAXLENGTH=50><BR><font size="1" face="verdana,arial,helvetica">(Your email address is required to recovery a '.$config['server']['serverName'].' account)</font></TD></TR> <TR><TD width="150"><b>Email status:</b></TD><TD colspan="2"><b><div id="email_check">Please enter your e-mail.</div></b></TD></TR>'; $main_content .= '<TR><TD width="150"><b>Select Country:</b></TD><TD colspan="2"><b><select name="country"> <option value="">Please choose</option><option value="af"> Afghanistan </option><option value="al"> Albania </option><option value="dz"> Algeria </option><option value="as"> American Samoa </option><option value="ad"> Andorra </option><option value="ao"> Angola </option><option value="ai"> Anguilla </option><option value="aq"> Antarctica </option><option value="ag"> Antigua and Barbuda </option><option value="ar"> Argentina </option> <option value="am"> Armenia </option><option value="aw"> Aruba </option><option value="au"> Australia </option><option value="at"> Austria </option><option value="az"> Azerbaijan </option><option value="bs"> Bahamas </option><option value="bh"> Bahrain </option><option value="bd"> Bangladesh </option><option value="bb"> Barbados </option><option value="by"> Belarus </option><option value="be"> Belgium </option><option value="bz"> Belize </option><option value="bj"> Benin </option><option value="bm"> Bermuda </option><option value="bt"> Bhutan </option><option value="bo"> Bolivia </option><option value="ba"> Bosnia and Herzegowina </option><option value="bw"> Botswana </option><option value="bv"> Bouvet Island </option><option value="br"> Brazil </option><option value="io"> British Indian Ocean Territory </option><option value="bn"> Brunei Darussalam </option><option value="bg"> Bulgaria </option><option value="bf"> Burkina Faso </option><option value="bi"> Burundi </option> <option value="kh"> Cambodia </option><option value="cm"> Cameroon </option><option value="ca"> Canada </option><option value="cv"> Cape Verde </option><option value="ky"> Cayman Islands </option><option value="cf"> Central African Republic </option><option value="td"> Chad </option><option value="cl"> Chile </option><option value="cn"> China </option><option value="cx"> Christmas Island </option><option value="cc"> Cocos Islands </option><option value="co"> Colombia </option><option value="km"> Comoros </option><option value="cd"> Congo </option><option value="cg"> Congo </option><option value="ck"> Cook Islands </option><option value="cr"> Costa Rica </option><option value="ci"> Cote DIvoire </option><option value="hr"> Croatia </option><option value="cu"> Cuba </option><option value="cy"> Cyprus </option><option value="cz"> Czech Republic </option><option value="dk"> Denmark </option><option value="dj"> Djibouti </option><option value="dm"> Dominica </option> <option value="do"> Dominican Republic </option><option value="tp"> East Timor </option><option value="ec"> Ecuador </option><option value="eg"> Egypt </option><option value="sv"> El Salvador </option><option value="gq"> Equatorial Guinea </option><option value="er"> Eritrea </option><option value="ee"> Estonia </option><option value="et"> Ethiopia </option><option value="fk"> Falkland Islands </option><option value="fo"> Faroe Islands </option><option value="fj"> Fiji </option><option value="fi"> Finland </option><option value="fr"> France </option><option value="gf"> French Guiana </option><option value="pf"> French Polynesia </option><option value="tf"> French Southern Territories </option><option value="ga"> Gabon </option><option value="gm"> Gambia </option><option value="ge"> Georgia </option><option value="de"> Germany </option><option value="gh"> Ghana </option><option value="gi"> Gibraltar </option><option value="gr"> Greece </option> <option value="gl"> Greenland </option><option value="gd"> Grenada </option><option value="gp"> Guadeloupe </option><option value="gu"> Guam </option><option value="gt"> Guatemala </option><option value="gn"> Guinea </option><option value="gw"> Guinea-Bissau </option><option value="gy"> Guyana </option><option value="ht"> Haiti </option><option value="hm"> Heard and Mc Donald Islands </option><option value="hn"> Honduras </option><option value="hk"> Hong Kong </option><option value="hu"> Hungary </option><option value="is"> Iceland </option><option value="in"> India </option><option value="id"> Indonesia </option><option value="ir"> Iran </option><option value="iq"> Iraq </option><option value="ie"> Ireland </option><option value="il"> Israel </option><option value="it"> Italy </option><option value="jm"> Jamaica </option><option value="jp"> Japan </option><option value="jo"> Jordan </option><option value="kz"> Kazakhstan </option><option value="ke"> Kenya </option> <option value="ki"> Kiribati </option><option value="kr"> Korea </option><option value="kp"> Korea </option><option value="kw"> Kuwait </option><option value="kg"> Kyrgyzstan </option><option value="la"> Lao Peoples Democratic Republic </option><option value="lv"> Latvia </option><option value="lb"> Lebanon </option><option value="ls"> Lesotho </option><option value="lr"> Liberia </option><option value="ly"> Libyan Arab Jamahiriya </option><option value="li"> Liechtenstein </option><option value="lt"> Lithuania </option><option value="lu"> Luxembourg </option><option value="mo"> Macau </option><option value="mk"> Macedonia </option><option value="mg"> Madagascar </option><option value="mw"> Malawi </option><option value="my"> Malaysia </option><option value="mv"> Maldives </option><option value="ml"> Mali </option><option value="mt"> Malta </option><option value="mh"> Marshall Islands </option><option value="mq"> Martinique </option> <option value="mr"> Mauritania </option><option value="mu"> Mauritius </option><option value="yt"> Mayotte </option><option value="mx"> Mexico </option><option value="fm"> Micronesia </option><option value="md"> Moldova </option><option value="mc"> Monaco </option><option value="mn"> Mongolia </option><option value="ms"> Montserrat </option><option value="ma"> Morocco </option><option value="mz"> Mozambique </option><option value="mm"> Myanmar </option><option value="na"> Namibia </option><option value="nr"> Nauru </option><option value="np"> Nepal </option><option value="nl"> Netherlands </option><option value="an"> Netherlands Antilles </option><option value="nc"> New Caledonia </option><option value="nz"> New Zealand </option><option value="ni"> Nicaragua </option><option value="ne"> Niger </option><option value="ng"> Nigeria </option><option value="nu"> Niue </option><option value="nf"> Norfolk Island </option><option value="mp"> Northern Mariana Islands </option> <option value="no"> Norway </option><option value="om"> Oman </option><option value="pk"> Pakistan </option><option value="pw"> Palau </option><option value="pa"> Panama </option><option value="pg"> Papua New Guinea </option><option value="py"> Paraguay </option><option value="pe"> Peru </option><option value="ph"> Philippines </option><option value="pn"> Pitcairn </option><option value="pl"> Poland </option><option value="pt"> Portugal </option><option value="pr"> Puerto Rico </option><option value="qa"> Qatar </option><option value="re"> Reunion </option><option value="ro"> Romania </option><option value="ru"> Russian Federation </option><option value="rw"> Rwanda </option><option value="kn"> Saint Kitts and Nevis </option><option value="lc"> Saint Lucia </option><option value="ws"> Samoa </option><option value="sm"> San Marino </option><option value="st"> Sao Tome and Principe </option><option value="sa"> Saudi Arabia </option><option value="sn"> Senegal </option> <option value="sc"> Seychelles </option><option value="sl"> Sierra Leone </option><option value="sg"> Singapore </option><option value="sk"> Slovakia </option><option value="si"> Slovenia </option><option value="sb"> Solomon Islands </option><option value="so"> Somalia </option><option value="za"> South Africa </option><option value="es"> Spain </option><option value="lk"> Sri Lanka </option><option value="sh"> St. Helena </option><option value="pm"> St. Pierre and Miquelon </option><option value="sd"> Sudan </option><option value="sr"> Suriname </option><option value="sj"> Svalbard and Jan Mayen Islands </option><option value="sz"> Swaziland </option><option value="se"> Sweden </option><option value="ch"> Switzerland </option><option value="sy"> Syrian Arab Republic </option><option value="tw"> Taiwan </option><option value="tj"> Tajikistan </option><option value="tz"> Tanzania </option> <option value="th"> Thailand </option><option value="tg"> Togo </option><option value="tk"> Tokelau </option><option value="to"> Tonga </option> <option value="tt"> Trinidad and Tobago </option><option value="tn"> Tunisia </option><option value="tr"> Turkey </option><option value="tm"> Turkmenistan </option><option value="tc"> Turks and Caicos Islands </option><option value="tv"> Tuvalu </option><option value="ug"> Uganda </option><option value="ua"> Ukraine </option><option value="ae"> United Arab Emirates </option><option value="gb"> United Kingdom </option><option value="us"> United States </option><option value="uy"> Uruguay </option><option value="uz"> Uzbekistan </option><option value="vu"> Vanuatu </option><option value="va"> Vatican </option><option value="ve"> Venezuela </option><option value="vn"> Viet Nam </option><option value="vg"> Virgin Islands (British) </option><option value="vi"> Virgin Islands (US) </option> <option value="wf"> Wallis and Futuna Islands </option><option value="eh"> Western Sahara </option><option value="ye"> Yemen </option><option value="yu"> Yugoslavia </option><option value="zm"> Zambia </option><option value="zw"> Zimbabwe </option> </select>'; if(!$config['site']['create_account_verify_mail']) $main_content .= '<script type="text/javascript">var verifpass=1;</script> <TR><TD width="150" valign="top"><B>Password: </B></TD><TD colspan="2"><INPUT TYPE="password" id="passor" NAME="reg_password" VALUE="" SIZE=30 MAXLENGTH=50><BR><font size="1" face="verdana,arial,helvetica">(Here write your password to new account on '.$config['server']['serverName'].')</font></TD></TR> <TR><TD width="150" valign="top"><B>Repeat password: </B></TD><TD colspan="2"><INPUT TYPE="password" id="passor2" NAME="reg_password2" VALUE="" SIZE=30 MAXLENGTH=50><BR><font size="1" face="verdana,arial,helvetica">(Repeat your password)</font></TD></TR>'; else { } $main_content .= '</TABLE> </TD></TR> <TR><TD> <TABLE BORDER=0 CELLSPACING=5 CELLPADDING=0><TR><TD> Please review the following terms and state your agreement below. </TD></TR> <TR><TD> <B>'.$config['server']['serverName'].' Rules</B><BR> <TEXTAREA ROWS="16" WRAP="physical" COLS="75" READONLY="true">'; //load server rules from file include("tibiarules.php"); $main_content .= '</TEXTAREA> </TD></TR></TABLE> </TD></TR> <TR><TD> <TABLE BORDER=0 CELLSPACING=5 CELLPADDING=0> <TR><TD> <INPUT TYPE="checkbox" NAME="rules" id="rules" value="true" /><label for="rules"><u> I agree to the '.$config['server']['serverName'].' Rules.</u></lable><BR> </TD></TR> <TR><TD> If you fully agree to these terms, click on the "I Agree" button in order to create a '.$config['server']['serverName'].' account.<BR> If you do not agree to these terms or do not want to create a '.$config['server']['serverName'].' account, please click on the "Cancel" button. </TD></TR></TABLE> </TD></TR> </TABLE></TD></TR> </TABLE> <BR> <TABLE BORDER=0 WIDTH=100%> <TR><TD ALIGN=center> <IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=120 HEIGHT=1 BORDER=0><BR> </TD><TD ALIGN=center VALIGN=top> <INPUT TYPE=image NAME="I Agree" SRC="'.$layout_name.'/images/buttons/sbutton_iagree.gif" BORDER=0 WIDTH=120 HEIGHT=18> </FORM> </TD><TD ALIGN=center> <FORM ACTION="?subtopic=latestnews" METHOD=post> <INPUT TYPE=image NAME="Cancel" SRC="'.$layout_name.'/images/buttons/sbutton_cancel.gif" BORDER=0 WIDTH=120 HEIGHT=18> </FORM> </TD><TD ALIGN=center> <IMG SRC="/images/general/blank.gif" WIDTH=120 HEIGHT=1 BORDER=0><BR> </TD></TR> </TABLE> </TD> <TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD> </TR> </TABLE>'; } //CREATE ACCOUNT PAGE (save account in database) if($action == "saveaccount") { $reg_country = trim($_POST['country']); $reg_name = strtoupper(trim($_POST['reg_name'])); $reg_email = trim($_POST['reg_email']); $reg_password = trim($_POST['reg_password']); $reg_code = trim($_POST['reg_code']); //FIRST check //check e-mail if(empty($reg_name)) $reg_form_errors[] = "Please enter account name."; elseif(!check_account_name($reg_name)) $reg_form_errors[] = "Invalid account name format. Use only A-Z and numbers 0-9."; elseif($str_len($reg_name) < 3) $reg_form_errors[] = "Invalid account name size. The length acceptable is 3 chars." if(empty($reg_email)) $reg_form_errors[] = "Please enter your email address."; else { if(!check_mail($reg_email)) $reg_form_errors[] = "E-mail address is not correct."; } if($config['site']['verify_code']) { } //check password if(empty($reg_password) && !$config['site']['create_account_verify_mail']) $reg_form_errors[] = "Please enter password to your new account."; elseif(!$config['site']['create_account_verify_mail']) { if(!check_password($reg_password)) $reg_form_errors[] = "Password contains illegal chars (a-z, A-Z and 0-9 only!) or lenght."; } //SECOND check //check e-mail address in database if(empty($reg_form_errors)) { if($config['site']['one_email']) { $test_email_account = $ots->createObject('Account'); //load account with this e-mail $test_email_account->findByEmail($reg_email); if($test_email_account->isLoaded()) $reg_form_errors[] = "Account with this e-mail address already exist in database."; } $account_db = new OTS_Account(); $account_db->find($reg_name); if($account_db->isLoaded()) $reg_form_errors[] = 'Account with this name already exist.'; } // ----------creates account-------------(save in database) if(empty($reg_form_errors)) { //create object 'account' and generate new acc. number if($config['site']['create_account_verify_mail']) { $reg_password = ''; for ($i = 1; $i <= 6; $i++) $reg_password .= mt_rand(0,9); } $reg_account = $ots->createObject('Account'); $number = $reg_account->create(0, 9999999, $reg_name); // saves account information in database $reg_account->setPassword(password_ency($reg_password)); $reg_account->setEMail($reg_email); $reg_account->setCustomField("flag", $reg_country); $reg_account->unblock(); $reg_account->save(); if($config['site']['newaccount_premdays']) { $reg_account->setCustomField("premdays", $config['site']['newaccount_premdays']); $reg_account->setCustomField("lastday", time()); } //show information about registration if($config['site']['send_emails'] && $config['site']['create_account_verify_mail']) { $mailBody = '<html> <body> <h3>Your account name and password!</h3> <p>You or someone else registred on server <a href="'.$config['server']['url'].'"><b>'.$config['server']['serverName'].'</b></a> with this e-mail.</p> <p>Account name: <b>'.$reg_name.'</b></p> <p>Password: <b>'.trim($reg_password).'</b></p> <br /> <p>After login you can:</p> <li>Create new characters <li>Change your current password <li>Change your current e-mail </body> </html>'; require("phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); if ($config['site']['smtp_enabled'] == "yes") { $mail->IsSMTP(); $mail->Host = $config['site']['smtp_host']; $mail->Port = (int)$config['site']['smtp_port']; $mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false); $mail->Username = $config['site']['smtp_user']; $mail->Password = $config['site']['smtp_pass']; } else $mail->IsMail(); $mail->IsHTML(true); $mail->From = $config['site']['mail_address']; $mail->AddAddress($reg_email); $mail->Subject = $config['server']['serverName']." - Registration"; $mail->Body = $mailBody; if($mail->Send()) { $main_content .= 'Your account has been created. Check your e-mail. See you in Tibia!<BR><BR>'; $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Account Created</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['darkborder'].'"> <TABLE BORDER=0 CELLPADDING=1><TR><TD> <BR>Your account name is <b>'.$reg_name.'</b>. <BR><b><i>You will receive e-mail (<b>'.$reg_email.'</b>) with your password.</b></i><br>'; $main_content .= 'You will need the account name and your password to play on '.$config['server']['serverName'].'. Please keep your account name and password in a safe place and never give your account name or password to anybody.<BR><BR>'; $main_content .= '<br /><small>These informations were send on email address <b>'.$reg_email.'</b>. Please check your inbox/spam folder.'; } else { $main_content .= '<br /><small>An error occorred while sending email! Account not created. Try again.</small>'; $reg_account->delete(); } } else { $main_content .= 'Your account has been created. Now you can login and create your first character. See you in Tibia!<BR><BR>'; $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Account Created</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['darkborder'].'"> <TABLE BORDER=0 CELLPADDING=1><TR><TD> <BR>Your account name is <b>'.$reg_name.'</b><br>You will need the account name and your password to play on '.$config['server']['serverName'].'. Please keep your account name and password in a safe place and never give your account name or password to anybody.<BR><BR>'; if($config['site']['send_emails'] && $config['site']['send_register_email']) { $mailBody = '<html> <body> <h3>Your account name and password!</h3> <p>You or someone else registred on server <a href="'.$config['server']['url'].'"><b>'.$config['server']['serverName'].'</b></a> with this e-mail.</p> <p>Account name: <b>'.$reg_name.'</b></p> <p>Password: <b>'.trim($reg_password).'</b></p> <br /> <p>After login you can:</p> <li>Create new characters <li>Change your current password <li>Change your current e-mail </body> </html>'; require("phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); if ($config['site']['smtp_enabled'] == "yes") { $mail->IsSMTP(); $mail->Host = $config['site']['smtp_host']; $mail->Port = (int)$config['site']['smtp_port']; $mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false); $mail->Username = $config['site']['smtp_user']; $mail->Password = $config['site']['smtp_pass']; } else $mail->IsMail(); $mail->IsHTML(true); $mail->From = $config['site']['mail_address']; $mail->AddAddress($reg_email); $mail->Subject = $config['server']['serverName']." - Registration"; $mail->Body = $mailBody; if($mail->Send()) $main_content .= '<br /><small>These informations were send on email address <b>'.$reg_email.'</b>.'; else $main_content .= '<br /><small>An error occorred while sending email (<b>'.$reg_email.'</b>)!</small>'; } } $main_content .= '</TD></TR></TABLE></TD></TR></TABLE><BR><BR>'; } else { //SHOW ERRORs if data from form is wrong $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($reg_form_errors as $show_msg) { $main_content .= '<li>'.$show_msg; } $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/> <BR> <CENTER> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=?subtopic=createaccount METHOD=post><TR><TD> <INPUT TYPE=hidden NAME=email VALUE=""> <INPUT TYPE=image NAME="Back" ALT="Back" SRC="'.$layout_name.'/images/buttons/sbutton_back.gif" BORDER=0 WIDTH=120 HEIGHT=18> </TD></TR></FORM></TABLE> </CENTER>'; } } ?> Apague o que está em createaccount.php e coloque o código a cima. <?PHP if(!$logged) if($action == "logout") $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Logout Successful</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>You have logged out of your '.$config['server']['serverName'].' account. In order to view your account you need to <a href="?subtopic=accountmanagement" >log in</a> again.</td></tr> </table> </div> </table></div></td></tr>'; else $main_content .= 'Please enter your account name and your password.<br/><a href="?subtopic=createaccount" >Create an account</a> if you do not have one yet.<br/><br/><form action="?subtopic=accountmanagement" method="post" ><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Account Login</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Account Name:</span></td><td style="width:100%;" ><input type="password" name="account_login" SIZE="10" maxlength="10" ></td></tr><tr><td class="LabelV" ><span >Password:</span></td><td><input type="password" name="password_login" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table width="100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=lostaccount" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Account lost?" alt="Account lost?" src="'.$layout_name.'/images/buttons/_sbutton_accountlost.gif" ></div></div></td></tr></form></table></td></tr></table>'; else { if($action == "") { $account_reckey = $account_logged->getRecoveryKey(); if(!$account_logged->isPremium()) $account_status = '<b><font color="red">Free Account</font></b>'; else $account_status = '<b><font color="green">Premium Account, '.$account_logged->getPremDays().' days left</font></b>'; if(empty($account_reckey)) $account_registred = '<b><font color="red">No</font></b>'; else if($config['site']['generate_new_reckey'] && $config['site']['send_emails']) $account_registred = '<b><font color="green">Yes ( <a href="?subtopic=accountmanagement&action=newreckey"> Buy new Rec key </a> )</font></b>'; else $account_registred = '<b><font color="green">Yes</font></b>'; $account_created = $account_logged->getCreated(); $account_email = $account_logged->getEMail(); $account_email_new_time = $account_logged->getCustomField("email_new_time"); if($account_email_new_time > 1) $account_email_new = $account_logged->getCustomField("email_new"); $account_vip = $account_logged->getPlayerVip_Time() ? '<b><font color="green"> Vip Account, '.$account_logged->getPlayerVip_Time().' Time left </font></b>' : '<b><font color="red">Not Vip Account</font></b>'; $account_rlname = $account_logged->getRLName(); $account_location = $account_logged->getLocation(); if($account_logged->isBanned()) if($account_logged->getBanTime() > 0) $welcome_msg = '<font color="red">Your account is banished until '.date("j F Y, G:i:s", $account_logged->getBanTime()).'!</font>'; else $welcome_msg = '<font color="red">Your account is banished FOREVER!</font>'; else $welcome_msg = 'Welcome to your account!'; $main_content .= '<div class="SmallBox" > <div class="MessageContainer" ><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div><div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div><div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div><div class="Message" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div><div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div><table><td width="100%" align=center>'; if($config['site']['worldtransfer'] == 1) $main_content .= '<a href="?subtopic=accountmanagement&action=charactertransfer">Character World Transfer</a>'; $main_content .= '</td><td width=50%><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=logout" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Logout" alt="Logout" src="'.$layout_name.'/images/buttons/_sbutton_logout.gif" ></div></div></td></tr></form></table></td></tr></table> </div><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/><center><table><tr><td><img src="'.$layout_name.'/images/content/headline-bracer-left.gif" /></td><td style="text-align:center;vertical-align:middle;horizontal-align:center;font-size:17px;font-weight:bold;" >'.$welcome_msg.'<br/></td><td><img src="'.$layout_name.'/images/content/headline-bracer-right.gif" /></td></tr></table><br/></center>'; //if account dont have recovery key show hint if(empty($account_reckey)) $main_content .= '<div class="SmallBox" ><div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div><div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div><div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div><div class="Message" ><div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div><div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div><table><tr><td class="LabelV" >Hint:</td><td style="width:100%;" >You can register your account for increased protection. Click on "Register Account" and get your free recovery key today!</td></tr></table><div align="center" ><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=registeraccount" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Register Account" alt="Register Account" src="'.$layout_name.'/images/buttons/_sbutton_registeraccount.gif" ></div></div></td></tr></form></table></div></div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div><div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div><div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; if($account_email_new_time > 1) if($account_email_new_time < time()) $account_email_change = '<br>(You can accept <b>'.$account_email_new.'</b> as a new email.)'; else { $account_email_change = ' <br>You can accept <b>new e-mail after '.date("j F Y", $account_email_new_time).".</b>"; $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="Message" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div><table><tr><td class="LabelV" >Note:</td><td style="width:100%;" >A request has been submitted to change the email address of this account to <b>'.$account_email_new.'</b>. After <b>'.date("j F Y, G:i:s", $account_email_new_time).'</b> you can accept the new email address and finish the process. Please cancel the request if you do not want your email address to be changed! Also cancel the request if you have no access to the new email address!</td></tr></table><div align="center" ><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=changeemail" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Edit" alt="Edit" src="'.$layout_name.'/images/buttons/_sbutton_edit.gif" ></div></div></td></tr></form></table></div> </div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/><br/>'; } $main_content .= '<a name="General+Information" ></a><div class="TopButtonContainer" ><div class="TopButton" ><a href="#top" > <image style="border:0px;" src="'.$layout_name.'/images/content/back-to-top.gif" /></a></div></div><div class="TableContainer" ><table class="Table3" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >General Information</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div><tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" ><div class="TableContentContainer" > <table class="TableContent" width="100%" ><tr style="background-color:'.$config['site']['darkborder'].';" ><td class="LabelV" >Email Address:</td><td style="width:90%;" >'.$account_email.''.$account_email_change.'</td></tr><tr style="background-color:'.$config['site']['lightborder'].';" ><td class="LabelV" >Created:</td><td>'.date("j F Y, G:i:s", $account_created).'</td></td><tr style="background-color:'.$config['site']['darkborder'].';" ><td class="LabelV" >Last Login:</td><td>'.date("j F Y, G:i:s", time()).'</td></tr><tr style="background-color:'.$config['site']['lightborder'].';" ><td class="LabelV" >Account Status:</td><td>'.$account_status.'</td></tr><tr style="background-color:'.$config['site']['darkborder'].';" ><td class="LabelV" >Vip Status:</td><td>'.$account_vip.'</td></tr><tr style="background-color:'.$config['site']['darkborder'].'; " ><td class="LabelV" >Registered:</td><td>'.$account_registred.'</td></tr></table></div></div><div class="TableShadowContainer" ><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" ><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div> </div></div></td></tr><tr><td><table class="InnerTableButtonRow" cellpadding="0" cellspacing="0" ><tr><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=changepassword" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Change Password" alt="Change Password" src="'.$layout_name.'/images/buttons/_sbutton_changepassword.gif" ></div></div></td></tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=changeemail" method="post" ><tr><td style="border:0px;" ><input type="hidden" name=newemail value="" ><input type="hidden" name=newemaildate value=0 ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Change Email" alt="Change Email" src="'.$layout_name.'/images/buttons/_sbutton_changeemail.gif" ></div></div></td></tr></form> </table></td><td width="100%"></td>'; //show button "register account" if(empty($account_reckey)) $main_content .= '<td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=registeraccount" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Register Account" alt="Register Account" src="'.$layout_name.'/images/buttons/_sbutton_registeraccount.gif" ></div></div></td></tr></form></table></td>'; $main_content .= '</tr></table></td></tr></table></div></table></div></td></tr><br/><a name="Public+Information" ></a><div class="TopButtonContainer" ><div class="TopButton" ><a href="#top" ><image style="border:0px;" src="'.$layout_name.'/images/content/back-to-top.gif" /></a></div></div><div class="TableContainer" > <table class="Table5" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Public Information</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" ><div class="TableContentContainer" > <table class="TableContent" width="100%" ><tr><td><table style="width:100%;"><tr><td class="LabelV" >Real Name:</td><td style="width:90%;" >'.$account_rlname.'</td></tr><tr><td class="LabelV" >Location:</td><td style="width:90%;" >'.$account_location.'</td></tr></table></td><td align=right><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=changeinfo" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Edit" alt="Edit" src="'.$layout_name.'/images/buttons/_sbutton_edit.gif" ></div></div></td></tr></form></table></td></tr> </table> </div></div><div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div> </div></div></td></tr> </table> </div> </table></div></td></tr><br/><br/>'; $main_content .= '<a name="Characters" ></a><div class="TopButtonContainer" ><div class="TopButton" ><a href="#top" ><image style="border:0px;" src="'.$layout_name.'/images/content/back-to-top.gif" /></a></div></div><div class="TableContainer" > <table class="Table3" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" ><div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Characters</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" ><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" ><div class="TableContentContainer" > <table class="TableContent" width="100%" ><tr class="LabelH" ><td style="width:65%" >Name</td><td style="width:15%" >Level</td><td style="width:7%">Status</td><td style="width:5%">&#160;</td></tr>'; $account_players = $account_logged->getPlayersList(); $account_players->orderBy('name'); //show list of players on account foreach($account_players as $account_player) { $player_number_counter++; $main_content .= '<tr style="background-color:'; if(is_int($player_number_counter / 2)) $main_content .= $config['site']['darkborder']; else $main_content .= $config['site']['lightborder']; $main_content .= ';" ><td><NOBR>'.$player_number_counter.'.&#160;'.$account_player->getName(); if($account_player->isDeleted()) $main_content .= '<font color="red"><b> [ DELETED ] </b> <a href="?subtopic=accountmanagement&action=undelete&name='.urlencode($account_player->getName()).'">>> UNDELETE <<</a></font>'; if($account_player->isNameLocked()) if($account_player->getOldName()) $main_content .= '<font color="red"><b> [ NAMELOCK:</b> Wait for GM, new name: <b>'.$account_player->getOldName().' ]</b></font>'; else $main_content .= '<font color="red"><b> [ NAMELOCK: <form action="" method="GET"><input name="subtopic" type="hidden" value="accountmanagement" /><input name="action" type="hidden" value="newnick" /><input name="name" type="hidden" value="'.$account_player->getName().'" /><input name="name_new" type="text" value="Enter here new nick" size="16" /><input type="submit" value="Set new nick" /></form> ]</b></font>'; $main_content .= '</NOBR></td><td><NOBR>'.$account_player->getLevel().' '.$vocation_name[$account_player->getWorld()][$account_player->getPromotion()][$account_player->getVocation()].'</NOBR></td>'; if(!$account_player->isOnline()) $main_content .= '<td><font color="red"><b>Offline</b></font></td>'; else $main_content .= '<td><font color="green"><b>Online</b></font></td>'; $main_content .= '<td>[<a href="?subtopic=accountmanagement&action=changecomment&name='.urlencode($account_player->getName()).'" >Edit</a>]</td></tr>'; } $main_content .= '</table> </div></div><div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div> </div></div></td></tr><tr><td><table class="InnerTableButtonRow" cellpadding="0" cellspacing="0" ><tr><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=createcharacter" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Create Character" alt="Create Character" src="'.$layout_name.'/images/buttons/_sbutton_createcharacter.gif" ></div></div></td></tr></form></table></td><td style="width:100%;" ></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=deletecharacter" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Delete Character" alt="Delete Character" src="'.$layout_name.'/images/buttons/_sbutton_deletecharacter.gif" ></div></div></td></tr></form></table></td></tr></table></td></tr> </table> </div> </table></div></td></tr><br/><br/>'; } //########### CHANGE PASSWORD ########## if($action == "changepassword") { $new_password = trim($_POST['newpassword']); $new_password2 = trim($_POST['newpassword2']); $old_password = trim($_POST['oldpassword']); if(empty($new_password) && empty($new_password2) && empty($old_password)) { $main_content .= 'Please enter your current password and a new password. For your security, please enter the new password twice.<br/><br/><form action="?subtopic=accountmanagement&action=changepassword" method="post" ><div class="TableContainer" ><table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Change Password</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >New Password:</span></td><td style="width:90%;" ><input type="password" name="newpassword" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >New Password Again:</span></td><td><input type="password" name="newpassword2" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >Current Password:</span></td><td><input type="password" name="oldpassword" size="30" maxlength="29" ></td></tr></table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } else { if(empty($new_password) || empty($new_password2) || empty($old_password)){ $show_msgs[] = "Please fill in form."; } if($new_password != $new_password2) { $show_msgs[] = "The new passwords do not match!"; } if(empty($show_msgs)) { if(!check_password($new_password)) { $show_msgs[] = "New password contains illegal chars (a-z, A-Z and 0-9 only!) or lenght."; } $old_password = password_ency($old_password); if($old_password != $account_logged->getPassword()) { $show_msgs[] = "Current password is incorrect!"; } } if(!empty($show_msgs)){ //show errors $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($show_msgs as $show_msg) { $main_content .= '<li>'.$show_msg; } $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; //show form $main_content .= 'Please enter your current password and a new password. For your security, please enter the new password twice.<br/><br/><form action="?subtopic=accountmanagement&action=changepassword" method="post" ><div class="TableContainer" ><table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Change Password</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >New Password:</span></td><td style="width:90%;" ><input type="password" name="newpassword" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >New Password Again:</span></td><td><input type="password" name="newpassword2" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >Current Password:</span></td><td><input type="password" name="oldpassword" size="30" maxlength="29" ></td></tr></table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } else { $org_pass = $new_password; $new_password = password_ency($new_password); $account_logged->setPassword($new_password); $account_logged->save(); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Password Changed</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>Your password has been changed.'; if($config['site']['send_emails'] && $config['site']['send_mail_when_change_password']) { $mailBody = '<html> <body> <h3>Password to account changed!</h3> <p>You or someone else changed password to your account on server <a href="'.$config['server']['url'].'"><b>'.$config['server']['serverName'].'</b></a>.</p> <p>New password: <b>'.$org_pass.'</b></p> </body> </html>'; require("phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); if ($config['site']['smtp_enabled'] == "yes") { $mail->IsSMTP(); $mail->Host = $config['site']['smtp_host']; $mail->Port = (int)$config['site']['smtp_port']; $mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false); $mail->Username = $config['site']['smtp_user']; $mail->Password = $config['site']['smtp_pass']; } else $mail->IsMail(); $mail->IsHTML(true); $mail->From = $config['site']['mail_address']; $mail->AddAddress($account_logged->getEMail()); $mail->Subject = $config['server']['serverName']." - Changed password"; $mail->Body = $mailBody; if($mail->Send()) $main_content .= '<br /><small>Your new password were send on email address <b>'.$account_logged->getEMail().'</b>.</small>'; else $main_content .= '<br /><small>An error occorred while sending email with password!</small>'; } $main_content .= '</td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; $_SESSION['password'] = $new_password; } } } //############# CHANGE E-MAIL ################### if($action == "changeemail") { $account_email_new_time = $account_logged->getCustomField("email_new_time"); if($account_email_new_time > 10) {$account_email_new = $account_logged->getCustomField("email_new"); } if($account_email_new_time < 10){ if($_POST['changeemailsave'] == 1) { $account_email_new = trim($_POST['new_email']); $post_password = trim($_POST['password']); if(empty($account_email_new)) { $change_email_errors[] = "Please enter your new email address."; } else { if(!check_mail($account_email_new)) { $change_email_errors[] = "E-mail address is not correct."; } } if(empty($post_password)) { $change_email_errors[] = "Please enter password to your account."; } else { $post_password = password_ency($post_password); if($post_password != $account_logged->getPassword()) { $change_email_errors[] = "Wrong password to account."; } } if(empty($change_email_errors)) { $account_email_new_time = time() + $config['site']['email_days_to_change'] * 24 * 3600; $account_logged->setCustomField("email_new", $account_email_new); $account_logged->setCustomField("email_new_time", $account_email_new_time); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >New Email Address Requested</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>You have requested to change your email address to <b>'.$account_email_new.'</b>. The actual change will take place after <b>'.date("j F Y, G:i:s", $account_email_new_time).'</b>, during which you can cancel the request at any time.</td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else { //show errors $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($change_email_errors as $change_email_error) { $main_content .= '<li>'.$change_email_error; } $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; //show form $main_content .= 'Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. <b>For security reasons, the actual change will be finalised after a waiting period of '.$config['site']['email_days_to_change'].' days.</b><br/><br/><form action="?subtopic=accountmanagement&action=changeemail" method="post" ><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Change Email Address</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ></tr><td class="LabelV" ><span >New Email Address:</span></td> <td style="width:90%;" ><input name="new_email" value="'.$_POST['new_email'].'" size="30" maxlength="50" ></td><tr></tr><td class="LabelV" ><span >Password:</span></td> <td><input type="password" name="password" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><input type="hidden" name=changeemailsave value=1 ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } else { $main_content .= 'Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. <b>For security reasons, the actual change will be finalised after a waiting period of '.$config['site']['email_days_to_change'].' days.</b><br/><br/><form action="?subtopic=accountmanagement&action=changeemail" method="post" ><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Change Email Address</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ></tr><td class="LabelV" ><span >New Email Address:</span></td> <td style="width:90%;" ><input name="new_email" value="'.$_POST['new_email'].'" size="30" maxlength="50" ></td><tr></tr><td class="LabelV" ><span >Password:</span></td> <td><input type="password" name="password" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><input type="hidden" name=changeemailsave value=1 ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } else { if($account_email_new_time < time()) { if($_POST['changeemailsave'] == 1) { $account_logged->setCustomField("email_new", ""); $account_logged->setCustomField("email_new_time", 0); $account_logged->setEmail($account_email_new); $account_logged->save(); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Email Address Change Accepted</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>You have accepted <b>'.$account_logged->getEmail().'</b> as your new email adress.</td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else { $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Email Address Change Accepted</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>Do you accept <b>'.$account_email_new.'</b> as your new email adress?</td></tr> </table> </div> </table></div></td></tr><br /><table width="100%"><tr><td width="30">&nbsp;</td><td align=left><form action="?subtopic=accountmanagement&action=changeemail" method="post"><input type="hidden" name="changeemailsave" value=1 ><INPUT TYPE=image NAME="I Agree" SRC="'.$layout_name.'/images/buttons/sbutton_iagree.gif" BORDER=0 WIDTH=120 HEIGHT=17></FORM></td><td align=left><form action="?subtopic=accountmanagement&action=changeemail" method="post"><input type="hidden" name="emailchangecancel" value=1 ><input type=image name="Cancel" src="'.$layout_name.'/images/buttons/sbutton_cancel.gif" BORDER=0 WIDTH=120 HEIGHT=17></form></td><td align=right><form action="?subtopic=accountmanagement" method="post" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form></td><td width="30">&nbsp;</td></tr></table>'; } } else { $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Change of Email Address</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>A request has been submitted to change the email address of this account to <b>'.$account_email_new.'</b>.<br/>The actual change will take place on <b>'.date("j F Y, G:i:s", $account_email_new_time).'</b>.<br>If you do not want to change your email address, please click on "Cancel".</td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=changeemail" method="post" ><tr><td style="border:0px;" ><input type="hidden" name="emailchangecancel" value=1 ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Cancel" alt="Cancel" src="'.$layout_name.'/images/buttons/_sbutton_cancel.gif" ></div></div></td></tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } if($_POST['emailchangecancel'] == 1) { $account_logged->setCustomField("email_new", ""); $account_logged->setCustomField("email_new_time", 0); $main_content = '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Email Address Change Cancelled</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>Your request to change the email address of your account has been cancelled. The email address will not be changed.</td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } } //########### CHANGE PUBLIC INFORMATION (about account owner) ###################### if($action == "changeinfo") { $new_rlname = htmlspecialchars(stripslashes(trim($_POST['info_rlname']))); $new_location = htmlspecialchars(stripslashes(trim($_POST['info_location']))); if($_POST['changeinfosave'] == 1) { //save data from form $account_logged->setRLName($new_rlname); $account_logged->setLocation($new_location); $account_logged->save(); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Public Information Changed</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>Your public information has been changed.</td></tr> </table> </div> </table></div></td></tr><br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else { //show form $account_rlname = $account_logged->getRLName(); $account_location = $account_logged->getLocation(); $main_content .= 'Here you can tell other players about yourself. This information will be displayed alongside the data of your characters. If you do not want to fill in a certain field, just leave it blank.<br/><br/><form action="?subtopic=accountmanagement&action=changeinfo" method=post><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Change Public Information</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" >Real Name:</td><td style="width:90%;" ><input name="info_rlname" value="'.$account_rlname.'" size="30" maxlength="50" ></td></tr><tr><td class="LabelV" >Location:</td><td><input name="info_location" value="'.$account_location.'" size="30" maxlength="50" ></td></tr></table> </div> </table></div></td></tr><br/><table width="100%"><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><input type="hidden" name="changeinfosave" value="1" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } //############## GENERATE RECOVERY KEY ########### if($action == "registeraccount") { $reg_password = password_ency(trim($_POST['reg_password'])); $old_key = $account_logged->getRecoveryKey("key"); if($_POST['registeraccountsave'] == "1") { if($reg_password == $account_logged->getPassword()) { if(empty($old_key)) { $dontshowtableagain = 1; $acceptedChars = 'ABCDEFGHIJKLMNPQRSTUVWXYZ123456789'; $max = strlen($acceptedChars)-1; $new_rec_key = NULL; // 10 = number of chars in generated key for($i=0; $i < 10; $i++) { $cnum[$i] = $acceptedChars{mt_rand(0, $max)}; $new_rec_key .= $cnum[$i]; } $account_logged->setRecoveryKey($new_rec_key); $account_logged->save(); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Account Registered</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" >Thank you for registering your account! You can now recover your account if you have lost access to the assigned email address by using the following<br/><br/><font size="5">&nbsp;&nbsp;&nbsp;<b>Recovery Key: '.$new_rec_key.'</b></font><br/><br/><br/><b>Important:</b><ul><li>Write down this recovery key carefully.</li><li>Store it at a safe place!</li>'; if($config['site']['send_emails'] && $config['site']['send_mail_when_generate_reckey']) { $mailBody = '<html> <body> <h3>New recovery key!</h3> <p>You or someone else generated recovery key to your account on server <a href="'.$config['server']['url'].'"><b>'.$config['server']['serverName'].'</b></a>.</p> <p>Recovery key: <b>'.$new_rec_key.'</b></p> </body> </html>'; require("phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); if ($config['site']['smtp_enabled'] == "yes") { $mail->IsSMTP(); $mail->Host = $config['site']['smtp_host']; $mail->Port = (int)$config['site']['smtp_port']; $mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false); $mail->Username = $config['site']['smtp_user']; $mail->Password = $config['site']['smtp_pass']; } else $mail->IsMail(); $mail->IsHTML(true); $mail->From = $config['site']['mail_address']; $mail->AddAddress($account_logged->getEMail()); $mail->Subject = $config['server']['serverName']." - recovery key"; $mail->Body = $mailBody; if($mail->Send()) $main_content .= '<br /><small>Your recovery key were send on email address <b>'.$account_logged->getEMail().'</b>.</small>'; else $main_content .= '<br /><small>An error occorred while sending email with recovery key! You will not receive e-mail with this key.</small>'; } $main_content .= '</ul> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else $reg_errors[] = 'Your account is already registred.'; } else $reg_errors[] = 'Wrong password to account.'; } if($dontshowtableagain != 1) { //show errors if not empty if(!empty($reg_errors)) { $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($reg_errors as $reg_error) $main_content .= '<li>'.$reg_error; $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; } //show form $main_content .= 'To generate recovery key for your account please enter your password.<br/><br/><form action="?subtopic=accountmanagement&action=registeraccount" method="post" ><input type="hidden" name="registeraccountsave" value="1"><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Generate recovery key</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Password:</td><td><input type="password" name="reg_password" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } //############## GENERATE NEW RECOVERY KEY ########### if($action == "newreckey") { $reg_password = password_ency(trim($_POST['reg_password'])); $reckey = $account_logged->getRecoveryKey(); if((!$config['site']['generate_new_reckey'] || !$config['site']['send_emails']) || empty($reckey)) $main_content .= 'You cant get new rec key'; else { $points = $account_logged->getPremiumPoints(); if($_POST['registeraccountsave'] == "1") { if($reg_password == $account_logged->getPassword()) { if($points >= $config['site']['generate_new_reckey_price']) { $dontshowtableagain = 1; $acceptedChars = 'ABCDEFGHIJKLMNPQRSTUVWXYZ123456789'; $max = strlen($acceptedChars)-1; $new_rec_key = NULL; // 10 = number of chars in generated key for($i=0; $i < 10; $i++) { $cnum[$i] = $acceptedChars{mt_rand(0, $max)}; $new_rec_key .= $cnum[$i]; } $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Account Registered</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><ul>'; $mailBody = '<html> <body> <h3>New recovery key!</h3> <p>You or someone else generated recovery key to your account on server <a href="'.$config['server']['url'].'"><b>'.$config['server']['serverName'].'</b></a>.</p> <p>Recovery key: <b>'.$new_rec_key.'</b></p> </body> </html>'; require("phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); if ($config['site']['smtp_enabled'] == "yes") { $mail->IsSMTP(); $mail->Host = $config['site']['smtp_host']; $mail->Port = (int)$config['site']['smtp_port']; $mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false); $mail->Username = $config['site']['smtp_user']; $mail->Password = $config['site']['smtp_pass']; } else $mail->IsMail(); $mail->IsHTML(true); $mail->From = $config['site']['mail_address']; $mail->AddAddress($account_logged->getEMail()); $mail->Subject = $config['server']['serverName']." - new recovery key"; $mail->Body = $mailBody; if($mail->Send()) { $account_logged->setRecoveryKey(new_rec_key); $account_logged->setPremiumPoints($account_logged->getPremiumPoints()-$config['site']['generate_new_reckey_price']); $account_logged->save(); $main_content .= '<br />Your recovery key were send on email address <b>'.$account_logged->getEMail().'</b> for '.$config['site']['generate_new_reckey_price'].' premium points.'; } else $main_content .= '<br />An error occorred while sending email ( <b>'.$account_logged->getEMail().'</b> ) with recovery key! Recovery key not changed. Try again.'; $main_content .= '</ul> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else $reg_errors[] = 'You need '.$config['site']['generate_new_reckey_price'].' premium points to generate new recovery key. You have <b>'.$points.'<b> premium points.'; } else $reg_errors[] = 'Wrong password to account.'; } if($dontshowtableagain != 1) { //show errors if not empty if(!empty($reg_errors)) { $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($reg_errors as $reg_error) $main_content .= '<li>'.$reg_error; $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; } //show form $main_content .= 'To generate NEW recovery key for your account please enter your password.<br/><font color="red"><b>New recovery key cost '.$config['site']['generate_new_reckey_price'].' Premium Points.</font> You have '.$points.' premium points. You will receive e-mail with this recovery key.</b><br/><form action="?subtopic=accountmanagement&action=newreckey" method="post" ><input type="hidden" name="registeraccountsave" value="1"><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Generate recovery key</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Password:</td><td><input type="password" name="reg_password" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } } //###### CHANGE CHARACTER COMMENT ###### if($action == "changecomment") { $player_name = stripslashes($_REQUEST['name']); $new_comment = htmlspecialchars(stripslashes(substr(trim($_POST['comment']),0,2000))); $new_hideacc = (int) $_POST['accountvisible']; $new_showskills = (int) $_POST['showskills']; $new_showcharts = (int) $_POST['showcharts']; $new_showquests = (int) $_POST['showquests']; // MadPHP.org Signature $madphp_signature = (int) $_POST['madphp_signature']; $madphp_signature_bg = htmlspecialchars(stripslashes(trim( $_POST['madphp_signature_bg'] ))); $madphp_signature_bars = (int) $_POST['madphp_signature_bars']; $madphp_signature_eqs = (int) $_POST['madphp_signature_eqs']; // MadPHP.org Signature if(check_name($player_name)) { $player = $ots->createObject('Player'); $player->find($player_name); if($player->isLoaded()) { $player_account = $player->getAccount(); if($account_logged->getId() == $player_account->getId()) { if($_POST['changecommentsave'] == 1) { $player->setCustomField("hide_char", $new_hideacc); ///customize char page by Zakius $player->setCustomField("show_outfit", $new_showoutfit); $player->setCustomField("show_eq", $new_showeq); $player->setCustomField("show_bars", $new_showbars); $player->setCustomField("show_skills", $new_showskills); $player->setCustomField("show_quests", $new_showquests); /// $player->setCustomField("comment", $new_comment); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Information Changed</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character information has been changed.</td></tr> </table> </div> </table></div></td></tr><br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else { $main_content .= 'Here you can see and edit the information about your character.<br/>If you do not want to specify a certain field, just leave it blank.<br/><br/><form action="?subtopic=accountmanagement&action=changecomment" method="post" ><div class="TableContainer" > <table class="Table5" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Edit Character Information</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" > <div class="TableContentContainer" > <table class="TableContent" width="100%" ><tr><td class="LabelV" >Name:</td><td style="width:80%;" >'.$player_name.'</td></tr><tr><td class="LabelV" >Hide Account:</td><td>'; if($player->getCustomField("hide_char") == 1) { $main_content .= '<input type="checkbox" name="accountvisible" value="1" checked="checked">'; } else { $main_content .= '<input type="checkbox" name="accountvisible" value="1" >'; } $main_content .= ' check to hide your account information</td></tr>'; ///customize char page by Zakius if($config['site']['show_outfit']){ $main_content .= '<tr><td class="LabelV">Show outfit</td><td style="width:80%;">'; $main_content .= '<input type="checkbox" id="showoutfit" name="showoutfit" value="1"'.( $player->getCustomField( 'show_outfit' ) == 1 ? ' checked="checked"' : null ).' /> tick to show your outfit on characters page</td></tr>'; $main_content .= '<tr><td class="LabelV">Show equipment</td><td style="width:80%;">'; } $main_content .= '<input type="checkbox" id="showeq" name="showeq" value="1"'.( $player->getCustomField( 'show_eq' ) == 1 ? ' checked="checked"' : null ).' /> tick to show your equipment on characters page</td></tr>'; $main_content .= '<tr><td class="LabelV">Show bars</td><td style="width:80%;">'; $main_content .= '<input type="checkbox" id="showbars" name="showbars" value="1"'.( $player->getCustomField( 'show_bars' ) == 1 ? ' checked="checked"' : null ).' /> tick to show your health, mana and exp bars on characters page</td></tr>'; if($config['site']['show_skills_info']){ $main_content .= '<tr><td class="LabelV">Show skills</td><td style="width:80%;">'; $main_content .= '<input type="checkbox" id="showskills" name="showskills" value="1"'.( $player->getCustomField( 'show_skills' ) == 1 ? ' checked="checked"' : null ).' /> tick to show your skills on characters page</td></tr>';} $main_content .= '<tr><td class="LabelV">Show quests</td><td style="width:80%;">'; $main_content .= '<input type="checkbox" id="showquests" name="showquests" value="1"'.( $player->getCustomField( 'show_quests' ) == 1 ? ' checked="checked"' : null ).' /> tick to show your quests status on characters page</td></tr>'; /// $main_content .= '</table> </div></div><div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div> </div></div></td></tr><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div>'; $main_content .= '</table> </div></div><div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div> </div></div></td></tr><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div>'; $main_content .= '<div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" > <div class="TableContentContainer" > <table class="TableContent" width="100%" ><tr><td class="LabelV" ><span >Comment:</span></td><td style="width:80%;" ><textarea name="comment" rows="10" cols="50" wrap="virtual" >'.$player->getCustomField("comment").'</textarea><br>[max. length: 2000 chars, 50 lines (ENTERs)]</td></tr> </table> </div></div><div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" ><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div></div></div></td></tr></td></tr> </table> </table></div></td></tr><br/><table style="width:100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><input type="hidden" name="name" value="'.$player->getName().'"><input type="hidden" name="changecommentsave" value="1"><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } else { $main_content .= "Error. Character <b>".$player_name."</b> is not on your account."; } } else { $main_content .= "Error. Character with this name doesn't exist."; } } else { $main_content .= "Error. Name contain illegal characters."; } } //### NEW NICK - set new nick proposition ### if($action == "newnick") { $name = $_GET['name']; $name_new = stripslashes(ucwords(strtolower(trim($_GET['name_new'])))); if(!empty($name) && !empty($name_new)) { if(check_name_new_char($name_new)) { $player = $ots->createObject('Player'); $player->find($name); if($player->isLoaded() && $player->isNameLocked()) { $player_account = $player->getAccount(); if($account_logged->getId() == $player_account->getId()) { if(!$player->getOldName()) if(!$player->isOnline()) { $player->setCustomField('old_name', $name_new); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >New nick proposition</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character <b>'.$name.'</b> new nick proposition <b>'.$name_new.'</b> has been set. Now you must wait for acceptation from GM.</td></tr> </table> </div> </table></div></td></tr>'; } else $main_content .= 'This character is online.'; else $main_content .= 'You already set new name for this character ( <b>'.$player->getOldName().'</b> ). You must wait until GM accept/reject your proposition.'; } else $main_content .= 'Character <b>'.$player_name.'</b> is not on your account.'; } else $main_content .= 'Character with this name doesn\'t exist or isn\'t name locked.'; } else $main_content .= 'Name contain illegal characters. Invalid format or lenght.'; } else $main_content .= 'Please enter new char name.'; $main_content .= '<br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } //### DELETE character from account ### if($action == "deletecharacter") { $player_name = stripslashes(trim($_POST['delete_name'])); $password_verify = trim($_POST['delete_password']); $password_verify = password_ency($password_verify); if($_POST['deletecharactersave'] == 1) { if(!empty($player_name) && !empty($password_verify)) { if(check_name($player_name)) { $player = $ots->createObject('Player'); $player->find($player_name); if($player->isLoaded()) { $player_account = $player->getAccount(); if($account_logged->getId() == $player_account->getId()) { if($password_verify == $account_logged->getPassword()) { if(!$player->isOnline()) { //dont show table "delete character" again $dontshowtableagain = 1; //delete player $player->setCustomField('deleted', 1); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Deleted</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character <b>'.$player_name.'</b> has been deleted.</td></tr> </table> </div> </table></div></td></tr><br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else $delete_errors[] = 'This character is online.'; } else { $delete_errors[] = 'Wrong password to account.'; } } else { $delete_errors[] = 'Character <b>'.$player_name.'</b> is not on your account.'; } } else { $delete_errors[] = 'Character with this name doesn\'t exist.'; } } else { $delete_errors[] = 'Name contain illegal characters.'; } } else { $delete_errors[] = 'Character name or/and password is empty. Please fill in form.'; } } if($dontshowtableagain != 1) { if(!empty($delete_errors)) { $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($delete_errors as $delete_error) { $main_content .= '<li>'.$delete_error; } $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; } $main_content .= 'To delete a character enter the name of the character and your password.<br/><br/><form action="?subtopic=accountmanagement&action=deletecharacter" method="post" ><input type="hidden" name="deletecharactersave" value="1"><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Delete Character</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Character Name:</td><td style="width:90%;" ><input name="delete_name" value="" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >Password:</td><td><input type="password" name="delete_password" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } //### UNDELETE character from account ### if($action == "undelete") { $player_name = stripslashes(trim($_GET['name'])); if(!empty($player_name)) { if(check_name($player_name)) { $player = $ots->createObject('Player'); $player->find($player_name); if($player->isLoaded()) { $player_account = $player->getAccount(); if($account_logged->getId() == $player_account->getId()) { if(!$player->isOnline()) { $player->setCustomField('deleted', 0); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Undeleted</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character <b>'.$player_name.'</b> has been undeleted.</td></tr> </table> </div> </table></div></td></tr><br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else $delete_errors[] = 'This character is online.'; } else $delete_errors[] = 'Character <b>'.$player_name.'</b> is not on your account.'; } else $delete_errors[] = 'Character with this name doesn\'t exist.'; } else $delete_errors[] = 'Name contain illegal characters.'; } } //## Character World Transfer by Norix### if($config['site']['worldtransfer'] == 1) { if($action == "charactertransfer") { if(empty($_REQUEST['page'])) { $color1 = 'blue'; $color2 = 'green-blue'; $color3 = 'blue'; $color4 = 'blue'; $color5 = 'blue'; } if($_REQUEST['page'] == 'confirm') { $color1 = 'blue'; $color2 = 'green'; $color3 = 'green'; $color4 = 'green-blue'; $color5 = 'blue'; } if($_REQUEST['page'] == 'transfer') { $color1 = 'green'; $color2 = 'green'; $color3 = 'green'; $color4 = 'green'; $color5 = 'green'; } $main_content .= '<div id="ProgressBar" > <center><h2>Character World Transfer</h2></center><div id="MainContainer" ><div id="BackgroundContainer" ><img id="BackgroundContainerLeftEnd" src="images/worldtrade/stonebar-left-end.gif" /><div id="BackgroundContainerCenter"> <div id="BackgroundContainerCenterImage" style="background-image:url(images/worldtrade/stonebar-center.gif);" /></div></div><img id="BackgroundContainerRightEnd" src="images/worldtrade/stonebar-right-end.gif" /></div> <img id="TubeLeftEnd" src="images/worldtrade/progress-bar-tube-left-green.gif" /><img id="TubeRightEnd" src="images/worldtrade/progress-bar-tube-right-'.$color1.'.gif" /><div id="FirstStep" class="Steps" ><div class="SingleStepContainer" > <img class="StepIcon" src="images/worldtrade/progress-bar-icon-0-green.gif" /><div class="StepText" style="font-weight:bold;" >Select World</div></div></div><div id="StepsContainer1" ><div id="StepsContainer2" ><div class="Steps" style="width:50%" > <div class="TubeContainer" ><img class="Tube" src="images/worldtrade/progress-bar-tube-'.$color2.'.gif" /></div><div class="SingleStepContainer" ><img class="StepIcon" src="images/worldtrade/progress-bar-icon-3-'.$color3.'.gif" /><div class="StepText" style="font-weight:normal;" >Confirm Data</div> </div></div><div class="Steps" style="width:50%" ><div class="TubeContainer" ><img class="Tube" src="images/worldtrade/progress-bar-tube-'.$color4.'.gif" /></div><div class="SingleStepContainer" ><img class="StepIcon" src="images/worldtrade/progress-bar-icon-4-'.$color5.'.gif" /> <div class="StepText" style="font-weight:normal;" >Transfer Result</div></div></div></div></div></div></div>'; $user_premium_points = $account_logged->getCustomField('premium_points'); $playerid = stripslashes(trim($_REQUEST['player_id'])); $world_id = stripslashes(trim($_REQUEST['new_world'])); if(empty($_REQUEST['page'])) { $player = $ots->createObject('Player'); $player->load($playerid); $time = time(); $maxtranstime = ($config['site']['transfermonths']*30*24*60*60); if(!empty($playerid)) { $worldid = (int) $_REQUEST['newworld_'.$player->getId().'']; $house = $SQL->query('SELECT * FROM houses WHERE owner = '.$player->GetId().';')->fetch(); $transfertime = ($time-$player->getCustomField('worldtransfer')); if($maxtranstime > $transfertime AND $player->getCustomField('worldtransfer') > 0) $time_img = no; else $time_img = yes; if($house) $house_img = no; else $house_img = yes; if($player->getVocation() < 1) $voc_img = no; else $voc_img = yes; if($player->getMarriage() > 1) $mar_img = no; else $mar_img = yes; if($user_premium_points < $config['site']['worldtransferprice']) $points_img = no; else $points_img = yes; $main_content .= 'In order to transfer your character to another game world, you have to fulfil the following requirements:<br/><ul> <li style="list-style-image:url(images/worldtrade/'.$mar_img.'.gif)" >You must divorce your spouse first.</li> <li style="list-style-image:url(images/worldtrade/'.$house_img.'.gif)" >Character owns no house.</li> <li style="list-style-image:url(images/worldtrade/'.$voc_img.'.gif)" >Character has a vocation.</li> <li style="list-style-image:url(images/worldtrade/'.$time_img.'.gif)" >Have not done Character World Transfer the last '.$config['site']['transfermonths'].' months.</li> <li style="list-style-image:url(images/worldtrade/'.$points_img.'.gif)" >Have atleast '.$config['site']['worldtransferprice'].' premium points on your account.</li></ul>'; } $main_content .= '<form action="" method="post"><input type="hidden" name="player_id" value="'.$playerid.'"/><div class="TableContainer" ><table class="Table3" cellpadding="0" cellspacing="0" ><div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Character Data</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div></div><tr><td><div class="InnerTableContainer" ><table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" ><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" ><div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr class="LabelH" style="background-color:#D4C0A1;" ><td></td><td>Name</td><td>Current World</td><td>Possible Target World</td><td>Requirement Status</td></tr>'; $account_players = $account_logged->getPlayersList(); $account_players->orderBy('name'); foreach($account_players as $account_player) { if($account_player->getId() == $playerid) { $border = 'border-style: solid; border-color: #D4C0A1; border-width: 2px;'; $checked = ' checked=checked'; } else { $border = ''; $checked = ''; } $main_content .= '<tr style="background-color:#F1E0C6;'.$border.'" ><td><input type="radio" name="player_id" value="'.$account_player->getId().'" '.$checked.' onClick="this.form.submit()"/></td><td>'.$account_player->getName().'</td><td>'.$config['site']['worlds'][$account_player->getWorld()].'</td><td><select name="newworld_'.$account_player->getId().'"><option value="" >(select your target game world)</option>'; foreach($config['site']['worlds'] as $id => $world_n) { if($account_player->getWorld() != $id) { $main_content .= '<option value="'.$id.'" onClick="this.form.submit()"'; if($id == $worldid AND $playerid == $account_player->getId()) $main_content .= ' selected="selected"'; $main_content .= '>'.$world_n.'</option>'; } } $main_content .= '</select>'; $house = $SQL->query('SELECT * FROM houses WHERE owner = '.$account_player->GetId().';')->fetch(); $transfertime = ($time-$account_player->getCustomField('worldtransfer')); if(!$house AND $account_player->getVocation() >= 1 AND $account_player->getMarriage() <= 0 AND $user_premium_points >= $config['site']['worldtransferprice'] AND $transfertime >= $maxtranstime) $status = '<span class="green" >allowed</span>'; else $status = '<span class="red" >not allowed</span>'; $main_content .= '</td><td><b>'.$status.'</b></td></tr>'; } $main_content .= '</form><form action="?subtopic=accountmanagement&action=charactertransfer&page=confirm" method="post" ><input type="hidden" name="new_world" value="'.$worldid.'"/><input type="hidden" name="player_id" value="'.$playerid.'"/></table></div></div><div class="TableShadowContainer" ><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div></div></div></td></tr></table></div></table></div></td></tr><br/><table style="width:100%;" ><tr align="center" ><td width=50%>'; if(!empty($playerid)) $transfertime = ($time-$player->getCustomField('worldtransfer')); if(!empty($playerid)) if(!$house AND $player->getVocation() >= 1 AND $player->getMarriage() <= 0 AND $user_premium_points >= $config['site']['worldtransferprice'] AND $transfertime >= $maxtranstime) $main_content .= '<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div>'; $main_content .= '</form></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div> <input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } if ($_REQUEST['page'] == 'confirm') { $player = $ots->createObject('Player'); $player->load($playerid); $main_content .= '<form action="?subtopic=accountmanagement&action=charactertransfer&page=transfer" method="post" ><div class="TableContainer" ><table class="Table4" cellpadding="0" cellspacing="0" ><div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Data</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div></div><tr><td><div class="InnerTableContainer" ><table style="width:100%;" ><tr><td><tr><td><div class="TableShadowContainerRightTop" ><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" ><div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr><td colspan="2" >Do you really want to transfer your character <b>'.$player->getName().'</b>:<br/></td></tr><tr><td class="LabelV" width="150" >Current World:</td> <td>'.$config['site']['worlds'][$player->getWorld()].'</td></tr><tr><td class="LabelV" >Target World:</td><td>'.$config['site']['worlds'][$world_id].'</td></tr></table></div></div><div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" ><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div></div></div></td></tr><tr><td><div class="TableShadowContainerRightTop" ><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" > <div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr><td><b><span class="red" >Attention:</span></b><br/>If your character is successfully transferred to another game world, you cannot transfer it again within the next '.$config['site']['transfermonths'].' months !</td></tr></table></div></div><div class="TableShadowContainer" ><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div></div></div></td></tr></td></tr></table></div></table></div></td></tr><br/><table style="width:100%;" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" > <input type="hidden" name="player_id" value="'.$playerid.'" ><input type="hidden" name="new_world" value="'.$world_id.'" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div> <input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td></tr></form></table><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=charactertransfer" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" > <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></td></tr></table><div></div>'; } if ($_REQUEST['page'] == 'transfer') { $SQL->query('UPDATE `players` SET `world_id` = '.$world_id.', `worldtransfer` = '.$SQL->quote(time()).' WHERE `id` = '.$playerid.';'); $account_logged->setPremiumPoints($user_premium_points-$config['site']['worldtransferprice']); $account_logged->save(); $main_content .= '<form action="?subtopic=accountmanagement&action=charactertransfer" method="post" ><div class="TableContainer" ><table class="Table4" cellpadding="0" cellspacing="0" ><div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Data</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div></div><tr><td><div class="InnerTableContainer" ><table style="width:100%;" ><tr><td><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" ><div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr><td colspan="2" > <center><b>Character World Transfer successfully done.</b></td></tr></table></div></div><div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" ><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div></div></div></td></tr><tr><td><div class="TableShadowContainerRightTop" ><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" ><div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr><td><b><span class="red" >Attention:</span></b><br/>If your character is successfully transferred to another game world, you cannot transfer it again within the next '.$config['site']['transfermonths'].' months!</td></tr> </table></div></div><div class="TableShadowContainer" ><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" ><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div> </div></div></td></tr></td></tr></table></div></table></div></td></tr><br/><table style="width:100%;" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" > <div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table><div></div>'; } } } else { $main_content .= '<br><center><b>Sorry, the World Transfer System is currently disabled by the admin. Please ask him for more information.</b></center>'; } //## CREATE CHARACTER on account ### if($action == "createcharacter") { if(count($config['site']['worlds']) > 1) { if(isset($_REQUEST['world'])) $world_id = (int) $_REQUEST['world']; } else $world_id = 0; if(!isset($world_id)) { $main_content .= 'Before you can create character you must select world: '; foreach($config['site']['worlds'] as $id => $world_n) $main_content .= '<br /><a href="?subtopic=accountmanagement&action=createcharacter&world='.$id.'">- '.$world_n.'</a>'; $main_content .= '<br /><h3><a href="?subtopic=accountmanagement">BACK</a></h3>'; } else { $main_content .= '<script type="text/javascript"> var nameHttp; function checkName() { if(document.getElementById("newcharname").value=="") { document.getElementById("name_check").innerHTML = \'<b><font color="red">Please enter new character name.</font></b>\'; return; } nameHttp=GetXmlHttpObject(); if (nameHttp==null) { return; } var newcharname = document.getElementById("newcharname").value; var url="ajax/check_name.php?name=" + newcharname + "&uid="+Math.random(); nameHttp.onreadystatechange=NameStateChanged; nameHttp.open("GET",url,true); nameHttp.send(null); } function NameStateChanged() { if (nameHttp.readyState==4) { document.getElementById("name_check").innerHTML=nameHttp.responseText; } } </script>'; $newchar_name = stripslashes(ucwords(strtolower(trim($_POST['newcharname'])))); $newchar_sex = $_POST['newcharsex']; $newchar_vocation = $_POST['newcharvocation']; $newchar_town = $_POST['newchartown']; if($_POST['savecharacter'] != 1) { $main_content .= 'Please choose a name'; if(count($config['site']['newchar_vocations'][$world_id]) > 1) $main_content .= ', vocation'; $main_content .= ' and sex for your character. <br/>In any case the name must not violate the naming conventions stated in the <a href="?subtopic=tibiarules" target="_blank" >'.$config['server']['serverName'].' Rules</a>, or your character might get deleted or name locked.'; if($account_logged->getPlayersList()->count() >= $config['site']['max_players_per_account']) $main_content .= '<b><font color="red"> You have maximum number of characters per account on your account. Delete one before you make new.</font></b>'; $main_content .= '<br/><br/><form action="?subtopic=accountmanagement&action=createcharacter" method="post" ><input type="hidden" name="world" value="'.$world_id.'" ><input type="hidden" name=savecharacter value="1" ><div class="TableContainer" > <table class="Table3" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Create Character</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div><tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" > <div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr class="LabelH" ><td style="width:50%;" ><span >Name</td><td><span >Sex</td></tr><tr class="Odd" ><td><input id="newcharname" name="newcharname" onkeyup="checkName();" value="'.$newchar_name.'" size="30" maxlength="29" ><BR><font size="1" face="verdana,arial,helvetica"><div id="name_check">Please enter your character name.</div></font></td><td>'; $main_content .= '<input type="radio" name="newcharsex" value="1" '; if($newchar_sex == 1) $main_content .= 'checked="checked" '; $main_content .= '>male<br/>'; $main_content .= '<input type="radio" name="newcharsex" value="0" '; if($newchar_sex == "0") $main_content .= 'checked="checked" '; $main_content .= '>female<br/></td></tr></table></div></div></table></div>'; if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1) $main_content .= '<div class="InnerTableContainer" > <table style="width:100%;" ><tr>'; if(count($config['site']['newchar_vocations'][$world_id]) > 1) { $main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your vocation:</b></td><td><table class="TableContent" width="100%" >'; foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char) { $main_content .= '<tr><td><input type="radio" name="newcharvocation" value="'.$char_vocation_key.'" '; if($newchar_vocation == $char_vocation_key) $main_content .= 'checked="checked" '; $main_content .= '>'.$vocation_name[$world_id][0][$char_vocation_key].'</td></tr>'; } $main_content .= '</table></table></td>'; } if(count($config['site']['newchar_towns'][$world_id]) > 1) { $main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your city:</b></td><td><table class="TableContent" width="100%" >'; foreach($config['site']['newchar_towns'][$world_id] as $town_id) { $main_content .= '<tr><td><input type="radio" name="newchartown" value="'.$town_id.'" '; if($newchar_town == $town_id) $main_content .= 'checked="checked" '; $main_content .= '>'.$towns_list[$world_id][$town_id].'</td></tr>'; } $main_content .= '</table></table></td>'; } if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1) $main_content .= '</tr></table></div>'; $main_content .= '</table></div></td></tr><br/><table style="width:100%;" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } else { if(empty($newchar_name)) $newchar_errors[] = 'Please enter a name for your character!'; if(empty($newchar_sex) && $newchar_sex != "0") $newchar_errors[] = 'Please select the sex for your character!'; if(count($config['site']['newchar_vocations'][$world_id]) > 1) { if(empty($newchar_vocation)) $newchar_errors[] = 'Please select a vocation for your character.'; } else $newchar_vocation = $config['site']['newchar_vocations'][$world_id][0]; if(count($config['site']['newchar_towns'][$world_id]) > 1) { if(empty($newchar_town)) $newchar_errors[] = 'Please select a town for your character.'; } else $newchar_town = $config['site']['newchar_towns'][$world_id][0]; if(empty($newchar_errors)) { if(!check_name_new_char($newchar_name)) $newchar_errors[] = 'This name contains invalid letters, words or format. Please use only a-Z, - , \' and space.'; if(check_name_new_char($newchar_name) && $str_len($newchar_name) < 3) $newchar_errors[] = 'This name contains invalid name size. the length acceptable is 3 chars.'; if($newchar_sex != 1 && $newchar_sex != "0") $newchar_errors[] = 'Sex must be equal <b>0 (female)</b> or <b>1 (male)</b>.'; if(!in_array($newchar_town, $config['site']['newchar_towns'][$world_id])) $newchar_errors[] = 'Please select valid town.'; if(count($config['site']['newchar_vocations'][$world_id]) > 1) { $newchar_vocation_check = FALSE; foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char) if($newchar_vocation == $char_vocation_key) $newchar_vocation_check = TRUE; if(!$newchar_vocation_check) $newchar_errors[] = 'Unknown vocation. Please fill in form again.'; } else $newchar_vocation = 0; } if(empty($newchar_errors)) { $check_name_in_database = $ots->createObject('Player'); $check_name_in_database->find($newchar_name); if($check_name_in_database->isLoaded()) $newchar_errors[] .= 'This name is already used. Please choose another name!'; $number_of_players_on_account = $account_logged->getPlayersList()->count(); if($number_of_players_on_account >= $config['site']['max_players_per_account']) $newchar_errors[] .= 'You have too many characters on your account <b>('.$number_of_players_on_account.'/'.$config['site']['max_players_per_account'].')</b>!'; } if(empty($newchar_errors)) { $char_to_copy_name = $config['site']['newchar_vocations'][$world_id][$newchar_vocation]; $char_to_copy = new OTS_Player(); $char_to_copy->find($char_to_copy_name); if(!$char_to_copy->isLoaded()) $newchar_errors[] .= 'Wrong characters configuration. Try again or contact with admin. ADMIN: Edit file config/config.php and set valid characters to copy names. Character to copy'.$char_to_copy_name.'</b> doesn\'t exist.'; } if(empty($newchar_errors)) { if($newchar_sex == "0") $char_to_copy->setLookType(136); $player = $ots->createObject('Player'); $player->setName($newchar_name); $player->setAccount($account_logged); $player->setGroup($char_to_copy->getGroup()); $player->setSex($newchar_sex); $player->setVocation($char_to_copy->getVocation()); $player->setConditions($char_to_copy->getConditions()); $player->setRank($char_to_copy->getRank()); $player->setLookAddons($char_to_copy->getLookAddons()); $player->setTownId($newchar_town); $player->setExperience($char_to_copy->getExperience()); $player->setLevel($char_to_copy->getLevel()); $player->setMagLevel($char_to_copy->getMagLevel()); $player->setHealth($char_to_copy->getHealth()); $player->setHealthMax($char_to_copy->getHealthMax()); $player->setMana($char_to_copy->getMana()); $player->setManaMax($char_to_copy->getManaMax()); $player->setManaSpent($char_to_copy->getManaSpent()); $player->setSoul($char_to_copy->getSoul()); $player->setDirection($char_to_copy->getDirection()); $player->setLookBody($char_to_copy->getLookBody()); $player->setLookFeet($char_to_copy->getLookFeet()); $player->setLookHead($char_to_copy->getLookHead()); $player->setLookLegs($char_to_copy->getLookLegs()); $player->setLookType($char_to_copy->getLookType()); $player->setCap($char_to_copy->getCap()); $player->setPosX(0); $player->setPosY(0); $player->setPosZ(0); $player->setLossExperience($char_to_copy->getLossExperience()); $player->setLossMana($char_to_copy->getLossMana()); $player->setLossSkills($char_to_copy->getLossSkills()); $player->setLossItems($char_to_copy->getLossItems()); $player->save(); unset($player); $player = $ots->createObject('Player'); $player->find($newchar_name); if($player->isLoaded()) { $player->setCustomField('world_id', (int) $world_id); $player->setSkill(0,$char_to_copy->getSkill(0)); $player->setSkill(1,$char_to_copy->getSkill(1)); $player->setSkill(2,$char_to_copy->getSkill(2)); $player->setSkill(3,$char_to_copy->getSkill(3)); $player->setSkill(4,$char_to_copy->getSkill(4)); $player->setSkill(5,$char_to_copy->getSkill(5)); $player->setSkill(6,$char_to_copy->getSkill(6)); $player->save(); $loaded_items_to_copy = $SQL->query("SELECT * FROM player_items WHERE player_id = ".$char_to_copy->getId().""); foreach($loaded_items_to_copy as $save_item) $SQL->query("INSERT INTO `player_items` (`player_id` ,`pid` ,`sid` ,`itemtype`, `count`, `attributes`) VALUES ('".$player->getId()."', '".$save_item['pid']."', '".$save_item['sid']."', '".$save_item['itemtype']."', '".$save_item['count']."', '".$save_item['attributes']."');"); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Created</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character <b>'.$newchar_name.'</b> has been created.<br/>Please select the outfit when you log in for the first time.<br/><br/><b>See you on '.$config['server']['serverName'].'!</b></td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else { echo "Error. Can\'t create character. Probably problem with database. Try again or contact with admin."; exit; } } else { $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($newchar_errors as $newchar_error) $main_content .= '<li>'.$newchar_error; $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; $main_content .= 'Please choose a name'; if(count($config['site']['newchar_vocations'][$world_id]) > 1) $main_content .= ', vocation'; $main_content .= ' and sex for your character. <br/>In any case the name must not violate the naming conventions stated in the <a href="?subtopic=tibiarules" target="_blank" >'.$config['server']['serverName'].' Rules</a>, or your character might get deleted or name locked.<br/><br/><form action="?subtopic=accountmanagement&action=createcharacter" method="post" ><input type="hidden" name="world" value="'.$world_id.'" ><input type="hidden" name=savecharacter value="1" ><div class="TableContainer" > <table class="Table3" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Create Character</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div><tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" > <div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr class="LabelH" ><td style="width:50%;" ><span >Name</td><td><span >Sex</td></tr><tr class="Odd" ><td><input id="newcharname" name="newcharname" onkeyup="checkName();" value="'.$newchar_name.'" size="30" maxlength="29" ><BR><font size="1" face="verdana,arial,helvetica"><div id="name_check">Please enter your character name.</div></font></td><td>'; $main_content .= '<input type="radio" name="newcharsex" value="1" '; if($newchar_sex == 1) $main_content .= 'checked="checked" '; $main_content .= '>male<br/>'; $main_content .= '<input type="radio" name="newcharsex" value="0" '; if($newchar_sex == "0") $main_content .= 'checked="checked" '; $main_content .= '>female<br/></td></tr></table></div></div></table></div>'; if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1) $main_content .= '<div class="InnerTableContainer" > <table style="width:100%;" ><tr>'; if(count($config['site']['newchar_vocations'][$world_id]) > 1) { $main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your vocation:</b></td><td><table class="TableContent" width="100%" >'; foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char) { $main_content .= '<tr><td><input type="radio" name="newcharvocation" value="'.$char_vocation_key.'" '; if($newchar_vocation == $char_vocation_key) $main_content .= 'checked="checked" '; $main_content .= '>'.$vocation_name[$world_id][0][$char_vocation_key].'</td></tr>'; } $main_content .= '</table></table></td>'; } if(count($config['site']['newchar_towns'][$world_id]) > 1) { $main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your city:</b></td><td><table class="TableContent" width="100%" >'; foreach($config['site']['newchar_towns'][$world_id] as $town_id) { $main_content .= '<tr><td><input type="radio" name="newchartown" value="'.$town_id.'" '; if($newchar_town == $town_id) $main_content .= 'checked="checked" '; $main_content .= '>'.$towns_list[$world_id][$town_id].'</td></tr>'; } $main_content .= '</table></table></td>'; } if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1) $main_content .= '</tr></table></div>'; $main_content .= '</table></div></td></tr><br/><table style="width:100%;" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } } } } ?> Apague o que está em accountmanagement.php e coloque o código a cima. @Rodrigo94 realize os devidos testes! Rep+
    1 ponto
  36. JulianoZN

    Como adicionar portas

    Coloca no Object Builder Coloca a no Item Editor Coloca no item.xml Coloca no Actions na Parte de Doors Coloca um ID inicial na porta de saida da house
    1 ponto
  37. Sammy

    [OtClient] Tutorial sobre Módulos

    Olá pessoal, vi esse tutorial em um site gringo sobre a parte básica dos módulos de um otclient, que pode auxiliar muita gente que quiser explorar ainda mais o Otclient, já que essa área eu não vejo tanto conteúdo no Tibia Br, como sempre os créditos estarão ao final do tópico... Então, para começar as coisas que eu vou estar cobrindo: - a criação de módulos. - repassar alguns dos fundamentos para trabalhar no ambiente otclients lua. como testar eficientemente seus módulos e scripts. Para este tutorial você vai precisar: - Um editor de texto de algum tipo (eu gosto de usar o Notepad + +) também seria bom ter conhecimentos básicos de lua e habilidades de programação (mas isso é algo que você pode pegar rapidamente praticando). Agora que já temos tudo o que precisamos, podemos começar ! CRIANDO O NOVO MÓDULO Otclient front-end funciona fora o que chamamos de ' módulos '. Os módulos são uma forma de implementar eficazmente os recursos do cliente separados uns dos outros. Se você está considerando a criação de um novo módulo, é aconselhável que você pense sobre o que o recurso pode ser e se ele iria caber em um módulo já existente (provavelmente um módulo game_xxx), os módulos são encontrados no diretório/modules do otclient. Seus são atualmente dois módulo ' ambientes ': jogo e cliente. Os módulos de jogo usam o prefixo game_ e devem estar refletindo recursos que se relacionam especificamente com os recursos do ambiente do jogador ou do jogo por exemplo game_outfit ou game_mounts são ambos os recursos que são usados no ambiente de jogo. Os módulos de cliente usam o prefixo client_ e devem estar refletindo recursos que se relacionam especificamente com o cliente e o cliente somente. Ele não tem nada a ver com o ambiente de jogo de jogadores, por exemplo, client_options e client_skins estão diretamente relacionados com a funcionalidade de clientes. Isso pode ser um pouco difícil de Visualizar para agora, mas você vai pegar isso mais tarde. Então, agora que você tem uma compreensão do que é um módulo e um pouco como eles funcionam, vamos em frente e começar a criar um novo. COMEÇANDO DO ZERO Nós estamos indo para criar um novo módulo a partir do zero, a primeira coisa que você precisa fazer é criar o diretório modules. O nome do diretório deve refletir o recurso global em si, por isso vamos chamar o nosso game_spells para começar a criar um novo módulo que irá listar todos os players spells com suas informações apropriadas. Nós não estaremos criando este módulo inteiro, mas podemos começar a ver como tudo funciona. Crie um novo diretório chamado game_spells dentro do diretório/Modules clientes. Dentro de game_spells precisamos começar adicionando 3 novos arquivos base: Spells. lua, feitiços. otmod e Spells. otui para a lógica de módulos, registro e design de interface. Criar 3 novos arquivos base spells.lua, spells.otmod e spells.otui dentro/modules/game_spells Você já deve saber o que o arquivo. lua representa, mas quais são essas novas extensões. otmod e. otui? .otmod .otmod é o arquivo que é usado para inicializar o módulo dentro do otclient, é como um registro em que ele irá registrar o módulo para uso dentro do cliente. Este arquivo geralmente tem uma estrutura como esta (eu adicionei comentários, se você copiar este código não se esqueça de remover o--comments): Module nome: game_spells -- nome do módulo (geralmente o mesmo nome que o diretório modules. descrição: Exibir a player spell com sua informação apropriada--descrição do módulo que explica o que é. autor: Sammy -- nomes dos criadores e colaboradores do módulo. website: www.otclient.info -- Se você tem um site externo que você pode ligá-lo aqui. sandboxed: true--sandbox é uma maneira de conter a variável modules e funções para que você não tenha conflitos entre outros módulos. scripts: [ spells.lua ] -- Os scripts são a lógica por trás do módulo onde todas as funções estão contidas. @onLoad: init() -- Este é o lugar onde você define a função de inicialização do módulo (nós vamos cobrir isso mais tarde). @onUnload: terminate() -- Este é o lugar onde você define a função de término do módulo (vamos cobrir isso mais tarde) Copie o código .otmod acima em seu arquivo spells.otmod e remova os comentários. .otui .otui é o arquivo que é usado para criar a interface de usuário modules. Esta é uma linguagem de estilo feito encomenda projetado especificamente para otclient chamado OTML, ele se sente muito como a formatação CSS para aqueles de vocês que têm experiência em webdesign. A estrutura típica de um arquivo .otui se parece com isso (este é o arquivo base iniciar, não concluído): MainWindow !text: tr('Spells') size: 160 450 @onEnter: modules.game_spells.destroy() @onEscape: modules.game_spells.destroy() Label id: spellsLabel !text: tr('Player Spells') width: 130 anchors.top: prev.top anchors.left: prev.left margin-top: 5 margin-left: 5 MainWindow: Esta é a janela que estaremos usando para a interface da Spell List, é uma classe de janela padrão derivado de/client_skins/default/styles/windows.otui styling file estende janela que estende UIWindow. UIWindow é uma classe base dessa inicialização, ele controla a funcionalidade widgets e comportamentos. !text: Este é o texto que é exibido na seção de cabeçalho MainWindow size: isso é usado para definir a largura/altura da mainwindow. @onEnter: configura o retorno de chamada de widgets de MainWindow OnEnter (função que será chamada quando você pressiona a tecla Enter). @onEscape: configura os widgets de retorno de chamada de MainWindow (função que será chamado quando você pressiona a tecla de escape). Label: Este é um widget de etiquetas que é usado para exibir texto na maioria dos casos. É um derivado da classe UILabel. id: Este é o ID que esta mais comum será alias-se com para referenciar usando funções como widget: getChildById ( "spellsLabel ") !text: Este é o texto que será exibido pelo widget UILabel. width: Este é o tamanho da largura do Label anchors. top/bottom/left/right: São onde a parte superior/inferior/esquerda/direita do Label devem ser posicionada. margin-top/bottom/left/right: São deslocamentos para as anchors, eles permitirão que você afinar o posicionamento dos componentes da interface do usuário. Esta é apenas a superfície de .otui formatação e styling, há muito mais que pode ser feito, mas a ideia principal é que você obter uma compreensão sobre como a hierarquia dos componentes da interface do usuário para exibir corretamente, etc as convenções de styling OTML forçá-lo a manter o projeto de um interface separado para o código lógico, por exemplo, o .lua Copie o código otui acima e coloque em spells.otui Agora que entendemos qual arquivo é usado para registrar o módulo e que arquivo (s) são usados para construir os módulos da interface do usuário, podemos aprofundar o código de lógica de módulos e tentar entender como tudo funciona em conjunto. O arquivo spells.lua é o arquivo que contém o código de lógica de módulos. É aqui que os spells serão preenchidos e o manuseio da seleção ortográfica e do display ortográfico serão controlados. Abra o arquivo spells.lua e copie o seguinte código base para começar. Nós estaremos escolhendo aparte este código para ajudar a entendê-lo melhor. Eu fui em frente e comecei o código base para você, aqui está: Spells = {} spellWindow = nil selectedSpell = nil spells = {} function init() connect(g_game, { onOpenSpellWindow = Spells.create, onGameEnd = Spells.destroy }) end function terminate() disconnect(g_game, { onOpenSpellWindow = Spells.create, onGameEnd = Spells.destroy }) Spells.destroy() Spells = nil end function Spells.create(spellList) spells = spellList Spells.destroy() spellWindow = g_ui.displayUI('spells.otui') end function Spells.destroy() if spellWindow then spellWindow:destroy() spellWindow = nil selectedSpell = nil spells = {} end end function Spells.selectSpell() if table.empty(spells) then return end -- TODO end As principais coisas que eu quero focar aqui são: as variáveis (spellWindow, selectedSpell e spells). e as funções (armazenamento de funções e discutir o que init e Terminate são necessários). O VARIÁVEL Variáveis dentro de um módulo em modo seguro não precisam ser localizadas com a palavra-chave local como elas estão dentro de seu próprio ambiente de módulo. Se o módulo estiver em modo seguro: false, então você precisará certificar-se de que você localize a variável e redefini-los dentro da função Terminate (que vamos discutir mais tarde). Dentro deste módulo de feitiço precisamos ter uma maneira de armazenar o objeto janela módulos, fazemos isso definindo a variável spellWindow que temos inicializado como nulo, mas que vamos configurar em breve. Nós também precisamos de uma maneira de conter o que o jogador selecionou o que significa que devemos armazenar uma referência para o spell de alguma forma usando a variável selectedSpell. Por último, mas não menos importante e provavelmente não duram tanto! Precisamos armazenar a lista de spells e fazer isso com a variável Spells. AS FUNÇÕES Funções muito como variáveis estão contidas em módulos de área restrita para que a localização pode variar dependendo de suas preferências. Se você não estiver usando um module sandboxed: true, em seguida, você precisará certificar-se de que você está localizando e armazenar funções corretamente. Eu pessoalmente gosto de usar uma tabela para armazenar minhas funções dentro para manter as coisas organizadas mais este é o lugar onde você vê spells = {}. Spells é uma tabela que eu estarei usando para armazenar todas as funções públicas de um módulo. Funções de módulo privado serão localizadas mesmo que não seja inteiramente necessário dentro de um módulo em modo seguro, eu prefiro declarar quando a função é privada através da palavra-chave local. Então, quais são as funções init () e Terminate () usado para? Como você já deve ter notado dentro dos feitiços .otmod código que você vai ver: @onLoad: init() @onUnLoad: terminate() init() A função init é uma função que é chamada quando otclient tenta carregar o módulo registrado usando chamada de sinal OnLoad. Dentro desta função você deve estar inicializando todos os componentes que são exigidos pelo seu módulo. Como você pode ver dentro de spells.lua estamos chamando uma função dentro de init (): connect(g_game, { onOpenSpellWindow = Spells.create, onGameEnd = Spells.destroy }) terminate() A função Terminate é uma função que é chamada quando otclient tenta descarregar o módulo registrado usando a chamada de sinal OnUnload. Dentro desta função você deve estar destruindo e redefinir variáveis que precisam ser desmarcadas na terminação do módulo. Lembre-se de que nem todas as variáveis precisarão ser redefinidas, mas as referências de widget e a tabela de spells são todas necessárias para serem redefinidas. Como você pode ver dentro de feitiços. lua estamos chamando e definindo uma série de coisas dentro de terminate(): disconnect(g_game, { onOpenSpellWindow = Spells.create, onGameEnd = Spells.destroy }) Spells.destroy() Spells = nil Afirmei anteriormente que chamamos a função Connect dentro init (). Agora que estamos encerrando o módulo precisamos desconectar os retornos de chamada do conjunto de chamadas de sinal. Isto é feito através da função de desconexão (...). Com estas principais coisas cobertas você pode muito bem fazer o que você gosta dentro do módulo. Você pode com cuidado construir e craft o para inserir o que você precisa. Siga através do tutorial para estender o seu conhecimento de criação de módulos e também trabalhar dentro do ambiente do módulo otclients. COMO TESTAR EFICAZMENTE OS SEUS MÓDULOS Testar seus módulos será uma parte importante de fazê-los trabalhar da maneira que você precisa. Módulos de teste pode, por vezes, ser um pouco de um desafio para que haja algumas coisas que você precisa saber, a fim de torná-lo mais fácil para você. RECARREGANDO OS SEUS MÓDULOS Você pode recarregar seus módulos no cliente usando o Gerenciador módulo módulo Gerenciador módulo selecione seu módulo e clique em recarregar. Esteja ciente de que o seu init () e terminate (), funções serão chamados em recarregar por isso, se você não está inicializando e destruindo coisas particulares corretamente, então você pode obter erros no recarregamento. Nota importante: existem algumas alterações raras que podem não ser recarregadas corretamente com o gestor de módulos, coisas como .otui @ alterações (por exemplo, @onClick: edits). Pode haver algumas outras mudanças que não recarregam corretamente, mas para a maior parte ele funciona bem. Se você se encontrar com erros estranhos tentou fazer um reinício completo do cliente para garantir a sua não uma emissão de recarga. COMANDOS DE TESTE ÚTEIS Há uma seleção de comandos úteis que podem ser úteis para testes encontrados no arquivo de script/modules/client_terminal/Commands.lua. Aqui está uma lista dos comandos atuais que você pode inserir no terminal do cliente: dumpWidgets(widget, level) drawDebugBoxes(enable) hideMap() showMap() debugContainersItems() debugPosition(enable) autoReloadModule(name) Você pode adicionar novos comandos ao seu diretório/mod, a fim de evitar fazer alterações no arquivo de comando modules. Você deve sempre assegurar-se de que seus módulos estejam testados completamente antes de criar solicitações da tração ao repositório principal do git. Estas dicas podem ser muito úteis nas fases de teste! ALGUMAS ORIENTAÇÕES ÚTEIS Ao desenvolver seu módulo seja certo dar-lhe lotes do pensamento sobre como está indo trabalhar e mesmo se você pode fundir a característica a um módulo já existente. Também funções globais e variáveis constantes podem ser encontradas nos diretórios modules/corelib e modules/gamelib. Por favor, dê uma cuidadosa consideração para o que você colocar nesses arquivos e se possível tentar evitá-lo. Siga a regra "manter tudo para sua própria causa, e apenas essa causa ". FIM DO TÓPICO =] CRÉDITOS: edubart BeniS Eu(pela tradução e adaptação para o português)
    1 ponto
  38. otomeuhugo

    Show Off Website otGoldemon

    Oi gente a mais de um mês comecei a desenvolver do 0 um website do otpokemon para meu poketibia e hoje um showoff: Sistemas: Créditos: - Otpokemon : Pelo Layout - Eu : Por desenvolver site Imagen's:
    1 ponto
  39. Lucasyeah

    LeLo City atualizada 8.60

    Olá pessoal, esse mapa (mapa base original) foi muito jogado quando os ots eram na versão 8.0 e 8.10, eu era muito fã desse mapa e dessa versão de tibia, então fiz esse mapa há um tempo para utilizar em um otserv meu. Hoje resolvi compartilhar ele com o Xtibia pois achei que ficou bem bacana essa atualização que eu fiz Comentem! Coordenadas: {x = 1104, y = 1062, z = 5} Imagens! Coordenadas: {x = 1104, y = 1062, z = 5} Scan: Clique Aqui! Favor não postar imagens ou download desse arquivo em outros fóruns. Dedico exclusivamente ao Xtibia! Créditos: LeLo (criador do mapa original 8.0 ou 8.10) Lucas Flávio (Eu, por atualizar a cidade)
    1 ponto
  40. Dragon Ball Evolution Fala pessoal estava com um projeto DBZ em 2015 porém não deu muito certo e estou aqui para (DOAR) pra vocês! Ainda mais é um projeto feito já pra rodar em maquina usando UBUNTU 12.04, pra ficar melhor ainda eu fiz a source desse DBZ toda e estou liberando junto, ela não contém erros de compilações e também não há erros graves que derruba o servidor, vim aqui em nome do meu projeto que libero a vocês, apenas o mapa não é meu o resto foi tudo editado por mim, fora as magias que existem no servidor, as vocações estão quase todas balanceadas, a config.lua está totalmente configurada como a source e suas funções. o que tem no servidor ? Informações: *War System na source *spoof system player configurado na config.lua *Source rev 3777 protocolo 8.60. (estável) (bug's fixed) *Cliente dbz solto OLD. *Servidor pronto pra por online. *Muitas transformações. *bank System dentro do jogo colocado por mim. *NPC's funcionando perfeitamente. *Banco de dados juntos. *Ant push system pela source, que configura no config.lua *antiPushDelay configurado no config.lua também. *Ant Divulgação colocada pela source. *Multi word aonde pode abrir vários mundos diferentes usando uma unica database. *No salt, pode usar o account Manager junto com mysql que não irá gerar o salt funciona conjunto com o site sem erros. e muita outra coisas espero que gostem!!! by L3K0T um servidor parado no pendriver e certamente não vou usar. Demonstração: Servidor e Cliente + Source >>> Download DATABASE >>> com account manager já configurado! >> http://www.mediafire.com/download/1in454i49h5o5rj/dbz.sql DLL Windows >>>dll.zip Executor Windows:>>> theforgottenserver.zip (para quem não consegue compilar) Scan dos arquivos >>> Scan Compilando Ubuntu 12.04: 1° Utilitários - *Se tiver seu Ubuntu Instalado ignore isso UTorrent pra baixa o S.O (Sistema Operacional) >> http://www.utorrent.com/intl/pt/ Ubuntu LTS 12.04>>> http://releases.ubuntu.com/12.04/ubuntu-12.04.5-alternate-amd64.iso.torrent 2° COMPILAR OTSERV LINUX (UBUNTU) Lembre-se, eu ensinarei você a compilar seu OTServ em Ubuntu. Se aparecer algo (Y or N? ou S ou N) digita Y ou S e da enter. Instalando as lib e boost's no Ubuntu! Ubuntu: apt-get update apt-get upgrade apt-get install libboost-all-dev apt-get install subversion autoconf build-essential pkg-config libboost-dev libgmp3-dev libxml2-dev liblua5.1-0-dev libmysqlclient-dev libcrypto++-dev ccache libboost-filesystem-dev libboost-regex-dev libboost-system-dev libboost-thread-dev screen libssl-dev apt-get install libcurl4-openssl-dev apt-get install screen Pronto, feito isso você terá tudo configurado para que você possa compilar e botar seu OTServ online! 3° COMPILANDO cd .. chmod 777 -R Dragon Ball Evolution cd /Dragon Ball Evolution/source sh ./autogen.sh && ./configure --enable-server-diag --enable-mysql --enable-root-permission && make clean && make -j 2 4° Ligando servidor cd .. chmod 777 -R Dragon Ball Evolution cd /Dragon Ball Evolution ./theforgottenserver FIM tutorial Linux Agora WINDOWS: Para compilar em windows use esse dev-CPP que disponibilizei especialmente nos fóruns que frequento: Dev-CPP>>> http://www.mediafire.com/download/pr41vq9g1u9sudf/dev+ja+configurada.7z Siga os passo de como você conhece (não precisa configura boost nem nada disso, pois é um dev-CPP pré configurado para esse servidor. Se gerar um erro no final da compilação (Ignore) você pode compilar dnv sem erros, apenas compila não apague nada. ai você vai na pasta dev-cpp que o exe ta lá! As dll tá lá em cima do tópico para você usar. Entrando Senha 1/1 ATENÇÃO: Não USE sqlite para o servidor, pois você não vai conseguir entrar! USE o banco de dados de SITE MYSQL conjunto com account manager (Não tem salt de na criação via account manager e pode ser usado junto com o site sem problema!) (Não quero gente vendendo em ) Source DBZ.zip
    1 ponto
  41. Exclusivo! PokeTibia DxP OpenSource praticamente completo com sistemas e funções nunca liberados. ATENÇÃO: Não dou suporte, apenas estou disponibilizando o server para quem quiser continua-lo ou pegar os sistemas. Se alguns grandes aqui do xtibia quiserem ajudar nos bugs fiquem a vontade, pois este server é praticamente completo, com funções e sistemas nas sources, acho que nunca liberados para o publico. Aconselho a trocarem o mapa ou criarem outro por que não testei o mesmo, e não sei se há bugs ou armadilhas. • Menu: ├ Informações; ├ Bugs; ├ Prints; ├ Download; └ Créditos. • Informações Basicas • • Duel System. • Nick System. • TV System. • Autoloot System. • Block Respaw System. • Mega Evolução Ssystem. • Auto Stacking System. • Player passa por dentro de outros Players(Não sei o nome deste sistema kk). • Ditto Memory System. • Player pode usar potions, revive, soltar poke andando sem parar. • Limite de efeitos aumentados nas sources até 380(Podendo aumentar muito mais) • Transparência. • Cliente criptografado(Acompanha OBD único para o cliente). • Sistemas básicos como fly, ride, surf, order etc. • Held System(Não tem todos, falta fazer alguns, ja tem o x-luck). • Fishing trocando o outfit automaticamente. • Icone System. • Varias Pokeballs novas. • Task System. • Guild System. E muito+, não testei o servidor todo. podem ter sistemas no server que eu esqueci de colocar aqui na lista. • Bugs • Irei postar os que eu sei, podem haver mais. • Pode soltar mais de 1 poke ao mesmo tempo. • Botão que abre os chats tipo help, trade etc, não esta funcionando. • Não da para criar conta nem char(Provavelmente o programador colocou nas sources como proteção, alguem com conhecimento em programação pode resolver). • Tem um código nas sources, segundo fontes, em game.cpp que caso alguém coloque o servidor online o programador do server pode derrubá-lo(Outra coisa para um programador rever). • Fly anda travando, no chão voa normal, somente nos andares acima acontece isso, deve ser alguma config. • Gym System não esta funcionando. Bem, são os que eu sei, tem que dar uma revisada geral. • Prints • • Mega Evolução • Ditto Memory. • TV System. • Auto Loot System. • Block Respaw System. • Irei colocar mais prints em breve(Estou com pouco tempo agora). • Downloads•
    1 ponto
  42. Olá galera do Xtibia, venho hoje trazer um sistema muito útil como pode ver no Título ele remove casa dos players que não logam mais. Explicação: Sabe aqueles players filho da mãe que compram as melhores casas e não logam mais no servidor e enche a porra da casa de item pros novos players não comprar? Pois é esse sistema dara um jeito nesses safados! xD Este script é apenas um arquivo que você colocará em sua pasta mods e ele executará toda vez que o servidor for reiniciado/ligado, ou seja: Quando o servidor ligar ele irá verificar os players que não logam a X dias (configurável) e então expulsa-los da casa movendo seus items para o depot deixando a casa sem dono. Bom chega de explicação e vamos ao que interessa; Na pasta principal do servidor, onde fica a distro que roda o servidor e tudo mais, entre na pasta MODS e crie um arquivo com o nome de cleanhouses.xml e dentro coloque o seguinte codigo: <?xml version="1.0" encoding="UTF-8"?><mod name="Cleanhouses" version="1.04" author="Yan Liima-Night" contact="xtibia.com" enabled="yes"> <description> v.1.04 - Adicionado 'onlyNonPremium' configurável. Versão sem erros por favor caso não é avançado na área não modifique nada. Criado e modificado por Yan Liima Nick: [ADM] Night Este mod irá limpar casas de jogadores inativos e mover os seus itens para o depósito.explicação das configurações: days - Se o jogador não tiver logado para este número de dias de sua casa será liberado. log - true/false, é para habilitar o registro de quais casas foram limpas. file - caminho para o arquivo de log, onde os logs serão armazenados. Ignorado se 'log' definido como falso onlyNonPremium - se definido como 'true', o script irá limpar apenas as casas dos jogadores que não lougou X dias. Outras indicações: NÃO remova doSaveServer() no final, caso contrário, se o servidor parar de funciona antes que o servidor salve você vai se arrepender =) </description> <globalevent name="cleanhouses" type="start" event="buffer"><![CDATA[ local config = { days = 60, log = true, file = getDataDir() .. "/logs/cleanhouses.txt", onlyNonPremium = true } local ns_query =[[ SELECT houses.owner, houses.id as hid, houses.name as house_name ,players.name FROM houses LEFT JOIN players ON players.id=houses.owner LEFT JOIN accounts ON players.account_id=accounts.id WHERE players.lastlogin < (UNIX_TIMESTAMP() - ]] ..config.days.. [[*24*60*60) ]] ..(config.onlyNonPremium and ' AND accounts.premdays=0 ' or '')..[[ AND players.world_id =]] .. getConfigValue("worldId") local house = db.getResult(ns_query) local logs = " Houses cleaned:\n\n" if house:getID() ~= -1 then repeat logs = logs .. house:getDataString('house_name') ..", owned by " .. house:getDataString('name') .. "\n" setHouseOwner(house:getDataInt('hid'), 0) until not house:next() house:free() else logs = logs .. "There were no houses to clean." end if config.log then doWriteLogFile(config.file, logs) end addEvent(doSaveServer, 1000) ]]></globalevent></mod> Pronto, salve e feche. Toda vez que o servidor iniciar irá expulsar os players que não logam aos dias configuráveis. Como configurar: days = 60 * É o número em DIAS que o player terá que ficar sem logar para perder a casa. Aconselho a não mexer, caso queira modificar algo aconselho ser avançado na área para não causar error no sistema. Este sistema funciona em qualquer TFS. Créditos Yan Liima Bom eu tinha publicado um post igual esse faz anos so que não lembro minha conta, e pegaro meu post postaro em outro fórum que não merece ser citado com outros créditos estou apenas avisando. Te ajudei?? REP + e ficamos quites... Atenciosamente, Yan Liima Abraços!
    1 ponto
  43. Bom Galera , este é meu primeiro tutorial sobre websites. Só vai funcionar com database phpmyadmin Que pode ser muito útil para aqueles que gostam de resetar mas nao quer devolver items. =D Vamos lá. 1) Acesse seu localhost/phpmyadmin 2) Vá na sua database e depois em SQL 3) Vai aparecer "Faser consulta no banco de dados" 4) Nele voce escreve os codigos correspondentes á açao que voce quer faser. -AS açoes vou listar elas abaixo Para resetar os lvl e a life: UPDATE `players` SET `level` = '8', `health` = '180', `healthmax` = '180', `experience` = '4200', `mana` = '35', `manamax` = '35', `cap` = '400' Para resetar os skills: UPDATE `ot`.`players_skills` SET `value` = '10' Remover Premium Dos players: (serve para vip system que vende premmy no gesior) UPDATE account SET premdays=0; Adicionar 3 dias de Premium: UPDATE accounts SET premdays = premdays + 3; Mandar Geral po templo: UPDATE players SET posx = X, posy = Y, posz = Z; Criar Account Manager: INSERT INTO `players` VALUES (1, 'Account Manager', 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 10, 10, 10, 0, 0); Remover Red skulls , Black Skuls e Frags de todos: UPDATE `players` SET `redskulltime`=0; Dar bless para todos: UPDATE `players` SET `blessings`=31; Remover um Item especifico: (exemplo 2160= crystal coin) ótimo para casos de clonadores. DELETE FROM player_depotitems, player_items, tile_items WHERE itemtype = 2160; Deletar players lvl 50- (CUIDADO, EXECUTANDO ESSA AÇAO VOCE IRÁ DELETAR OS SAMPLES. AUMENTE O LVL DOS SAMPLES E DEPOIS VOLTE AO NOMRAL) DELETE FROM players WHERE level < 50 AND lastlogin < UNIX_TIMESTAMP() - 20*24*60*60 Deletar houses de players que foram deletados: UPDATE `houses` SET `owner` = '0' WHERE `houses`.`owner` NOT IN ( SELECT `players`.`id` FROM `players` WHERE `players`.`id` = `houses`.`owner` ); Trocar Outifit de all players: UPDATE players SET lookbody =61, lookfeet =93, lookhead =127, looktype =128 Deletar players que nunca logaram: DELETE FROM `players` WHERE `lastlogin`=0; É isso galera, espero ter ajudado. fmz? Se nao for muito para vcs , dao REP + Thanks. é para o xtibia. :XTibia_smile:
    1 ponto
  44. WooX

    Npc Que Vende Nova Vocação

    Ae Xtibianos Vou Ensinar A Vocês Como Criar Um Npc Que Vende A Nova Voc Que Vc Criou No Seu Server! 1°Vá Hem data/npc/ Click Hem Novo->Documento De Texto Renomei Para Nome Que Quiser Dentro Coloque Iso Azul:Nome Do NPc Click Hem Salvar Como Coloque Nome Que Quiser + No Final Coloque.xml E Salve Na Pasta Do Seu Ot Agora Delete O Arquivo Txt Que Tinha Criado! 2°Vá Hem data/npc/scripts/ Copie E Cole Qualquer Arquivo.lua Renomeio Para vip promote Dentro Coloque Iso Vermelho:Vocação Verde:Preço Da Voc Roxo:ID Da Voc É Isso Vlw Se Falto Algo Comenten By:Leo46
    1 ponto
  45. Newtonnotwen

    Change Outfit Especial!

    Ele muda o outfit quando pisa no tile, e perde quando sai dele. Script by: LuckOake Editado by: Newtonnotwen Adicione em data/movements/scripts em um arquivo.lua denominado outfits: -Marrom: Mensagem ao pisar. -Violeta: Life a perder. -Azul Turqueza: - (menos) para perder life, + (mais) para ganhar -Laranja: Id do tile Editando o outfit: -Vermelho: Outfit number ( /newtype ) -Verde: Cor do outfit (só funciona em alguns outfits) -Roxo: Addon do outfit (só funciona em alguns outfits) Obs: Addon varia de 0 a 3. ------------------------------- Em movements.xml:
    1 ponto
  46. Spiga

    [Pokemon] Kanto + Johto (Full)

    MAP KANTO (54MB): desatualizado, motivo; nao consigo mais exportar o minimapa de tao grande ta dando bug. MAP JOHTO (16MB): Editando... Todos estão bem detalhados, se o topico render eu posto mais fotos de todas as citys. OBS: Ambos os mapas eu fiz do 0, pra quem duvida basta saber que eu sou o criador do server q veio a ser conhecido como PokemonDashFight, sou o mystery, e na epoca que comecei a fazer o servidor foi em janeiro, portanto, entre idas e voltas, esse projeto já tem quase 1 ano. INTRODUÇÃO: Bom, isso tambem nao vem ao caso mas vo aproveitar o post pra falar um pouco do projeto, alem de mapper eu sou scripter, spriter e um pouco programmer, e doido ainda faço engenharia. Vou utilizar este topico pra falar do jogo, não tenho muitas fotos, pois nao tenho tempo pra ficar tirando, oque eu posso dizer e provar é que estou com o servidor pronto (que fiz sozinho) que contém todos os sistemas de pokemon q eu conheço (e eu estudei bastante tah), bom dentre estes os que me vem ao topo da cabeça pra eu citar agora são: level, nick, sexo, nature, happy, food, 6 status por poke (todos funcionais), eggs, TM's, Boost, Injuries, PvP, bike, headbutt, dive, gyms, FULL SHINY, TODOS OS POKEMONS JOHTO, MOVES 100% (kanto e johto), além de mais de 60 npcs e cliente inovador, porém eu tenho muitos outros, vou fazer um topico em outra area para explicá-los mais tarde. Gostaria de citar - e tambem agradece-los - que utilizei a source do Dash para faze-los, só mexi em 3 coisinhas, então já tenho todos aqeueles systems conhecidos adpatados no meu server. AJUDA: O negócio é o seguinte, to precisando de mappers dispostos a terminar esse mapa johto, ou apenas criarem hunts personalizadas pra eu poder adicionar, o tempo da curto pra mim se continuar fazendo tudo sozinho parece q nao vou acabar o servidor nunca, quem tiver disposto a parceria favor contato. Pra quem nao sabe este é o mapa Kanto-Johto; Se topico render eu posto mais fotos! Atualizado 13/10 - Priguiiça Eh isso, Até o Próximo post galêree. Pra mais actions e scripts de pokemon dash veja minha assinatura!
    1 ponto
  47. Vodkart

    Talkactions !mana E !vida

    Ta dando isso, esta tudo do jeito que você falou para mim no tópico. Quando se usa !health ele da isso. Sabe porque está dando isso? é porque no seu servidor não existe essa função também! Vou te passar a função que eu fiz: lib/functions coloca function getPlayerHealth(cid) -- by vodka doPlayerSave(cid) local PlayerInfo = db.getResult("SELECT `health` FROM `players` WHERE `id` = " .. getPlayerGUID(cid)) return PlayerInfo:getDataInt("health") end ai no script ali onde tiver "getCreatureHealth" troca por "getPlayerHealth"
    1 ponto
  48. É simples brother: No map editor, selecione o tile de PZ e vá passando em cima da onde você quer retirar a PZ segurando CTRL.
    1 ponto
Líderes está configurado para São Paulo/GMT-03:00
×
×
  • Criar Novo...