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. Piabeta Kun

    MCQ

    minha cara quando descubro que o kissy eh o skyligh
  2. Olá amigos, tenho um OT mapa baiak, estou com o sql muito carregado de players, estou com cerca de 400 players no sql, sendo que tem apenas 150 jogando... Pedido: quero algum script que delete esses players inativos, com 12 dias de inatividade, independente do level. Problema: ja testei varios scripts de outros sites e ate mesmo daqui, nao consegui arrumar nenhum 100%, ja executei na SQL esse seguinte comando, mas da error... -DELETE FROM `players` WHERE `level` < 50 AND `lastlogin` < UNIX_TIMESTAMP() - 20 * 24 * 60 * 60 O ERROR FALA ALGUMA COISA SOBRE UNIX_TIMESTAMP.. Ja tentei tambem um que é pelo globalevents, acho que o nome é dbclean... algo assim, mas da erro na distro... MINHA DISTRO É A TFS 0.36, DA OTLAND, OU A DO MAPA BASE DO BAIAK BARAO, QUE A A ALISSOW, uso as 2 pq roda perfeito com alto uptime. Me ajudem por favor ---------------------------------------------------------- Um membro de outro forum me falou o seguinte: VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV Esse unix_timestamp não funciona corretamente no SQLite Studio, e sim no MySQL eu acho que você pode optar por outro jeito Crie uma talkaction qualquer e execute ela in-game function onSay(cid, words, param) db.query("DELETE FROM `players` WHERE `level` < 50 AND `name` <> `Account Manager` AND `lastlogin` < ".. os.time() - 20 * 24 * 60 * 60) return true end 20 * 24 * 60 * 60 = tempo em segundos de inatividade. 20 * 24 * 60 * 60 = 20 dias offline. 40 * 24 * 60 * 60 = 40 dias offline. ------------------------------------------------------------------------------- Eu n sei se fiz corretamente, mas n deu certo aqui... quando eu executo o comando, da erro na distro! Estou desesperado pq quando o ot vai salvar, demora muito! ME AJUDEM POR FAVOR!
  3. ola pessoas, venho aqui no nobre xtibia para fazer um pedido. uma talkaction do tipo /abrir tempo , exemplo /abrir 60 , abriria uma passagem por 60 minutos ou pode por 60 minutos fixos no script deixando somente o /abrir e esse /abrr tiraria uma grade dessa por 1 hora e depois de uma hora ela voltasse
  4. Então se queria saber se alguém poderia fazer uma spell ou talkaction que quando eu escrevesse !bug ou !cp algo do tipo eu voltasse para o CP mais que não funcione quando a monstros atacando.
  5. Fala galera, tudo bem? Semana passada abri uma dúvida perguntando se alguém conhecia algum jeito de players compartilharem o mesmo espaço no mapa sem interagirem entre si, como se fossem duas dimensões separadas. Ninguém soube me dar uma solução que fizesse exatamente isso, porém, o Danihcv me deu uma luz sugerindo que eu fizesse algo próximo de um instanciador de mapa. Ou seja, uma forma de clonar automaticamente um pedaço do mapa desejado sem ter que criar mil vezes no map editor. Ainda estou trabalhando na automação do mesmo - pretendo fazer um sistema, sem ser talkaction, que sempre que for necessário ele instancia uma novo espaço para aquele mesmo mapa. Esta é uma primeira versão, feita em talkaction pois achei melhor de trabalhar num primeiro momento e testar todas as funções que eu queria adicionar, ela faz basicamente cópia de uma área do mapa. Pro projeto que eu pensei para esse sistema é suficiente que ele suporte somente mapas do mesmo tamanho e, portanto, foquei em atender esse requisito. Ainda sim, é possível trabalhar com mapas de tamanhos diferentes, desde que eles fiquem em linhas diferentes. Vamos lá Primeiramente, eu fiz um banco de funções que foram utilizadas ou serão úteis mais para frente. Em lib, crie um arquivo chamado cloneMap.lua e adicione o código abaixo: As funções estão todas funcionando, porém algumas não foram utilizadas nessa versão, ficam de bônus pra vocês. Depois disso, vá em talkactions.xml adicione a tag: <talkaction words="!clonemap" event="script" value="cmap.lua"/> Feito isso, crie dentro de scripts um arquivo chamado cmap.lua e adicione o código abaixo: Por último, vá em globalevents/scripts e abra o arquivo start.lua. Dentro da função onStartup(), antes do return true, adicione as 3 linhas a seguir: setGlobalStorageValue(5546, -1) setGlobalStorageValue(5547, -1) setGlobalStorageValue(5548, -1) Pronto. Agora algumas configurações que você deve fazer de acordo com seu mapa: emptySpaceBeginPos - É a posição no mapa onde começa a área vazia que você determinou para a criação das instâncias (Canto superior esquerdo da área, ela cresce para direita até o fim do mapa e depois para baixo e se encerra quando o mapa acaba). Storages - Storages globais onde serão armazenadas os próximos valores X, Y e Z a serem utilizados. (A progressão no eixo z ainda não foi implementada, mas a lógica é a mesma). safe_dist - É a distância entre os mapas, você pode variar de acordo com a utilização que vai dar ao mapa. Feito isso, está pronto para utilizar o Instanciador de Mapas V1.0. Como funciona: !clonemap CenterX CenterY CenterZ Side Floors Centers (X, Y e Z) são as coordenadas centrais do seu mapa (e Z é o floor mais baixo do mapa, caso ele seja multi floor, isto é o floor de valor mais alto - ex, se o seu mapa vai de z=7 até z =10, use CenterZ = 10). Side é a distância entre o centro e uma das bordas (Caso o mapa não seja quadrado, basta usar a maior distância. É possível implementar usando a mesma lógica um SideX e SideY, mas eu não tive tempo de fazê-lo). Floors é o número de andares que tem o seu mapa, se ele ocupa só um andar floor = 1, 2 floor = 2 e assim por diante. Bom é isso, espero que gostem e que seja útil para vocês. Agora vou empenhar no sistema completo, assim que terminar eu posto a versão 2.0 do instanciador com muito mais recursos. Algumas Imagens OBSERVAÇÃO IMPORTANTE Quando você utilizar o comando ingame, esteja longe da área onde o mapa será criado, senão o seu cliente irá debugar. Nada acontece, na verdade, acho que é algum problema do cliente, assim que você abre o tibia novamente tudo se estabiliza, mas é chato ficar re-abrindo então evite isso.\ Grande abraço. ps: Lembrando, novamente dos Créditos ao Danihcv pela ideia, sem o brainstorm por ele promovido no meu tópico isso não seria possível
  6. Ola pessoal , estou rodando meu servidor e venho percebendo que de vez em quando aparece um erro no rope.lua. Ele está funcionando mas aparece um erro no meu log, é um erro que não ocorre sempre e eu ainda não consegui ver quem era ou o que é esse evento que faz dar esse erro, poderiam me ajudar ?, segue a baixo: Erro: Lua Script Error: [Action Interface] data/actions/scripts/tools/rope.lua:onUse data/actions/scripts/tools/rope.lua:11: attempt to index a nil value stack traceback: [C]: in function '__index' data/actions/scripts/tools/rope.lua:11: in function Rope.lua Spoiler bugado , sorry
  7. Ola galera estou precisando de uma ajuda com esse script.. Ele funciona da seguinte forma. É uma action que coloquei numa alavanca de comer food.mais nao sao aquelas alavancas que entrega o food na backpack do player nao, esse script mata a fome do player ou seja puxando a alavanca come food. A parte de comer o food e de mostrar a msg "YOU ARE FULL" e de aparecer um efeito ao comer esta funcinando perfeitamente o unico problema e que quando eu puxo a alavanca ela nao se meche eu gostaria que ela se movesse <<<< >>> toda vez que puxar. o id 2672 e o id do food na alavanca o id da alavanca que to usando e 1945 normal /1946 puxada desde ja agrdeco galerinha.. actions.xml <action actionid="2672" event="script" value="pbot/alavancafood.lua"/> alavancafood.lua
  8. Estou com um script (Talkaction) feito por Daniehcv, deste fórum. Ele consiste no seguinte: Permite que vocações summonem quantidades diferentes de monstros. Está funcionando perfeitamente, o único problema é que summona todos os monstros que eu por, no mesmo level e com usando a mesma quantidade de mana. Queria que alguém ajeitasse isso pra mim, pondo mais ou menos uma tabela onde ficaria o nome dos monstros com seu level e quantidade de mana pra conjuração. Ex: {bear, wolf, polar bear: levelmin=20, mana=100}, {dragon, giant spider, orc warlord: levelmin=80, mana 700} E se possível, transformar em magia. Se alguém puder ajudar, agradeço. Segue o script: up
  9. Falaê, vi esse script em outro fórum porém tava meio bugado e fiz algumas alterações, pequenas mas que ajudaram no funcionamento. Quando prende o player ele não fica mais em um local fixo, você pode configurar para coloca-lo em outras celas. O tempo pode ou não ser fixo, é só você digitar /jail (nome do player) para um tempo fixo ou /jail (nome do player), (tempo) para coloca-lo com um tempo especifico. OBS: O tempo é posto em segundos. (120 segundos = 2 minutos) TAG, talkaction.xml: <talkaction log="yes" words="/jail;!jail;/prender;!prender;/unjail;!unjail;/desprender;!desprender" access="3" event="script" value="prision.lua"/> Script, data/talkaction/prision.lua: grouprequired = 3 jailedstoragevalue_time = 1338 jailedstoragevalue_bool = 1339 local jailpos = { [1] = {x = 59, y = 52, z =6}, [2] = {x = 59, y = 52, z =5}, [3] = {x = 55, y = 47, z =6}, [4] = {x = 55, y = 47, z =5}, [5] = {x = 55, y = 52, z =6}, [6] = {x = 55, y = 52, z =5}, [7] = {x = 59, y = 47, z =5}, [8] = {x = 63, y = 52, z =5} } local unjailpos = { x = 63, y = 54, z =6 } jail_list = {} jail_list_work = 0 function checkJailList(param) addEvent(checkJailList, 1000, {}) for targetID,player in ipairs(jail_list) do if isPlayer(player) == TRUE then if getPlayerStorageValue(player, jailedstoragevalue_time) < os.time() then doTeleportThing(player, unjailpos, TRUE) setPlayerStorageValue(player, jailedstoragevalue_time, 0) setPlayerStorageValue(player, jailedstoragevalue_bool, 0) table.remove(jail_list,targetID) doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_ORANGE, 'Você saiu da cadeia, tente não fazer coisas malvadas da próxima vez para não ser preso novamente. Cuide-se amigo.') end else table.remove(jail_list,targetID) end end end 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 jail_list_work == 0 then jail_list_work = addEvent(checkJailList, 1000, {}) end local jail_time = -1 for word in string.gmatch(tostring(t[1]), "(%w+)") do if tostring(tonumber(word)) == word then jail_time = tonumber(word) end end local isplayer = getPlayerByName(t[1]) if isPlayer(isplayer) ~= TRUE then isplayer = getPlayerByName(string.sub(t[1], string.len("jail_time")+1)) if isPlayer(isplayer) ~= TRUE then isplayer = getPlayerByName(string.sub(t[1], string.len("jail_time")+2)) if isPlayer(isplayer) ~= TRUE then isplayer = getPlayerByName(string.sub(t[1], string.len("jail_time")+3)) end end end local default_jail = 30 if(t[2]) then default_jail = t[2] end if jail_time ~= -1 then jail_time = jail_time * 60 else jail_time = default_jail end if (words == '!prender' or words == '/prender') then if getPlayerGroupId(cid) >= grouprequired then if isPlayer(isplayer) == TRUE then doTeleportThing(isplayer, jailpos[math.random(#jailpos)], TRUE) setPlayerStorageValue(isplayer, jailedstoragevalue_time, os.time()+jail_time) setPlayerStorageValue(isplayer, jailedstoragevalue_bool, 1) table.insert(jail_list,isplayer) doPlayerSendTextMessage (cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Você prendeu o player: '.. getCreatureName(isplayer) ..' ate ' .. os.date("%H:%M:%S", getPlayerStorageValue(isplayer, jailedstoragevalue_time)) .. ' (agora é: ' .. os.date("%H:%M:%S", os.time()) .. ').') doPlayerSendTextMessage (isplayer, MESSAGE_STATUS_CONSOLE_ORANGE, 'Voce foi preso por '.. getCreatureName(cid) ..' ate ' .. os.date("%H:%M:%S", getPlayerStorageValue(isplayer, jailedstoragevalue_time)) .. ' (agora é: ' .. os.date("%H:%M:%S", os.time()) .. ').') else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Este jogador não existe ou esta offline.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem permissão para prender players.") end elseif (words == '!desprender' or words == '/desprender') then if getPlayerGroupId(cid) >= grouprequired then if isPlayer(isplayer) == TRUE then if getPlayerStorageValue(isplayer, jailedstoragevalue_bool) == 1 then doTeleportThing(isplayer, unjailpos, TRUE) setPlayerStorageValue(isplayer, jailedstoragevalue_time, 0) setPlayerStorageValue(isplayer, jailedstoragevalue_bool, 0) table.remove(jail_list,targetID) doPlayerSendTextMessage(isplayer, MESSAGE_STATUS_CONSOLE_ORANGE, 'O player '.. getCreatureName(cid) ..' te tirou da prisão. Te vejo em breve!!!') doPlayerSendTextMessage (cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Você tirou da prisão o player: '.. getCreatureName(isplayer) ..'.') else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Este jogador não está preso.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Este jogador não existe ou esta offline.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem permissão para prender players.") end end return true end Configuração: local jailpos = { -- Local das selas onde o player vai aparecer. local unjailpos = { x = 63, y = 54, z =6 } -- Local onde ele irá sair. local default_jail = 30 -- Tempo padrão. Créditos: Comedinha, por postar pela primeira vez. Eu, por arrumar alguns bugs. Enjoy it!
  10. Gostaria de saber se alguem nao conseguiria fazer uma spell ou um actionId que mandasse o player para uma outra dimensao que seria o genjutsu, e la o player levaria hits por um determinado tempo
  11. Olá galerinha, queria pedir a ajuda de vcs, queria que alguém ajudasse a criar um Código C++ para limitar o alcance da vista de tiles do player, tipo, abaixar mais o Zoom da visão do player para ele ver mais coisas ao redor dele, que nem o Otpokemon, o client deles é todo aberto, ele n tem as barras laterais e o zoom é bem bom, sendo que quando eu tiro as barras laterais do meu Otclient ele fica com uns bugs pretos no lugar que era as barras laterais, isso acontece devido o limite de tiles que o player pode ver ao alcance dele, ouvir falar em outro forum que ficam localizado no Protocolgame.cpp das sources do server e no map.h das sources do server, e no otclient somente no Map.cpp. vou deixar eles aqui para vcs verem e tentar me ajudar. Protocolgame.cpp server Map.h Do Server Map.cpp Do Otclient Up Up
  12. Galera se alguém puder me ajudar nesse erro, segue abaixo o log: Uso TFS 1.2 Lua Script Error: [Main Interface] in a timer event called from: (Unknown scriptfile) data/actions/scripts/quests/demonHelmetQuestLever.lua:14: attempt to call global 'getThingFromPosition' (a nil value) stack traceback: [C]: in function 'getThingFromPosition' data/actions/scripts/quests/demonHelmetQuestLever.lua:14: in function Meu demonHelmetQuestLever.lua Quando eu puxo a alavanca ele da esse erro no console , ele abre as grades tranquilo mas odeio ver um erro no console sabe ^^ . Vlws agradeço desde já!
  13. Entao Tenho este Script do Futebol, So que esta dando este erro no Distro [11/1/2016 22:36:15] [Error - LuaInterface::loadFile] data/npc/scripts/juiz.lua:18: unexpected symbol near '[' [11/1/2016 22:36:15] [Warning - NpcEvents::NpcEvents] Cannot load script: data/npc/scripts/juiz.lua [11/1/2016 22:36:15] data/npc/scripts/juiz.lua:18: unexpected symbol near '[' Aqui o Script E Este Esta Dando este erro [11/1/2016 22:36:16] [Error - Action Interface] [11/1/2016 22:36:16] data/actions/scripts/futebol.lua:onUse [11/1/2016 22:36:16] Description: [11/1/2016 22:36:16] data/actions/scripts/futebol.lua:587: attempt to concatenate local 'uidMonstro' (a boolean value) [11/1/2016 22:36:16] stack traceback: [11/1/2016 22:36:16] data/actions/scripts/futebol.lua:587: in function <data/actions/scripts/futebol.lua:452> Aqui o Script Ficaria Muito Grato !! Por Resolver este 2 Erros !! Valendo Sempre +REP
  14. Bom pessoal, minha dúvida é a seguinte: Como passo um item através de addEvent para que possa usar o item:transform(id) ? por exemplo, com players basta fazer o seguinte: function eventoAqui(self) local jogador = Player(self) jogador:removeItem(2386, 1) -- blablabla... end addEvent(eventoAqui,2000,player:getId()) Mas com item, o item:getId() só pega a Id do item, e eu quero transformar um item em especifico (o target de uma action) apos alguns segundos. Passar o target como parametro em um addEvent não da certo, pois é uma metadata, e isso pode causar memory-leaks no server. Sugestões?
  15. ALGUEM PODERIA ADIOCINAR MAIS HORARIO PRA MIM NESSE EVENTO EM MODS, ELE ESTA COMFIGURADO 1 HORARIO POR DIA GOSTIARIA DE ADICIONAR 3 VESES NO DIA !
  16. Gostaria muito que logo abaixo do level dos player tivese a opção Reset, que mostraria o numero de Reset que x player tem. tentei fazer mas por algum motivo da algum erro então estou postando pedindo a ajuda de vocês! <?PHP $name = stripslashes(ucwords(strtolower(trim($_REQUEST['name'])))); if(empty($name)) { $main_content .= 'Here you can get detailed information about a certain player on '.$config['server']['serverName'].'.<BR> <FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>'; } else { if(check_name($name)) { $player = $ots->createObject('Player'); $player->find($name); if($player->isLoaded()) { $account = $player->getAccount(); $main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Character Information</B></TD></TR>'; if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=20%>Name:</TD><TD><font color="'; $main_content .= ($player->isOnline()) ? 'green' : 'red'; $main_content .= '"><b>'.$player->getName().'</b></font>'; if($player->isDeleted()) $main_content .= '<font color="red"> [DELETED]</font>'; if($player->isNameLocked()) $main_content .= '<font color="red"> [NAMELOCK]</font>'; $main_content .= '</TD></TR>'; if($player->getOldName()) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; if($player->isNameLocked()) $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Proposition:</TD><TD>'.$player->getOldName().'</TD></TR>'; else $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Old name:</TD><TD>'.$player->getOldName().'</TD></TR>'; } // BEGIN Position Showing *** Fixed by jerryb1988 from otfans.net $group = $player->getGroup(); if ($group == 2){$group_name = 'Tutor';} if ($group == 3){$group_name = 'Senior Tutor';} if ($group == 4){$group_name = 'Gamemaster';} if ($group == 5){$group_name = 'Community Manager';} if ($group == 6){$group_name = 'GOD';} if($group != 1) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Position:</TD><TD>'.$group_name.'</TD></TR>'; } // END Position Showing if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Sex:</TD><TD>'; $main_content .= ($player->getSex() == 0) ? 'female' : 'male'; $main_content .= '</TD></TR>'; if($config['site']['show_marriage_info']) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Marital status:</TD><TD>'; $marriage = new OTS_Player(); $marriage->load($player->getMarriage()); if($marriage->isLoaded()) $main_content .= 'married to <a href="?subtopic=characters&name='.urlencode($marriage->getName()).'"><b>'.$marriage->getName().'</b></a></TD></TR>'; else $main_content .= 'single</TD></TR>'; } if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Profession:</TD><TD>'.$vocation_name[$player->getWorld()][$player->getPromotion()][$player->getVocation()].'</TD></TR>'; if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Level:</TD><TD>'.$player->getLevel().'</TD></TR>'; if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>World:</TD><TD>'.$config['site']['worlds'][$player->getWorld()].'</TD></TR>'; if(!empty($towns_list[$player->getWorld()][$player->getTownId()])) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Residence:</TD><TD>'.$towns_list[$player->getWorld()][$player->getTownId()].'</TD></TR>'; if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Balance:</TD><TD>'.$player->getBalance().' Gold Coins.</TD></TR>'; } $rank_of_player = $player->getRank(); if(!empty($rank_of_player)) { { $guild_id = $rank_of_player->getGuild()->getId(); $guild_name = $rank_of_player->getGuild()->getName(); if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Guild Membership:</TD><TD>'.$rank_of_player->getName().' of the <a href="?subtopic=guilds&action=show&guild='.$guild_id.'">'.$guild_name.'</a></TD></TR>'; } } if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $lastlogin = $player->getLastLogin(); if(empty($lastlogin)) $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Last login:</TD><TD>Never logged in.</TD></TR>'; else $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Last login:</TD><TD>'.date("j F Y, g:i a", $lastlogin).'</TD></TR>'; if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; if($config['site']['show_creationdate'] && $player->getCreated()) { $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Created:</TD><TD>'.date("j F Y, g:i a", $player->getCreated()).'</TD></TR>'; } /*Vip Status*/ if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Vip Status:</TD><TD>'; $main_content .= ($account->getPlayerVipTime()) ? '<b><font color="green">Vip Account</font></b>' : '<b><font color="red">Not Vip Account</font></b>'; if($config['site']['show_vip_status']) { $id = $player->getCustomField("id"); if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=10%>Vip Status:</TD>'; $vip = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$config['site']['show_vip_storage'].';')->fetch(); if($vip == false) { $main_content .= '<TD><span class="red"><B>NOT VIP</B></TD></TR>'; } else { $main_content .= '<TD><span class="green"><B>VIP</B></TD></TR>'; } $comment = $player->getComment(); $newlines = array("\r\n", "\n", "\r"); $comment_with_lines = str_replace($newlines, '<br />', $comment, $count); if($count < 50) $comment = $comment_with_lines; if(!empty($comment)) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD VALIGN=top>Comment:</TD><TD>'.$comment.'</TD></TR>'; } } //Outfit shower by Pening edited by loleslav if($config['site']['show_outfit']) { $id = $player->getCustomField("id"); $main_content .= '<TD BGCOLOR="'.$config['site']['darkborder'].'">Outfit:'; $listaddon = array('128','129','130','131','132','133','134','135','136','137','138','139','140','141','142','143','144','145','146','147','148','149','150','151','152','153','154','155','158','159','251','252','268','269','270','273','278','279','288','289','302','324','325'); $lookadd = array('0','1','2','3'); foreach ($listaddon as $pid => $name) foreach ($lookadd as $addo => $name) { $addon1 = $SQL->query('SELECT * FROM players WHERE id = '.$id.' AND looktype = '.$listaddon[$pid].' AND lookaddons = '.$lookadd[$addo].';')->fetch(); if($addon1[looktype] == true ) { $finaddon = $addon1[looktype] + $addon1[lookaddons] * 300; $main_content .= '<TD with=50% style="background-color: '.$config['site']['darkborder'].'"><center><img src="images/addons/'.$finaddon.'.gif"/></center></TD></TD>'; } } } $main_content .= '</td>'; //end Outfit shower by Pening edited by loleslav if($config['site']['show_signature']) { // Signature by makr0mango. function randomSignature( $folder ) { $files = scandir ( "./$folder/" ); $signature = array(); foreach ( $files as $file ): if ( substr ( strtolower ( $file ) , -4 ) == ".png" ) $signature[] = $file; endforeach; return rand(0,count($signature)-1); } $random = randomSignature("signatures"); $main_content .= '<br><tr></tr><tr></tr><tr></tr><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Signature</B></TD></TR>'; $main_content .= "<TR BGCOLOR=".$config['site']['darkborder']."><TD WIDTH=20%>Forum Link:</TD><TD><input type='text' size='75' onclick='this.select();' value='[url=\"http://" . $_SERVER['HTTP_HOST'] . "\"][IMG=http://" . $_SERVER['HTTP_HOST'] . "/signature.php?character=" .$player->getName(). "ℑ=" . $random . "][/url]' /></TD></TR>"; $main_content .= "<TR BGCOLOR=".$config['site']['lightborder']."><TD WIDTH=20%>Direct Link:</TD><TD><input type='text' size='75' onclick='this.select();' value='http://" . $_SERVER['HTTP_HOST'] . "/signature.php?character=" .$player->getName(). "ℑ=" . $random . "' /></TD></TR>"; $main_content .= "<TR BGCOLOR=".$config['site']['darkborder']."><TD COLSPAN='2' style='text-align: center;'><img src='signature.php?character=" .$player->getName(). "ℑ=" . $random . "' /></TD></TR>"; $main_content .= '</TD></TR></TABLE>'; // Signature by makr0mango. } //modified status scripts by ballack13 $main_content .= '<table width=100%><tr>'; //equipment shower by ballack13 $id = $player->getCustomField("id"); $number_of_items = 1; $main_content .= '<td align=center><table with=100% style="border: solid 1px #888888;" CELLSPACING="1"><TR>'; $list = array('2','1','3','6','4','5','9','7','10','8'); foreach ($list as $pid => $name) { $top = $SQL->query('SELECT * FROM player_items WHERE player_id = '.$id.' AND pid = '.$list[$pid].';')->fetch(); if($top[itemtype] == false) { if($list[$pid] == '8') { $main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>'; } if(is_int($number_of_items / 3)){ $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD></tr><tr>'; } else { $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD>'; } $number_of_items++; } else { if($list[$pid] == '8') { $main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>'; } if(is_int($number_of_items / 3)) $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD></tr><tr>'; else $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD>'; $number_of_items++; } if($list[$pid] == '8') { $main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Cap:<br/>'.$player->getCap().'</td>'; } } $main_content .= '</tr></TABLE></td>'; //Hp/Mana/Exp Status by ballack13 $hp = ($player->getHealth() / $player->getHealthMax() * 100); $main_content .= '<td align=center ><table width=100%><tr><td align=center><table CELLSPACING="1" CELLPADDING="4"><tr><td BGCOLOR="#D4C0A1" align="left" width="20%"><b>Player Health:</b></td> <td BGCOLOR="#D4C0A1" align="left">'.$player->getHealth().'/'.$player->getHealthMax().'<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.$hp.'%; height: 3px;"></td></tr>'; if ($player->getManaMax() > 0) { $mana = ($player->getMana() / $player->getManaMax() * 100); $main_content .= '<tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Mana:</b></td><td BGCOLOR="#F1E0C6" align="left">'.$player->getMana().'/'.$player->getManaMax().'<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: blue; width: '.$mana.'%; height: 3px;"></td>'; } else { $main_content .= '<tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Mana:</b></td><td BGCOLOR="#F1E0C6" align="left">0/0<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: blue; width: 100%; height: 3px;"></td>'; } $main_content .= '</tr></table><tr>'; $next = ($player->getLevel() + 1); $exp = ((50 / 3) * ($player->getLevel() * $player->getLevel() * $player->getLevel()) - (100 * ($player->getLevel() * $player->getLevel())) + ((850/3) * $player->getLevel()) - 200); $expnext = ((50 / 3) * ($next * $next * $next) - (100 * ($next * $next)) + ((850/3) * $next) - 200 - $player->getExperience()); $expresult = ($expnext / (($expnext + $player->getExperience()) - $exp) * 100); $main_content .= '<tr><table CELLSPACING="1" CELLPADDING="4"><tr><td BGCOLOR="'.$config['site']['lightborder'].'" align="left" width="20%"><b>Player Level:</b></td><td BGCOLOR="'.$config['site']['lightborder'].'" align="left">'.$player->getLevel().'</td></tr> <tr><td BGCOLOR="'.$config['site']['darkborder'].'" align="left"><b>Player Experience:</b></td><td BGCOLOR="'.$config['site']['darkborder'].'" align="left">'.$player->getExperience().' EXP.</td></tr> <tr><td BGCOLOR="'.$config['site']['lightborder'].'" align="left"><b>To Next Level:</b></td><td BGCOLOR="'.$config['site']['lightborder'].'" align="left">You need <b>'.$exp.' EXP</b> to Level <b>'.$next.'</b>.<div title="99.320604545 %" style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.$expresult.'%; height: 3px;"></td></tr></table></td></tr></table></tr></TABLE></td>'; if($config['site']['show_skills_info']) { //Skills Pics v2. Table borders optimized by Absolute Mango $main_content .= '<br/><table cellspacing="0" cellpadding="0" border="0" width="200" align="center"><caption><strong>Skills</strong></caption><tbody><tr> <td align="center"><a href="?subtopic=highscores&list=experience"><img src="images/skills/level.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=magic"><img src="images/skills/ml.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=fist"><img src="images/skills/fist.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=club"><img src="images/skills/club.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=sword"><img src="images/skills/sword.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=axe"><img src="images/skills/axe.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=distance"><img src="images/skills/dist.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=shield"><img src="images/skills/def.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=fishing"><img src="images/skills/fish.png" style="border: none;"/></a></td> </tr></tbody></table> <table cellspacing="0" cellpadding="0" border="1" width="360" align="center"><tbody><tr><tr bgcolor="'.$config['site']['darkborder'].'"> <td align="center" width="38"><strong>Level</strong></td> <td align="center" width="38"><strong>ML</strong></td> <td align="center" width="42"><strong>Fist</strong></td> <td align="center" width="40"><strong>Club</strong></td> <td align="center" width="38"><strong>Swrd</strong></td> <td align="center" width="38"><strong>Axe</strong></td> <td align="center" width="38"><strong>Dist</strong></td> <td align="center" width="38"><strong>Shield</strong></td> <td align="center" width="38"><strong>Fish</strong></td></font> </tr> <tr bgcolor="'.$config['site']['lightborder'].'"> <td align="center" width="38">'.$player->getLevel().'</td> <td align="center" width="38">'.$player->getMagLevel().'</td> <td align="center" width="38">'.$player->getSkill(0).'</td> <td align="center" width="38">'.$player->getSkill(1).'</td> <td align="center" width="38">'.$player->getSkill(2).'</td> <td align="center" width="38">'.$player->getSkill(3).'</td> <td align="center" width="38">'.$player->getSkill(4).'</td> <td align="center" width="38">'.$player->getSkill(5).'</td> <td align="center" width="38">'.$player->getSkill(6).'</td> </tr></tbody></table><div table align="center"> <br /> </div>'; //skill script end } //quest status by ballack13 $id = $player->getCustomField("id"); $number_of_quests = 0; $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD align="left" COLSPAN=2 CLASS=white><B>Quests</B></TD></TD align="right"></TD></TR>'; $quests = $config['site']['quests']; foreach ($quests as $storage => $name) { if(is_int($number_of_quests / 2)) $bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder']; $number_of_quests++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=95%>'.$storage.'</TD>'; $quest = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$quests[$storage].';')->fetch(); if($quest == false) { $main_content .= '<TD><img src="images/false.png"/></TD></TR>'; } else { $main_content .= '<TD><img src="images/true.png"/></TD></TR>'; } } $main_content .= '</TABLE></td></tr></table><br />'; $deads = 0; //deaths list $player_deaths = $SQL->query('SELECT `id`, `date`, `level` FROM `player_deaths` WHERE `player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,10;'); foreach($player_deaths as $death) { if(is_int($number_of_rows / 2)) $bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder']; $number_of_rows++; $deads++; $dead_add_content .= "<tr bgcolor=\"".$bgcolor."\"> <td width=\"20%\" align=\"center\">".date("j M Y, H:i", $death['date'])."</td> <td>"; $killers = $SQL->query("SELECT environment_killers.name AS monster_name, players.name AS player_name, players.deleted AS player_exists FROM killers LEFT JOIN environment_killers ON killers.id = environment_killers.kill_id LEFT JOIN player_killers ON killers.id = player_killers.kill_id LEFT JOIN players ON players.id = player_killers.player_id WHERE killers.death_id = ".$SQL->quote($death['id'])." ORDER BY killers.final_hit DESC, killers.id ASC")->fetchAll(); $i = 0; $count = count($killers); foreach($killers as $killer) { $i++; if(in_array($i, array(1, $count))) $killer['monster_name'] = str_replace(array("an ", "a "), array("", ""), $killer['monster_name']); if($killer['player_name'] != "") { if($i == 1) $dead_add_content .= "Killed at level <b>".$death['level']."</b> by "; else if($i == $count) $dead_add_content .= " and by "; else $dead_add_content .= ", "; if($killer['monster_name'] != "") $dead_add_content .= $killer['monster_name']." summoned by "; if($killer['player_exists'] == 0) $dead_add_content .= "<a href=\"index.php?subtopic=characters&name=".urlencode($killer['player_name'])."\">"; $dead_add_content .= $killer['player_name']; if($killer['player_exists'] == 0) $dead_add_content .= "</a>"; } else { if($i == 1) $dead_add_content .= "Died at level <b>".$death['level']."</b> by "; else if($i == $count) $dead_add_content .= " and by "; else $dead_add_content .= ", "; $dead_add_content .= $killer['monster_name']; } if($i == $count) $dead_add_content .= "."; } $dead_add_content .= ".</td></tr>"; } if($deads > 0) $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Deaths</B></TD></TR>' . $dead_add_content . '</TABLE><br />'; //end if(!$player->getHideChar()) { $main_content .= '<TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Account Information</B></TD></TR>'; if($account->getRLName()) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Real name:</TD><TD>'.$account->getRLName().'</TD></TR>'; } if($account->getLocation()) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR='.$config['site']['darkborder'].'><TD WIDTH=20%>Location:</TD><TD>'.$account->getLocation().'</TD></TR>'; } if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; if($account->getLastLogin()) $main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Last login:</TD><TD>'.date("j F Y, g:i a", $account->getLastLogin()).'</TD></TR>'; else $main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Last login:</TD><TD>Never logged in.</TD></TR>'; if($account->getCreated()) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Created:</TD><TD>'.date("j F Y, g:i a", $account->getCreated()).'</TD></TR>'; } if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Account Status:</TD><TD>'; $main_content .= ($account->isPremium()) ? '<b><font color="green">Premium Account</font></b>' : '<b><font color="green">Gratis Premium Account</font></b>'; if($account->isBanned()) if($account->getBanTime() > 0) $main_content .= '<font color="red"> [Banished until '.date("j F Y, G:i", $account->getBanTime()).']</font>'; else $main_content .= '<font color="red"> [Banished FOREVER]</font>'; $main_content .= '</TD></TR></TABLE>'; $main_content .= '<br><TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=5 CLASS=white><B>Characters</B></TD></TR> <TR BGCOLOR='.$config['site']['darkborder'].'><TD><B>Name</B></TD><TD><B>World</B></TD><TD><B>Level</B></TD><TD><b>Status</b></TD><TD><B> </B></TD></TR>'; $account_players = $account->getPlayersList(); $account_players->orderBy('name'); $player_number = 0; foreach($account_players as $player_list) { if(!$player_list->getHideChar()) { $player_number++; if(is_int($player_number / 2)) $bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder']; if(!$player_list->isOnline()) $player_list_status = '<font color="red">Offline</font>'; else $player_list_status = '<font color="green">Online</font>'; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=52%><NOBR>'.$player_number.'. '.$player_list->getName(); $main_content .= ($player_list->isDeleted()) ? '<font color="red"> [DELETED]</font>' : ''; $main_content .= '</NOBR></TD><TD WIDTH=15%>'.$config['site']['worlds'][$player_list->getWorld()].'</TD><TD WIDTH=25%>'.$player_list->getLevel().' '.$vocation_name[$player_list->getWorld()][$player_list->getPromotion()][$player_list->getVocation()].'</TD><TD WIDTH="8%"><b>'.$player_list_status.'</b></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=characters" METHOD=post><TR><TD><INPUT TYPE=hidden NAME=name VALUE="'.$player_list->getName().'"><INPUT TYPE=image NAME="View '.$player_list->getName().'" ALT="View '.$player_list->getName().'" SRC="'.$layout_name.'/images/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></FORM></TABLE></TD></TR>'; } } $main_content .= '</TABLE></TD><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>'; } $main_content .= '<BR><BR><FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>'; $main_content .= '</TABLE>'; } else $search_errors[] = 'Character <b>'.$name.'</b> does not exist.'; } else $search_errors[] = 'This name contains invalid letters. Please use only A-Z, a-z and space.'; if(!empty($search_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($search_errors as $search_error) $main_content .= '<li>'.$search_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 .= '<BR><FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>'; } } ?> Tentei colocar asssim: { } if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD><b>Dinheiro:</TD><TD>'.$player->getPlayerReset().' Gold Coins.</b></TD></TR>'; $rank_of_player = $player->getRank(); if(!empty($rank_of_player)) { Mas da erro.
  17. fala ae Xtibianos estou com um problema en um site aque xml, quando alguem ta criando o char ele buga o executavel com (sex), tipo meu server tem o sex (0) e o (1), no inspesionador de elemento eles conseguem mudar isto para qualquer numero e quando eles logao com char bugado o exe crasha!, si alguem puder me ajudar, eu tentei faser um script de if no php mas n consegui sou leigo en php ;/! Agradeço Rep+ Print Bug! Phps do site! Savenewchar.php account.page=char.php @up
  18. Olá, eu coloquei um script de quest ele ta dando erro não sei o que fazer kkk... Meu Script Error [04/01/2016 21:32:20] [Error - LuaScriptInterface::loadFile] data/actions/scripts/gem.lua:3: unexpected symbol near '=' [04/01/2016 21:32:20] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/gem.lua) [04/01/2016 21:32:20] data/actions/scripts/gem.lua:3: unexpected symbol near '='
  19. Quando Eu Capturo Um Pokemon Não Da Para Dar Look Nem Usar o Pokemon . Obs : Servidor Com Level System . Obs²: Não Da Erro Na Hora Que da o Catch . Obs³: Da Para Usar Os Pokemons Criados no ( /cb ) . Erro No Look : Look.lua : Erro No Goback : Goback.lua : Level System :
  20. Galera eu tenho esse script de bike funciona legalzinho... Mais eu queria que quando o jogador morre-se ele nascia sem estar na bike ou seja o outflit dele estivesse normal.. para nao ter bugs tem como fazer isso? por exemplo no surf quando usamos o pokemon para andar na agua se morremos em cima do pokemon agente nasce com o pokemon morto e com outflit normal eu quero fazer isso com a bike. OBRIGADO! local t = {text='BIKE ON!', dtext='BIKE OFF!', s=5700, speed = 480} local bikeid = 12688 -- ITEMID da Bike local function BikeSpeedOn(cid, t) setPlayerStorageValue(cid, t.s, t.speed) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, t.speed) end local function BikeSpeedOff(cid, t) setPlayerStorageValue(cid, t.s, -1) doRegainSpeed(cid) end function onUse(cid, item, fromPosition, itemEx, toPosition) local pos = getThingPos(cid) if getPlayerItemCount(cid, 12688) <= 0 then return doPlayerSendCancel(cid, "Você precisa ter a bike na sua bag.") end if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then return doPlayerSendCancel(cid, "Voce nao pode fazer isso.") end if getPlayerStorageValue(cid, t.s) <= 0 then if item.actionid ~= 12120 then doRemoveItem(item.uid, 1) local create_action = doPlayerAddItem(cid, bikeid, 1) doItemSetAttribute(create_action, "aid", 12120) setPlayerStorageValue(cid, 12120, 1) doSendMagicEffect(pos, 177) doCreatureSay(cid, t.text, 19) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce montou na bike.') BikeSpeedOn(cid, t) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394}, -1) else doSetCreatureOutfit(cid, {lookType = 1393}, -1) end else doPlayerSendCancel(cid, "Essa bike esta em uso.") end else if item.actionid == 12120 and getCreatureOutfit(cid).lookType == 1394 or getCreatureOutfit(cid).lookType == 1393 then doRemoveItem(item.uid, 1) doPlayerAddItem(cid, bikeid, 1) setPlayerStorageValue(cid, 12120, -1) doSendMagicEffect(pos, 177) doCreatureSay(cid, t.dtext, 19) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce saiu da bike.') BikeSpeedOff(cid, t) doRemoveCondition(cid, CONDITION_OUTFIT) else doPlayerSendCancel(cid, "Voce nao pode usar a bike.") end end return true end
  21. Estou fazendo um sistema no meu servidor de um item que leva a um tile que tem "x" storage mais não da para mim usar o item tem como alguém me ajudar ? Erro : Script :
  22. Shop Guild TFS 1.0 Bom, vamos ao sistema: Em talkactions.xml, adicione a tag abaixo: <talkaction words="!guildpoints" separator=" " script="guildpoints.lua"/> Na pasta talkactions/scripts faça um .lua com o nome guildpoints e dentro dele adicione os coder abaixo: local config = { executeInterval = 24, minimumLevel = 80, membersNeeded = 10, minimumDifferentIps = 6, pointAmount = 9 } local function getValidAccounts(guild) local resultId = db.storeQuery('SELECT a.`id` FROM `accounts` a, `guild_membership` m, `players` p WHERE m.`guild_id` = ' ..guild:getId() .. ' AND p.`id` = m.`player_id` AND p.`level` > ' .. config.minimumLevel .. ' and a.`id` = p.`account_id` AND a.`guild_points_stats` = 0 GROUP BY a.`id`;') if resultId == false then return {} end local accounts = {} repeat table.insert(accounts, result.getDataInt(resultId, 'id')) until not result.next(resultId) result.free(resultId) return accounts end function onSay(cid, words, param) local player = Player(cid) local guild = player:getGuild() if not guild or player:getGuildLevel() ~= GUILDLEVEL_LEADER then player:getPosition():sendMagicEffect(CONST_ME_POFF) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Only guild leader can request points.') return false end local resultId = db.storeQuery('SELECT `last_execute_points` FROM `guilds` WHERE id = ' .. guild:getId()) if resultId == false then player:getPosition():sendMagicEffect(CONST_ME_POFF) player:sendCancelMessage('Error while running database query.') return false end local lastExecution = result.getDataInt(resultId, 'last_execute_points') result.free(resultId) if lastExecution >= os.time() then player:getPosition():sendMagicEffect(CONST_ME_POFF) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'The command can only be run once every ' ..config.executeInterval .. ' hours.') return false end local members = guild:getMembersOnline() for i = #members, 1, -1 do if members[i]:getLevel() < config.minimumLevel then table.remove(members, i) end end if #members < config.membersNeeded then player:getPosition():sendMagicEffect(CONST_ME_POFF) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Only ' .. #members .. ' guild members online, you need ' ..config.membersNeeded .. ' guild members with level ' .. config.minimumLevel .. ' or higher.') return false end local ipDictionary, ipCount = {}, 0 for i = 1, #members do local ip = members[i]:getIp() if not ipDictionary[ip] then ipDictionary[ip] = true ipCount = ipCount + 1 end end if ipCount < config.minimumDifferentIps then player:getPosition():sendMagicEffect(CONST_ME_POFF) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Only ' .. ipCount .. ' members are valid, you need ' ..config.minimumDifferentIps .. ' players with different ip addresses.') return false end local validAccounts = getValidAccounts(guild) db.query('UPDATE `guilds` SET `last_execute_points` = ' .. (os.time() + config.executeInterval * 3600) .. ' WHERE `guilds`.`id` = ' .. guild:getId() .. ';') player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, #validAccounts .. ' guild members received points.') if #validAccounts > 0 then db.query('UPDATE `accounts` SET `guild_points` = `guild_points` + ' .. config.pointAmount .. ', `guild_points_stats` = ' .. os.time() .. ' WHERE `id` IN (' .. table.concat(validAccounts, ',') .. ');') for i = 1, #members do local member = members[i] if isInArray(validAccounts, member:getAccountId()) then member:sendTextMessage(MESSAGE_INFO_DESCR, 'You received ' .. config.pointAmount .. ' guild points.') end end end return false end No coder acima bem no inicio tem as linhas seguintes para configurar: executeInterval = 24, ( Intervalo para execução do comando, ae está de 24 em 24hrs) membersNeeded = 10, (Quantos players é preciso está online para poder executar o comando.) minimumDifferentIps = 6, (Quantos IPS diferentes são necessários para executar o comando no exemplo ae tem 6.) minimumLevel = 80, (Aqui adicione o level minimo, é necessário que todos os player da guild tenha o level pedido para o lider executar o comando.) pointAmount = 9, (Aqui é a quantidade de pontos para adicionar em cada player da guild.) Em data/globalevents/scripts crie um arquivo chamado shopguild.lua e adicione o code a seguir: -- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 18 -- time (in seconds) between connections to SQL database by shop script SQL_interval = 30 -- ### END OF CONFIG ### function onThink(interval, lastExecution) local result_plr = db.storeQuery("SELECT * FROM z_ots_guildcomunication") if(result_plr ~= false) then repeat local id = tonumber(result.getDataInt(result_plr, "id")) local action = tostring(result.getDataString(result_plr, "action")) local delete = tonumber(result.getDataInt(result_plr, "delete_it")) local cid = getPlayerByName(tostring(result.getDataString(result_plr, "name"))) if(cid) then local itemtogive_id = tonumber(result.getDataInt(result_plr, "param1")) local itemtogive_count = tonumber(result.getDataInt(result_plr, "param2")) local container_id = tonumber(result.getDataInt(result_plr, "param3")) local container_count = tonumber(result.getDataInt(result_plr, "param4")) local add_item_type = tostring(result.getDataString(result_plr, "param5")) local add_item_name = tostring(result.getDataString(result_plr, "param6")) local received_item = 0 local full_weight = 0 if(add_item_type == 'container') then container_weight = getItemWeight(container_id, 1) if(isItemRune(itemtogive_id)) then items_weight = container_count * getItemWeight(itemtogive_id, 1) else items_weight = container_count * getItemWeight(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeight(itemtogive_id, itemtogive_count) if(isItemRune(itemtogive_id)) then full_weight = getItemWeight(itemtogive_id, 1) else full_weight = getItemWeight(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if(full_weight <= free_cap) then if(add_item_type == 'container') then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while(iter ~= container_count) do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) received_item = doPlayerAddItemEx(cid, new_item) end if(type(received_item) == "number" and received_item == RETURNVALUE_NOERROR) then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '..SQL_interval ..' seconds to get it.') end end until not result.next(result_plr) result.free(result_plr) end return true end Em data/globalevents/globalevents.xml adicione a seguinte tag: <globalevent name="shopguild" interval="300" event="script" value="shopguild.lua"/> Certo, a parte do servidor é esta, ta feita, vamos adicionar a database o coder a seguir: ALTER TABLE `accounts` ADD `guild_points` INTEGER(11) NOT NULL DEFAULT 0; ALTER TABLE `accounts` ADD `guild_points_stats` INT NOT NULL DEFAULT '0'; ALTER TABLE `guilds` ADD `last_execute_points` INT NOT NULL DEFAULT '0'; CREATE TABLE `z_shopguild_offer` ( `id` int(11) NOT NULL auto_increment, `points` int(11) NOT NULL default '0', `itemid1` int(11) NOT NULL default '0', `count1` int(11) NOT NULL default '0', `itemid2` int(11) NOT NULL default '0', `count2` int(11) NOT NULL default '0', `offer_type` varchar(255) default NULL, `offer_description` text NOT NULL, `offer_name` varchar(255) NOT NULL, `pid` INT(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`)) CREATE TABLE `z_shopguild_history_item` ( `id` int(11) NOT NULL auto_increment, `to_name` varchar(255) NOT NULL default '0', `to_account` int(11) NOT NULL default '0', `from_nick` varchar(255) NOT NULL, `from_account` int(11) NOT NULL default '0', `price` int(11) NOT NULL default '0', `offer_id` int(11) NOT NULL default '0', `trans_state` varchar(255) NOT NULL, `trans_start` int(11) NOT NULL default '0', `trans_real` int(11) NOT NULL default '0', PRIMARY KEY (`id`)) CREATE TABLE `z_shopguild_history_pacc` ( `id` int(11) NOT NULL auto_increment, `to_name` varchar(255) NOT NULL default '0', `to_account` int(11) NOT NULL default '0', `from_nick` varchar(255) NOT NULL, `from_account` int(11) NOT NULL default '0', `price` int(11) NOT NULL default '0', `pacc_days` int(11) NOT NULL default '0', `trans_state` varchar(255) NOT NULL, `trans_start` int(11) NOT NULL default '0', `trans_real` int(11) NOT NULL default '0', PRIMARY KEY (`id`)) CREATE TABLE IF NOT EXISTS `z_ots_guildcomunication` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, `action` varchar(255) NOT NULL, `param1` varchar(255) NOT NULL, `param2` varchar(255) NOT NULL, `param3` varchar(255) NOT NULL, `param4` varchar(255) NOT NULL, `param5` varchar(255) NOT NULL, `param6` varchar(255) NOT NULL, `param7` varchar(255) NOT NULL, `delete_it` int(2) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13107; Olha estamos quase finalizando tudo, só precisamos terminar a parte de web. O meu GuildShop eu copiei meu shopsystem.php e fiz umas modificações, simples você pode fazer o mesmo é menos trabalhoso. Copie o shopsystem.php renomeie para shopguild.php, após abra-o e modifique como manda a seguir: shop_system para shopguild_system premium_points para guild_points premium points para guild points z_shop_offer para z_shopguild_offer shopsystem para shopguild z_shop_history_pacc para z_shopguild_history_pacc z_shop_history_item para z_shopguild_history_item z_ots_comunication para z_ots_guildcomunication Ou utilize este já pronto: shopguild.php O shopguildadmin.php está no link abaixo, basta fazer o mesmo procedimento: shopguildadmin.php Em index.php add: case "shopguild"; $topic = "Shop Guild"; $subtopic = "shopguild"; include("shopguild.php"); break; case "shopguildadmin"; $topic = "ShopGuild Admin"; $subtopic = "shopguildadmin"; include("shopguildadmin.php"); break; Vá em config.php adicione: $config['site']['shopguild_system'] = 1; $config['site']['access_adminguild_panel'] = 9; Vá em layouts.php adicione abaixo de buypoints: <a href='?subtopic=shopguild'> <div id='submenu_shopguild' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)'onMouseOut='MouseOutSubmenuItem(this)'> <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div> <div id='ActiveSubmenuItemIcon_shopguild' class='ActiveSubmenuItemIcon'style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div> <div class='SubmenuitemLabel'>Shop Guild</div> <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div> </div> </a> Em layouts.php add depois do shopadmin: if($group_id_of_acc_logged >= $config['site']['access_adminguild_panel']) echo "<a href='?subtopic=shopadmin'> <div id='submenu_shopguildadmin' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)'onMouseOut='MouseOutSubmenuItem(this)'> <div class='LeftChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div> <div id='ActiveSubmenuItemIcon_shopguildadmin' class='ActiveSubmenuItemIcon'style='background-image:url(".$layout_name."/images/menu/icon-activesubmenu.gif);'></div> <div class='SubmenuitemLabel'><font color=red>! ShopGuild Admin !</font></div> <div class='RightChain' style='background-image:url(".$layout_name."/images/general/chain.gif);'></div> </div> </a>"; Em shopsystem.php procure por: elseif($action == 'show_history') { if(!$logged) { $main_content .= 'Please login first.'; } else{ $items_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_item').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';'); if(is_object($items_history_received)) { foreach($items_history_received as $item_received) { if($account_logged->getId() == $item_received['to_account']) $char_color = 'green'; else $char_color = 'red'; $items_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$item_received['to_name'].'</font></td><td>'; if($account_logged->getId() == $item_received['from_account']) $items_received_text .= '<i>Your account</i>'; else $items_received_text .= $item_received['from_nick']; $items_received_text .= '</td><td>'.$item_received['offer_id'].'</td><td>'.$item_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $item_received['trans_start']).'</td>'; if($item_received['trans_real'] > 0) $items_received_text .= '<td>'.date("j F Y, H:i:s",$item_received['trans_real']).'</td>'; else $items_received_text .= '<td><b><font color="red">Not realized yet.</font></b></td>'; $items_received_text .= '</tr>'; } } $paccs_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_pacc').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';'); if(is_object($paccs_history_received)) { foreach($paccs_history_received as $pacc_received) { if($account_logged->getId() == $pacc_received['to_account']) $char_color = 'green'; else $char_color = 'red'; $paccs_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$pacc_received['to_name'].'</font></td><td>'; if($account_logged->getId() == $pacc_received['from_account']) $paccs_received_text .= '<i>Your account</i>'; else $paccs_received_text .= $pacc_received['from_nick']; $paccs_received_text .= '</td><td>'.$pacc_received['pacc_days'].' days</td><td>'.$pacc_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $pacc_received['trans_real']).'</td></tr>'; } } $main_content .= '<center><h1>Transactions History</h1></center>'; if(!empty($items_received_text)) $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="6"><font color="white" size="4"><b> Item Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Offer name</b></td><td><b>Cost</b></td><td><b>Bought on page</b></td><td><b>Received on '.$config['server']['serverName'].'</b></td></tr>'.$items_received_text.'</table><br />'; if(!empty($paccs_received_text)) $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="5"><font color="white" size="4"><b> Pacc Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Duration</b></td><td><b>Cost</b></td><td><b>Added:</b></td></tr>'.$paccs_received_text.'</table><br />'; if(empty($paccs_received_text) && empty($items_received_text)) $main_content .= 'You did not buy/receive any items or PACC.'; } } Troque por: elseif($action == 'show_history') { if(!$logged) { $main_content .= 'Please login first.'; } else{ $items_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_item').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';'); if(is_object($items_history_received)) { foreach($items_history_received as $item_received) { if($account_logged->getId() == $item_received['to_account']) $char_color = 'green'; else $char_color = 'red'; $items_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$item_received['to_name'].'</font></td><td>'; if($account_logged->getId() == $item_received['from_account']) $items_received_text .= '<i>Your account</i>'; else $items_received_text .= $item_received['from_nick']; $items_received_text .= '</td><td>'.$item_received['offer_id'].'</td><td>'.$item_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $item_received['trans_start']).'</td>'; if($item_received['trans_real'] > 0) $items_received_text .= '<td>'.date("j F Y, H:i:s",$item_received['trans_real']).'</td>'; else $items_received_text .= '<td><b><font color="red">Not realized yet.</font></b></td>'; $items_received_text .= '</tr>'; } } $itemsguild_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shopguild_history_item').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';'); if(is_object($itemsguild_history_received)) { foreach($itemsguild_history_received as $itemguild_received) { if($account_logged->getId() == $itemguild_received['to_account']) $char_color = 'green'; else $char_color = 'red'; $itemsguild_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$itemguild_received['to_name'].'</font></td><td>'; if($account_logged->getId() == $itemguild_received['from_account']) $itemsguild_received_text .= '<i>Your account</i>'; else $itemsguild_received_text .= $itemguild_received['from_nick']; $itemsguild_received_text .= '</td><td>'.$itemguild_received['offer_id'].'</td><td>'.$itemguild_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $itemguild_received['trans_start']).'</td>'; if($itemguild_received['trans_real'] > 0) $itemsguild_received_text .= '<td>'.date("j F Y, H:i:s",$itemguild_received['trans_real']).'</td>'; else $itemsguild_received_text .= '<td><b><font color="red">Not realized yet.</font></b></td>'; $itemsguild_received_text .= '</tr>'; } } $paccs_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_pacc').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';'); if(is_object($paccs_history_received)) { foreach($paccs_history_received as $pacc_received) { if($account_logged->getId() == $pacc_received['to_account']) $char_color = 'green'; else $char_color = 'red'; $paccs_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$pacc_received['to_name'].'</font></td><td>'; if($account_logged->getId() == $pacc_received['from_account']) $paccs_received_text .= '<i>Your account</i>'; else $paccs_received_text .= $pacc_received['from_nick']; $paccs_received_text .= '</td><td>'.$pacc_received['pacc_days'].' days</td><td>'.$pacc_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $pacc_received['trans_real']).'</td></tr>'; } } $paccsguild_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shopguild_history_pacc').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';'); if(is_object($paccsguild_history_received)) { foreach($paccsguild_history_received as $paccguild_received) { if($account_logged->getId() == $paccguild_received['to_account']) $char_color = 'green'; else $char_color = 'red'; $paccsguild_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$paccguild_received['to_name'].'</font></td><td>'; if($account_logged->getId() == $paccguild_received['from_account']) $paccsguild_received_text .= '<i>Your account</i>'; else $paccsguild_received_text .= $paccguild_received['from_nick']; $paccsguild_received_text .= '</td><td>'.$paccguild_received['pacc_days'].' days</td><td>'.$paccguild_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $paccguild_received['trans_real']).'</td></tr>'; } } $main_content .= '<center><h1>Transactions History</h1></center>'; if(!empty($items_received_text)) $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="6"><font color="white" size="4"><b> ShopServer Item Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Offer name</b></td><td><b>Cost</b></td><td><b>Bought on page</b></td><td><b>Received on '.$config['server']['serverName'].'</b></td></tr>'.$items_received_text.'</table><br />'; if(!empty($itemsguild_received_text)) $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="6"><font color="white" size="4"><b> ShopGuild Item Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Offer name</b></td><td><b>Cost</b></td><td><b>Bought on page</b></td><td><b>Received on '.$config['server']['serverName'].'</b></td></tr>'.$itemsguild_received_text.'</table><br />'; if(!empty($paccs_received_text)) $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="5"><font color="white" size="4"><b> ShopServer VIP Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Duration</b></td><td><b>Cost</b></td><td><b>Added:</b></td></tr>'.$paccs_received_text.'</table><br />'; if(!empty($paccsguild_received_text)) $main_content .= '<center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=95%><tr width="100%" bgcolor="#505050"><td colspan="5"><font color="white" size="4"><b> ShopGuild VIP Transactions</b></font></td></tr><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Duration</b></td><td><b>Cost</b></td><td><b>Added:</b></td></tr>'.$paccsguild_received_text.'</table><br />'; if(empty($paccs_received_text) && empty($items_received_text)) $main_content .= 'You did not buy/receive any items or PACC.'; if(empty($paccsguild_received_text) && empty($itemsguild_received_text)) $main_content .= 'You did not buy/receive any items or PACC.'; } } Finalmente terminamos! Bom todo esse processo é feito só para facilitar tudo pra você e o player e pra diferenciar o Shop System do Shop Guild, porque um sustenta as despesas do server e o outro atrai player, porque pra ter player é preciso ter player. Galera acredito que não esteja faltando nada, espero que gostem e tudo que eu poder fazer para nossas melhoras estarei postando, me desculpem meu erros de português mais o que importa aqui é o script está correto, abraços! Créditos: Natanael Beckman Não proíbo ninguém de copia o tópico só peço que onde você adicione inclua os créditos mencionados.
  23. Boa noite amigos, estou precisando modificar esse script, ele esta programado pra funcionar com uniqueid 3144, 3145 e 3146, eu queria que ele funcionasse com actionid 3144, 3145 e 3146 ja mudei local boss = bosses[item.uid] >>>> para local boss = bosses[item.aid] (além de mudar em moviments.xml para aid) mas nao funciona. Alguém me ajuda? local bosses = { [3144] = {position = Position(33099, 31950, 10), name = 'deathstrike'}, [3145] = {position = Position(33103, 31951, 11), name = 'gnomevil'}, [3146] = {position = Position(33081, 31902, 12), name = 'abyssador', checkItemId = 18463}, } function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return true end local boss = bosses[item.uid] if boss.checkItemId then if Tile(position):getItemById(boss.checkItemId) then return true end end player:teleportTo(boss.position) boss.position:sendMagicEffect(CONST_ME_TELEPORT) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have half an hour to heroically defeat ' .. boss.name .. '. Otherwise you\'ll be teleported out by the gnomish emergency device.') return true end
  24. Olá pessoal, Feliz natal. Eu gostaria de fazer alguma coisa especial para esse natal que já está passando... (pois é, estou atrasado) então fiz esse script, para criar um clima de natal no seu otserver, que ao clicar num monte de neve, você joga uma bola de neve, e faz um boneco de neve se desfazer... Bom... nada melhor para explicar, do que um vídeo: Script:
  25. Galera meu tfs é 1.2 e eu gostaria de trocar o articlo do meu site para esse aqui eu tambem preciso do passo a passo de como mudar obrigado. meu site e burberry-global.servegame.com latestnews.php <div id="LayerPop" style="display:block; position:absolute; left:0px; top:-520px;"></div> <div id="LayerPop2" align="center" style="position: absolute; top:-520px; margin:auto; padding:auto; width: 100%; z-index: 5000;"><a href="?subtopic=store" target="_BLANK"><img src="http://i.imgur.com/iuihazN.png" class="imgBorder"></a><BR /><input type="button" name="fechar" value="FECHAR" onclick="document.getElementById('LayerPop').style.display = 'none';document.getElementById('LayerPop2').style.display = 'none'" style="font-family: Verdana; font-weight: bold; font-size:10px; color: #FFFFFF; background-color: #000000; border: 1px solid #fffff;"></div> <?PHP header("Content-Type: text/html; charset=ISO-8859-1",true); date_default_timezone_set('America/Sao_Paulo'); // top kills - guilds $main_content .= '<center><div class="NewsHeadline"> <div class="NewsHeadlineBackground" style="background-image:url(' . $layout_name . '/images/news/newsheadline_background.gif);"> <table border="0"> <tr> <td style="text-align: center; font-weight: bold;"> <font color="white">Most powerfull guilds</font> </td> </tr> </table> </div> </div> <table border="0" cellspacing="3" cellpadding="4" width="100%"><tr>'; foreach($SQL->query('SELECT `g`.`id` AS `id`, `g`.`name` AS `name`, COUNT(`g`.`name`) as `frags` FROM `players` p LEFT JOIN `player_deaths` pd ON `pd`.`killed_by` = `p`.`name` LEFT JOIN `guild_membership` gm ON `p`.`id` = `gm`.`player_id` LEFT JOIN `guilds` g ON `gm`.`guild_id` = `g`.`id` WHERE `g`.`id` > 0 AND `pd`.`unjustified` = 1 GROUP BY `name` ORDER BY `frags` DESC, `name` ASC LIMIT 6;') as $guild) $main_content .= '<td style="width: 25%; text-align: center;"><a href="?subtopic=guilds&action=show&guild=' . $guild['id'] . '"><img src="guild_image.php?id=' . $guild['id'] . '" width="64" height="64" border="0"/> <br />' . $guild['name'] . '</a><br />' . $guild['frags'] . ' kills </td>'; $main_content .= '</tr></table></center>'; date_default_timezone_set('America/Sao_Paulo'); //######################## SHOW TICKERS AND NEWS ####################### if ($logged){ $players_from_account = $SQL->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll(); foreach($players_from_account as $player) { $str .= '<option value="'.$player['id'].'"'; if($player['id'] == $char_id) $strt .= ' selected="selected"'; $str .= '>'.$player['name'].'</option>'; } } $time = time(); $news_content .= ' <div id="newsticker" class="Box"> <div class="Corner-tl" style="background-image: url('.$layout_name.'/images/content/corner-tl.gif);"></div> <div class="Corner-tr" style="background-image: url('.$layout_name.'/images/content/corner-tr.gif);"></div> <div class="Border_1" style="background-image: url('.$layout_name.'/images/content/border-1.gif);"></div> <div class="BorderTitleText" style="background-image: url('.$layout_name.'/images/content/title-background-green.gif);"></div> <img class="Title" src="/images/head/News Ticker.png" alt="Contentbox headline" /> <div class="Border_2"> <div class="Border_3"> <div class="BoxContent" style="background-image: url('.$layout_name.'/images/content/scroll.gif);">'; //##################### ADD NEW TICKER ##################### if($action == "newticker") { if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) { $ticker_text = stripslashes(trim($_POST['new_ticker'])); $ticker_icon = (int) $_POST['icon_id']; if(empty($ticker_text)) { $news_content .= 'You can\'t add empty ticker.'; } else { if(empty($ticker_icon)) { $news_icon = 0; } $SQL->query('INSERT INTO '.$SQL->tableName('z_news_tickers').' (date, author, image_id, text, hide_ticker) VALUES ('.$SQL->quote($time).', '.$account_logged->getId().', '.$ticker_icon.', '.$SQL->quote($ticker_text).', 0)'); $news_content .= '<center><h2><font color="red">Added new ticker:</font></h2></center><hr/> <div id="newsticker" class="Box"> <div id="TickerEntry-1" class="Row" onclick=\'TickerAction("TickerEntry-1")\'> <div class="Odd"> <div class="NewsTickerIcon" style="background-image: url('.$layout_name.'/images/news/icon_'.$ticker['image_id'].'.gif);"></div> <div id="TickerEntry-1-Button" class="NewsTickerExtend" style="background-image: url('.$layout_name.'/images/general/plus.gif);"></div> <div class="NewsTickerText"> <span class="NewsTickerDate">'.date("j M Y", $time).' -</span> <div id="TickerEntry-1-ShortText" class="NewsTickerShortText">'; $news_content .= '<a href="index.php?subtopic=latestnews&action=deleteticker&id='.$time.'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>'; $news_content .= short_text($ticker_text, 60).' </div> <div id="TickerEntry-1-FullText" class="NewsTickerFullText">'; $news_content .= '<a href="index.php?subtopic=latestnews&action=deleteticker&id='.$time.'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>'; $news_content .= $ticker_text.' </div> </div> </div> </div> </div><hr/>'; } } else { $news_content .= 'You don\'t have admin rights. You can\'t add new ticker.'; } $news_content .= '<form action="index.php?subtopic=latestnews" 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>'; } //#################### DELETE (HIDE only!) TICKER ############################ if($action == "deleteticker") { if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) { header("Location: "); $date = (int) $_REQUEST['id']; $SQL->query('UPDATE '.$SQL->tableName('z_news_tickers').' SET hide_ticker = 1 WHERE '.$SQL->fieldName('date').' = '.$date.';'); $news_content .= '<center>News tickets with <b>date '.date("j M Y", $date).'</b> has been deleted.<form action="index.php?subtopic=latestnews" 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></center>'; } else { $news_content .= '<center>You don\'t have admin rights. You can\'t delete tickers.<form action="index.php?subtopic=latestnews" 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></center>'; } } //show tickers if any in database or not blocked (tickers limit = 0) $tickers = $SQL->query('SELECT * FROM `z_news_tickers` WHERE hide_ticker != 1 ORDER BY date DESC LIMIT 50;'); $number_of_tickers = 0; if(is_object($tickers)) { foreach($tickers as $ticker) { if(is_int($number_of_tickers / 2)) $color = "Odd"; else $color = "Even"; $tickers_to_add .= ' <div id="TickerEntry-'.$number_of_tickers.'" class="Row" onclick=\'TickerAction("TickerEntry-'.$number_of_tickers.'")\'> <div class="'.$color.'"> <div class="NewsTickerIcon" style="background-image: url('.$layout_name.'/images/news/icon_'.$ticker['image_id'].'.gif);"></div> <div id="TickerEntry-'.$number_of_tickers.'-Button" class="NewsTickerExtend" style="background-image: url('.$layout_name.'/images/general/plus.gif);"></div> <div class="NewsTickerText"> <span class="NewsTickerDate">'.date("j M Y", $ticker['date']).' -</span> <div id="TickerEntry-'.$number_of_tickers.'-ShortText" class="NewsTickerShortText">'; //if admin show button to delete (hide) ticker if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) { $tickers_to_add .= '<a href="index.php?subtopic=latestnews&action=deleteticker&id='.$ticker['date'].'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>'; } $tickers_to_add .= short_text($ticker['text'], 60).'</div> <div id="TickerEntry-'.$number_of_tickers.'-FullText" class="NewsTickerFullText">'; //if admin show button to delete (hide) ticker if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) { $tickers_to_add .= '<a href="index.php?subtopic=latestnews&action=deleteticker&id='.$ticker['date'].'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>'; } $tickers_to_add .= $ticker['text'].'</div> </div> </div> </div>'; $number_of_tickers++; } } if(!empty($tickers_to_add)) { //show table with tickers if($group_id_of_acc_logged >= $config['site']['access_admin_panel'] && $action!=newticker) $news_content .= '<script type="text/javascript"> var showednewticker_state = "0"; function showNewTickerForm() { if(showednewticker_state == "0") { document.getElementById("newtickerform").innerHTML = \'<form action="index.php?subtopic=latestnews&action=newticker" method="post" ><table border="0"><tr><td bgcolor="D4C0A1" align="center"><b>Select icon:</b></td><td><table border="0" bgcolor="F1E0C6"><tr><td><img src="'.$layout_name.'/images/news/icon_0.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_1.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_2.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_3.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_4.gif" width="20"></td></tr><tr><td><input type="radio" name="icon_id" value="0" checked="checked"></td><td><input type="radio" name="icon_id" value="1"></td><td><input type="radio" name="icon_id" value="2"></td><td><input type="radio" name="icon_id" value="3"></td><td><input type="radio" name="icon_id" value="4"></td></tr></table></td></tr><tr><td align="center" bgcolor="D4C0A1"><b>New<br>ticker<br>text:</b></td><td bgcolor="F1E0C6"><textarea name="new_ticker" rows="3" cols="45"></textarea></td></tr><tr><td><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></form><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><img class="ButtonText" id="AddTicker" src="'.$layout_name.'/images/buttons/_sbutton_cancel.gif" onClick="showNewTickerForm()" alt="AddTicker" /></div></div></td></tr></table>\'; document.getElementById("jajo").innerHTML = \'\'; showednewticker_state = "1"; } else { document.getElementById("newtickerform").innerHTML = \'\'; document.getElementById("jajo").innerHTML = \'<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><img class="ButtonText" id="AddTicker" src="'.$layout_name.'/images/buttons/addticker.gif" onClick="showNewTickerForm()" alt="AddTicker" /></div></div>\'; showednewticker_state = "0"; } } </script><div id="newtickerform"></div><div id="jajo"><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><img class="ButtonText" id="AddTicker" src="'.$layout_name.'/images/buttons/addticker.gif" onClick="showNewTickerForm()" alt="AddTicker" /></div></div></div><hr/>'; //add tickers list $news_content .= $tickers_to_add; //koniec } $news_content .= '</div> </div> </div> <div class="Border_1" style="background-image: url('.$layout_name.'/images/content/border-1.gif);"></div> <div class="CornerWrapper-b"><div class="Corner-bl" style="background-image: url('.$layout_name.'/images/content/corner-bl.gif);"></div></div> <div class="CornerWrapper-b"><div class="Corner-br" style="background-image: url('.$layout_name.'/images/content/corner-br.gif);"></div></div> </div>'; //end of tickers, news part //featured article //sem creditos do autor, apenas postado por Dhenyz Shady no X-tibia. $news_content .= ' <div id="news" class="Box"> <div class="Corner-tl" style="background-image:url('.$layout_name.'/images/content/corner-tl.gif);"></div> <div class="Corner-tr" style="background-image:url('.$layout_name.'/images/content/corner-tr.gif);"></div> <div class="Border_1" style="background-image:url('.$layout_name.'/images/content/border-1.gif);"></div> <div class="BorderTitleText" style="background-image:url(layouts/tibiacom/images/content/title-background-green.gif);"></div> <img class="Title" src="/images/head/Featured Article.png" alt="Contentbox headline" /> <div class="Border_2"> <div class="Border_3"> <div class="BoxContent" style="background-image:url('.$layout_name.'/images/content/scroll.gif);"> <div id=\'TeaserThumbnail\'><img src="layouts/tibiacom/images/news/topitems.jpg" width=275 height=200 border=0 alt="" ALIGN=right hspace="10" /></div> <div id=\'TeaserText\'> <div style="position: relative; top: -9px; margin-bottom: 10px;"></br> <b><font size="5px"><center><b><font style="text-decoration: inherit; text-shadow:#000 1px -1px 2px, #000 -1px 1px 2px, #000 1px 1px 2px, #000 -1px -1px 2px" size="1px" color="white">| IP: <font color="green">burberry-global.servegame.com</font> / Port: <font color="green">7171</font> / Client: <font color="green">10.90</font> |</b></font></center><br></b><font size="2px">Seja bem vindo ao <b><font color="green">burberry-global</font></b>, contamos com o <b>RLMAP</b> mais completo de todos os servidores atualmente, principais quests <b>SEM MISSOES</b>, Cooldown e Magias reformuladas para um PvP mais dinamico e divertido. <b>Exp shared 100%, All Quests</b>. Diversos bugs fixados e sendo arrumados diariamente. Venha conferir o melhor servidor de todos os tempos! Aqui sua diversao e garantida.<br><center><b><a href="http://www.mediafire.com/download/2vgvbjyc1gjc211/TibiaWix.rar">Download Client</a> | <a href="?subtopic=createaccount">Criar Conta</a></center></b> </font> </div> </div> </div> </div> </div> <div class="Border_1" style="background-image: url('.$layout_name.'/images/content/border-1.gif);"></div> <div class="CornerWrapper-b"><div class="Corner-bl" style="background-image: url('.$layout_name.'/images/content/corner-bl.gif);"></div></div> <div class="CornerWrapper-b"><div class="Corner-br" style="background-image: url('.$layout_name.'/images/content/corner-br.gif);"></div></div> </div> '; //Fim do featured Article //adding news if($action == "newnews") { if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) { $text = ($_REQUEST['text']); $char_id = (int) $_REQUEST['char_id']; $post_topic = stripslashes(trim($_REQUEST['topic'])); $smile = (int) $_REQUEST['smile']; $news_icon = (int) $_REQUEST['icon_id']; if(empty($news_icon)) { $news_icon = 0; } if(empty($post_topic)) { $an_errors[] .= 'You can\'t add news without topic.'; } if(empty($text)) { $an_errors[] .= 'You can\'t add empty news.'; } if(empty($char_id)) { $an_errors[] .= 'Select character.'; } //execute query if(empty($an_errors)) { $SQL->query("INSERT INTO `z_forum` (`id` ,`first_post` ,`last_post` ,`section` ,`replies` ,`views` ,`author_aid` ,`author_guid` ,`post_text` ,`post_topic` ,`post_smile` ,`post_date` ,`last_edit_aid` ,`edit_date`, `post_ip`, `icon_id`) VALUES ('NULL', '0', '".time()."', '1', '0', '0', '".$account_logged->getId()."', '".(int) $char_id."', ".$SQL->quote($text).", ".$SQL->quote($post_topic).", '".(int) $smile."', '".time()."', '0', '0', '".$_SERVER['REMOTE_ADDR']."', '".$news_icon."')"); $thread_id = $SQL->lastInsertId(); $SQL->query("UPDATE `z_forum` SET `first_post`=".(int) $thread_id." WHERE `id` = ".(int) $thread_id);//show added data $main_content .= '<form action="index.php?subtopic=latestnews" 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>'; } 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($an_errors as $an_error) { $main_content .= '<li>'.$an_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/>'; //okno edycji newsa z wpisanymi danymi przeslanymi wczesniej $main_content .= '<form action="index.php?subtopic=latestnews&action=newnews" method="post" ><table border="0"><tr><td bgcolor="D4C0A1" align="center"><b>Select icon:</b></td><td><table border="0" bgcolor="F1E0C6"><tr><td><img src="'.$layout_name.'/images/news/icon_0.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_1.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_2.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_3.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_4.gif" width="20"></td></tr><tr><td><input type="radio" name="icon_id" value="0" checked="checked"></td><td><input type="radio" name="icon_id" value="1"></td><td><input type="radio" name="icon_id" value="2"></td><td><input type="radio" name="icon_id" value="3"></td><td><input type="radio" name="icon_id" value="4"></td></tr></table></td></tr><tr><td align="center" bgcolor="F1E0C6"><b>Topic:</b></td><td><input type="text" name="topic" maxlenght="50" style="width: 300px" value="'.$post_topic.'"></td></tr><tr><td align="center" bgcolor="D4C0A1"><b>News<br>text:</b></td><td bgcolor="F1E0C6"><textarea name="text" rows="6" cols="60">'.$text.'</textarea></td></tr><tr><td width="180"><b>Character:</b></td><td><select name="char_id"><option value="0">(Choose character)</option>'.$str.'</select></td></tr><tr><td><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></form><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><img class="ButtonText" id="CancelAddNews" src="'.$layout_name.'/images/buttons/_sbutton_cancel.gif" onClick="location.href=\'index.php?subtopic=latestnews\';" alt="CancelAddNews" /></div></div></td></tr></table>'; } } else { $main_content .= 'You don\'t have site-admin rights. You can\'t add news.';} } //####################Show script with new news panel############################ if($group_id_of_acc_logged >= $config['site']['access_admin_panel'] && $action != 'newnews') { $main_content .= ' <font style="font-size: 16px; font-weight: bold; margin-left: 20px;">New News</font> <form action="index.php?subtopic=latestnews&action=newnews" method="post" > <table border="0"> <tr> <td bgcolor="D4C0A1" align="center"><b>Select icon:</b></td> <td> <table border="0"> <tr bgcolor="F1E0C6"> <td><img src="'.$layout_name.'/images/news/icon_0.gif" width="20"></td> <td><img src="'.$layout_name.'/images/news/icon_1.gif" width="20"></td> <td><img src="'.$layout_name.'/images/news/icon_2.gif" width="20"></td> <td><img src="'.$layout_name.'/images/news/icon_3.gif" width="20"></td> <td><img src="'.$layout_name.'/images/news/icon_4.gif" width="20"></td> </tr> <tr bgcolor="D4C0A1"> <td><input type="radio" name="icon_id" value="0" checked="checked"></td> <td><input type="radio" name="icon_id" value="1" /></td> <td><input type="radio" name="icon_id" value="2" /></td> <td><input type="radio" name="icon_id" value="3" /></td> <td><input type="radio" name="icon_id" value="4" /></td> </tr> </table> </td> </tr> <tr> <td align="center" bgcolor="F1E0C6"><b>Topic:</b></td> <td><input type="text" name="topic" maxlenght="50" style="width: 300px" ></td> </tr> <tr> <td align="center" bgcolor="D4C0A1"><b>News<br>text:</b></td> <td bgcolor="F1E0C6"><textarea name="text" rows="6" cols="60"></textarea></td> </tr> <tr> <td width="180"><b>Character:</b></td> <td><select name="char_id"><option value="0">(Choose character)</option>'.$str.'</select></td> </tr> <tr> <td> <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></form></td></tr> </table> <hr/>'; $zapytanie = $SQL->query("SELECT `z_forum`.`icon_id`,`z_forum`.`post_topic`, `z_forum`.`author_guid`, `z_forum`.`post_date`, `z_forum`.`post_text`, `z_forum`.`id`, `z_forum`.`replies`, `players`.`name` FROM `z_forum`, `players` WHERE `section` = '1' AND `z_forum`.`id` = `first_post` AND `players`.`id` = `z_forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 3;")->fetchAll(); } ///show news $announcements = $SQL->query("SELECT * FROM `announcements` WHERE id ORDER BY `date` DESC LIMIT 1"); foreach ($announcements as $announcementsRow){ $news_content .= '<div id="featuredarticle" class="Box"> <div class="Corner-tl" style="background-image:url('.$layout_name.'/images/content/corner-tl.gif);"></div> <div class="Corner-tr" style="background-image:url('.$layout_name.'/images/content/corner-tr.gif);"></div> <div class="Border_1" style="background-image:url('.$layout_name.'/images/content/border-1.gif);"></div> <div class="BorderTitleText" style="background-image:url('.$layout_name.'/images/content/title-background-green.gif);"></div> <img class="Title" src="montaimg.php?text=Announcement" alt="Contentbox headline" /> <div class="Border_2"> <div class="Border_3"> <div class="BoxContent" style="background-image:url('.$layout_name.'/images/content/scroll.gif);"> <div id="TeaserThumbnail"><img src="images/news/announcement.jpg" width="150" height="100" border="0" alt="" /></div> <div id="TeaserText"> <div style="position: relative; margin-bottom: 2px;" > <div style="font-size:18px; font-weight:bold;">'.$announcementsRow['title'].'</div> </div> '.$announcementsRow['text'].' <br /> <br /> <small style="float: right;">Posted by <font color="red">'.$announcementsRow['author'].'</font> - '.date("d M Y", $announcementsRow['date']).'</small>'; if ($logged)if ($account_logged->getCustomField("page_access") > 6 ){ $news_content .='<input type="button" value="Deletar" OnClick="location.href=\'index.php?subtopic=cpanel&action=deletar_ann&id='.$announcementsRow['id'].'\'" />';} $news_content .=' </div> </div> </div> </div> <div class="Border_1" style="background-image:url('.$layout_name.'/images/content/border-1.gif);"></div> <div class="CornerWrapper-b"><div class="Corner-bl" style="background-image:url('.$layout_name.'/images/content/corner-bl.gif);"></div></div> <div class="CornerWrapper-b"><div class="Corner-br" style="background-image:url('.$layout_name.'/images/content/corner-br.gif);"></div></div> </div> '; } // $zapytanie = $SQL->query("SELECT `z_forum`.`icon_id`,`z_forum`.`post_topic`, `z_forum`.`author_guid`, `z_forum`.`post_date`, `z_forum`.`post_text`, `z_forum`.`id`, `z_forum`.`replies`, `players`.`name` FROM `z_forum`, `players` WHERE `section` = '1' AND `z_forum`.`id` = `first_post` AND `players`.`id` = `z_forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 6;")->fetchAll(); foreach ($zapytanie as $row) { $BB = array( '/\[youtube\](.*?)\[\/youtube\]/is' => '<center><object width="500" height="405"><param name="movie" value="http://www.youtube.com/watch?v=$1&hl=pt-br&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/watch?v=$1&hl=pt-br&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="405"></embed></object></center>', '/\[b\](.*?)\[\/b\]/is' => '<strong>$1</strong>', '/\[center\](.*?)\[\/center\]/is' => '<center>$1</center>', '/\[quote\](.*?)\[\/quote\]/is' => '<table cellpadding="0" style="background-color: #c4c4c4; width: 480px; border-style: dotted; border-color: #007900; border-width: 2px"><tr><td>$1</td></tr></table>', '/\[u\](.*?)\[\/u\]/is' => '<u>$1</u>', '/\[i\](.*?)\[\/i\]/is' => '<i>$1</i>', '/\[letter\](.*?)\[\/letter\]/is' => '<img src=images/letters/$1.gif alt=$1 />', '/\[url](.*?)\[\/url\]/is' => '<a href=$1>$1</a>', '/\[color\=(.*?)\](.*?)\[\/color\]/is' => '<span style="color: $1;">$2</span>', '/\[img\](.*?)\[\/img\]/is' => '<img src=$1 alt=$1 />', '/\[player\](.*?)\[\/player\]/is' => '<a href='.$server['ip'].'index.php?subtopic=characters&name=$1>$1</a>', '/\[code\](.*?)\[\/code\]/is' => '<div dir="ltr" style="margin: 0px;padding: 2px;border: 1px inset;width: 500px;height: 290px;text-align: left;overflow: auto"><code style="white-space:nowrap">$1</code></div>' ); $message = preg_replace(array_keys($BB), array_values($BB), nl2br($row['post_text'])); $main_content .= ' <div class="NewsHeadline"> <img class="Title" src="/images/head/Latest News.png" alt="Contentbox headline" /> <div class="NewsHeadlineBackground" style="background-image:url('.$layout_name.'/images/news/newsheadline_background.gif)"> <img src="'.$layout_name.'/images/news/icon_'.$row['icon_id'].'_big.gif" class="NewsHeadlineIcon" /> <div class="NewsHeadlineDate">'.date('j M Y', $row['post_date']).' - </div> <div class="NewsHeadlineText">'.$row['post_topic'].'</div> </div> </div> <table style=\'clear:both\' border=0 cellpadding=0 cellspacing=0 width=\'100%\'><tr> <td><img src="'.$layout_name.'/images/global/general/blank.gif" width=10 height=1 border=0 alt=\'\' /></td>'; if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) { $main_content .='<td width="100%">'.$message.'<br><p align="right"><a href="index.php?subtopic=forum&action=remove_post&id='.$row['id'].'"><font color="red">[Delete this news]</font></a> <a href="index.php?subtopic=forum&action=edit_post&id='.$row['id'].'"><font color="green">[Edit this news]</font></a>'; } else { $main_content .='<td width="100%">'.$message.'<br /><br />'; } $main_content .= '</td> <td><img src="'.$layout_name.'/images/global/general/blank.gif" width=10 height=1 border=0 alt=\'\' /></td> </tr></table>'; } ?>
×
×
  • Criar Novo...