Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''action''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Encontrar resultados em...

Encontrar resultados que contenham...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Sou

  1. galera ta bugado a poção do paladino great spirit potion se o cara usa ela o atk melee para e depois volta como arrumar ?? local MIN = 7000 local MAX = 8000 local EMPTY_POTION = 8472 local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) == FALSE then return FALSE end if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE end if((not(isKnight(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 130) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then doCreatureSay(itemEx.uid, "Only knights of level 130 or above may drink this fluid.", TALKTYPE_ORANGE_1) return TRUE end if doCreatureAddHealth(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then return FALSE end doAddCondition(cid, exhaust) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) return TRUE end
  2. olá gente, é o seguinte, peguei uma source de um amigo, e ela só veio com os arquivos .cpp e .h, dai tive que criar a pasta dev-cpp e criar um novo projeto no dev c++, mas dai quando criei tudo e tals, quando fui compilar, deu esse erro aqui.] alguém me ajuda pfv, do rep+ Up
  3. Bom dia galera, tudo bem? Decidi fazer uma talkaction para ilustrar o sistema que criei de customização de ataque básico: Personalizando Ataques Básicos Óbviamente, ela não é a melhor forma de usar o sistema (afinal assim o player poderia definir qualquer range / tipo de combate/ efeito que ele quiser), mas serve para ilustrar como o sistema funciona. Sem mais delongas, vá em talkactions.xml e cole a tag abaixo: <talkaction words="/cbh" separator=" " script="changeBasicHit.lua" /> Em talkactions/scripts crie um arquivo chamado changeBasicHit.lua e cole o script abaixo nele: local combats = { ["physical"] = COMBAT_PHYSICALDAMAGE, ["energy"] = COMBAT_ENERGYDAMAGE, ["earth"] = COMBAT_EARTHDAMAGE, ["fire"] = COMBAT_FIREDAMAGE, ["undefined"] = COMBAT_UNDEFINEDDAMAGE, ["life_drain"] = COMBAT_LIFEDRAIN, ["mana_drain"] = COMBAT_MANADRAIN, ["healing"] = COMBAT_HEALING, ["drown"] = COMBAT_DROWNDAMAGE, ["ice"] = COMBAT_ICEDAMAGE, ["holy"] = COMBAT_HOLYDAMAGE, ["death"] = COMBAT_DEATHDAMAGE}local distanceEffects = { ["spear"] = CONST_ANI_SPEAR, ["bolt"] = CONST_ANI_BOLT, ["arrow"] = CONST_ANI_ARROW, ["fire"] = CONST_ANI_FIRE, ["energy"] = CONST_ANI_ENERGY, ["poison_arrow"] = CONST_ANI_POISONARROW, ["burst_arrow"] = CONST_ANI_BURSTARROW, ["throwing_star"] = CONST_ANI_THROWINGSTAR, ["throwing_knife"] = CONST_ANI_THROWINGKNIFE, ["smallstone"] = CONST_ANI_SMALLSTONE, ["death"] = CONST_ANI_DEATH, ["large_rock"] = CONST_ANI_LARGEROCK, ["snowball"] = CONST_ANI_SNOWBALL, ["power_bolt"] = CONST_ANI_POWERBOLT, ["poison"] = CONST_ANI_POISON, ["infernal_bolt"] = CONST_ANI_INFERNALBOLT, ["hunting_spear"] = CONST_ANI_HUNTINGSPEAR, ["enchanted_spear"] = CONST_ANI_ENCHANTEDSPEAR, ["red_star"] = CONST_ANI_REDSTAR, ["green_star"] = CONST_ANI_GREENSTAR, ["royal_spear"] = CONST_ANI_ROYALSPEAR, ["sniper_arrow"] = CONST_ANI_SNIPERARROW, ["onyx_arrow"] = CONST_ANI_ONYXARROW, ["piercing_bolt"] = CONST_ANI_PIERCINGBOLT, ["sword"] = CONST_ANI_WHIRLWINDSWORD, ["axe"] = CONST_ANI_WHIRLWINDAXE, ["club"] = CONST_ANI_WHIRLWINDCLUB, ["ethereal_spear"] = CONST_ANI_ETHEREALSPEAR, ["ice"] = CONST_ANI_ICE, ["earth"] = CONST_ANI_EARTH, ["holy"] = CONST_ANI_HOLY, ["sudden_death"] = CONST_ANI_SUDDENDEATH, ["flash_arrow"] = CONST_ANI_FLASHARROW, ["flamming_arrow"] = CONST_ANI_FLAMMINGARROW, ["shiver_arrow"] = CONST_ANI_SHIVERARROW, ["energy_ball"] = CONST_ANI_ENERGYBALL, ["small_ice"] = CONST_ANI_SMALLICE, ["small_holy"] = CONST_ANI_SMALLHOLY, ["small_earth"] = CONST_ANI_SMALLEARTH, ["earth_arrow"] = CONST_ANI_EARTHARROW, ["explosion"] = CONST_ANI_EXPLOSION, ["cake"] = CONST_ANI_CAKE, ["tarsal_arrow"] = CONST_ANI_TARSALARROW, ["vortex_bolt"] = CONST_ANI_VORTEXBOLT, ["prismatic_bolt"] = CONST_ANI_PRISMATICBOLT, ["crystalline_arrow"] = CONST_ANI_CRYSTALLINEARROW, ["drill_bolt"] = CONST_ANI_DRILLBOLT, ["envenomed_arrow"] = CONST_ANI_ENVENOMEDARROW, ["physical"] = CONST_ANI_GLOOTHSPEAR, ["simple_arrow"] = CONST_ANI_SIMPLEARROW,}function onSay(player, words, param) local config = string.split(param, " ") if #config ~= 3 then doPlayerSendCancel(player, "Invalid params number. You must specify three params: range combat type effect!") doSendMagicEffect(getCreaturePosition(player), CONST_ME_POFF) return false end if not tonumber(config[1]) then doPlayerSendCancel(player, "Pay attention: 1. Params order is: range combat effect. 2. Range must be a number.") doSendMagicEffect(getCreaturePosition(player), CONST_ME_MAGIC_BLUE) return false end player:setFistConditions(config[1], combats[config[2]] or COMBAT_PHYSICALDAMAGE, distanceEffects[config[3]] or config[1] == 1 and CONST_ANI_NONE or CONST_ANI_SNOWBALL) doSendMagicEffect(getCreaturePosition(player), CONST_ME_MAGIC_BLUE)end Imagem: Enfim, espero que gostem. Abraços,
  4. Estou com um systema de auto loot e ele esta bugado o comando dele que nao funciona!! Bug
  5. Esse sistema de addonbox poder vim addons aleatorios.. function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { premium = true, -- se precisa ser premium account (true or false) battle = false, -- se precisa estar sem battle (true). Se colocar false, poderá usar addons box no meio de batalhas level = 100, -- level para poder usar addons box } local items = {13064,13060} ----id do addon if getPlayerLevel(cid) < config.level then doPlayerSendCancel(cid, "precisar ser level ".. config.level ..".") return true end if config.premium and not isPremium(cid) then doPlayerSendCancel(cid, "Somente player premium.") return true end if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "Your pokemon can't concentrate during battles.") return true end doPlayerAddItem(cid, items[math.random(#items)]) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce Abriu Addon Box") doRemoveItem(item.uid, 1) end criar 1 arquivo com nome addonbox.lua poder escolher entre as 2 script 1-- script poder escolher level para abrir addon box e addons aleatorios 2-- script e bem basica só poder ganhar 1 addon na addon box function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { premium = true, -- se precisa ser premium account (true or false) battle = false -- se precisa estar sem battle (true). Se colocar false, poderá usar addons box no meio de batalhas } id = 13064 count = 1 -- id do item e quantidade if config.premium and not isPremium(cid) then doPlayerSendCancel(cid, "Somente player premium.") return true end if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "Your pokemon can't concentrate during battles.") return true end doPlayerAddItem(cid, id, count) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce Abriu Addons Box E Ganhou Addons De "..getItemNameById(id)..".") doRemoveItem(item.uid, 1) end tag <action itemid="id_do_item" event="script" value="addonbox.lua"/>
  6. Olá galera, depois de seguir os procedimentos nesse link usando como base o Pokemon Stage, obtive o seguinte erro após usar a spell Mega Evolution: [28/03/2016 01:05:09] [Error - TalkAction Interface] [28/03/2016 01:05:09] data/talkactions/scripts/move1.lua:onSay [28/03/2016 01:05:09] Description: [28/03/2016 01:05:09] data/lib/level system.lua:272: attempt to index field '?' (a nil value) [28/03/2016 01:05:09] stack traceback: [28/03/2016 01:05:09] data/lib/level system.lua:272: in function 'adjustStatus' [28/03/2016 01:05:09] data/lib/pokemon moves.lua:274: in function 'docastspell' [28/03/2016 01:05:09] data/talkactions/scripts/move1.lua:201: in function <data/talkactions/scripts/move1.lua:21> Como podem ver no GIF abaixo, após usar a spell, as spells na cdBar não atualizam para as do Mega Charizard X, aparece um "m11" após o "Charizard, Mega Evolve!" e além disso todas as skills param de funcionar, aparece apenas "m1", "m2", "m3" e etc seguidos de erros na distro: Segue abaixo os arquivos que aparentemente estão com erros: move1.lua level system.lua pokemon moves.lua Podem fechar o tópico, já consegui resolver o erro.
  7. Olá. Eu estou a procura de um script action que quando o player der use em certo item, ele de 10 gold ingots (ID: 9971) pro player, mas que só possa usar o item a cada 24h.
  8. Esse script é o de adicionar skill aquele "/addskill Playername, axe" eu queri que alguém me ajudasse a trocar a parte do Playername por um numero que eu vou por no script, tipo um variavel "passcode = [12354]" e que o player precise dizer "/addskill 12354, axe" e ele mesmo ganha o skill, só que tem um outro detalhe, ele tem que verificar se o player tem mais de 0 em uma storage X, e só então a talkaction funciona e da o skill de axe pro cara... esse é o script q tenho function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local t = string.explode(param, ",") if(not t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough params.") return true end local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found.") return true end t[2] = t[2]:lower() local skill = SKILL_IDS[t[2]] if(not skill) then local tmp = t[2]:sub(1, 1) if(tmp == 'l' or tmp == 'e') then skill = SKILL__LEVEL elseif(tmp == 'm') then skill = SKILL__MAGLEVEL else skill = tonumber(t[2]) if(not skill or skill < SKILL_FIRST or SKILL > SKILL__LAST) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such skill does not exists.") return true end end end local amount = tonumber(t[3]) if(not amount or amount == 0) then amount = 1 end doPlayerAddSkill(pid, skill, amount, true) return true end
  9. Olá amigos, Estou com um grande problema e não achei nada parecido aqui no TK. Segue o exemplo da imagem, o player vai ter um tp no templo e outro na quest, quando ele passar pelo tp1 ele vai ser teleportado para o X na direita do player salvando a sua posição de checkpoint, ao passar pelo tp2 ele irá ser teleportado para o X que será sua posição de checkpoint, o tp2 se encontrará no templo. Consistência: *só pode salvar uma vez, se ele entrar em outro checkpoint ele resetará sua posição para a ultima; *se não houver checkpoint, o player receberá uma mensagem de que não há checkpoint; *em cada tp ao teleportar o player recebe uma mensagem, com qualquer efeito, só pra saber como é o código do efeito;
  10. ta dando esse erro alguém ajuda, preciso compila pra bloqueia os ips Compiler: Default compiler Building Makefile: "C:\Users\Brunas2Ivan\Downloads\3777-master\src\dev-cpp\Makefile.win" Executing make clean rm -f obj//actions.o obj//admin.o obj//allocator.o obj//baseevents.o obj//beds.o obj//chat.o obj//combat.o obj//condition.o obj//configmanager.o obj//connection.o obj//container.o obj//creature.o obj//creatureevent.o obj//cylinder.o obj//database.o obj//databasemanager.o obj//databasemysql.o obj//databasesqlite.o obj//depot.o obj//dispatcher.o obj//exception.o obj//fileloader.o obj//game.o obj//gameservers.o obj//globalevent.o obj//group.o obj//house.o obj//housetile.o obj//ioban.o obj//ioguild.o obj//iologindata.o obj//iomap.o obj//iomapserialize.o obj//item.o obj//itemattributes.o obj//items.o obj//luascript.o obj//mailbox.o obj//manager.o obj//map.o obj//monster.o obj//monsters.o obj//movement.o obj//networkmessage.o obj//npc.o obj//otserv.o obj//outfit.o obj//outputmessage.o obj//party.o obj//player.o obj//position.o obj//protocol.o obj//protocolgame.o obj//protocolhttp.o obj//protocollogin.o obj//protocolold.o obj//quests.o obj//raids.o obj//rsa.o obj//scheduler.o obj//scriptmanager.o obj//server.o obj//spawn.o obj//spells.o obj//status.o obj//talkaction.o obj//teleport.o obj//textlogger.o obj//thing.o obj//tile.o obj//tools.o obj//trashholder.o obj//vocation.o obj//waitlist.o obj//weapons.o obj//theforgottenserver_private.res TheForgottenServer.exe g++.exe -c ../actions.cpp -o obj//actions.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../admin.cpp -o obj//admin.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../allocator.cpp -o obj//allocator.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../baseevents.cpp -o obj//baseevents.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../beds.cpp -o obj//beds.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../chat.cpp -o obj//chat.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../combat.cpp -o obj//combat.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../condition.cpp -o obj//condition.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../configmanager.cpp -o obj//configmanager.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../connection.cpp -o obj//connection.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../container.cpp -o obj//container.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../creature.cpp -o obj//creature.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../creatureevent.cpp -o obj//creatureevent.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../cylinder.cpp -o obj//cylinder.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../database.cpp -o obj//database.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../databasemanager.cpp -o obj//databasemanager.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../databasemysql.cpp -o obj//databasemysql.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../databasesqlite.cpp -o obj//databasesqlite.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../depot.cpp -o obj//depot.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../dispatcher.cpp -o obj//dispatcher.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../exception.cpp -o obj//exception.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../fileloader.cpp -o obj//fileloader.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../game.cpp -o obj//game.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../gameservers.cpp -o obj//gameservers.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../globalevent.cpp -o obj//globalevent.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../group.cpp -o obj//group.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../house.cpp -o obj//house.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../housetile.cpp -o obj//housetile.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../ioban.cpp -o obj//ioban.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../ioguild.cpp -o obj//ioguild.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../iologindata.cpp -o obj//iologindata.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../iomap.cpp -o obj//iomap.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../iomapserialize.cpp -o obj//iomapserialize.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../item.cpp -o obj//item.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../itemattributes.cpp -o obj//itemattributes.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../items.cpp -o obj//items.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../luascript.cpp -o obj//luascript.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../mailbox.cpp -o obj//mailbox.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../manager.cpp -o obj//manager.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../map.cpp -o obj//map.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../monster.cpp -o obj//monster.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../monsters.cpp -o obj//monsters.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../movement.cpp -o obj//movement.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../networkmessage.cpp -o obj//networkmessage.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../npc.cpp -o obj//npc.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../otserv.cpp -o obj//otserv.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../outfit.cpp -o obj//outfit.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../outputmessage.cpp -o obj//outputmessage.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../party.cpp -o obj//party.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../player.cpp -o obj//player.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../position.cpp -o obj//position.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../protocol.cpp -o obj//protocol.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../protocolgame.cpp -o obj//protocolgame.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../protocolhttp.cpp -o obj//protocolhttp.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../protocollogin.cpp -o obj//protocollogin.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../protocolold.cpp -o obj//protocolold.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../quests.cpp -o obj//quests.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../raids.cpp -o obj//raids.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../rsa.cpp -o obj//rsa.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../scheduler.cpp -o obj//scheduler.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../scriptmanager.cpp -o obj//scriptmanager.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../server.cpp -o obj//server.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../spawn.cpp -o obj//spawn.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../spells.cpp -o obj//spells.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../status.cpp -o obj//status.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../talkaction.cpp -o obj//talkaction.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../teleport.cpp -o obj//teleport.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../textlogger.cpp -o obj//textlogger.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../thing.cpp -o obj//thing.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../tile.cpp -o obj//tile.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 g++.exe -c ../tools.cpp -o obj//tools.o -I"C:/Users/Brunas2Ivan/Documents/Mipony/Stian's Repack Dev-Cpp/Stian's Repack Dev-Cpp/include" -D__USE_MYSQL__ -D__USE_SQLITE__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__WAR_SYSTEM__ -fexpensive-optimizations -O1 ../tools.cpp:23:25: openssl/sha.h: No such file or directory ../tools.cpp:24:25: openssl/md5.h: No such file or directory ../tools.cpp: In function `std::string transformToMD5(std::string, bool)': ../tools.cpp:33: error: `MD5_CTX' was not declared in this scope ../tools.cpp:33: error: expected `;' before "c" ../tools.cpp:34: error: `c' was not declared in this scope ../tools.cpp:34: error: `MD5_Init' was not declared in this scope ../tools.cpp:35: error: `MD5_Update' was not declared in this scope ../tools.cpp:37: error: `MD5_DIGEST_LENGTH' was not declared in this scope ../tools.cpp:38: error: `md' was not declared in this scope ../tools.cpp:38: error: `MD5_Final' was not declared in this scope ../tools.cpp:42: error: `output' was not declared in this scope ../tools.cpp:45: error: `output' was not declared in this scope ../tools.cpp:47: error: `output' was not declared in this scope ../tools.cpp: In function `std::string transformToSHA1(std::string, bool)': ../tools.cpp:52: error: `SHA_CTX' was not declared in this scope ../tools.cpp:52: error: expected `;' before "c" ../tools.cpp:53: error: `c' was not declared in this scope ../tools.cpp:53: error: `SHA1_Init' was not declared in this scope ../tools.cpp:54: error: `SHA1_Update' was not declared in this scope ../tools.cpp:56: error: `SHA_DIGEST_LENGTH' was not declared in this scope ../tools.cpp:57: error: `md' was not declared in this scope ../tools.cpp:57: error: `SHA1_Final' was not declared in this scope ../tools.cpp:61: error: `output' was not declared in this scope ../tools.cpp:64: error: `output' was not declared in this scope ../tools.cpp:66: error: `output' was not declared in this scope ../tools.cpp: In function `std::string transformToSHA256(std::string, bool)': ../tools.cpp:71: error: `SHA256_CTX' was not declared in this scope ../tools.cpp:71: error: expected `;' before "c" ../tools.cpp:72: error: `c' was not declared in this scope ../tools.cpp:72: error: `SHA256_Init' was not declared in this scope ../tools.cpp:73: error: `SHA256_Update' was not declared in this scope ../tools.cpp:75: error: `SHA256_DIGEST_LENGTH' was not declared in this scope ../tools.cpp:76: error: `md' was not declared in this scope ../tools.cpp:76: error: `SHA256_Final' was not declared in this scope ../tools.cpp:80: error: `output' was not declared in this scope ../tools.cpp:83: error: `output' was not declared in this scope ../tools.cpp:85: error: `output' was not declared in this scope ../tools.cpp: In function `std::string transformToSHA512(std::string, bool)': ../tools.cpp:90: error: `SHA512_CTX' was not declared in this scope ../tools.cpp:90: error: expected `;' before "c" ../tools.cpp:91: error: `c' was not declared in this scope ../tools.cpp:91: error: `SHA512_Init' was not declared in this scope ../tools.cpp:92: error: `SHA512_Update' was not declared in this scope ../tools.cpp:94: error: `SHA512_DIGEST_LENGTH' was not declared in this scope ../tools.cpp:95: error: `md' was not declared in this scope ../tools.cpp:95: error: `SHA512_Final' was not declared in this scope ../tools.cpp:99: error: `output' was not declared in this scope ../tools.cpp:102: error: `output' was not declared in this scope ../tools.cpp:104: error: `output' was not declared in this scope make.exe: *** [obj//tools.o] Error 1 Execution terminated
  11. Bom dia. Estou procurando um script que de "use" em certo item e o player fique com bless infinita, sem que precise comprar ou usar o item novamente.
  12. blz galera, como resolver ?? Check server configuration Error occured! Error ID: More info: ERROR: #C-1 : Class::ConfigLUA - Line 37 of LUA config file is not valid [key: violationNameReportActionType 1] File: C:\xampp\xampp\htdocs\classes/configlua.php Line: 59 File: C:\xampp\xampp\htdocs\classes/configlua.php Line: 20 File: C:\xampp\xampp\htdocs\classes/configlua.php Line: 12 File: C:\xampp\xampp\htdocs/install.php Line: 249 consegui instalar vejo meu site tudo certo só q não consigo, abrir o ot da unable to load config.lua consegui resolver agora meu gesior nao cria conta pelo site putz deve ta bugado e pelo jogo tive q instala account maanger na db pqp o cara falou q o gesio deletava bugado nao no post já resolvi isso o problema agora é esse, fala galera na moral desde tarde ate agora procurando e nada meu gesior não acompanha os samples alterei todos os samples pra posição q eu quero q nasça as novas contas, eu crio a conta vou la na db as posição ta tudo 0 0 0 =.=
  13. blz galera, passei meu ot pra mysql e todos os baus actions parou de funfa e todos itens atras deles tbm não estão dando o efeito q dava, vou ter q refazer um por um ou da pra arrumar de uma vez só, segue o erro
  14. Script Item Quer Criar Monster Ou Pokemon... 1--criar 1 arquivo com nome monster.lua -- By Luiz Machado1 -- function onUse(cid, item, fromPosition, itemEx, toPosition) Local Monster1 = Nome Do pokemon ou monster Local Pos = x=1038, y=1036, z=7 -- Posição Para Aonde Vai Nascer O Monster Ou Pokemon doSummonCreature(cid, monster1, pos) doPlayerSendCancel(cid,"Você Criou 1 Pokemon ou monster!") end 2--Tag <action itemid="id do item" event="script" value="monster.lua"/>
  15. fawkz12

    Give Item

    Erro: Error - LuaScriptInterface::loadFile] data/talkactions/scripts/giveitem.lua:1: unexpected symbol near 'ï' [21/03/2016 14:19:11] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/giveitem.lua) [21/03/2016 14:19:11] data/talkactions/scripts/giveitem.lua:1: unexpected symbol near 'ï' Script : function onSay(cid, words, param) local param = param.explode(param, ',') if param then if isPlayer(getCreatureByName(param[1])) == TRUE then doPlayerSendTextMessage(getCreatureByName(param[1]), 22, "Você acabou de receber um item da Staff!") doPlayerAddItem(getCreatureByName(param[1]), param[2], param[3]) end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") end return TRUE end
  16. Bom dia, Eu to usando o sistema do VIP by Mock no otserver junto com o gesior, porém ele ta com erro na contagem de tempo, eu compro qualquer quantia de vip e aparece um monte de numero no tempo para terminar. Meu accountmanagement.php já foi alterado com os coisas lá do "vip_time" e tudo mais. Meu accountmanagement.php ta assim: <?PHP if($group_id_of_acc_logged == 2) $main_content .= '<h1>Account Manager Bloqueado No Site.'; else 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"> YES, '.$account_logged->getPlayerVip_Time().' Time left </font></b>' : '<b><font color="red">NO</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" ><b>Premium Player:</b></td><td>'.$account_vip.'</td></tr><tr style="background-color:'.$config['site']['lightborder'].'; " ><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%"> </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.'. '.$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->SMTPDebug = 0; $mail->SMTPSecure = "ssl"; $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"> </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"> </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"> <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->SMTPDebug = 0; $mail->SMTPSecure = "ssl"; $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->SMTPDebug = 0; $mail->SMTPSecure = "ssl"; $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($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>'; } } } } } ?>
  17. blz galera bom dia, eu tenho esse talkaction no meu servidor, o meu sistema vip e por storage ai gostaria de bloquear esse comando só pra vips poder falar ou então por uma determinada vocação. ---By Masterpako19--- --Config-- local cash = 500 -- Dinero que se nesecita para hacer el broadcast (en gps) local levelneeded = 8 -- Level necesario para hacer el broadcast local lenght = 100 -- Maximo de caracteres del mensaje local messagesort = MESSAGE_STATUS_WARNING -- can be "MESSAGE_STATUS_WARNING" or "TALKTYPE_ORANGE_1" check your global.lua for more... local exhaustTime = 1 * 60 * 1000 -- tiempo de exausted entre cada mensaje (para cambiar mas minutos cambia el 4 por x cantidad de minutos) local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, exhaustTime) --End of config-- function onSay(cid, words, param) if getCreatureCondition(cid, CONDITION_EXHAUST) == TRUE then doPlayerSendCancel(cid, "Lo siento, nesecitas esperas 1 minutos para mansar otro mensaje") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end local name = getPlayerName(cid) local level = getPlayerLevel(cid) if isCreature(cid) == TRUE then if param ~= nil then if string.len(param) < lenght then if level >= levelneeded then if doPlayerRemoveMoney(cid, cash) == TRUE then broadcastMessage( ''..name..' ['..level..'] dice: ' .. param .. '', messagesort) --exhaustion.set(cid, storageValue,exhaustTime) doAddCondition(cid, exhaust) return TRUE else doPlayerSendCancel(cid, 'Tu nesecitas '..cash..' gps para hacer un broadcast!') doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end else doPlayerSendCancel(cid, 'Tu nesecitas ser level '..levelneeded..' para hacer un broadcast!') doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end else doPlayerSendCancel(cid, 'No mas de ' .. lenght .. ' caracteres. ') doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end else doPlayerSendCancel(cid, 'Nesecitas escribir algo!') doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end else doPlayerSendCancel(cid, 'You haven\'t a target!') doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end return TRUE end
  18. blz galera bom dia, eu tenho esse talkaction no meu servidor, o meu sistema vip e por storage ai gostaria de bloquear esse comando só pra vips poder falar ---By Masterpako19--- --Config-- local cash = 500 -- Dinero que se nesecita para hacer el broadcast (en gps) local levelneeded = 8 -- Level necesario para hacer el broadcast local lenght = 100 -- Maximo de caracteres del mensaje local messagesort = MESSAGE_STATUS_WARNING -- can be "MESSAGE_STATUS_WARNING" or "TALKTYPE_ORANGE_1" check your global.lua for more... local exhaustTime = 1 * 60 * 1000 -- tiempo de exausted entre cada mensaje (para cambiar mas minutos cambia el 4 por x cantidad de minutos) local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, exhaustTime) --End of config-- function onSay(cid, words, param) if getCreatureCondition(cid, CONDITION_EXHAUST) == TRUE then doPlayerSendCancel(cid, "Lo siento, nesecitas esperas 1 minutos para mansar otro mensaje") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end local name = getPlayerName(cid) local level = getPlayerLevel(cid) if isCreature(cid) == TRUE then if param ~= nil then if string.len(param) < lenght then if level >= levelneeded then if doPlayerRemoveMoney(cid, cash) == TRUE then broadcastMessage( ''..name..' ['..level..'] dice: ' .. param .. '', messagesort) --exhaustion.set(cid, storageValue,exhaustTime) doAddCondition(cid, exhaust) return TRUE else doPlayerSendCancel(cid, 'Tu nesecitas '..cash..' gps para hacer un broadcast!') doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end else doPlayerSendCancel(cid, 'Tu nesecitas ser level '..levelneeded..' para hacer un broadcast!') doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end else doPlayerSendCancel(cid, 'No mas de ' .. lenght .. ' caracteres. ') doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end else doPlayerSendCancel(cid, 'Nesecitas escribir algo!') doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end else doPlayerSendCancel(cid, 'You haven\'t a target!') doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end return TRUE end
  19. Erro : [20/03/2016 23:55:50] [Error - CreatureScript Interface] [20/03/2016 23:55:51] data/creaturescripts/scripts/exp2.0.lua:onStatsChange [20/03/2016 23:55:51] Description: [20/03/2016 23:55:51] (luaGetItemAttribute) Item not found Script : local combats = { --alterado v1.6 \/ [PSYCHICDAMAGE] = {cor = COLOR_PSYCHIC}, [GRASSDAMAGE] = {cor = COLOR_GRASS}, [POISONEDDAMAGE] = {cor = COLOR_GRASS}, [FIREDAMAGE] = {cor = COLOR_FIRE2}, [BURNEDDAMAGE] = {cor = COLOR_BURN}, [WATERDAMAGE] = {cor = COLOR_WATER}, [ICEDAMAGE] = {cor = COLOR_ICE}, [NORMALDAMAGE] = {cor = COLOR_NORMAL}, [FLYDAMAGE] = {cor = COLOR_FLYING}, [GHOSTDAMAGE] = {cor = COLOR_GHOST}, [GROUNDDAMAGE] = {cor = COLOR_GROUND}, [ELECTRICDAMAGE] = {cor = COLOR_ELECTRIC}, [ROCKDAMAGE] = {cor = COLOR_ROCK}, [BUGDAMAGE] = {cor = COLOR_BUG}, [FIGHTDAMAGE] = {cor = COLOR_FIGHTING}, [DRAGONDAMAGE] = {cor = COLOR_DRAGON}, [POISONDAMAGE] = {cor = COLOR_POISON}, [DARKDAMAGE] = {cor = COLOR_DARK}, [STEELDAMAGE] = {cor = COLOR_STEEL}, [MIRACLEDAMAGE] = {cor = COLOR_PSYCHIC}, [DARK_EYEDAMAGE] = {cor = COLOR_GHOST}, [SEED_BOMBDAMAGE] = {cor = COLOR_GRASS}, [SACREDDAMAGE] = {cor = COLOR_FIRE2}, [MUDBOMBDAMAGE] = {cor = COLOR_GROUND} } --alterado v1.5 tabelas agora estao em lib/configuration.lua local function sendPlayerDmgMsg(cid, text) if not isCreature(cid) then return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, text) end local races = { [4] = {cor = COLOR_FIRE2}, [6] = {cor = COLOR_WATER}, [7] = {cor = COLOR_NORMAL}, [8] = {cor = COLOR_FIRE2}, [9] = {cor = COLOR_FIGHTING}, [10] = {cor = COLOR_FLYING}, [11] = {cor = COLOR_GRASS}, [12] = {cor = COLOR_POISON}, [13] = {cor = COLOR_ELECTRIC}, [14] = {cor = COLOR_GROUND}, [15] = {cor = COLOR_PSYCHIC}, [16] = {cor = COLOR_ROCK}, [17] = {cor = COLOR_ICE}, [18] = {cor = COLOR_BUG}, [19] = {cor = COLOR_DRAGON}, [20] = {cor = COLOR_GHOST}, [21] = {cor = COLOR_STEEL}, [22] = {cor = COLOR_DARK}, [1] = {cor = 180}, [2] = {cor = 180}, [3] = {cor = 180}, [5] = {cor = 180}, } local damages = {GROUNDDAMAGE, ELECTRICDAMAGE, ROCKDAMAGE, FLYDAMAGE, BUGDAMAGE, FIGHTINGDAMAGE, DRAGONDAMAGE, POISONDAMAGE, DARKDAMAGE, STEELDAMAGE} local fixdmgs = {PSYCHICDAMAGE, COMBAT_PHYSICALDAMAGE, GRASSDAMAGE, FIREDAMAGE, WATERDAMAGE, ICEDAMAGE, NORMALDAMAGE, GHOSTDAMAGE} local ignored = {POISONEDDAMAGE, BURNEDDAMAGE} --alterado v1.6 local cannotkill = {BURNEDDAMAGE, POISONEDDAMAGE} function onStatsChange(cid, attacker, type, combat, value) if combat == FLYSYSTEMDAMAGE then return false end if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV if not isCreature(attacker) then --alterado v1.5 cid == attacker if not isInArray(fixdamages, combat) and combats[combat] then doSendAnimatedText(getThingPos(cid), value, combats[combat].cor) end return true end local damageCombat = combat -------------------------------------------------- --alterado v1.6 retirado os combats sleep_powder e poison_powder daki! -------------------------------------------------- if type == STATSCHANGE_HEALTHGAIN then if cid == attacker then return true end if isSummon(cid) and isSummon(attacker) and canAttackOther(cid, attacker) == "Cant" then return false end return true end -------------------------------------------------- if isMonster(cid) then local valor = value if not pokes[getCreatureName(cid)] and damageCombat == COMBAT_PHYSICALDAMAGE then valor = getOffense(attacker) * playerDamageReduction doCreatureAddHealth(cid, -math.abs(valor), 3, races[7].cor) --alterado v1.6 dano nos npcs return false elseif not pokes[getCreatureName(cid)] and damageCombat ~= COMBAT_PHYSICALDAMAGE then doCreatureAddHealth(cid, -math.abs(valor), 3, combats[damageCombat].cor) return false end end -------------------------------------------------- if isPlayer(attacker) then local valor = value if valor > getCreatureHealth(cid) then valor = getCreatureHealth(cid) end if combat == COMBAT_PHYSICALDAMAGE then return false end if combat == PHYSICALDAMAGE then doSendMagicEffect(getThingPos(cid), 3) doSendAnimatedText(getThingPos(cid), valor, races[getMonsterInfo(getCreatureName(cid)).race].cor) end if combats[damageCombat] and not isInArray(fixdmgs, damageCombat) then doSendAnimatedText(getThingPos(cid), valor, combats[damageCombat].cor) end if #getCreatureSummons(attacker) >= 1 and not isInArray({POISONEDDAMAGE, BURNEDDAMAGE}, combat) then --doPlayerSendTextMessage(attacker, cid, 20, "Seu "..getPokeName(getCreatureSummons(attacker)[1]).." causou "..valor.." de dano no "..getSomeoneDescription(cid)..".") end return true end -------------------------------------------------- if isPlayer(cid) and #getCreatureSummons(cid) >= 1 and type == STATSCHANGE_HEALTHLOSS then --if ehMonstro(attacker) and getClosestFreeTile(getCreatureSummons(cid)[1]) >= 1 then --doSendAnimatedText(getThingPosWithDebug(attacker), "Hmpfg!", 215) --doMonsterSetTarget(attacker, getCreatureSummons(cid)[1]) --end return false end --if isPlayer(cid) and #getCreatureSummons(cid) >= 1 and type == STATSCHANGE_HEALTHLOSS then --if ehMonstro(attacker) and getClosestFreeTile(getCreatureSummons(cid)[1]) <= 0 then --doSendAnimatedText(getThingPosWithDebug(attacker), "Grrr!", 215) --doMonsterSetTarget(attacker, cid) --end --return true --end -------------------------------------------------- if isPlayer(cid) and #getCreatureSummons(cid) <= 0 and type == STATSCHANGE_HEALTHLOSS then if isSummon(attacker) or isPlayer(attacker) then if canAttackOther(cid, attacker) == "Cant" then return false end end local valor = 0 if combat == COMBAT_PHYSICALDAMAGE then valor = getOffense(attacker) else valor = getSpecialAttack(attacker) end valor = valor * playerDamageReduction valor = valor * math.random(83, 117) / 100 if valor >= getCreatureHealth(cid) then valor = getCreatureHealth(cid) end valor = math.floor(valor) if valor >= getCreatureHealth(cid) then if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then setPlayerStorageValue(cid, 6598754, -1) setPlayerStorageValue(cid, 6598755, -1) doRemoveCondition(cid, CONDITION_OUTFIT) doTeleportThing(cid, {x = 1001, y = 1026, z = 14}, false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) return false --alterado v1.8 elseif getPlayerStorageValue(cid, 577869) >= 1 then setPlayerStorageValue(cid, 577869, 0) doTeleportThing(cid, {x = 1009, y = 1084, z = 14}, false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) return false elseif getPlayerStorageValue(cid, 20000) >= 1 then setPlayerStorageValue(cid, 20000, 0) setPlayerStorageValue(cid,30,0) doTeleportThing(cid, {x = 1172, y = 1366, z = 7}, false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doPlayerSendTextMessage(cid, 20, "Você morreu no Saffari por Favor volte mais tarde!") return false elseif getPlayerStorageValue(cid, 20001) >= 1 then setPlayerStorageValue(cid,20001,0) doTeleportThing(cid, {x = 1371, y = 1240, z = 7}, false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doRemoveCondition(cid, CONDITION_OUTFIT) doPlayerSendTextMessage(cid, 20, "You are died in demon room, please come back!") return false end ------------------------------------------- --- if getPlayerStorageValue(cid, 18) >= 1 then setPlayerStorageValue(cid,18,0) doRemoveCondition(cid, CONDITION_OUTFIT) end ------------Saffari---------------------------------- if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, 17000, 0) setPlayerStorageValue(cid, 17001, 0) setPlayerStorageValue(cid, 63215, -1) doChangeSpeed(cid, PlayerSpeed) local item = getPlayerSlotItem(cid, 8) local btype = getPokeballType(item.itemid) if #getCreatureSummons(cid) <= 0 then if isInArray(pokeballs[btype].all, item.itemid) then doTransformItem(item.uid, pokeballs[btype].off) doItemSetAttribute(item.uid, "hp", 0) end end end ------------Edited Golden Arena------------------ if getPlayerStorageValue(cid, 22545) == 1 then if getGlobalStorageValue(22550) == 1 then doPlayerSendTextMessage(cid, 20, "Você foi o último sobrevivente da Golden Arena! Tome sua recompensa!") doPlayerAddItem(cid, 2160, getPlayerStorageValue(cid, 22551)*30/4) doPlayerAddExperience(cid, 1000, getPlayerStorageValue(cid, 22551)*30) setPlayerStorageValue(cid, 22545, -1) doTeleportThing(cid, getClosestFreeTile(cid, getClosestFreeTile(cid, posBackGolden)), false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid)) --setPlayerRecordWaves(cid) endGoldenArena() return false --alterado v1.8 else setGlobalStorageValue(22550, getGlobalStorageValue(22550)-1) setPlayerStorageValue(cid, 22545, -1) doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false) doPlayerAddItem(cid, 2152, getPlayerStorageValue(cid, 22551)*5) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid)) --setPlayerRecordWaves(cid) return true end end ---------------------------------- if getPlayerSex(cid) == 1 then local corpse = doCreateItem(3058, 1, getThingPos(cid)) doDecayItem(corpse) doItemSetAttribute(corpse, "name", "dead human (Vol:8). You recognize ".. getCreatureName(cid) ..". He was killed by a ".. getCreatureName(attacker) .."") elseif getPlayerSex(cid) == 0 then local corpse = doCreateItem(3065, 1, getThingPos(cid)) doDecayItem(corpse) doItemSetAttribute(corpse, "name", "dead human (Vol:8). You recognize ".. getCreatureName(cid) ..". She was killed by a ".. getCreatureName(attacker) .."") end end doCreatureAddHealth(cid, -valor, 3, 180) if not isPlayer(cid) then addEvent(sendPlayerDmgMsg, 5, cid, "Você perdeu "..valor.." em pontos de vida por um attack de "..getSomeoneDescription(attacker)..".") end return false end -------------------------------------------------- --if isMonster(attacker) and getPlayerStorageValue(attacker, 201) ~= -1 then -- if isPlayer(cid) then -- return false -- end -- if getPlayerStorageValue(getCreatureMaster(cid), ginasios[getPlayerStorageValue(attacker, 201)].storage) ~= 1 then -- return false -- end --end --------------------------------------------------- --if isMonster(cid) and getPlayerStorageValue(cid, 201) ~= -1 then -- if getPlayerStorageValue(getCreatureMaster(attacker), ginasios[getPlayerStorageValue(cid, 201)].storage) ~= 1 then -- return false -- end --end -------------------------------------------------- if ehMonstro(cid) and ehMonstro(attacker) then return false --edited monstro nao atacar monstro end -------------------------------------------------- --------------------REFLECT----------------------- if getPlayerStorageValue(cid, 21099) >= 1 and combat ~= COMBAT_PHYSICALDAMAGE then if not isInArray({"Team Claw", "Team Slice"}, getPlayerStorageValue(attacker, 21102)) then doSendMagicEffect(getThingPosWithDebug(cid), 135) doSendAnimatedText(getThingPosWithDebug(cid), "REFLECT", COLOR_GRASS) addEvent(docastspell, 100, cid, getPlayerStorageValue(attacker, 21102)) if getCreatureName(cid) == "Wobbuffet" then doRemoveCondition(cid, CONDITION_OUTFIT) end setPlayerStorageValue(cid, 21099, -1) --alterado v1.6 setPlayerStorageValue(cid, 21100, 1) setPlayerStorageValue(cid, 21101, attacker) setPlayerStorageValue(cid, 21103, getTableMove(attacker, getPlayerStorageValue(attacker, 21102)).f) setPlayerStorageValue(cid, 21104, getCreatureOutfit(attacker).lookType) return false end end ------------------------------------------------- local multiplier = 1 if isCreature(cid) then poketype1 = pokes[getCreatureName(cid)].type --alterado v1.6 poketype2 = pokes[getCreatureName(cid)].type2 end if not poketype1 or not poketype2 then return false end --alterado v1.6 if getCreatureCondition(cid, CONDITION_INVISIBLE) then return false end if damageCombat ~= COMBAT_PHYSICALDAMAGE and not isInArray(ignored, damageCombat) then if isInArray(effectiveness[damageCombat].super, poketype1) then multiplier = multiplier + 0.5 end if isInArray(effectiveness[damageCombat].super, poketype2) then multiplier = multiplier + 0.5 end if isInArray(effectiveness[damageCombat].weak, poketype1) then --Edited effetivenes = pxg... ;p multiplier = multiplier - 0.25 end if isInArray(effectiveness[damageCombat].weak, poketype2) then multiplier = multiplier - 0.25 end if isInArray(effectiveness[damageCombat].non, poketype1) or isInArray(effectiveness[damageCombat].non, poketype2) then if isInArray(specialabilities["foresight"], getCreatureName(attacker)) then --alterado v1.5 multiplier = 0.5 end --alterado v1.6 end -- X-Attack -- if isSummon(attacker) and isPlayer(getCreatureMaster(attacker)) then local TierArray = {8, 9, 10, 11, 12, 13, 14} local Tiers = { [8] = {bonus = AtkBonus1}, [9] = {bonus = AtkBonus2}, [10] = {bonus = AtkBonus3}, [11] = {bonus = AtkBonus4}, [12] = {bonus = AtkBonus5}, [13] = {bonus = AtkBonus6}, [14] = {bonus = AtkBonus7}, } local ball = getPlayerSlotItem(getCreatureMaster(attacker), 8) local Tier = getItemAttribute(ball.uid, "heldx") local bonusatk = {} if isInArray(TierArray, getItemAttribute(ball.uid, "heldx")) then bonusatk = Tiers[Tier].bonus else bonusatk = 1 end multiplier = multiplier * bonusatk end -- X-Attack -- elseif combat == COMBAT_PHYSICALDAMAGE then if isGhostPokemon(cid) then --alterado v1.3 if not isInArray(specialabilities["foresight"], getCreatureName(attacker)) then --passiva Foresight!! doSendMagicEffect(getThingPos(cid), 3) return false end end local cd = getPlayerStorageValue(attacker, conds["Miss"]) local cd2 = getPlayerStorageValue(attacker, conds["Confusion"]) local cd3 = getPlayerStorageValue(attacker, conds["Stun"]) if cd >= 0 or cd2 >= 0 or cd3 >= 0 then if math.random(1, 100) > 50 then --Edited miss system -- 50% chance de da miss no atk fisico doSendMagicEffect(getThingPos(cid), 211) doSendAnimatedText(getThingPos(attacker), "MISS", 215) --alterado v1.5 return false end end end -------------------------------------------------- local valor = value if multiplier == 1.5 and poketype2 == "no type" then multiplier = 2 --alterado v1.6 elseif multiplier == 1.5 and poketype2 ~= "no type" then multiplier = 1.75 elseif multiplier == 1.25 then --edited effetivines = pxg multiplier = 1 end -------------------------------------------------- if isSummon(cid) and isSummon(attacker) then if getCreatureMaster(cid) == getCreatureMaster(attacker) then return false end if canAttackOther(cid, attacker) == "Cant" then return false end end valor = valor * multiplier if isSummon(attacker) then valor = valor * getHappinessRate(attacker) else valor = valor * summonReduction end valor = math.floor(valor) if combat == COMBAT_PHYSICALDAMAGE then block = 1 - (getDefense(cid) / (getOffense(attacker) + getDefense(cid))) valor = getOffense(attacker) * block if isInArray(specialabilities["counter"], getCreatureName(cid)) then if math.random(1, 100) <= 10 then doCreatureAddHealth(attacker, -valor, 3, 180) valor = 0 doSendAnimatedText(getThingPosWithDebug(cid), "COUNTER", 215) end end -- Return -- if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then local returnbonus = {} local ball = getPlayerSlotItem(getCreatureMaster(cid), 8) local Tiers = { [15] = {bonus = DmgReturn1}, [16] = {bonus = DmgReturn2}, [17] = {bonus = DmgReturn3}, [18] = {bonus = DmgReturn4}, [19] = {bonus = DmgReturn5}, [20] = {bonus = DmgReturn6}, [21] = {bonus = DmgReturn7}, } local Tier = getItemAttribute(ball.uid, "heldx") if Tier and Tier > 14 and Tier < 22 then returnbonus = math.floor((valor * Tiers[Tier].bonus)) elseif not isInArray(Tiers, Tier) then returnbonus = 0 end doCreatureAddHealth(attacker, -returnbonus) end -- Return -- else -- Return -- if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then local returnbonus = {} local ball = getPlayerSlotItem(getCreatureMaster(cid), 8) local Tiers = { [15] = {bonus = DmgReturn1}, [16] = {bonus = DmgReturn2}, [17] = {bonus = DmgReturn3}, [18] = {bonus = DmgReturn4}, [19] = {bonus = DmgReturn5}, [20] = {bonus = DmgReturn6}, [21] = {bonus = DmgReturn7}, } local Tier = getItemAttribute(ball.uid, "heldx") if Tier and Tier > 14 and Tier < 22 then returnbonus = math.floor((valor * Tiers[Tier].bonus)) elseif not isInArray(Tiers, Tier) then returnbonus = 0 end doCreatureAddHealth(attacker, -returnbonus) end -- Return -- valor = valor / getDefense(cid) end -------------------------Edited CLAN SYSTEM----------------------------------- if isSummon(attacker) and getPlayerStorageValue(getCreatureMaster(attacker), 86228) >= 1 then valor = valor*getClanPorcent(getCreatureMaster(attacker), combat, "atk") --alterado v1.3 elseif isSummon(cid) and getPlayerStorageValue(getCreatureMaster(cid), 86228) >= 1 then valor = valor - (valor*getClanPorcent(getCreatureMaster(cid), combat, "def", pokes[getCreatureName(cid)].type, pokes[getCreatureName(cid)].type2)) end ----------------------------------------------------------------------- ---------------------- FEAR / ROAR ------------------------------------ if getPlayerStorageValue(attacker, conds["Fear"]) >= 1 then --alterado!! return true end -------------------------------------------------------------------------- if damageCombat ~= COMBAT_PHYSICALDAMAGE and not isInArray(ignored, damageCombat) then if isInArray(effectiveness[damageCombat].non, poketype1) or isInArray(effectiveness[damageCombat].non, poketype2) then if not isInArray(specialabilities["foresight"], getCreatureName(attacker)) then --alterado v1.6 valor = valor * 0 --alterado v1.5 end end end if damageCombat == GROUNDDAMAGE then if isInArray(specialabilities["levitate"], getCreatureName(cid)) then valor = 0 --alterado v1.5 end end ----------------------------------------------------------------------------- local p = getThingPos(cid) if p.x == 1 and p.y == 1 and p.z == 10 then return false end if getPlayerStorageValue(cid, 9658783) == 1 then return false --imune end ----------------------------------------------------------------------------- if valor >= getCreatureHealth(cid) then if isInArray(cannotKill, combat) and isPlayer(cid) then valor = getCreatureHealth(cid) - 1 else valor = getCreatureHealth(cid) end end valor = math.floor(valor) --alterado v1.6 ------------------ SKILLs Q CURAM O ATTACKER --------------------------------- local function doHeal(cid, amount) if (getCreatureHealth(cid) + amount) >= getCreatureMaxHealth(cid) then amount = math.abs(getCreatureHealth(cid)-getCreatureMaxHealth(cid)) end if getCreatureHealth(cid) ~= getCreatureMaxHealth(cid) then --alterado v1.6 doCreatureAddHealth(cid, amount) doSendAnimatedText(getThingPosWithDebug(cid), "+"..amount.."", 65) end end if damageCombat == PSYCHICDAMAGE or damageCombat == MIRACLEDAMAGE then if getPlayerStorageValue(attacker, 95487) >= 1 then doHeal(attacker, valor) setPlayerStorageValue(attacker, 95487, -1) --alterado v1.6 end elseif damageCombat == SEED_BOMBDAMAGE then doHeal(attacker, valor) end -------------------------------------------- ----------SACRED FIRE----------------------- if combat == SACREDDAMAGE and not ehNPC(cid) then --alterado v1.6 local ret = {} ret.id = cid ret.cd = 9 ret.check = getPlayerStorageValue(cid, conds["Silence"]) ret.eff = 39 ret.cond = "Silence" doCondition2(ret) end --------------------------------------------- --------------Passiva Lifesteal Clobat------------ if combat == COMBAT_PHYSICALDAMAGE then if getCreatureName(attacker) == "Crobat" then --alterado v1.4 doCreatureAddHealth(attacker, math.floor(valor)) doSendAnimatedText(getThingPos(attacker), "+ "..math.floor(valor), 30) end end -------------------------------------------- --------------Passiva Lifesteal Clobat------------ if combat == COMBAT_PHYSICALDAMAGE then if getCreatureName(attacker) == "Golbat" then --alterado v1.4 doCreatureAddHealth(attacker, math.floor(valor)) doSendAnimatedText(getThingPos(attacker), "+ "..math.floor(valor), 30) end end -------------------------------------------- --------------Passiva Lifesteal Clobat------------ if combat == COMBAT_PHYSICALDAMAGE then if getCreatureName(attacker) == "Zubat" then --alterado v1.4 doCreatureAddHealth(attacker, math.floor(valor)) doSendAnimatedText(getThingPos(attacker), "+ "..math.floor(valor), 30) end end -------------------------------------------- --------------Passiva Lifesteal Clobat------------ if combat == COMBAT_PHYSICALDAMAGE then if getCreatureName(attacker) == "Shiny Crobat" then --alterado v1.4 doCreatureAddHealth(attacker, math.floor(valor)) doSendAnimatedText(getThingPos(attacker), "+ "..math.floor(valor), 30) end end -------------------------------------------- --------------Passiva Lifesteal Clobat------------ if combat == COMBAT_PHYSICALDAMAGE then if getCreatureName(attacker) == "Shiny Golbat" then --alterado v1.4 doCreatureAddHealth(attacker, math.floor(valor)) doSendAnimatedText(getThingPos(attacker), "+ "..math.floor(valor), 30) end end -------------------------------------------- --------------Passiva Lifesteal Clobat------------ if combat == COMBAT_PHYSICALDAMAGE then if getCreatureName(attacker) == "Shiny Zubat" then --alterado v1.4 doCreatureAddHealth(attacker, math.floor(valor)) doSendAnimatedText(getThingPos(attacker), "+ "..math.floor(valor), 30) end end -------------------------------------------- valor = math.abs(valor) --alterado v1.9 if isSummon(cid) and valor >= getCreatureHealth(cid) then onPokeHealthChange(getCreatureMaster(cid), true) elseif isSummon(cid) then onPokeHealthChange(getCreatureMaster(cid)) end if isSummon(attacker) then if combat == COMBAT_PHYSICALDAMAGE then doTargetCombatHealth(getCreatureMaster(attacker), cid, PHYSICALDAMAGE, -valor, -valor, 255) addEvent(doDoubleHit, 1000, attacker, cid, valor, races) --alterado v1.6 else doTargetCombatHealth(getCreatureMaster(attacker), cid, damageCombat, -valor, -valor, 255) end else if combat ~= COMBAT_PHYSICALDAMAGE then doCreatureAddHealth(cid, -math.abs(valor), 3, combats[damageCombat].cor) else doCreatureAddHealth(cid, -math.abs(valor), 3, races[getMonsterInfo(getCreatureName(cid)).race].cor) addEvent(doDoubleHit, 1000, attacker, cid, valor, races) --alterado v1.6 end if isSummon(cid) and valor ~= 0 then --addEvent(sendPlayerDmgMsg, 5, getCreatureMaster(cid), "Seu "..getCreatureName(cid).." perdeu "..valor.." de vida pelo attack do "..getSomeoneDescription(attacker)..".") end end if damageCombat == FIREDAMAGE and not isBurning(cid) then local ret = {} ret.id = cid ret.cd = math.random(5, 12) ret.check = getPlayerStorageValue(cid, conds["Burn"]) ret.damage = isSummon(attacker) and getMasterLevel(attacker)+getPokemonBoost(attacker) or getPokemonLevel(attacker) ret.cond = "Burn" doCondition2(ret) elseif damageCombat == POISONDAMAGE and not isPoisoned(cid) then local ret = {} ret.id = cid ret.cd = math.random(6, 15) ret.check = getPlayerStorageValue(cid, conds["Poison"]) local lvl = isSummon(attacker) and getMasterLevel(attacker) or getPokemonLevel(attacker) ret.damage = math.floor((getPokemonLevel(attacker)+lvl)/2) ret.cond = "Poison" doCondition2(ret) end --[[---------------CD BAR----------------------- if isSummon(cid) then doCreatureExecuteTalkAction(getCreatureMaster(cid), "/pokeread") end ]] ------------------------------------POTIONS------------------------------------------- if isSummon(cid) and type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(cid, 173) >= 1 then if damageCombat ~= BURNEDDAMAGE and damageCombat ~= POISONEDDAMAGE then setPlayerStorageValue(cid, 173, -1) --alterado v1.6 doSendAnimatedText(getThingPos(cid), "LOST HEAL", 144) end end end ----------------------------------------PASSIVAS------------------------------------- --alterado v1.6 \/ todas as passivas agora estao em lib/pokemon moves.lua -------------------------------------------Counter Helix------------------------------------ if passivesChances["Helix"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Helix"][getCreatureName(cid)] then docastspell(cid, "Counter Helix") end -------------------------------------------Lava-Counter---------------------------- if passivesChances["Lava"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Lava"][getCreatureName(cid)] then docastspell(cid, "Lava-Counter") end -------------------------------------------Shock-Counter---------------------------- if passivesChances["Shock"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Shock"][getCreatureName(cid)] then docastspell(cid, "Shock-Counter") end -------------------------------------------Bone Spin---------------------------- if passivesChances["Bone"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Bone"][getCreatureName(cid)] then docastspell(cid, "Bone-Spin") end ---------------------------------------Stunning Confusion----------------------------------------- if passivesChances["Stunning"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Stunning"][getCreatureName(cid)] then docastspell(cid, "Stunning Confusion") end --------------------------------------Electric Charge--------------------------------------------- if passivesChances["Electric Charge"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Electric Charge"][getCreatureName(cid)] then docastspell(cid, "Electric Charge", 0, 0) end -------------------------------------Melody------------------------------------ if passivesChances["Melody"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Melody"][getCreatureName(cid)] then docastspell(cid, "Melody") end ------------------------------------- Dragon Fury / Fury --------------------------------------- if passivesChances["Dragon Fury"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Dragon Fury"][getCreatureName(cid)] then docastspell(cid, "Dragon Fury", 0, 0) end ------------------------------------- Mega Drain --------------------------------------- if passivesChances["Mega Drain"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Mega Drain"][getCreatureName(cid)] then docastspell(cid, "Mega Drain") end ------------------------------------- Spores Reaction --------------------------------------- if passivesChances["Spores Reaction"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Spores Reaction"][getCreatureName(cid)] then docastspell(cid, "Spores Reaction") end ------------------------------------ Amnesia ---------------------------------------- if passivesChances["Amnesia"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Amnesia"][getCreatureName(cid)] then docastspell(cid, "Amnesia", 0, 0) end ----------------------------------- Zen Mind ----------------------------------------- if passivesChances["Zen Mind"][getCreatureName(cid)] and isWithCondition(cid) and math.random(1, 100) <= passivesChances["Zen Mind"][getCreatureName(cid)] then docastspell(cid, "Zen Mind", 0, 0) end ---------------------------------- Mirror Coat --------------------------------------- if passivesChances["Mirror Coat"][getCreatureName(cid)] and math.random(1, 80) <= passivesChances["Mirror Coat"][getCreatureName(cid)] then docastspell(cid, "Mirror Coat", 0, 0) end --------------------------------- Illusion ----------------------------------------- return false end
  20. fala galera gostaria q fosse removido do script o tile (VIP) q os players ganha somente isso, pq isso buga da pra criar msm nick do cara depois local lever = { [7045] = {30,30,{2160}} } function onUse(cid,item,fromPosition,itemEx,toPosition) if getPoints(cid) < lever[item.actionid][1] then return doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Você precisa de "..lever[item.actionid][1].." points.") end removePoints(cid,lever[item.actionid][1]) local add = (lever[item.actionid][2]*86400) setPlayerStorageValue(cid, 85258, getPlayerStorageValue(cid, 85258) - os.time() <= 0 and (os.time() + add) or (getPlayerStorageValue(cid, 85258) + add)) local quantity = math.floor((getPlayerStorageValue(cid, 85258) - os.time())/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") for _, items in pairs(lever[item.actionid][3]) do doPlayerAddItem(cid,items,1) end if not getCreatureName(cid):find('(VIP)') then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) db.executeQuery("UPDATE `players` SET `name` = '(VIP) "..getCreatureName(cid).."' WHERE `id` = "..getPlayerGUID(cid)..";") addEvent(doRemoveCreature, 3*1000, cid) end return true end
  21. Ola galera eu tenho este evento nomeu servidor porem tenho que ficar entrando no Gm todo dia para abrilo-lo e acaba sendo cansativo... eu gostaria de saber se alguem poderia criar um script de globalevent para que ele seja aberto automaticamente todos os dias a X horario e fechado 2 horas depois que iniciou.. Pq ser fechado 2 horas depois de iniciado ? pq este é um evento onde os players entram numa arena eao se matarem ganham XP.. entao gostaria quue fosse aberto X hora e fechasse depois de x horas que abriu.. atualmente os players entram no evento atraves de um npc que so os teletransporta quando o evento e aberto pelo GM atraves do comando /fps open.. segue abaixo tudo que foi instalado no servidor a respeito deste evento.. TFS 0.4 data/Lib Data/Npc.xml Data / Xml / Channels
  22. Estou com 1 problema com sistema de distribuição de pontos quando crio 1 personagem ele ja aparece com -1 ponto, conforme o char for upando era para ele ganhar pontos para distribuir mais isso não acontece, resumindo o personagem não recebe pontos quando upa para fazer a distribuição, baixo tem a imagem e o script. Creatures Script local function addSkills(player, skillId) player:addSkillTries(skillId, math.ceil(player:getVocation():getRequiredSkillTries(skill, player:getSkillLevel(skill) + 1) / configManager.getNumber(configKeys.RATE_SKILL))) return false end local skillids = { ["shield"] = SKILL_SHIELD, ["sword"] = SKILL_SWORD, ["axe"] = SKILL_AXE, ["club"] = SKILL_CLUB, ["fist"] = SKILL_FIST, ["dist"] = SKILL_DISTANCE } local attributes = { ["health"] = {reqPoints = 1, increaseBy = 2, name = "Hit Points"}, ["mana"] = {reqPoints = 1, increaseBy = 2, name = "Mana Points"}, ["magic"] = {reqPoints = 15, increaseBy = 1, name = "Magic Level"}, ["shielding"] = {reqPoints = 15, increaseBy = 1, name = "Shielding Skill"}, ["sword"] = {reqPoints = 15, increaseBy = 1, name = "Sword Skill"}, ["axe"] = {reqPoints = 15, increaseBy = 1, name = "Axe Skill"}, ["club"] = {reqPoints = 15, increaseBy = 1, name = "Club Skill"}, ["fist"] = {reqPoints = 15, increaseBy = 1, name = "Fist Skill"}, ["distance"] = {reqPoints = 15, increaseBy = 1, name = "Distance Skill"}, } function onModalWindow(player, modalWindowId, buttonId, choiceId) local SKILL_POINTS = 45200 --- Change here the storage value used to save the skill points local points = player:getStorageValue(SKILL_POINTS) local function sendCancel() player:sendTextMessage(MESSAGE_INFO_DESCR, "You do not have the required amount of Skill Points!") end local function doAddHealth(param, attributes) player:setMaxHealth(player:getMaxHealth() + attributes["health"].increaseBy*param) player:addHealth(attributes["health"].increaseBy*param) player:setStorageValue(SKILL_POINTS, points - attributes["health"].reqPoints*param) player:sendTextMessage(MESSAGE_INFO_DESCR, "You have gained " ..attributes["health"].increaseBy.. " " ..attributes["health"].name.. "!") return true end local function doAddMana(param, attributes) player:setMaxMana(player:getMaxMana() + attributes["mana"].increaseBy*param) player:addMana(attributes["mana"].increaseBy*param) player:setStorageValue(SKILL_POINTS, points - attributes["mana"].reqPoints*param) player:sendTextMessage(MESSAGE_INFO_DESCR, "You have gained " ..attributes["mana"].increaseBy.. " " ..attributes["mana"].name.. "!") return true end if (not modalWindowId == 1) or (buttonId == 4) then return false end if choiceId == 1 then if buttonId == 1 then if points >= attributes["health"].reqPoints then doAddHealth(1, attributes) else sendCancel() end end if buttonId == 2 then if points >= attributes["health"].reqPoints*2 then doAddHealth(2, attributes) else sendCancel() end end if buttonId == 3 then if points >= attributes["health"].reqPoints*5 then doAddHealth(5, attributes) else sendCancel() end end end if choiceId == 2 then if buttonId == 1 then if points >= attributes["mana"].reqPoints then doAddMana(1, attributes) else sendCancel() end end if buttonId == 2 then if points >= attributes["mana"].reqPoints*2 then doAddMana(2, attributes) else sendCancel() end end if buttonId == 3 then if points >= attributes["mana"].reqPoints*5 then doAddMana(5, attributes) else sendCancel() end end end if choiceId == 3 then if buttonId == 1 then if points >= attributes["magic"].reqPoints then player:addManaSpent(math.ceil(player:getVocation():getRequiredManaSpent(player:getBaseMagicLevel() + 1) / configManager.getNumber(configKeys.RATE_MAGIC))) player:setStorageValue(SKILL_POINTS, points - attributes["magic"].reqPoints) else sendCancel() end end if buttonId == 2 then if points >= attributes["magic"].reqPoints*2 then for i = 1,2 do player:addManaSpent(math.ceil(player:getVocation():getRequiredManaSpent(player:getBaseMagicLevel() + 1) / configManager.getNumber(configKeys.RATE_MAGIC))) player:setStorageValue(SKILL_POINTS, points - attributes["magic"].reqPoints) end else sendCancel() end end if buttonId == 3 then if points >= attributes["magic"].reqPoints*5 then for i = 1,5 do player:addManaSpent(math.ceil(player:getVocation():getRequiredManaSpent(player:getBaseMagicLevel() + 1) / configManager.getNumber(configKeys.RATE_MAGIC))) player:setStorageValue(SKILL_POINTS, points - attributes["magic"].reqPoints) end else sendCancel() end end end if choiceId == 4 then if buttonId == 1 then if points >= attributes["sword"].reqPoints then addSkills(player, skillids["sword"]) end end if buttonId == 2 then if points >= attributes["sword"].reqPoints*2 then for i = 1,2 do addSkills(player, skillids["sword"]) end else sendCancel() end end if buttonId == 3 then if points >= attributes["sword"].reqPoints*5 then for i = 1,5 do addSkills(player, skillids["sword"]) end else sendCancel() end end end if choiceId == 5 then if buttonId == 1 then if points >= attributes["axe"].reqPoints then addSkills(player, skillids["axe"]) end else sendCancel() end if buttonId == 2 then if points >= attributes["axe"].reqPoints*2 then for i = 1,2 do addSkills(player, skillids["axe"]) end else sendCancel() end end if buttonId == 3 then if points >= attributes["axe"].reqPoints*5 then for i = 1,5 do addSkills(player, skillids["axe"]) end else sendCancel() end end end if choiceId == 6 then if buttonId == 1 then if points >= attributes["club"].reqPoints then addSkills(player, skillids["club"]) end else sendCancel() end if buttonId == 2 then if points >= attributes["club"].reqPoints*2 then for i = 1,2 do addSkills(player, skillids["club"]) end else sendCancel() end end if buttonId == 3 then if points >= attributes["club"].reqPoints*5 then for i = 1,5 do addSkills(player, skillids["club"]) end else sendCancel() end end end if choiceId == 7 then if buttonId == 1 then if points >= attributes["shielding"].reqPoints then addSkills(player, skillids["shield"]) end else sendCancel() end if buttonId == 2 then if points >= attributes["shielding"].reqPoints*2 then for i = 1,2 do addSkills(player, skillids["shield"]) end else sendCancel() end end if buttonId == 3 then if points >= attributes["shielding"].reqPoints*5 then for i = 1,5 do addSkills(player, skillids["shield"]) end else sendCancel() end end end if choiceId == 8 then if buttonId == 1 then if points >= attributes["distance"].reqPoints then addSkills(player, skillids["dist"]) end else sendCancel() end if buttonId == 2 then if points >= attributes["distance"].reqPoints*2 then for i = 1,2 do addSkills(player, skillids["dist"]) end else sendCancel() end end if buttonId == 3 then if points >= attributes["distance"].reqPoints*5 then for i = 1,5 do addSkills(player, skillids["dist"]) end else sendCancel() end end end end local SkillPoints = { [1] = 1, [2] = 1, [3] = 1, [4] = 1, [5] = 1, [6] = 1, [7] = 1, [8] = 1, } function onAdvance(player, skill, oldlevel, newlevel) local cid = player:getId() if not (SkillPoints[getPlayerVocation(cid)]) then return true end if (skill == 8) then if (getPlayerStorageValue(cid, 14573) < newlevel) then if (getPlayerStorageValue(cid, 14574) < 0) then setPlayerStorageValue(cid, 14574, 0) setPlayerStorageValue(cid, 14573, 0) end setPlayerStorageValue(cid, 14573, newlevel) setPlayerStorageValue(cid, 14574, getPlayerStorageValue(cid, 14574) + (newlevel - oldlevel) * (SkillPoints[getPlayerVocation(cid)])) doCreatureSay(cid, '+1 Skill Point!', TALKTYPE_MONSTER_SAY) end end return true end Talkaction Script function onSay(player, words, param) local SKILL_POINTS = 45200 local Point = ModalWindow(1, "Skill Points", "You have skill " ..player:getStorageValue(SKILL_POINTS).. " points make your choice:\n\n Skill Required Points Increase Amount") Point:addChoice(1, "1. Health 1 2") Point:addChoice(2, "2. Mana") Point:addChoice(3, "3. Magic Level") Point:addChoice(4, "4. Sword") Point:addChoice(5, "5. Axe") Point:addChoice(6, "6. Club") Point:addChoice(7, "7. Shielding") Point:addChoice(8, "8. Distance") Point:addButton(1, 'Gain 1') Point:addButton(2, 'Gain 2') Point:addButton(3, 'Gain 5') Point:addButton(4, 'Cancel') player:registerEvent("PointWindow") Point:sendToPlayer(player) return false end Resolvido...
  23. Bom eu coloquei tile level no meu servidor, mas ele não funfa... todos os leveis podem passar nele..... Script do movements.xml <movevent type="StepIn" actionid="24003" event="script" value="tilelevel.lua"/> Script do movements\scripts function onStepIn(cid, item, position, fromPosition) level = 600 if getPlayerLevel(cid) < level then doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) doPlayerSendCancel(cid,"Only level " .. level .. " or more can pass here.") end return TRUE end Como arrumar?
  24. Meu erro é o seguinte ! [18/03/2016 17:15:36] [Warning - Spells::registerEvent] Duplicate registered instant spell with words: spell022 [18/03/2016 17:15:36] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/rainitems_command.lua:5: unexpected symbol near '[' [18/03/2016 17:15:36] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/rainitems_command.lua) [18/03/2016 17:15:36] data/talkactions/scripts/rainitems_command.lua:5: unexpected symbol near '[' Script >>\/ local config = { items = {{2391,1}, {2392,2}, {2160,10}, {11638,1}, {11639,1}, {11640,1}, {14185,1}, {14188,1}, {14186, 1}}, interval = 1000, -- time between checks areas = [1] = { waves = 2, interval = 10000, chancePerTile = 10, -- % maxItemsPerWave = 7, from = {x = 1047, y = 1055, z = 7}, to = {x = 1071, y = 1060, z = 7} }, } function Position.isPathable(pos) local tile = Tile(pos) if tile == nil then return false end return not tile:hasFlag(TILESTATE_BLOCKSOLID) end function rainWave(arena) local from = config.areas[arena].from local to = config.areas[arena].to local items_spawned = 0 for x = from.x, to.x do for y = from.y, to.y do for z = from.z, to.z do if math.random(1, 100) < config.areas[arena].chancePerTile and items_spawned < config.areas[arena].maxItemsPerWave then local pos = {x = x, y = y, z = z} if Position(pos):isPathable() then local item = math.random(1, #config.items) doCreateItem(config.items[item][1], math.random(1, config.items[item][2]), pos) Position(pos):sendMagicEffect(CONST_ME_MAGIC_RED) items_spawned = items_spawned + 1 end end end end end end function startRain(arena) broadcastMessage("Uma Chuva de ITENS vem AE!") for i = 1, config.areas[arena].waves do if i == 1 then rainWave(arena) else addEvent(rainWave, config.areas[arena].interval * (i - 1), arena) end end addEvent(broadcastMessage, config.areas[arena].interval * (config.areas[arena].waves - 1), "Chuva PAROU.") end function onSay(player, words, param) if not player:getGroup():getAccess() then return false end if tonumber(param) then startRain(tonumber(param)) else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, words .. " eventid") end return false end
  25. fala galera bom dia, aqui tem dois comendo no meu servidor um é falar em vermelho pra geral e outro e o outfit newtype, meu servidor ja tem vip gostaria de saber como faço pra só pra quem tem vip pode usar esses dois comandos, obrigado
×
×
  • Criar Novo...