Ir para conteúdo

glacialot

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    glacialot recebeu reputação de juliojr em Como Add Outfit   
    Tem como adicionar mais q o Outfit 25?
     
    Eu adicionei alguns outfits novos, mas quando eu passo do 25 Ele na reconhece, soh vai até o 25, tem como mudar isso?
  2. Gostei
    glacialot recebeu reputação de ArielZeRah em (Resolvido)[PEDIDO] Script TOP LEVEL   
    Show de bola, bem como eu queria. REP+
  3. Gostei
    glacialot deu reputação a luanluciano93 em (Resolvido)Como remover Storage de player   
    http://www.tibiaking.com/forum/topic/2023-phpmyadmin-comandos-uteis/
  4. Gostei
    glacialot deu reputação a Aksz em (Resolvido)[ERRO] Donatar Pagseguro   
    Desativa pagamentos via HTML no painel pagseguro e poste resultados.
  5. Gostei
    glacialot deu reputação a ServerCore em [URGENTE] Server OFF   
    Tente digitar: killall -9 tfs e ligar ele novamente.
     
    Provavelmente tem outra instancia dele aberto
  6. Gostei
    glacialot deu reputação a Natanael Beckman em StreamTemple TFS 0.4 [8.60]   
    Opa galera eu mais uma vez postando mais uma novidade na área de OTServer!
    StreamTemple é um sistema que proporciona uma visualização em tempo real da movimentação de characters em um determinado local do server, isso vai depender das suas configurações...
    Esse sistema foi criado por Gesior.pl para versão TFS 1.0 e migrado para a versão TFS 0.4 por Killua(90%) e Eu(Fix bug player move)
     
    Vamos la galera, em data/globalevents/scripts crie um arquivo .lua e nomeie para stream_temple.lua adicione dentro do mesmo este code:
     
    -- for linux default: '/var/www/streamtemple/stream.json' -- create folder 'streamtemple' in main folder of acc. maker! -- [LINUX] check that folder 'streamtemple' has rights to create new file by anyone local playerJsonInfoPath = '/var/www/streamtemple/stream.json' -- center position of your 'stream' - make sure you set valid left/top corner of image in PHP! -- stream show only players on same 'floor'/'level' local centerPosition = {x = 32349, y = 32222, z = 7} --[[ I RECOMMEND TO NOT SET WIDTH HIGHER THEN 20, BECAUSE IT MAY CAUSE LITTLE LAG ON SERVERS WITH 300-400 ONLINE! ]]-- -- viewWidth is not really width of stream, if viewWidth is '11': -- then stream shows players 11 tiles to the left and 11 tiles to the right from center positon, so real width is 23 tiles! local viewWidth = 11 -- viewHeight is not really height of stream, if viewHeight is '6': -- then stream shows players 6 tiles to the top and 6 tiles to the bottom from center positon, so real height is 13 tiles! local viewHeight = 6 function onThink()     -- get players/monsters/npcs in area list     local spectators = getSpectators(centerPosition, viewWidth, viewHeight, false)     -- generate information     local stream = "{"     if(spectators) then         for _, spectator in pairs(spectators) do             local player = spectator             if(player) then                 local playerPosition = getCreaturePosition(player)                 local playerOutfit = getCreatureOutfit(player)                 if(centerPosition.z == playerPosition.z) then                     stream = stream .. '"'..getCreatureName(player)..'":['.. playerPosition.x ..','.. playerPosition.y ..','.. playerPosition.z ..','.. playerOutfit.lookType ..','.. playerOutfit.lookAddons ..','.. playerOutfit.lookHead ..','.. playerOutfit.lookBody ..','.. playerOutfit.lookLegs ..','.. playerOutfit.lookFeet ..','.. getPositionByDirection(player) ..','.. getCreatureLookDirection(player) ..',' .. playerOutfit.lookTypeEx .. ','.. getCreatureSkullType(player) ..'],'                 end             end         end     end     stream = stream .. '}'     -- save to file     local streampath = io.open(playerJsonInfoPath, "w")     streampath:write(stream)     streampath:close()     return true end No arquivo acima faça as seguintes alterações:
    Aqui altere pro local correto onde ficara localizada a pasta streamtemple na pasta do site.
    local playerJsonInfoPath = '/var/www/streamtemple/stream.json' Aqui você vai botar as coordenada central de acordo com a imagem que vai utilizar.
    local centerPosition = {x = 32349, y = 32222, z = 7} Em globalevents.xml registre esse code:
             <!-- Stream Temple -->         <globalevent name="stream" interval="700" script="stream_temple.lua"/> No site você vai adicionar o arquivo .php chamado de streamtemple.php com esse code:
    <style type="text/css">     .alpha_wrapper {             padding-top: 8px;             float: left;             position: relative;             color: #fff;             width: 96px;             text-align: center;     }     .name {             white-space: nowrap;             color: rgb(0, 255, 0);             font-size:10px;             width: 50%;             margin: 0px auto;             padding-bottom: 2px;             font-family: Verdana;             text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;     }     .skull {             background: transparent url(images/skulls/redskull.gif) no-repeat;             position: absolute;             top: 31px;             left: 57px;             width: 11px;             height: 11px;             width: 50%;             margin: 0px auto;     } </style> <div style="float:center;text-align:center;margin: 0 auto;text-shadow:0 0 5px #fff;font-family:Georgia,serif;font-weight:strong;font-size:35px;"><img src=megastr.png></div> <!-- Your temple image must have tiles width/height 32px! --> <!-- There is 'streamtemple/temple.png', if you keep your temple image in other format or on other host, edit this. DO NOT FORGET TO EDIT THIS PART OF LINE BELOW: 'width:600px;height:380px', there must be width and height of your temple image! --> <div style="background-image:url('streamtemple/temple.png');width:600px;height:380px;box-shadow:0 0 20px #000;font-family:Arial, sans-serif;border:2px solid black;margin:5px auto;text-align:center;overflow:hidden;position:relative;" id="templeAnimationWindow"></div> <script type="text/javascript">     // -- CONFIG --         // url to stream file - it's NOT full path to that file like 'c:\xampp\...'     var playerJsonInfoURL = 'streamtemple/stream.json';         // BEST VALUE IS SAME AS INTERVAL IN GLOBALEVENTS.XML     var updateIntervalInSeconds = 1;         // It's NOT same position as center of stream in LUA, this position depends on your temple image on www!     // set it to position that is in game when you look at top-left corner of your temple image (+/- 1 after tests on www)     //  -- example:     // HARD PART: If your image on www shows 16x8 tiles of 'game screen' and left-top corner positon is '1000,1000' then..     // What is center-position and width/height for LUA script config? [if it's on floor 7..]     // YES! It's: Position(1008, 1004, 7), width: 8 (8*2+1 = 17, more then your image!), height: 4 (4*2+1 = 9, more ..!)     // ---     // but don't worry, if you set it to (32337,32220,7) and set width 15 and height 15 it will work too! (just use more CPU then it should)     var leftTopCornetX = 32339;     var leftTopCornetY = 32216;         // adjust these values (from -32 to 32, it's value in pixels) to make your character stand at same position as in game     // you must compare image on www and in game by yourself     var imageCorrectionX = 2;     var imageCorrectionY = 4;         // images URL     var itemImagesURL = 'http://item-images.ots.me/1030/';         // outfit generation script URL, you need your own outfit images host, how to create:     // http://otland.net/threads/gesior2012-make-your-own-outfits-items-country-flags-hosting-recommended.210844/     var outfitImagesURL = 'outfit.php';         // -- END OF CONFIG --         function disableSelection(target)     {         if (typeof target.onselectstart!="undefined")         {             target.onselectstart=function(){return false}         }         else if (typeof target.style.MozUserSelect!="undefined")         {             target.style.MozUserSelect="none";         }         else         {             target.onmousedown=function(){return false}         }         target.style.cursor = "default";     }     disableSelection(document.body);     var uid = Math.floor(Math.random()*(10000000-1))+10000000;     function handler(data)     {         setTimeout(update, updateIntervalInSeconds * 1000);         try { var obj = eval("(" + data + ")"); }         catch(err) {}         var s = '';         for (x in obj)         {             var k = obj[x];             s += '<div style="z-index:'+(k[1]-20)+';position:absolute;top:'+(((k[1]-leftTopCornetY)*32)+imageCorrectionY)+'px;left:'+(((k[0]-leftTopCornetX)*32)+imageCorrectionX)+'px;width:64px;height:64px;background:transparent url(';             if(k[3] == 0)             {                 s += itemImagesURL + k[11]+'.gif';             }             else             {                 var mountID = parseInt(k[9]);                 if(mountID > 0)                 {                     mountID += 65536;                 }                 s += outfitImagesURL + '?id='+k[3]+'&addons='+k[4]+'&head='+k[5]+'&body='+k[6]+'&legs='+k[7]+'&feet='+k[8]+'&direction='+(parseInt(k[10])+1);             }             s += ') no-repeat right bottom;">' +                 '<div class="alpha_wrapper">' +                     '<div class="name" style="margin: 5px 19px">'+x.replace(/(&nbsp)/g,' ')+'</div>' +                     '<div style="margin-left: 34px; margin-top: -7px; width: 25px; height: 2px; background-color: rgb(0, 191, 0); border: 1px solid black;"></div>';             if(k[12] >= 3)             {                 // known problem: there is no white skull image in Gesior2012, if you got it, you can put it in your /images/skulls/                 s += '<div class="skull" style="background-image:url(images/skulls/'+(k[12] == 3 ? 'white' : (k[12] == 4 ? 'red' : 'black')) + 'skull.gif);">&nbsp;</div>';             }                 s += '</div></div>';         }         document.getElementById('templeAnimationWindow').innerHTML = s;     }     function update()     {         var xhr;         try         {             xhr=new XMLHttpRequest();         }         catch (e)         {             try             {                 xhr=new ActiveXObject("Msxml2.XMLHTTP");             }             catch (e)             {                 try                 {                     xhr=new ActiveXObject("Microsoft.XMLHTTP");                 }                 catch (e)                 {                     alert("Your browser does not support AJAX!");                     return false;                 }             }         }         xhr.open("GET", playerJsonInfoURL + "?"+Math.random(), true);         xhr.onreadystatechange=function()         {             // status 4 = query realized without problems             if(xhr.readyState==4)             {                 // if query failed for some reason, it will stop animation                 handler(xhr.responseText);             }         }         xhr.send(null);     }     update(); </script> E o outfit.php.
     
    Certo aqui você baixe a pasta abaixo que já com o arquivo stream.json e uma imagem que utilizo no meu servidor.
    streamtemple
     
    E baixe essa pasta de outfits pro sistema funcionar perfeitamente:
    outfits
     
    Veja um exemplo do sistema:

  7. Negativo
    glacialot recebeu reputação de Caronte em System Anti Entrosa TFS 1.0   
    Ninguem vai disponibilizar?
     
    Manda ai o LINK da onde compra então...
  8. Gostei
    glacialot deu reputação a Tricoder em Thais Medieval   
    Categoria: Mapa.
    Versão: 8.60
    Créditos: Koci
    Anexos: Download | Scan
     
    Screenshot;









  9. Gostei
    glacialot deu reputação a Wise em (Resolvido)Monsters que Empurra   
    Me interessei pelo seu pedido, fiz aqui rapidinho..

    monsterpusher.lua (data\creaturescripts\scripts):
    function doPush(uid)     if not isCreature(uid) then return false end          local pos = getCreaturePosition(uid)     local pushp = {         [0] = {x = pos.x, y = pos.y + 1, z = pos.z, stackpos = 0},         [1] = {x = pos.x - 1, y = pos.y, z = pos.z, stackpos = 0},         [2] = {x = pos.x, y = pos.y - 1, z = pos.z, stackpos = 0},         [3] = {x = pos.x + 1, y = pos.y, z = pos.z, stackpos = 0},         [4] = {x = pos.x + 1, y = pos.y - 1, z = pos.z, stackpos = 0},         [5] = {x = pos.x - 1, y = pos.y - 1, z = pos.z, stackpos = 0},         [6] = {x = pos.x + 1, y = pos.y + 1, z = pos.z, stackpos = 0},         [7] = {x = pos.x - 1, y = pos.y - 1, z = pos.z, stackpos = 0}     }          local rn = math.random(0, 7)          if getTopCreature(pushp[rn]).uid > 0 or getTileThingByPos(pushp[rn]).itemid == 0 then         return doPush(uid)     else         doTeleportThing(uid, pushp[rn], true)     end          return true end function onAttack(cid, target)     doPush(target)     doMonsterChangeTarget(cid)     return true end


    creaturescripts.xml (data\creaturescripts):
    <event type="attack" name="MonsterPusher" script="monsterpusher.lua"/>


    Registre o creature event adicionando a seguinte tag ao arquivo XML do monstro desejado:
    <script>     <event name="MonsterPusher"/> </script>
  10. Gostei
    glacialot deu reputação a Vodkart em Npc Auction Versão 1.0 [Atualizado]   
    Versões: Foi feito para servidores que não tem o market system, mas funciona desde o 8.54 até 9.6+
    Suporta: servidores Sqlite e MySql
    Sobre: O Npc basicamente funciona da seguinte maneira, você "deposita" alguns items neste npc e durante "X" dias ele vende para você, claro que o npc irá cobrar "Y" preço pelo serviço...
    Para mais informações acessem o link que explica com imagens: http://tibiaking.com...mo-auction-npc/
     
    Basta fazer o download, executar a query que é pedida e depois disso colocar os arquivos em seus respectivas pastas.
     
    ##ATUALIZADO Versão 1.0##
     
    - Agora a Lib foi ajustada e bugs removidos
    - Itens de type "others" e "ammunition" arrumados
    - O Npc agora devolve seus itens quando quiser
    - Os itens vão para o depot quando não vende o item
    - Nova aba de "all" que mostra todos os itens em uma janela, independente da seleção do tipo de item;
     
     
    obs: Antes de instalar a lib leia o arquivo txt, porque tem 2 tipos de lib, um é usado 'db.executeQuery' e o outro 'db,query'(fiz isso para o pessoal que não sabe alterar as funções)
     
     
     
    Npc Auction 1.0.rar
  11. Gostei
    glacialot deu reputação a zipter98 em (Resolvido)[Pedido] Sistema de Arena.   
    OK. Refiz a parte que checa se a wave foi ou não completa. Tanto a maneira antiga quanto a nova funcionaram aqui. Espero que o mesmo aconteça no seu servidor.
    Troque sua lib por essa:
    ARENA = {     WAVES = {         [1] = {             monsters = {                 {"Demon", {x = 617, y = 2086, z = 6}},     --{nome_do_monstro, {posição_que_vai_nascer}},                 {"Demon", {x = 617, y = 2089, z = 6}},                 {"Demon", {x = 627, y = 2086, z = 6}}, {"Demon", {x = 627, y = 2089, z = 6}},             },             prize = {                 cash = 500000,                              --Coloque false se não for receber cash nessa wave.                 items = false,                              --Coloque false se não for receber item(s) nessa wave.             },         },         [2] = {             monsters = {                 {"Hellfire Figher", {x = 617, y = 2086, z = 6}},     --{nome_do_monstro, {posição_que_vai_nascer}},                 {"Hellfire Figher", {x = 617, y = 2089, z = 6}},                 {"Hellfire Figher", {x = 627, y = 2086, z = 6}}, {"Hellfire Figher", {x = 627, y = 2089, z = 6}},             },             prize = {                 cash = 1000000,                                            items = false,                                            },         },         [3] = {             monsters = {                 {"Orshabaal", {x = 617, y = 2086, z = 6}},     --{nome_do_monstro, {posição_que_vai_nascer}},                 {"Orshabaal", {x = 617, y = 2089, z = 6}},                 {"Orshabaal", {x = 627, y = 2086, z = 6}}, {"Orshabaal", {x = 627, y = 2089, z = 6}},             },             prize = {                 cash = 1000000,                                              items = {                     {2160, 1},                        --{ID do item, quantidade},                                       {2160, 1},                 },             },         },     },     NPC = {         price = 2000,                                --Preço para entrar na arena.         position = {x = 622, y = 2088, z = 6},            --Para onde o jogador será teleportado ao falar com o NPC.     },     TELEPORT = {       tpId = 1387,                                 --ID do teleporte.         tpPos = {x = 622, y = 2084, z = 6},               --Onde o teleporte será criado, ao matar o último boss.         tpToPos = {x = 622, y = 2081, z = 5},             --Para onde o teleporte levará.         aid = 1307,     },     STORAGES = {         storage = 90190,         wave_sto = 90191,         kill = 90194,     },     toPos = {x = 630, y = 2092, z = 6},               --Coordenadas da posição superior esquerda da arena.     fromPos = {x = 614, y = 2082, z = 6},             --Coordenadas da posição inferior direita da arena.     delay = 15,                                  --Segundos para o boss aparecer.     level = 100,                                 --Level mínimo. } function doWave(cid, wave)     if not isPlayer(cid) then         return true     elseif not ARENA.WAVES[wave] then         return true     elseif getPlayerStorageValue(cid, ARENA.STORAGES.storage) > -1 then         return true     end     local monster = ARENA.WAVES[wave]     local m = monster.monsters     doPlayerSendTextMessage(cid, 27, "Em "..ARENA.delay.." segundos, começa seu desafio. [Wave: "..wave.."]")     addEvent(function()         for i = 1, #m do             doCreateMonster(m[i][1], m[i][2])         end     end, ARENA.delay * 1000) end function clearArena()     for x = ARENA.fromPos.x, ARENA.toPos.x do         for y = ARENA.fromPos.y, ARENA.toPos.y do             for z = ARENA.fromPos.z, ARENA.toPos.z do                 local area = {x = x, y = y, z = z}                 local creature = getTopCreature(area).uid                 if isCreature(creature) then                        doRemoveCreature(creature)                 end             end         end     end end function getKilledMonsters(cid)     return getPlayerStorageValue(cid, ARENA.STORAGES.kill) > 0 and getPlayerStorageValue(cid, ARENA.STORAGES.kill) or 0 end Troque seu creaturescript por esse: function onKill(cid, target)     if isPlayer(cid) and getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1 then         setPlayerStorageValue(cid, ARENA.STORAGES.kill, getKilledMonsters(cid) + 1)         local wave = getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto)         local new_wave = wave + 1         if getKilledMonsters(cid) >= #ARENA.WAVES[wave].monsters then             local reward = ARENA.WAVES[getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto)].prize             local str = "You won:"             if reward.cash then                 doPlayerAddMoney(cid, reward.cash)                 str = str.."\n"..reward.cash.."$"             end             if reward.items then                 for i = 1, #reward.items do                     local item = reward.items[i][1]                     local count = reward.items[i][2]                     if not isItemStackable(item) and count > 1 then                         for i = 1, count do                             doPlayerAddItem(cid, item, 1)                         end                     else                         doPlayerAddItem(cid, item, count)                     end                     str = str.."\nItem - "..count.."x "..getItemNameById(item)                 end             end             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, str)             setPlayerStorageValue(cid, ARENA.STORAGES.kill, 0)             if ARENA.WAVES[new_wave] then                 setPlayerStorageValue(cid, ARENA.STORAGES.wave_sto, new_wave)                 doWave(cid, new_wave)             else                 local tp = doCreateTeleport(ARENA.TELEPORT.tpId, ARENA.TELEPORT.tpToPos, ARENA.TELEPORT.tpPos)                 doItemSetAttribute(tp, "aid", ARENA.TELEPORT.aid)             end         end     end     return true end function onLogout(cid)     if isPlayer(cid) then         if getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1 then             doPlayerSendCancel(cid, "You can't logout now.")              return false         end     end     return true end function onPrepareDeath(cid)     if getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1  then         setPlayerStorageValue(cid, ARENA.STORAGES.wave_sto, -1)         setGlobalStorageValue(1000, -1)         clearArena()     end     return true end
  12. Gostei
    glacialot deu reputação a olokomeu em (Resolvido)[Pedido] Sistema de Arena.   
    + Oq eu citei, não foi para esse Erro. Eu não tive esse Erro seu, pois, não estou usando a mesma "Lib" sua. Oq eu citei para tu consertar é quando tu morrer a arena ser Resetada.
     
    Percebi que você falou "Melda, faltou no clear arena as coordenadas que eu substitui, vou ver agora"
     
    Se você falava disso (Onde tá em vermelho):



     
    Não é para mudar. Deixei do jeito que tá ^.^
  13. Gostei
    glacialot deu reputação a zipter98 em (Resolvido)[Pedido] Sistema de Arena.   
    Ah, isso explica. Você configurou errado. toPos nunca terá valores menores que fromPos. 
    Provavelmente você inverteu fromPos e toPos. E também deve ser por isso que algumas funções que usei anteriormente não funcionaram com você.
     
    @glacialot
    Pronto, terminei o que você pediu.
    Deixei 3 waves configuradas como exemplo. Para adicionar mais waves, siga o modelo das já existentes.
    Substitua sua lib por essa:
    ARENA = {     WAVES = {         [1] = {             monsters = {                 {"monster_name", {x = x, y = y, z = z}},     --{nome_do_monstro, {posição_que_vai_nascer}},                 {"monster_name", {x = x, y = y, z = z}},                 {"monster_name", {x = x, y = y, z = z}},             },             prize = {                 cash = 500000,                              --Coloque false se não for receber cash nessa wave.                 items = false,                              --Coloque false se não for receber item(s) nessa wave.             },         },         [2] = {             monsters = {                 {"monster_name", {x = x, y = y, z = z}},     --{nome_do_monstro, {posição_que_vai_nascer}},                 {"monster_name", {x = x, y = y, z = z}},                 {"monster_name", {x = x, y = y, z = z}},             },             prize = {                 cash = 1000000,                                            items = false,                                            },         },         [3] = {             monsters = {                 {"monster_name", {x = x, y = y, z = z}},     --{nome_do_monstro, {posição_que_vai_nascer}},                 {"monster_name", {x = x, y = y, z = z}},                 {"monster_name", {x = x, y = y, z = z}},             },             prize = {                 cash = 1000000,                                              items = {                     {item_id, count},                        --{ID do item, quantidade},                                       {item_id, count},                 },             },         },     },     NPC = {         price = 2000,                                --Preço para entrar na arena.         position = {x = x, y = y, z = z},            --Para onde o jogador será teleportado ao falar com o NPC.     },     TELEPORT = {         tpId = 1387,                                 --ID do teleporte.         tpPos = {x = x, y = y, z = z},         --Onde o teleporte será criado, ao matar o último boss.         tpToPos = {x = x, y = y, z = z},       --Para onde o teleporte levará.         aid = 1307,     },     STORAGES = {         storage = 90190,         wave_sto = 90191,     },     toPos = {x = x, y = y, z = z},               --Coordenadas da posição superior esquerda da arena.     fromPos = {x = x, y = y, z = z},             --Coordenadas da posição inferior direita da arena.     delay = 15,                                  --Segundos para o boss aparecer.     level = 100,                                 --Level mínimo. } function doWave(cid, wave)     if not isPlayer(cid) then         return true     elseif not ARENA.WAVES[wave] then         return true     elseif getPlayerStorageValue(cid, ARENA.STORAGES.storage) > -1 then         return true     end     local monster = ARENA.WAVES[wave]     local m = monster.monsters     doPlayerSendTextMessage(cid, 27, "In "..ARENA.delay.." seconds, monsters will spawn. [Wave: "..wave.."]")     addEvent(function()         for i = 1, #m do             doCreateMonster(m[i][1], m[i][2])         end     end, ARENA.delay * 1000) end function clearArena()     for x = ARENA.fromPos.x, ARENA.toPos.x do         for y = ARENA.fromPos.y, ARENA.toPos.y do             for z = ARENA.fromPos.z, ARENA.toPos.z do                 local area = {x = x, y = y, z = z}                 local creature = getTopCreature(area).uid                 if isCreature(creature) then                        doRemoveCreature(creature)                 end             end         end     end end function newWave()     for x = ARENA.fromPos.x, ARENA.toPos.x do         for y = ARENA.fromPos.y, ARENA.toPos.y do             for z = ARENA.fromPos.z, ARENA.toPos.z do                 local area = {x = x, y = y, z = z}                 local creature = getTopCreature(area).uid                 if isCreature(creature) and isMonster(creature) then                        return false                 end             end         end     end     return true end Substitua seu creaturescript (killboss.lua) por esse: function onKill(cid, target)     if isPlayer(cid) and getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1 then         local new_wave = getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) + 1         if newWave() then             local reward = ARENA.WAVES[getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto)].prize             local str = "You won:"             if reward.cash then                 doPlayerAddMoney(cid, reward.cash)                 str = str.."\n"..reward.cash.."$"             end             if reward.items then                 for i = 1, #reward.items do                     local item = reward.items[i][1]                     local count = reward.items[i][2]                     if not isItemStackable(item) and count > 1 then                         for i = 1, count do                             doPlayerAddItem(cid, item, 1)                         end                     else                         doPlayerAddItem(cid, item, count)                     end                     str = str.."\nItem - "..count.."x "..getItemNameById(item)                 end             end             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, str)             if ARENA.WAVES[new_wave] then                 setPlayerStorageValue(cid, ARENA.STORAGES.wave_sto, new_wave)                 doWave(cid, new_wave)             else                 local tp = doCreateTeleport(ARENA.TELEPORT.tpId, ARENA.TELEPORT.tpToPos, ARENA.TELEPORT.tpPos)                 doItemSetAttribute(tp, "aid", ARENA.TELEPORT.aid)             end         end     end     return true end function onLogout(cid)     if getTileInfo(getThingPos(cid)).protection and getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1 then         return setPlayerStorageValue(cid, ARENA.STORAGES.wave_sto, -1)      end     if getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1 then         doPlayerSendCancel(cid, "You can't logout now.")          return false     end     return true end function onPrepareDeath(cid)     if getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1  then         setPlayerStorageValue(cid, ARENA.STORAGES.wave_sto, -1)         setGlobalStorageValue(1000, -1)         clearArena()     end     return true end Novamente: o sistema de ranking se encontra na página 4.
  14. Gostei
    glacialot deu reputação a zipter98 em (Resolvido)[Pedido] Sistema de Arena.   
    OK. Eu fiz bem rapidamente o sistema aqui, talvez haja algum(s) erro(s).
    data/lib, crie um arquivo com extensão .lua e coloque o seguinte conteúdo:
    ARENA = {     WAVES = {         [1] = {"monster_name", {x = x, y = y, z = z}},     --{nome_do_monstro, {posição_que_vai_nascer}},         [2] = {"monster_name", {x = x, y = y, z = z}},         [3] = {"monster_name", {x = x, y = y, z = z}},         [4] = {"monster_name", {x = x, y = y, z = z}},         [5] = {"monster_name", {x = x, y = y, z = z}},         [6] = {"monster_name", {x = x, y = y, z = z}},         [7] = {"monster_name", {x = x, y = y, z = z}},         [8] = {"monster_name", {x = x, y = y, z = z}},     },     NPC = {         price = 2000,                                --Preço para entrar na arena.         position = {x = x, y = y, z = z},            --Para onde o jogador será teleportado ao falar com o NPC.     },     TELEPORT = {         tpId = 1387,                                 --ID do teleporte.         tpPos = {x = x, y = y, z = z},               --Onde o teleporte será criado, ao matar o último boss.         tpToPos = {x = x, y = y, z = z},             --Para onde o teleporte levará.         aid = 1307,     },     STORAGES = {         storage = 90181,         wave_sto = 90182,     },     fromPos = {x = x, y = y, z = z},               --Coordenadas da posição superior esquerda da arena.     toPos = {x = x, y = y, z = z},             --Coordenadas da posição inferior direita da arena.     delay = 15,                                 --Segundos para o boss aparecer. level = 100, --Level mínimo. } function doWave(cid, wave)     if not isPlayer(cid) then         return true     elseif not ARENA.WAVES[wave] then         return true     elseif getPlayerStorageValue(cid, ARENA.STORAGES.storage) > -1 then         return true     end     local monster = ARENA.WAVES[wave][1]     local pos = ARENA.WAVES[wave][2]     doPlayerSendTextMessage(cid, 27, "In "..ARENA.delay.." seconds, a boss will spawn. [Wave: "..wave.."]")     addEvent(function()         doCreateMonster(monster, pos)     end, ARENA.delay * 1000) end function clearArena()     for x = ARENA.fromPos.x, ARENA.toPos.x do         for y = ARENA.fromPos.y, ARENA.toPos.y do             for z = ARENA.fromPos.z, ARENA.toPos.z do                 local area = {x = x, y = y, z = z}                 local creature = getTopCreature(area).uid                 if isCreature(creature) then                        doRemoveCreature(creature)                 end             end         end     end end Código do NPC: 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     if msgcontains(msg:lower(), "arena") or msgcontains(msg:lower(), "enter") then         if getPlayerLevel(cid) < ARENA.level then             selfSay("You do not have enough level ["..ARENA.level.."].", cid)             talkState[talkUser] = 0             return true         elseif getGlobalStorageValue(1000) > -1 then             selfSay("Someone is at the arena right now, please wait.", cid)             talkState[talkUser] = 0             return true         elseif getPlayerStorageValue(cid, ARENA.STORAGES.storage) > -1 then             selfSay("You already completed the arena.", cid)             talkState[talkUser] = 0             return true         else             selfSay("You really want enter in the arena? It will cost you {"..ARENA.NPC.price.."}.", cid)             talkState[talkUser] = 1             return true         end     elseif msgcontains(msg:lower(), "yes") and talkState[talkUser] == 1 then         if doPlayerRemoveMoney(cid, ARENA.NPC.price) then             selfSay("Good luck! ^.^", cid)             doTeleportThing(cid, ARENA.NPC.position)             setPlayerStorageValue(cid, ARENA.STORAGES.wave_sto, 1) setGlobalStorageValue(1000, 1)             doWave(cid, 1)             talkState[talkUser] = 0             return true         else             selfSay("You do not have enough money.", cid)             talkState[talkUser] = 0             return true         end     elseif msgcontains(msg:lower(), "no") and talkState[talkUser] == 1 then         selfSay("Ok, then...", cid)         talkState[talkUser] = 0         return true     end            return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())     data/creaturescripts/scripts, crie um arquivo com extensão .lua, nomeie-o killboss.lua, e coloque o seguinte conteúdo: function onKill(cid, target)     if isPlayer(cid) and getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1 then         local new_wave = getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) + 1         if ARENA.WAVES[new_wave] then             setPlayerStorageValue(cid, ARENA.STORAGES.wave_sto, new_wave)             doWave(cid, new_wave)         else             local tp = doCreateTeleport(ARENA.TELEPORT.tpId, ARENA.TELEPORT.tpToPos, ARENA.TELEPORT.tpPos)             doItemSetAttribute(tp, "aid", ARENA.TELEPORT.aid)         end     end     return true end function onLogout(cid)     if getTileInfo(getThingPos(cid)).protection and getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1 then         return setPlayerStorageValue(cid, ARENA.STORAGES.wave_sto, -1)     end     if getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1 then         doPlayerSendCancel(cid, "You can't logout now.")          return false     end     return true end function onPrepareDeath(cid)     if getPlayerStorageValue(cid, ARENA.STORAGES.wave_sto) > -1  then         setPlayerStorageValue(cid, ARENA.STORAGES.wave_sto, -1)         setGlobalStorageValue(1000, -1)         clearArena()     end     return true end Tags: <event type="kill" name="killBoss" script="killboss.lua"/> <event type="logout" name="arenaLogout" event="script" value="killboss.lua"/> <event type="preparedeath" name="deathBoss" event="script" value="killboss.lua"/> Não se esqueça de registrar o evento em login.lua:
    registerCreatureEvent(cid, "killBoss") registerCreatureEvent(cid, "deathBoss") Já em data/movements/scripts, você novamente cria um arquivo com extensão .lua (nome do arquivo: tpremove.lua) e coloca o seguinte código: function onStepIn(cid, item, position, fromPosition)     if not isPlayer(cid) then         return true     end     setPlayerStorageValue(cid, ARENA.STORAGES.storage, 1)     setPlayerStorageValue(cid, ARENA.STORAGES.wave_sto, -1) setGlobalStorageValue(1000, -1)     addEvent(function()         if getTileItemById(position, ARENA.TELEPORT.tpId).uid > 0 then             doRemoveItem(getTileItemById(position, ARENA.TELEPORT.tpId).uid, 1)         end     end, 50)     return true end Tag: <movevent type="StepIn" actionid="1307" event="script" value="tpremove.lua"/>
  15. Gostei
    glacialot deu reputação a Frenesy em Maquina de Summon APRIMORADA   
    No Tile ou Teleporte de saída da sala, você pode colocar para Scannear toda a área. Se tiver monstro lá dentro, o script remove.
     
    function onStepIn(cid, item, position, fromPosition) for posx = 367,480 do -- checar posição X, começo e final da sala for posy = 378,478 do -- checar posicao Y, começo e final da sala local pos = {x=posx, y=posy, z=14, stackpos=253} -- nao mexer aqui local creature = getThingfromPos(pos) -- pega informações da creature da posição (nao mexer aqui)                  if isMonster(creature.uid) then -- verifica se é um monster         doRemoveCreature(creature.uid) -- se for monster deleta ele end end end return TRUE end
  16. Gostei
    glacialot deu reputação a Jamison Collins em [Resolvido] SCRIPT QUE FAZ CHUVA DE CRYSTAL COIN   
    Bem, eu não testei, porém, creio que esteja certo
    Espero ter ajudado !
     
    @edit
    Preste atenção em outra alteração do script que eu fiz !
    function onSay(cid, words, param, channel) param = tonumber(param) local pos = {x=100, y=100, z=7} -- muda aqui pra posição central da arena local coin = 2160 -- muda aqui tbm pro id da crystal coin local speed = 150 -- velocidade em ms que aparecem as moedas local rangeX = 3 -- alcance no eixo x local rangeY = 3 -- alcance no eixo Y if(not param or param < 0 or param > 1000) then doPlayerSendCancel(cid, "Numeric param may not be lower than 0 and higher than 1000.") return true end for i = 1, (param*1) do addEvent(doCreateItem, i * speed, coin, 1, {x=pos.x + math.random(-rangeX, rangeX), y= pos.y + math.random(-rangeY, rangeY), z=pos.z}) end return true end
  17. Gostei
    glacialot deu reputação a Bruno Minervino em (Resolvido)[PEDIDO] Script TOP LEVEL   
    Em data/creaturescripts/creaturescripts.xml adicione:
    <event type="login" name="TopEffect" event="script" value="topeffect.lua"/> Em data/creaturescripts/scripts/login.lua adicione no fim:
    registerCreatureEvent(cid, "TopEffect") Agora crie um arquivo em data/creaturescripts/scripts com o nome topeffect.lua e adicione:
    local tempo = 10 --tempo em segundos function onLogin(cid) query = db.getResult("SELECT `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (query:getID() ~= -1) then name = query:getDataString("name") if getPlayerName(cid) == name then TopEffect(cid) end end return true end function TopEffect(cid) if isPlayer(cid) then doSendAnimatedText(getCreaturePosition(cid), "[TOP]", TEXTCOLOR_LIGHTBLUE) doSendMagicEffect(getCreaturePosition(cid), 30) addEvent(TopEffect, tempo*1000, cid) end return true end Altere apenas a primeira linha de acordo com sua necessidade.
    Espero ter ajudado!
     
    EDIT: Coloquei um outro efeito também rsrs
  18. Gostei
    glacialot deu reputação a Natanael Beckman em Trade OFF - Shop Offline   
    Esse sistema disponibiliza uma negociação offline, onde você oferta um item e esse item é divulgado no site do server e qualquer player pode comprar o item utilizando um comando especificado.
     
    Crie uma arquivo .lua dentro da pasta data/talkactions/scripts com o nome auctionsystem.lua, dentro do mesmo adicione o code:
    local config = {         levelRequiredToAdd = 20,         maxOffersPerPlayer = 5,         SendOffersOnlyInPZ = true,         blocked_items = {2165, 2152, 2148, 2160, 2166, 2167, 2168, 2169, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2343, 2433, 2640, 6132, 6300, 6301, 9932, 9933}         } function onSay(cid, words, param, channel)         if(param == '') then                 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")                 return true         end         local t = string.explode(param, ",")         if(t[1] == "add") then                 if((not t[2]) or (not t[3]) or (not t[4])) then                         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")                         return true                 end                 if(not tonumber(t[3]) or (not tonumber(t[4]))) then                         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't set valid price or items count.")                         return true                 end                 if(string.len(t[3]) > 7 or (string.len(t[4]) > 3)) then                         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This price or item count is too high.")                         return true                 end                 local item = getItemIdByName(t[2])                 if(not item) then                         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.")                         return true                 end                 if(getPlayerLevel(cid) < config.levelRequiredToAdd) then                         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have required (" .. config.levelRequiredToAdd .. ") level.")                         return true                 end                 if(isInArray(config.blocked_items, item)) then                         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This item is blocked.")                         return true                 end                 if(getPlayerItemCount(cid, item) < (tonumber(t[4]))) then                         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you don't have this item(s).")                         return true                 end                 local check = db.getResult("SELECT `id` FROM `auction_system` WHERE `player` = " .. getPlayerGUID(cid) .. ";")                 if(check:getID() == -1) then                 elseif(check:getRows(true) >= config.maxOffersPerPlayer) then                         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't add more offers (max. " .. config.maxOffersPerPlayer .. ")")                         return true                 end                 if(config.SendOffersOnlyInPZ) then                             if(not getTilePzInfo(getPlayerPosition(cid))) then                                 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you add offert to database.")                                 return true                         end                 end                 if(tonumber(t[4]) < 1 or (tonumber(t[3]) < 1)) then                         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to type a number higher than 0.")                         return true                 end                                 local itemcount, costgp = math.floor(t[4]), math.floor(t[3])                 doPlayerRemoveItem(cid, item, itemcount)                 db.executeQuery("INSERT INTO `auction_system` (`player`, `item_name`, `item_id`, `count`, `cost`, `date`) VALUES (" .. getPlayerGUID(cid) .. ", \"" .. t[2] .. "\", " .. getItemIdByName(t[2]) .. ", " .. itemcount .. ", " .. costgp ..", " .. os.time() .. ")")                                 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You successfully add " .. itemcount .." " .. t[2] .." for " .. costgp .. " gps to offerts database.")         end         if(t[1] == "buy") then                 if(not tonumber(t[2])) then                         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")                         return true                 end                 local buy = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";")                 if(buy:getID() ~= -1) then                         if(getPlayerMoney(cid) < buy:getDataInt("cost")) then                                 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have enoguh GP.")                                 buy:free()                                 return true                         end                         if(getPlayerName(cid) == getPlayerNameByGUID(buy:getDataInt("player"))) then                                 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can't buy your own items.")                                 buy:free()                                 return true                         end                         if(getPlayerFreeCap(cid) < getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")))then                                 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You try to buy a " .. buy:getDataString("item_name") .. ". It weight " .. getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")) .. " cap oz. and you have only " .. getPlayerFreeCap(cid) .. " oz. free capacity. Put some items to depot and try again.")                                 buy:free()                                 return true                         end                         if(isItemStackable((buy:getDataString("item_id")))) then                                 doPlayerAddItem(cid, buy:getDataString("item_id"), buy:getDataInt("count"))                         else                                 for i = 1, buy:getDataInt("count") do                                         doPlayerAddItem(cid, buy:getDataString("item_id"), 1)                                 end                         end                         doPlayerRemoveMoney(cid, buy:getDataInt("cost"))                         db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";")                         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You bought " .. buy:getDataInt("count") .. " ".. buy:getDataString("item_name") .. " for " .. buy:getDataInt("cost") .. " gps!")                         db.executeQuery("UPDATE `players` SET `auction_balance` = `auction_balance` + " .. buy:getDataInt("cost") .. " WHERE `id` = " .. buy:getDataInt("player") .. ";")                         buy:free()                 else                         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")                 end         end         if(t[1] == "remove") then                 if((not tonumber(t[2]))) then                         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")                         return true                 end                                 if(config.SendOffersOnlyInPZ) then                                             if(not getTilePzInfo(getPlayerPosition(cid))) then                                                 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you remove offerts from database.")                                                 return true                                         end                 end                 local delete = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";")                         if(delete:getID() ~= -1) then                         if(getPlayerGUID(cid) == delete:getDataInt("player")) then                                 db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";")                                 if(isItemStackable(delete:getDataString("item_id"))) then                                         doPlayerAddItem(cid, delete:getDataString("item_id"), delete:getDataInt("count"))                                 else                                         for i = 1, delete:getDataInt("count") do                                                 doPlayerAddItem(cid, delete:getDataString("item_id"), 1)                                         end                                 end                                 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your offert has been deleted from offerts database.")                         else                                 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This is not your offert!")                         end                 delete:free()                 else                         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")                 end         end         if(t[1] == "withdraw") then                 local balance = db.getResult("SELECT `auction_balance` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. ";")                 if(balance:getDataInt("auction_balance") < 1) then                         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have money on your auction balance.")                         balance:free()                         return true                 end                 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got " .. balance:getDataInt("auction_balance") .. " gps from auction system!")                 doPlayerAddMoney(cid, balance:getDataInt("auction_balance"))                 db.executeQuery("UPDATE `players` SET `auction_balance` = '0' WHERE `id` = " .. getPlayerGUID(cid) .. ";")                 balance:free()         end         return true end Em seguida em talkactions.xml adicione a tag:
    <talkaction words="!offer" event="script" value="auctionsystem.lua"/> No banco de dados execute as querys:
    CREATE TABLE `auction_system` (   `id` int(11) NOT NULL auto_increment,   `player` int(11),   `item_id` int(11),   `item_name` varchar(255),   `count` int(11),   `cost` int(11),   `date` int(11),   PRIMARY KEY  (`id`) ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; ALTER TABLE `players` ADD `auction_balance` INT( 11 ) NOT NULL DEFAULT '0'; Na pasta do seu site crie um arquivo chamado tradeoff.php, em seguida adicione o code:
    <?PHP $auctions = $SQL->query('SELECT `auction_system`.`player`, `auction_system`.`id`, `auction_system`.`item_name`, `auction_system`.`item_id`, `auction_system`.`count`, `auction_system`.`cost`, `auction_system`.`date`, `players`.`name` FROM `auction_system`, `players` WHERE `players`.`id` = `auction_system`.`player` ORDER BY `auction_system`.`id` DESC')->fetchAll(); $players = 0;             $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Instruction<b></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><center><h2>Commands</h2><b>!offer add, itemName, itemPrice, itemCount</b><br /><small>example: !offer add, plate armor, 500, 1</small><br /><br /><B>!offer buy, AuctionID</b><br /><small>example: !offer buy, 1943</small><br /><br /><b>!offer remove, AuctionID</b><br /><small>example: !offer remove, 1943</small><br /><br /><b>!offer withdraw</b><br /><small>Use this command to get money for sold items.</small></center></TR></TD></TABLE><br />';     if(empty($auctions))     {         $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Auctions</b></td></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD>Currently is no one active Auction.</TD></TR></TABLE>';         $main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/vDk/">vDk</a>.</small></p>';     }     else     {     foreach($auctions as $auction) {         $players++;             if(is_int($players / 2))                 $bgcolor = $config['site']['lightborder'];             else                 $bgcolor = $config['site']['darkborder'];         $cost = round($auction['cost']/1000, 2);         $content .= '<TR BGCOLOR='.$bgcolor.'><TD><center>'.$auction['id'].'</center></TD><TD><center><img src="/item_images/'.$auction['item_id'].'.gif"/></center></TD><TD><center>'.$auction['item_name'].'</center></TD><TD><center><a href="?subtopic=characters&name='.urlencode($auction['name']).'">'.$auction['name'].'</a></center></TD><TD><center>'.$auction['count'].'</center></TD><TD><center>'.$cost.'k<br /><small>'.$auction['cost'].'gp</small></center></TD><TD><center>!offer buy, '.$auction['id'].'</center></TR>';     }          $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>ID</center></b></TD><TD class="white"><b><center>#</center></b></TD><TD class="white"><b><center>Item Name</center></b></TD><TD class="white"><b><center>Player</center></b></TD><TD class="white"><b><center>Count</center></b></TD><TD class="white"><b><center>Cost</center></b></td><TD class="white"><b><center>Buy</center></b></td></TR>'.$content.'</TABLE>';     $main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/vdk.1553/">vDk</a>.</small></p>'; }     ?>  Em layouts.php adcione o code:
                                    <a href="?subtopic=tradeoff">                                         <div id="submenu_tradeoff" 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_tradeoff" class="ActiveSubmenuItemIcon" style="background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);"></div>                                                 <div id="ActiveSubmenuItemLabel_tradeoff" class="SubmenuitemLabel">Trade Off</div>                                                 <div class="RightChain" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);"></div>                                         </div>                                 </a> Pra finalizar em index.php adicione esse code:
    case "tradeoff";    $topic = "Trade Off";    $subtopic = "tradeoff";    include("tradeoff.php"); break;
    -
    E pronto galera clica em GOSTEI e comenta no tópico.
     
  19. Gostei
    glacialot deu reputação a EddyHavoc em Looking at you [Look]   
    Looking at You 
     
     
     
    Fala galera do TK, faz tempo que não posto nada, aí vou postar um sistema simples aqui, que ainda não tem no fórum e vejo membros procurando.
     
    DESCRIÇÃO DO SISTEMA: Quando um player der look em você aparecerá em branco uma mensagem no canto inferior da tela: "Nome do Player" is looking at you.
     
     
    1° - Acesse a pasta MODS e crie um arquivo chamado lookingatyou.xml, coloque isso dentro do arquivo: 
    <?xml version="1.0" encoding="UTF-8"?> <mod name="peeper" version="1.0" author="" contact="" enabled="yes"> <config name="peeper-config"><![CDATA[ -- anonymously or display peeper name? anonymous = "no" -- ignore players with access (will not show message when they look on someone) hiddenAccess = 3 -- message color (type) messageType = MESSAGE_STATUS_DEFAULT ]]></config> <event type="look" name="peeper-event" event="script"><![CDATA[ domodlib('peeper-config') local config = { anonymous = getBooleanFromString(anonymous), hiddenAccess = hiddenAccess, messageType = messageType } function onLook(cid, thing, position, lookDistance) if(isPlayer(thing.uid) and getPlayerAccess(cid) < config.hiddenAccess) then doPlayerSendTextMessage(thing.uid, config.messageType, (config.anonymous and "Someone" or getPlayerName(cid)) .. " is looking at you.") end return true end ]]></event> <event type="login" name="peeper-login" event="buffer"><![CDATA[ registerCreatureEvent(cid, "peeper-event") _result = true ]]></event> </mod> Bom galera este é o sistema.
    Créditos:
    EddyHavoc 
    Slawkens
     
    Testado e funcionando 100%
  20. Gostei
    glacialot deu reputação a Skydangerous em [CreatureEvent] Mensagem de Boas-Vindas   
    Esse script é bem útil nos servidores, para divulgações e notícias.

    Crie um arquivo com na pasta creaturescripts/scripts com nome de msg.lua,e em seguida cole o script abaixo.

    function onLogin(cid) if getPlayerStorageValue(cid, 50000) == -1 then doPlayerSendTextMessage(cid, 22, "Bem-Vindo"..getPlayerName(cid).." acesse www.tibiaking.com e cadastra-se") setPlayerStorageValue(cid, 50000, 1) end return TRUE end em creaturescripts.xml coloque essa tag <event type="login" name="Mensagem" script="msg.lua">



    Editando o Script


    doPlayerSendTextMessage(cid, 22, "Bem-Vindo"..getPlayerName(cid).." acesse www.tibiaking.com e cadastra-se")

    Aqui você coloca a mensagem que o player receberá quando logar pela primeira vez no seu servidor.</event>
  21. Gostei
    glacialot deu reputação a luanluciano93 em [MOD] Sistema de Loteria (Com página no Site)   
    DESC LIMIT 10

    $lottery = $SQL->query('SELECT id, name, item, world_id FROM lottery WHERE world_id = 0 ORDER BY id DESC LIMIT 5;'); Testa ai
  22. Gostei
    glacialot recebeu reputação de Rafael Mateus em Sistema Chuva Que Funcione Em 8.54   
    Pessoal vou disponibilizar um Script que tenho que Funciona no TFS 0.4, 8.60, nao sei em versão inferior, mas não custa tentar:
     
    Em globalvents/scripts cria um chamado chuva.lua
    local rain = Rain:new() function onThink(interval, lastExecution) local minX = 0 local minY = 0 local maxX = 192 local maxY = 79 local frompos = {x=math.random(minX, maxX), y=math.random(minY, maxY), z=7} local topos = {x=math.random(frompos.x, maxX), y=math.random(frompos.y, maxY), z=7} local effects = { snow = { disteffect = CONST_ANI_SNOWBALL, effect = CONST_ME_ICETORNADO }, rain = { disteffect = CONST_ANI_ICE, effect = CONST_ME_LOSEENERGY } } random = math.random(0, 10) if (random == 0) then rain.chance = math.random(10,50) rain:start({fromPos = frompos, toPos = topos}, effects.snow, 300, math.random(100, 500)) else rain.chance = math.random(20,100) rain.createItem = {chance = math.random(0,10), item = {itemid = 2016, type = 1}} rain:start({fromPos = frompos, toPos = topos}, effects.rain, math.random(100, 1000), math.random(100, 350)) end return TRUE end em globalevents.xml adiciona
    <globalevent name="save" interval="40000" event="script" value="chuva.lua"/> Para configurar onde vai chover basta mudar as cordenadas aqui:
    local minX = 0 local minY = 0 local maxX = 192 local maxY = 79 Se ajudei da um GOSTEI ai
  23. Gostei
    glacialot deu reputação a Qwizer em [Ajuda] Site pede World e City - CreateCharacter   
    e soo configurar no config.php do site

    configura no config.php do site 
     
    $config['site']['newchar_towns'][0] = array(1); $config['site']['newchar_towns'][1] = array(1); deixa assim    $config['site']['worlds'] = array(0 => 'Baiak');
    deixa assim
      $towns_list[0] = array(1 => 'Baiak'); deixa assim   se não souber onde posta seu config.php do site que a gente corrigi.
  24. Gostei
    glacialot deu reputação a eskylo em GIF dos Monster Site   
  25. Gostei
    glacialot deu reputação a Dudu Ruller em [NPC] Mission   
    Boa Tarde, Trago a voces Hoje o NPC De missao, que a recompença e EXP, Voce presisa Catar tantos items, e a recompença é em EXP!

    Bem Vamos la:

    Crie um Arquivo Chamado Mission.xml dentro da pasta data/npc e Cole o seguinte codigo no NPC:


    <?xml version="1.0" encoding="UTF-8"?> <npc name="Mission" script="mission.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="325" head="29" body="4" legs="20" feet="96" addons="3" corpse="2212"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. What brings you to me? You want start the {quest}?"/> </parameters> </npc> Pronto, Agora crie um arquivo chamado mission.lua dentro da pasta data/npc/scripts e cole isso dentro: 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 if(msgcontains(msg, 'quest')) then selfSay('To start this quest tell {mission}', cid) --This is just an example, In this script added 4 mission for you end if(msgcontains(msg, 'mission')) then if(getPlayerStorageValue(cid,700) < 1) then selfSay('Your first mission will be to get 100 {tarantula egg}.', cid) talkState[talkUser] = 1 elseif (getPlayerStorageValue(cid,701) < 1) then selfSay('Your next mission will be to get 150 {strands of medusa hair}.', cid) talkState[talkUser] = 1 elseif (getPlayerStorageValue(cid,702) < 0) then selfSay('Your next mission will be to get 300 {red dragon scales}.', cid) talkState[talkUser] = 1 elseif (getPlayerStorageValue(cid,703) < 0) then selfSay('Your next mission will be to get 400 {green dragon scales}.', cid) talkState[talkUser] = 1 elseif (getPlayerStorageValue(cid,703) == 1) then --zmieniac w zaleznosci od ostatniego storage!! selfSay('You have done all missions.', cid) talkState[talkUser] = 1 end --------------------------------------- elseif(msgcontains(msg, 'tarantula egg') and talkState[talkUser] == 1 and (getPlayerStorageValue(cid,700) < 1)) then if(doPlayerRemoveItem(cid, 11198, 100) == TRUE) then setPlayerStorageValue(cid,700,1) doPlayerAddPercentLevel(cid, 5) selfSay('Thank you.', cid) talkState[talkUser] = 0 else selfSay('To end mission you need have 100 {tarantula egg}.', cid) end --------------------------------------- elseif(msgcontains(msg, 'strands of medusa hair') and talkState[talkUser] == 1 and (getPlayerStorageValue(cid,701) < 1) and (getPlayerStorageValue(cid,700) == 1)) then if(doPlayerRemoveItem(cid, 11226, 150) == TRUE) then setPlayerStorageValue(cid,701,1) doPlayerAddPercentLevel(cid, 7) selfSay('Thank you.', cid) talkState[talkUser] = 0 else selfSay('To end mission you need have 150 {strands of medusa hair}.', cid) end --------------------------------------- elseif(msgcontains(msg, 'red dragon scales') and talkState[talkUser] == 1 and (getPlayerStorageValue(cid,702) < 1) and (getPlayerStorageValue(cid,701) == 1)) then if(doPlayerRemoveItem(cid, 5882, 300) == TRUE) then setPlayerStorageValue(cid,702,1) doPlayerAddPercentLevel(cid, 6) selfSay('Thank you.', cid) talkState[talkUser] = 0 else selfSay('To end mission you need have 300 {red dragon scales}.', cid) end --------------------------------------- elseif(msgcontains(msg, 'green dragon scales') and talkState[talkUser] == 1 and (getPlayerStorageValue(cid,703) < 1) and (getPlayerStorageValue(cid,702) == 1)) then if(doPlayerRemoveItem(cid, 5920, 400) == TRUE) then setPlayerStorageValue(cid,703,1) doPlayerAddPercentLevel(cid, 5) selfSay('Thank you.', cid) talkState[talkUser] = 0 else selfSay('To end mission you need have 400 {green dragon scales}.', cid) end ------------------------------------------ end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) [/code] Pronto, Agora Va em [b]data/lib/[/b] e abra o Arquivo [b]050-funcion.lua [/b]e cole a seguinte funçao:[b] [/b](function by Oskar1121 (Otland)) [code] function doPlayerAddPercentLevel(cid, percent) local player_lv, player_lv_1 = getExperienceForLevel(getPlayerLevel(cid)), getExperienceForLevel(getPlayerLevel(cid)+1) local percent_lv = ((player_lv_1 - player_lv) / 100) * percent doPlayerAddExperience(cid, percent_lv) end

    Bem é isso, Comentem!

Informação Importante

Confirmação de Termo