Ir para conteúdo

Fir3element

Héroi
  • Registro em

  • Última visita

Tudo que Fir3element postou

  1. tenta ai: <html> <div id="sidebar2"> <div id="box3" class="box-style3"> <div class="main_content"> <table cellpadding="0" cellspacing="0"> <tbody> <tr background="template/naruto/images/contentheader.png"> <td width="537" height="37"> <center> <a style="color: yellow; font-size: 12px; text-shadow: #3d2e05 0.2em 0.2em 0.4em;"> <b>Jutsu</b> </a> </center> </td> </tr> </tbody> </table> <center> <center><img src="/images/choose.png"></center> <center> </center> <table cellspacing="0" cellpadding="0" border="0" style="padding: 0px 0px 0px 0px;"><tbody> <tr style="margin:0;padding:0;"> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=narutos"> <img style="display: block;" src="/images/charactery/normal/4.png" onmouseover="this.src='/images/charactery/flash/4.png'" onmouseout="this.src='/images/charactery/normal/4.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=sasuke"> <img style="display: block;" src="/images/charactery/normal/5.png" onmouseover="this.src='/images/charactery/flash/5.png'" onmouseout="this.src='/images/charactery/normal/5.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=sakura"> <img style="display: block;" src="/images/charactery/normal/6.png" onmouseover="this.src='/images/charactery/flash/6.png'" onmouseout="this.src='/images/charactery/normal/6.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=sai"> <img style="display: block;" src="/images/charactery/normal/7.png" onmouseover="this.src='/images/charactery/flash/7.png'" onmouseout="this.src='/images/charactery/normal/7.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=bee"> <img style="display: block;" src="/images/charactery/normal/8.png" onmouseover="this.src='/images/charactery/flash/8.png'" onmouseout="this.src='/images/charactery/normal/8.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=minato"> <img style="display: block;" src="/images/charactery/normal/9.png" onmouseover="this.src='/images/charactery/flash/9.png'" onmouseout="this.src='/images/charactery/normal/9.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=kakashi"> <img style="display: block;" src="/images/charactery/normal/10.png" onmouseover="this.src='/images/charactery/flash/10.png'" onmouseout="this.src='/images/charactery/normal/10.png'"> </a> </td> </tr> <tr style="margin:0;padding:0;"> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=lee"> <img style="display: block;" src="/images/charactery/normal/11.png" onmouseover="this.src='/images/charactery/flash/11.png'" onmouseout="this.src='/images/charactery/normal/11.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=neji"> <img style="display: block;" src="/images/charactery/normal/12.png" onmouseover="this.src='/images/charactery/flash/12.png'" onmouseout="this.src='/images/charactery/normal/12.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=tenten"> <img style="display: block;" src="/images/charactery/normal/13.png" onmouseover="this.src='/images/charactery/flash/13.png'" onmouseout="this.src='/images/charactery/normal/13.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=kiba"> <img style="display: block;" src="/images/charactery/normal/14.png" onmouseover="this.src='/images/charactery/flash/14.png'" onmouseout="this.src='/images/charactery/normal/14.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=shino"> <img style="display: block;" src="/images/charactery/normal/15.png" onmouseover="this.src='/images/charactery/flash/15.png'" onmouseout="this.src='/images/charactery/normal/15.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=hinata"> <img style="display: block;" src="/images/charactery/normal/16.png" onmouseover="this.src='/images/charactery/flash/16.png'" onmouseout="this.src='/images/charactery/normal/16.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=yamato"> <img style="display: block;" src="/images/charactery/normal/24.png" onmouseover="this.src='/images/charactery/flash/24.png'" onmouseout="this.src='/images/charactery/normal/24.png'"> </a> </td> </tr> <tr style="margin:0;padding:0;"> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=shikamaru"> <img style="display: block;" src="/images/charactery/normal/18.png" onmouseover="this.src='/images/charactery/flash/18.png'" onmouseout="this.src='/images/charactery/normal/18.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=chooji"> <img style="display: block;" src="/images/charactery/normal/19.png" onmouseover="this.src='/images/charactery/flash/19.png'" onmouseout="this.src='/images/charactery/normal/19.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=ino"> <img style="display: block;" src="/images/charactery/normal/20.png" onmouseover="this.src='/images/charactery/flash/20.png'" onmouseout="this.src='/images/charactery/normal/20.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=gaara"> <img style="display: block;" src="/images/charactery/normal/21.png" onmouseover="this.src='/images/charactery/flash/21.png'" onmouseout="this.src='/images/charactery/normal/21.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=kankuro"> <img style="display: block;" src="/images/charactery/normal/22.png" onmouseover="this.src='/images/charactery/flash/22.png'" onmouseout="this.src='/images/charactery/normal/22.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=temari"> <img style="display: block;" src="/images/charactery/normal/23.png" onmouseover="this.src='/images/charactery/flash/23.png'" onmouseout="this.src='/images/charactery/normal/23.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=kabuto"> <img style="display: block;" src="/images/charactery/normal/35.png" onmouseover="this.src='/images/charactery/flash/35.png'" onmouseout="this.src='/images/charactery/normal/35.png'"> </a> </td> </tr> <tr style="margin:0;padding:0;"> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=jiraya"> <img style="display: block;" src="/images/charactery/normal/32.png" onmouseover="this.src='/images/charactery/flash/32.png'" onmouseout="this.src='/images/charactery/normal/32.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=orochimaru"> <img style="display: block;" src="/images/charactery/normal/33.png" onmouseover="this.src='/images/charactery/flash/33.png'" onmouseout="this.src='/images/charactery/normal/33.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=tsunade"> <img style="display: block;" src="/images/charactery/normal/34.png" onmouseover="this.src='/images/charactery/flash/34.png'" onmouseout="this.src='/images/charactery/normal/34.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=tobirama"> <img style="display: block;" src="/images/charactery/normal/3.png" onmouseover="this.src='/images/charactery/flash/3.png'" onmouseout="this.src='/images/charactery/normal/3.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=hashirama"> <img style="display: block;" src="/images/charactery/normal/2.png" onmouseover="this.src='/images/charactery/flash/2.png'" onmouseout="this.src='/images/charactery/normal/2.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=madara"> <img style="display: block;" src="/images/charactery/normal/1.png" onmouseover="this.src='/images/charactery/flash/1.png'" onmouseout="this.src='/images/charactery/normal/1.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=obito"> <img style="display: block;" src="/images/charactery/normal/31.png" onmouseover="this.src='/images/charactery/flash/31.png'" onmouseout="this.src='/images/charactery/normal/31.png'"> </a> </td> </tr> <tr style="margin:0;padding:0;"> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=hidan"> <img style="display: block;" src="/images/charactery/normal/25.png" onmouseover="this.src='/images/charactery/flash/25.png'" onmouseout="this.src='/images/charactery/normal/25.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=kakuzu"> <img style="display: block;" src="/images/charactery/normal/26.png" onmouseover="this.src='/images/charactery/flash/26.png'" onmouseout="this.src='/images/charactery/normal/26.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=deidara"> <img style="display: block;" src="/images/charactery/normal/27.png" onmouseover="this.src='/images/charactery/flash/27.png'" onmouseout="this.src='/images/charactery/normal/27.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=kisame"> <img style="display: block;" src="/images/charactery/normal/28.png" onmouseover="this.src='/images/charactery/flash/28.png'" onmouseout="this.src='/images/charactery/normal/28.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=itachi"> <img style="display: block;" src="/images/charactery/normal/29.png" onmouseover="this.src='/images/charactery/flash/29.png'" onmouseout="this.src='/images/charactery/normal/29.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=konan"> <img style="display: block;" src="/images/charactery/normal/36.png" onmouseover="this.src='/images/charactery/flash/36.png'" onmouseout="this.src='/images/charactery/normal/36.png'"> </a> </td> <td style="margin:0;padding:0;" height="73" width="72"> <a href="index.php?subtopic=nagato"> <img style="display: block;" src="/images/charactery/normal/30.png" onmouseover="this.src='/images/charactery/flash/30.png'" onmouseout="this.src='/images/charactery/normal/30.png'"> </a> </td> </tr> </tbody> </table> </center> </div> </div> </div> </html>
  2. Você precisa fazer sua própria biblioteca, com todas as funções de montaria. Uma base (não testei): -- Config mountStorage = 8888 outfit = {} -- Functions function isMounted(cid) if getPlayerStorageValue(cid, mountStorage) == 1 then return true end return false end function mount(cid, mountName) if getCreatureSummons(cid)[mountName] then table.insert(outfit, getCreatureOutfit(cid)) doSetCreatureOutfit(cid, mountOutfit) setPlayerStorageValue(cid, mountStorage, 1) end end function disMount(cid) doSetCreatureOutfit(cid, outfit) setPlayerStorageValue(cid, mountStorage, -1) end
  3. Fir3element postou uma resposta no tópico em Suporte Tibia OTServer
    Acho que não ta 100% <?xml version="1.0" encoding="UTF-8"?> <monster name="Omrafir" nameDescription="Omrafir" race="fire" experience="40000" speed="480" manacost="0"> <health now="350000" max="350000"/> <look type="12" head="78" body="3" legs="79" feet="79" addons="0" corpse="6068"/> <targetchange interval="2000" chance="25"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag staticattack="90"/> <flag targetdistance="1"/> <flag runonhealth="3000"/> </flags> <attacks> <attack name="melee" interval="2000" skill="390" attack="500"/> <attack name="omrafir wave" interval="2000" chance="17" min="-500" max="-1000"/> <attack name="omrafir beam" interval="2000" chance="15" min="-7000" max="-10000"/> <attack name="fire" interval="2000" chance="15" length="10" spread="0" min="-1000" max="-3000"> <attribute key="areaEffect" value="fireattack"/> </attack> <attack name="fire" interval="2000" chance="20" radius="3" target="0" min="-200" max="-400"> <attribute key="areaEffect" value="redshimmer"/> </attack> <attack name="fire" interval="2000" chance="19" radius="4" target="0" min="-150" max="-300"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="fire" interval="2000" chance="15" radius="1" target="1" min="-0" max="-0"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="fire"/> </attack> <attack name="firefield" interval="2000" chance="12" radius="3" target="1"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="fireattack"/> </attack> </attacks> <defenses armor="155" defense="165"> <defense name="healing" interval="2000" chance="22" min="440" max="800"> <attribute key="areaEffect" value="redspark"/> </defense> <defense name="omrafir summon" interval="2000" chance="50"/> <defense name="omrafir healing 2" interval="2000" chance="20"/> </defenses> <elements> <element earthPercent="50"/> <element deathPercent="50"/> <element icePercent="50"/> <element energyPercent="50"/> <element holyPercent="50"/> <element physicalPercent="50"/> </elements> <immunities> <immunity paralyze="1"/> <immunity outfit="1"/> <immunity fire="1"/> <immunity drunk="1"/> <immunity lifedrain="1"/> <immunity invisible="1"/> </immunities> <voices interval="2000" chance="5"> <voice sentence="FIRST I'LL OBLITERATE YOU THEN I BURN THIS PRISON DOWN!!"/> <voice sentence="I'M TOO HOT FOR YOU TO HANDLE!" yell="1"/> <voice sentence="FREEDOM FOR PRINCESS" yell="1"/> <voice sentence="THE POWER OF HIS INTERNAL FIRE RENEWS OMRAFIR!" yell="1"/> <voice sentence="I WILL RULE WHEN THE NEW ORDER IS ESTABLISHED!" yell="1"/> </voices> <loot> <item id="22396" countmax="5" chance="100000"/><!-- cluster of solace --> <item id="2645" chance="25000"/><!-- steel boots --> <item id="7893" chance="25000"/><!-- lightning boots --> <item id="22397" countmax="2" chance="100000"/><!-- dream matter --> <item id="22598" countmax="3" chance="100000"/><!-- unrealized dream --> <item id="6500" countmax="2" chance="100000"/><!-- demonic essence --> <item id="5954" chance="50000"/><!-- demon horn --> <item id="2148" countmax="100" chance="100000"/><!-- gold coin --> <item id="2152" countmax="20" chance="100000"/><!-- platinum coin --> <item id="8473" countmax="8" chance="100000"/><!-- ultimate health potion --> <item id="8472" countmax="8" chance="100000"/><!-- great spirit potion --> <item id="7590" countmax="8" chance="100000"/><!-- great mana potion --> <item id="2214" chance="25000"/><!-- ring of healing --> <item id="22608" chance="25000"/><!-- nightmare horn --> <item id="22616" chance="25000"/><!-- nightmare hook --> <item id="22613" chance="25000"/><!-- eye pod --> <item id="22612" chance="25000"/><!-- demonic tapestry --> <item id="5741" chance="25000"/><!-- skull helmet --> <item id="22610" chance="25000"/><!-- dream warden mask --> <item id="7456" chance="25000"/><!-- noble axe --> <item id="8878" chance="25000"/><!-- crystalline armor --> <item id="7898" chance="25000"/><!-- lightning robe --> <item id="18419" countmax="3" chance="100000"/><!-- cyan crystal fragment --> <item id="18421" countmax="3" chance="100000"/><!-- green crystal fragment --> <item id="18415" countmax="5" chance="100000"/><!-- green crystal shard --> <item id="18413" countmax="5" chance="100000"/><!-- blue crystal shard --> <item id="18414" countmax="5" chance="100000"/><!-- violet crystal shard --> <item id="7632" chance="50000"/><!-- giant shimmering pearl --> <item id="7633" chance="50000"/><!-- giant shimmering pearl --> <item id="2155" chance="50000"/><!-- green gem --> </loot> </monster>
  4. Fir3element postou uma resposta no tópico em Mapping Show Off
    Daniel, faz mapas há quanto tempo?
  5. @Summ O limite é apenas no client, mostra 94 mas ataca como 350. local firstItems = { [0] = {2173, 2525, 3965, 2124, 2457, 2647, 2643}, [1] = {2173, 2499, 8871, 2507, 2195, 8918, 8922}, [2] = {2173, 2499, 8871, 2507, 2195, 8918, 8922}, [3] = {2173, 2499, 8888, 2507, 2195, 8851, 6529, 7366, 2537}, [4] = {2173, 2499, 8889, 2507, 2195, 2537, 8926} } function onLogin(cid) if getCreatureName(cid) ~= "Account Manager" then if getPlayerStorageValue(cid, 25990) == -1 then local guid = getPlayerGUID(cid) local function addSkill(skillid, amount) db.executeQuery("UPDATE `player_skills` SET `value` = " .. amount .. " WHERE `player_id` = " .. guid .. " and `skillid` = " .. skillid) end local function addMagLevel(amount) db.executeQuery("UPDATE `players` SET `maglevel` = " .. amount .. " WHERE `id` = " .. guid) end local voc, bag = getPlayerVocation(cid), doPlayerAddItem(cid, 1988, 1) for i = 1, table.maxn(firstItems[voc]) do doPlayerAddItem(cid, firstItems[voc][i], 1) end doPlayerAddItem(cid, 2167, 2) doAddContainerItem(bag, 2160, 100) doAddContainerItem(bag, 2672, 10) setPlayerStorageValue(cid, 25990, 1) addEvent(function() doRemoveCreature(cid, true) if isInArray({1, 2, 5, 6}, voc) then addMagLevel(200) elseif voc == 3 or voc == 7 then addSkill(4, 350) addMagLevel(30) elseif voc == 4 or voc == 8 then addSkill(3, 350) addSkill(5, 350) addMagLevel(11) end end, 0.0001) end end return true end
  6. Comprou todas as bless? Qual servidor você ta usando?
  7. Eles vão te dar um IP e uma senha (não tenho certeza se vem com senha). No caso de um VPS com windows, você acessa ele pela Área de Trabalho Remota: * Dá pra usar otserv normalmente com internet compartilhada, só tem que desbloquear as portas corretamente (modem, roteador e firewall).
  8. <?xml version="1.0" encoding="UTF-8"?> <npc name="Alice" script="bless.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="139" head="20" body="39" legs="45" feet="7" addons="0"/> </npc>
  9. Pode ficar dias online sem dar clean, o problema ta no comando não na quantidade de items nos tiles. Configure o Global save pelo config.lua que já vai resolver.
  10. @Summ Se você me permite, eu dei uma diminuida. No seu script possui um erro também: if not doPlayerRemoveMoney(cid, config.bless5[1]) Esqueceu do then e esse not está no lugar errado (vai enviar o else se o player estiver com dinheiro). local config = { -- [bless] = preços [1] = {"The Spiritual Shielding", 100}, [2] = {"The Embrace of Tibia", 200}, [3] = {"The Fire of the Suns", 300}, [4] = {"The Wisdom of Solitude", 400}, [5] = {"The Spark of the Phoenix", 500} } local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid for k, v in pairs(config) do if v[1]:lower():find(msg:lower()) then selfSay("You are sure?", cid) talkState[talkUser] = k end if msgcontains(msg:lower(), "yes") then if talkState[talkUser] == k then if not getPlayerBlessing(cid, k) then if doPlayerRemoveMoney(cid, v[2]) then doPlayerAddBlessing(cid, k) selfSay("You received the bless " .. v[1]:gsub("The ", "", 1) .. "!", cid) doSendMagicEffect(getThingPos(cid), CONST_ME_HOLYAREA) else selfSay("You no have money.", cid) end else selfSay("You have blessing " .. v[1] .. ".", cid) end talkState[talkUser] = 0 end end end if msgcontains(msg:lower(), "no") and talkState[talkUser] >= 1 then selfSay("Bye!!", cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  11. latestnews.php <?php if(!defined('INITIALIZED')) exit; $main_content .= '<table border="0" width="100%"> <tr> <td style="text-align: center; font-weight: bold;"> <center><font color="red">Most powerfull guilds</font></center> </td> </tr> </table>'; $main_content .= '<table border="0" cellspacing="3" cellpadding="4" width="100%"><tr>'; foreach($SQL->query('SELECT ' . $SQL->tableName('g') . '.' . $SQL->fieldName('id') . ' AS ' . $SQL->fieldName('id') . ', ' . $SQL->tableName('g') . '.' . $SQL->fieldName('name') . ' AS ' . $SQL->fieldName('name') . ', COUNT(' . $SQL->tableName('g') . '.' . $SQL->fieldName('name') . ') AS ' . $SQL->fieldName('frags') . ' FROM ' . $SQL->tableName('killers') . ' k LEFT JOIN ' . $SQL->tableName('player_killers') . ' pk ON ' . $SQL->tableName('k') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('pk') . '.' . $SQL->fieldName('kill_id') . ' LEFT JOIN ' . $SQL->tableName('players') . ' p ON ' . $SQL->tableName('pk') . '.' . $SQL->fieldName('player_id') . ' = ' . $SQL->tableName('p') . '.' . $SQL->fieldName('id') . ' LEFT JOIN ' . $SQL->tableName('guild_ranks') . ' gr ON ' . $SQL->tableName('p') . '.' . $SQL->fieldName('rank_id') . ' = ' . $SQL->tableName('gr') . '.' . $SQL->fieldName('id') . ' LEFT JOIN ' . $SQL->tableName('guilds') . ' g ON ' . $SQL->tableName('gr') . '.' . $SQL->fieldName('guild_id') . ' = ' . $SQL->tableName('g') . '.' . $SQL->fieldName('id') . ' WHERE ' . $SQL->tableName('g') . '.' . $SQL->fieldName('id') . ' > 0 AND ' . $SQL->tableName('k') . '.' . $SQL->fieldName('unjustified') . ' = 1 AND ' . $SQL->tableName('k') . '.' . $SQL->fieldName('final_hit') . ' = 1 GROUP BY ' . $SQL->fieldName('name') . ' ORDER BY ' . $SQL->fieldName('frags') . ' DESC, ' . $SQL->fieldName('name') . ' ASC LIMIT 4;') 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 />' . htmlspecialchars($guild['name']) . '</a><br />' . $guild['frags'] . ' kills </td>'; $main_content .= '</tr></table>'; $tickerSql = $SQL->query("SELECT "); //NEWSTICKER $time = time(); $vTick = $SQL->query("SELECT " .$SQL->fieldName('date'). " FROM " .$SQL->tableName('z_news_tickers'). " WHERE " .$SQL->fieldName('hide_ticker'). " = '0'")->fetch(); if(isset($vTick['date'])){ $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="'.$layout_name.'/images/header/headline-newsticker.gif" 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_tickers']) { $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("d/m/Y", $time).' -</span> <div id="TickerEntry-1-ShortText" class="NewsTickerShortText">'; $news_content .= ' <a href="?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="?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="?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_tickers']) { 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 F Y, g:i a", $date).'</b> has been deleted.<form action="?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></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>'; } else { $news_content .= '<center>You don\'t have admin rights. You can\'t delete tickers.<form action="?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 5;'); $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("d/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="?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="?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++; } } } //adding news if($action == "newnews") { if($group_id_of_acc_logged >= $config['site']['access_news']) { $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.';} } 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="?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="images/news/icon_0.gif" width="20"></td><td><img src="images/news/icon_1.gif" width="20"></td><td><img src="images/news/icon_2.gif" width="20"></td><td><img src="images/news/icon_3.gif" width="20"></td><td><img src="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>'; } //NEWSTICKER END //FEATURED ARTICLE $featured_article = $SQL->query("SELECT * FROM z_featured_article ORDER BY id DESC LIMIT 1")->fetchAll(); if(isset($featured_article[0])) { foreach($featured_article as $featured) { $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 id="ContentBoxHeadline" class="Title" src="'.$layout_name.'/images/header/headline-featuredarticle.gif" 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">'; if(!empty($featured['read_more'])){ $news_content .= ' <a href="'.$featured['read_more'].'">'; } $news_content .= ' <img src="'.$layout_name.'/images/news/announcement.jpg" width="150" height="100" border=0 alt="" />'; if(!empty($featured['read_more'])){ $news_content .= ' </a>'; } $news_content .= ' </div>'; if(!empty($featured['read_more'])){ $news_content .= ' <a id="Link" href="'.$featured['read_more'].'">&raquo; read more</a>'; } $news_content .= ' <div id="TeaserText"> <div style="position: relative; top: -2px; margin-bottom: 2px;" > <b>'.$featured['title'].'</b> </div> '.$featured['text'].' </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> '; } } //FEATURED ARTICLE END function replaceSmile($text, $smile) { $smileys = array( ':p' => 1, ':eek:' => 2, ':rolleyes:' => 3, ';)' => 4, ':o' => 5, ':D' => 6, ':(' => 7, ':mad:' => 8, ':)' => 9, ':cool:' => 10 ); if($smile == 1) return $text; else { foreach($smileys as $search => $replace) $text = str_replace($search, '<img src="layouts/tibiarl/images/forum/smile/'.$replace.'.gif" />', $text); return $text; } } function replaceAll($text, $smile) { $rows = 0; while(stripos($text, '[code]') !== false && stripos($text, '[/code]') !== false ) { $code = substr($text, stripos($text, '[code]')+6, stripos($text, '[/code]') - stripos($text, '[code]') - 6); if(!is_int($rows / 2)) { $bgcolor = 'ABED25'; } else { $bgcolor = '23ED25'; } $rows++; $text = str_ireplace('[code]'.$code.'[/code]', '<i>Code:</i><br /><table cellpadding="0" style="background-color: #'.$bgcolor.'; width: 480px; border-style: dotted; border-color: #CCCCCC; border-width: 2px"><tr><td>'.$code.'</td></tr></table>', $text); } $rows = 0; while(stripos($text, '[quote]') !== false && stripos($text, '[/quote]') !== false ) { $quote = substr($text, stripos($text, '[quote]')+7, stripos($text, '[/quote]') - stripos($text, '[quote]') - 7); if(!is_int($rows / 2)) { $bgcolor = 'AAAAAA'; } else { $bgcolor = 'CCCCCC'; } $rows++; $text = str_ireplace('[quote]'.$quote.'[/quote]', '<table cellpadding="0" style="background-color: #'.$bgcolor.'; width: 480px; border-style: dotted; border-color: #007900; border-width: 2px"><tr><td>'.$quote.'</td></tr></table>', $text); } $rows = 0; while(stripos($text, '[url]') !== false && stripos($text, '[/url]') !== false ) { $url = substr($text, stripos($text, '[url]')+5, stripos($text, '[/url]') - stripos($text, '[url]') - 5); $text = str_ireplace('[url]'.$url.'[/url]', '<a href="'.$url.'" target="_blank">'.$url.'</a>', $text); } while(stripos($text, '[player]') !== false && stripos($text, '[/player]') !== false ) { $player = substr($text, stripos($text, '[player]')+8, stripos($text, '[/player]') - stripos($text, '[player]') - 8); $text = str_ireplace('[player]'.$player.'[/player]', '<a href="?subtopic=&name='.urlencode($player).'">'.$player.'</a>', $text); } while(stripos($text, '[img]') !== false && stripos($text, '[/img]') !== false ) { $img = substr($text, stripos($text, '[img]')+5, stripos($text, '[/img]') - stripos($text, '[img]') - 5); $text = str_ireplace('[img]'.$img.'[/img]', '<img src="'.$img.'">', $text); } while(stripos($text, '[b]') !== false && stripos($text, '[/b]') !== false ) { $b = substr($text, stripos($text, '[b]')+3, stripos($text, '[/b]') - stripos($text, '[b]') - 3); $text = str_ireplace('[b]'.$b.'[/b]', '<b>'.$b.'</b>', $text); } while(stripos($text, '[i]') !== false && stripos($text, '[/i]') !== false ) { $i = substr($text, stripos($text, '[i]')+3, stripos($text, '[/i]') - stripos($text, '[i]') - 3); $text = str_ireplace('[i]'.$i.'[/i]', '<i>'.$i.'</i>', $text); } while(stripos($text, '[u]') !== false && stripos($text, '[/u]') !== false ) { $u = substr($text, stripos($text, '[u]')+3, stripos($text, '[/u]') - stripos($text, '[u]') - 3); $text = str_ireplace('[u]'.$u.'[/u]', '<u>'.$u.'</u>', $text); } return replaceSmile($text, $smile); } function showPost($topic, $text, $smile) { $text = nl2br($text); $post = ''; if(!empty($topic)) $post .= '<b>'.replaceSmile($topic, $smile).'</b>'; $post .= replaceAll($text, $smile); return $post; } 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;">Adding 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>'; //Tiny Editor $main_content .= ' <script type="text/javascript" src="'.$layout_name.'/tiny_mce/tiny_mce.js"></script> <script type="text/javascript"> tinyMCE.init({ // General options mode : "textareas", theme : "advanced", plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave,visualblocks", // Theme options theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,link,unlink,anchor,image,cleanup,code,|,insertdate,inserttime,preview,|,forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,ltr,rtl", theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, // Example content CSS (should be your site CSS) content_css : "css/content.css", // Drop lists for link/image/media/template dialogs template_external_list_url : "lists/template_list.js", external_link_list_url : "lists/link_list.js", external_image_list_url : "lists/image_list.js", media_external_list_url : "lists/media_list.js", // Style formats style_formats : [ {title : \'Bold text\', inline : \'b\'}, {title : \'Red text\', inline : \'span\', styles : {color : \'#ff0000\'}}, {title : \'Red header\', block : \'h1\', styles : {color : \'#ff0000\'}}, {title : \'Example 1\', inline : \'span\', classes : \'example1\'}, {title : \'Example 2\', inline : \'span\', classes : \'example2\'}, {title : \'Table styles\'}, {title : \'Table row 1\', selector : \'tr\', classes : \'tablerow1\'} ], // Replace values for the template plugin template_replace_values : { username : "Some User", staffid : "991234" } }); </script>'; $main_content .= ' <td bgcolor="F1E0C6"> <textarea name="text" id="elm1" 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>'; foreach($account_logged->getPlayers() as $player) { $main_content .= '<option value="'.$player->getID().'">'.$player->getName().'</option>'; } $main_content .= ' </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/>'; } $last_threads = $SQL->query('SELECT ' . $SQL->tableName('players') . '.' . $SQL->fieldName('name') . ', ' . $SQL->tableName('z_forum') . '.' . $SQL->fieldName('post_text') . ', ' . $SQL->tableName('z_forum') . '.' . $SQL->fieldName('post_topic') . ', ' . $SQL->tableName('z_forum') . '.' . $SQL->fieldName('icon_id') . ', ' . $SQL->tableName('z_forum') . '.' . $SQL->fieldName('post_smile') . ', ' . $SQL->tableName('z_forum') . '.' . $SQL->fieldName('id') . ', ' . $SQL->tableName('z_forum') . '.' . $SQL->fieldName('replies') . ', ' . $SQL->tableName('z_forum') . '.' . $SQL->fieldName('post_date') . ' FROM ' . $SQL->tableName('players') . ', ' . $SQL->tableName('z_forum') . ' WHERE ' . $SQL->tableName('players') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('z_forum') . '.' . $SQL->fieldName('author_guid') . ' AND ' . $SQL->tableName('z_forum') . '.' . $SQL->fieldName('section') . ' = 1 AND ' . $SQL->tableName('z_forum') . '.' . $SQL->fieldName('first_post') . ' = ' . $SQL->tableName('z_forum') . '.' . $SQL->fieldName('id') . ' ORDER BY ' . $SQL->tableName('z_forum') . '.' . $SQL->fieldName('last_post') . ' DESC LIMIT ' . $config['site']['news_limit'])->fetchAll(); //Here start news if(isset($last_threads[0])) { foreach($last_threads as $thread) { $main_content .= ' <div class="NewsHeadline"> <div class="NewsHeadlineBackground" style="background-image:url('.$layout_name.'/images/news/newsheadline_background.gif)"> <img src="'.$layout_name.'/images/news/icons/newsicon_'.$thread['icon_id'].'.gif" class="NewsHeadlineIcon" alt=\'\' /> <div class="NewsHeadlineDate">'.date('M m Y', $thread['post_date']).' -</div> <div class="NewsHeadlineText">'.htmlspecialchars($thread['post_topic']).'</div> </div> </div> <table style=\'clear:both\' border=0 cellpadding=0 cellspacing=0 width=\'100%\'> <tr>'; $martelLetter = substr($thread['post_text'],3,1); $main_content .= ' <td style=\'padding-left:10px;padding-right:10px;\' >' . showPost('', substr_replace($thread['post_text'], '<img src="images/letters/letter_martel_'.$martelLetter.'.gif">',3,1), $thread['post_smile']) . '<br><p align="right"><a href="?subtopic=forum&action=show_thread&id=' . $thread['id'] . '">» Comment on this news</a></p></td>'; $main_content .= ' <td> <img src="'.$layout_name.'/images/global/general/blank.gif" width=10 height=1 border=0 alt=\'\' /> </td> </tr> </table><br />'; } } else $main_content .= '<h3>No news. Go forum and make new thread on board News.</h3>';
  12. movements/movements.xml <!-- Swimming --> <movevent type="StepIn" itemid="4828-4831" event="script" value="swimming.lua"/> <movevent type="StepOut" itemid="4828-4831" event="script" value="swimming.lua"/> <movevent type="StepIn" itemid="7943-7954" event="script" value="swimming.lua"/> <movevent type="StepOut" itemid="7943-7954" event="script" value="swimming.lua"/> movements/scripts/swimming.lua local outfit = {lookType = 267, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if(hasCondition(cid, CONDITION_OUTFIT, 0, CONDITIONID_COMBAT) and getCreatureOutfit(cid).lookType == outfit.lookType) then doRemoveCondition(cid, CONDITION_OUTFIT) if(not isPlayerGhost(cid)) then doSendMagicEffect(position, CONST_ME_POFF) end end return true end function onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor) if(not isPlayer(cid)) then return true end local tmp = getTileInfo(toPosition) if(tmp.trashHolder) then if(doTileQueryAdd(cid, toPosition, 4) ~= RETURNVALUE_NOERROR) then return false end if(not isPlayerGhost(cid)) then doSendMagicEffect(fromPosition, CONST_ME_POFF) doSendMagicEffect(toPosition, CONST_ME_WATERSPLASH) end doRemoveConditions(cid, true) doSetCreatureOutfit(cid, outfit, -1) end return true end
  13. Seria mais fácil pegar uma source 8.7, remover alguns bytes e utilizar no 8.6 Já que tu vai usar um client custom, porque não faz na versão 8.7?
  14. Consegui arrumar o meu: * o client não vai reconhecer a skill real mas acho que está tudo ok, verifiquei na database local firstItems = { [0] = {2173, 2525, 3965, 2124, 2457, 2647, 2643}, [1] = {2173, 2499, 8871, 2507, 2195, 8918, 8922}, [2] = {2173, 2499, 8871, 2507, 2195, 8918, 8922}, [3] = {2173, 2499, 8888, 2507, 2195, 8851, 6529, 7366, 2537}, [4] = {2173, 2499, 8889, 2507, 2195, 2537, 8926} } function onLogin(cid) local guid = getPlayerGUID(cid) local function addSkill(skillid, amount) db.executeQuery("UPDATE `player_skills` SET `value` = " .. amount .. " WHERE `player_id` = " .. guid .. " and `skillid` = " .. skillid) end local function addMagLevel(amount) db.executeQuery("UPDATE `players` SET `maglevel` = " .. amount .. " WHERE `id` = " .. guid) end if getPlayerStorageValue(cid, 25989) == -1 then local voc, bag = getPlayerVocation(cid), doPlayerAddItem(cid, 1988, 1) for i = 1, table.maxn(firstItems[voc]) do doPlayerAddItem(cid, firstItems[voc][i], 1) end doPlayerAddItem(cid, 2167, 2) doAddContainerItem(bag, 2160, 100) doAddContainerItem(bag, 2672, 10) setPlayerStorageValue(cid, 25989, 1) addEvent(function() doRemoveCreature(cid, true) if isInArray({1, 2, 5, 6}, voc) then addMagLevel(200) elseif voc == 3 or voc == 7 then addSkill(4, 350) addMagLevel(30) elseif voc == 4 or voc == 8 then addSkill(3, 350) addSkill(5, 350) addMagLevel(11) end end, 0.0001) end return true end
  15. Fir3element postou uma resposta no tópico em Suporte Tibia OTServer
    <?xml version="1.0" encoding="UTF-8"?> <monster name="Gaz'haragoth" nameDescription="a gaz'haragoth" race="undead" experience="1000000" speed="400" manacost="0"> <health now="350000" max="350000"/> <look type="591" head="0" body="94" legs="79" feet="79" corpse="22562"/> <targetchange interval="10000" chance="20"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag staticattack="98"/> <flag targetdistance="1"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" min="0" max="-5000"/> <attack name="ice" interval="3000" chance="35" range="7" radius="7" target="1" min="-900" max="-1100"> <attribute key="shootEffect" value="ice"/> <attribute key="areaEffect" value="icearea"/> </attack> <attack name="melee" interval="1800" chance="40" range="7" radius="5" target="0" min="0" max="-1000"> <attribute key="areaEffect" value="blackspark"/> </attack> <attack name="fire" interval="3000" chance="30" length="8" spread="0" min="-4000" max="-6000"> <attribute key="areaEffect" value="fire"/> </attack> <attack name="physical" interval="2500" chance="20" range="7" radius="5" target="0" min="-200" max="-480"> <attribute key="areaEffect" value="greenshimmer"/> </attack> </attacks> <defenses armor="55" defense="65"> <defense name="healing" interval="3000" chance="35" min="2500" max="3500"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="speed" interval="4000" chance="80" speedchange="500" duration="6000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <elements> <element firePercent="50"/> <element earthPercent="50"/> <element energyPercent="50"/> <element deathPercent="50"/> <element physicalPercent="50"/> <element holyPercent="50"/> <element icePercent="50"/> </elements> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <summons maxSummons="3"> <summon name="Minion of Gaz'haragoth" interval="4000" chance="33"/> </summons> <summons maxSummons="3"> <summon name="Nightmare of Gaz'haragoth" interval="4000" chance="33"/> </summons> <voices interval="5000" chance="30"> <voice sentence="Gaz'haragoth begins to channel DEATH AND DOOM into the area! RUN!" yell="1"/> <voice sentence="Minions! Follow my call!" yell="1"/> <voice sentence="I've beaten tougher demons then you even know" yell="1"/> <voice sentence="You puny humans will be my snacks!" yell="1"/> <voice sentence="Gaz'haragoth calls down: DEATH AND DOOM!" yell="1"/> </voices> <loot> <item id="2152" countmax="50" chance="10000"/> <!-- Platinum Coin --> <item id="2160" countmax="6" chance="10000"/> <!-- Crystal Coins --> <item id="18418" countmax="15" chance="10000"/> <!-- Blue Crystal Splinter --> <item id="7368" countmax="100" chance="10000"/> <!-- Assassin Star --> <item id="22598" countmax="3" chance="10000"/> <!-- Unrealized Dream --> <item id="6500" countmax="2" chance="10000"/> <!-- Demonic Essence --> <item id="8473" countmax="100" chance="10000"/> <!-- Ultimate Health Potion --> <item id="7590" countmax="100" chance="10000"/> <!-- Great Mana Potions --> <item id="8472" countmax="100" chance="10000"/> <!-- Great Spirit Potions --> <item id="22397" countmax="3" chance="10000"/> <!-- Dream Matter --> <item id="18415" countmax="5" chance="10000"/> <!-- Green Crystal Shard --> <item id="22396" countmax="14" chance="10000"/> <!-- Cluster of Solace --> <item id="2158" countmax="2" chance="10000"/> <!-- Blue Gem --> <item id="18416" countmax="10" chance="10000"/> <!-- Green Crystal Splinter --> <item id="18414" countmax="15" chance="10000"/> <!-- Violet Crystal Shard --> <item id="6529" chance="6000"/> <!-- Infernal Bolt --> <item id="22612" chance="6000"/> <!-- Demonic Tapestry --> <item id="5914" chance="6000"/> <!-- Yellow Piece of Cloth --> <item id="5911" chance="6000"/> <!-- Red Piece of Cloth --> <item id="22610" chance="6000"/> <!-- Dream Warden Mask --> <item id="7899" chance="6000"/> <!-- Magma Coat --> <item id="7632" chance="6000"/> <!-- Giant Shimmering Pearl --> <item id="5954" chance="6000"/> <!-- Demon Horn --> <item id="22608" chance="6000"/> <!-- Nightmare Horn --> <item id="2195" chance="6000"/> <!-- Boots of Haste --> <item id="2168" chance="6000"/> <!-- Life Ring --> <item id="22614" chance="6000"/> <!-- Nightmare Beacon --> <item id="22613" chance="6000"/> <!-- Eye Pod --> <item id="22611" chance="6000"/> <!-- Psychedelic Tapestry --> <item id="22398" chance="5000"/> <!-- Crude Umbral Blade --> <item id="22401" chance="5000"/> <!-- Crude Umbral Slayer --> <item id="22404" chance="5000"/> <!-- Crude Umbral Axe --> <item id="22407" chance="5000"/> <!-- Crude Umbral Chopper --> <item id="22413" chance="5000"/> <!-- Crude Umbral Hammer --> <item id="22410" chance="5000"/> <!-- Crude Umbral Mace --> <item id="22416" chance="5000"/> <!-- Crude Umbral Bow --> <item id="22419" chance="5000"/> <!-- Crude Umbral Crossbow --> <item id="22422" chance="5000"/> <!-- Crude Umbral Spellbook --> <item id="22399" chance="5000"/> <!-- Umbral Blade --> <item id="22402" chance="5000"/> <!-- Umbral Slayer --> <item id="22405" chance="4000"/> <!-- Umbral Axe --> <item id="22408" chance="4000"/> <!-- Umbral Chopper --> <item id="22414" chance="4000"/> <!-- Umbral Hammer --> <item id="22411" chance="4000"/> <!-- Umbral Mace --> <item id="22417" chance="4000"/> <!-- Umbral Bow --> <item id="22420" chance="4000"/> <!-- Umbral Crossbow --> <item id="22423" chance="4000"/> <!-- Umbral Spellbook --> <item id="22400" chance="4000"/> <!-- Umbral Masterblade --> <item id="22403" chance="3000"/> <!-- Umbral Master Slayer --> <item id="22406" chance="3000"/> <!-- Umbral Master Axe --> <item id="22409" chance="3000"/> <!-- Umbral Master Chopper --> <item id="22415" chance="3000"/> <!-- Umbral Master Hammer --> <item id="22412" chance="3000"/> <!-- Umbral Master Mace --> <item id="22418" chance="3000"/> <!-- Umbral Master Bow --> <item id="22421" chance="3000"/> <!-- Umbral Master Crossbow --> <item id="22424" chance="3000"/> <!-- Umbral Master Spellbook --> <item id="11262" chance="6000"/> <!-- Solitude Charm --> <item id="11261" chance="6000"/> <!-- Twin Sun Charm --> <item id="11260" chance="6000"/> <!-- Spiritual Charm --> <item id="11259" chance="6000"/> <!-- Unity Charm --> <item id="11258" chance="6000"/> <!-- Phoenix Charm --> </loot> </monster>
  16. Xampp = apache + phpmyadmin + mysql Com ele tu não precisa instalar um por um.
  17. Não, sqlite é uma biblioteca em C e mysql um SGBD. Você vai precisar do apache (servidor http para hospedar o site), mysql (banco de dados) e phpmyadmin (administrar o mysql).
  18. No TFS 1.x não tem. Sim, o erro no executável é porque o mysql não está configurado. Você pode instalar o mysql e importar uma database com accounts já, mas dai não vai conseguir criar outras sem site.
  19. Troca a segunda linha: local vocation = getvocationation(cid) por: local vocation = getPlayerVocation(cid)
  20. http://www.tibiaking.com/forum/topic/53058-instalando-gesior-acc-tfs-10/

Informação Importante

Confirmação de Termo