Ir para conteúdo

falling

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Curtir
    falling recebeu reputação de marcosb em [Script] Criar item   
    Olá pessoal estava tentando modificar este script da arena, movement que quando pisa no tile, aparece um goblet emcima da bancada, com a desc de bravura pro kra.
     
     
    Mais eu tentei por outro item, só mudei o ID e a QUANTIDADE e mesmo assim nao vai, tem como arrumar?
    function onStepIn(cid, item, position, fromPosition) local gobletPos = getThingPos(item.uid) if item.actionid == 42360 then if getPlayerStorageValue(cid, 42360) ~= 1 then setPlayerStorageValue(cid, 42360, 1) local goblet = doCreateItemEx(10572, 15) doItemSetAttribute(goblet, "description", "It is given to the courageous victor of the barbarian arena greenhorn difficulty.\nAwarded to " .. getCreatureName(cid) .. ".") doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet) end elseif item.actionid == 42370 then if getPlayerStorageValue(cid, 42370) ~= 1 then setPlayerStorageValue(cid, 42370, 1) local goblet = doCreateItemEx(10572, 25) doItemSetAttribute(goblet, "description", "It is given to the courageous victor of the barbarian arena scrapper difficulty.\nAwarded to " .. getCreatureName(cid) .. ".") doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet) end elseif item.actionid == 42380 then if getPlayerStorageValue(cid, 42380) ~= 1 then setPlayerStorageValue(cid, 42380, 1) local goblet = doCreateItemEx(10572, 30) doItemSetAttribute(goblet, "description", "It is given to the courageous victor of the barbarian arena warlord difficulty.\nAwarded to " .. getCreatureName(cid) .. ".") doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet) end end doTransformItem(item.uid, item.itemid - 1) return TRUE end function onStepOut(cid, item, pos) doTransformItem(item.uid, item.itemid + 1) return TRUE end
  2. Gostei
    falling deu reputação a Wakon em (Resolvido)[Action] Mudar de TALK para ACTION   
    Em "Data/actions/scripts" crie nome_do_arquivo.lua e cole:
    local t = {     money = 2000000 } function onUse(cid, item)     if (getCreatureSkullType(cid) == SKULL_BLACK) or (getCreatureSkullType(cid) == SKULL_RED) then         if doPlayerRemoveMoney(cid, t.money) then            doCreatureSetSkullType(cid, SKULL_NONE)            doPlayerSendTextMessage(cid, 22, "Sua skull foi retirada.") doRemoveItem(item.uid)         else            doPlayerSendTextMessage(cid, 22, "Você precisa de "..t.money.." gold coins para retirar sua skull.")         end     elseif (getCreatureSkullType(cid) == SKULL_NONE) then        doPlayerSendTextMessage(cid, 22, "Você não tem nenhuma skull.")     end    return true end Em "Data/actions" abra o actions.xml e adicione a TAG:
    <action itemid="id_do_item" event="script" value="nome_do_arquivo.lua"/> Para deixar infinito, basta criar outro da mesma maneira e retirar essa linha apenas:
    doRemoveItem(item.uid) Não testei o script, se der algum erro, avise.
  3. Gostei
    falling deu reputação a Wakon em (Resolvido)[Action] Organizar Script   
    Testa ai:
    local t = {     storage = 5722,     money = 50000 } function onUse(cid, item, frompos, item2, topos)     if getPlayerStorageValue(cid, t.storage) < 1 then         if doPlayerRemoveMoney(cid, t.money) == true then            doPlayerSendTextMessage(cid,22,"Voce agora é um Baiakzik Vip. System Vip By {ADM}~Th3uz1k~.")            doSendMagicEffect(topos,12)            coins_uid = doPlayerAddItem(cid,2160,100)            coins_uid = doPlayerAddItem(cid,9693,1)            setPlayerStorageValue(cid,t.storage,1)         else            doPlayerSendTextMessage(cid, 22, "Você não tem o dinheiro necessário.")         end     else        doPlayerSendTextMessage(cid, 22, "Você já é Baiakzik VIP.")     end    return true end TAG:
    <action actionid="action_id" event="script" value="nome_do_arquivo.lua"/>
  4. Gostei
    falling deu reputação a 1027929 em (Resolvido)[ARENA] BUG MOVEMENT   
    Na linha 18 ta assim:
    local monster_uid = getGlobalStorageValue(arena_room+100) Adicione isso abaixo ficando assim:
     
    local monster_uid = getGlobalStorageValue(arena_room+100) monster_uid = tonumber(monster_uid) Me avisa se funcionou zzz
  5. Gostei
    falling deu reputação a Snowsz em (Resolvido)[Talkaction] !frags   
    local config = { useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')), advancedFragList = getBooleanFromString(getConfigValue('advancedFragList')) } function onSay(cid, words, param, channel) if(not config.useFragHandler) then return true end local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = { name = result:getDataString("name"), level = result:getDataInt("level"), date = result:getDataInt("date") } if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } if(config.advancedFragList) then local result = "Frags gained today: " .. size.day .. "." result = result .. "\nFrags gained this week: " .. (size.day + size.week) .. "." result = result .. "\nFrags gained this month: " .. (size.day + size.week + size.month) .. "." local skullEnd = getPlayerSkullEnd(cid) if(skullEnd > 0) then result = result .. "\nYour " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd) end doPlayerSendTextMessage(cid, 18, result) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You currently have " .. size.day .. " frags today, " .. (size.day + size.week) .. " this week and " .. (size.day + size.week + size.month) .. " this month.") local skullEnd = getPlayerSkullEnd(cid) if(skullEnd > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd)) end end return true end
  6. Gostei
    falling deu reputação a Wakon em (Resolvido)[Actions para Talkaction] !spells   
    Script:
    function onSay(cid, words, param) local count = getPlayerInstantSpellCount(cid) local text = "" local t = {} for i = 0, count - 1 do local spell = getPlayerInstantSpellInfo(cid, i) if spell.level ~= 0 then if spell.manapercent > 0 then spell.mana = spell.manapercent .. "%" end table.insert(t, spell) end end table.sort(t, function(a, b) return a.level < b.level end) local prevLevel = -1 for i, spell in ipairs(t) do local line = "" if prevLevel ~= spell.level then if i ~= 1 then line = "\n" end line = line .. "Spells for Level " .. spell.level .. "\n" prevLevel = spell.level end text = text .. line .. "  " .. spell.words .. " - " .. spell.name .. " : " .. spell.mana .. "\n" end doShowTextDialog(cid, 2175, text) return TRUE end Tag:
    <talkaction words="!spells" event="script" value="spell.lua"/>
  7. Gostei
    falling deu reputação a Nightz em Instalando, usando e entendendo o Screen   
    Olá cidadãos do TibiaKing!
     
    Neste tutorial de hoje vou ensinar a instalar e utilizar o Screen. Mas antes disso, vou explicar o que é e para que serve.
     
    O Screen (ou GNU Screen) é é um software livre multiplexador de terminal de linha de comando desenvolvido pelo Projeto GNU. Permite que o usuário acesse múltiplas sessões separadas de terminal a partir de uma mesma janela ou mesmo remotamente. É muito útil para manipular vários programas em uma mesma janela ou mesmo para manter processos em execução de fundo. [Wikipedia]
     
    Ou seja, reusmidamente, o Screen é um software que permite você rodar várias áreas de trabalhos com vários processos executando.
     
    E porque preciso de utilizar isso no meu servidor de OTServer?
    Simples! Quando for abrir o servidor utilizando o comando ./theforgottenserver &, ao fechar o SSH, o servidor continua rorando, certo? Mas você não pode mais ver os logs que o executável gera em tempo real no linux. Porém.. se você abrir o servidor dentro de uma área de trabalho do Screen, isso é possível! Sem contar com várias outras vantagens como maior estabilidade e possibilidade de continuar trabalhando no SSH sem interromper o servidor ou ter que abrir outra janela!
     
    Bom.. agora que já expliquei sobre o Screen.. Vamos ao tutorial!
     
    1. Instalando o Screen:
     
    1.1. Abra o terminal SSH do seu servidor.
     
    1.2. Ao logar no servidor, rode o seguinte comando para instalar o Screen:
     
    -> Servidores Ubuntu/Debian:
    apt-get install screen -> Servidores CentOS:
    yum install screen 1.3. Pronto, Screen instalado! Simples, não?
     
     
    Agora vamos a utilização!
     
     
    2. Utilizando o Screen:
     
    2.1. Abra o terminal SSH do seu servidor.
     
    2.2. Para criar uma nova área de trabalho do Screen, utilize o comando:
    screen -S NomeDaScreen -> Por exemplo:
    screen -S rodarServidor 2.3. Assim que o comando acima for executado, voce já estará em uma nova área de trabalho. Caso queira deixar algo rodando nela em segundo plano, basta rodar o que for rodar normalmente e sair da Screen sem fechar a área de trabalho.
     
    -> Por exemplo:
    screen -S TFS nightz@servidor:~$ cd /home/otserv nightz@servidor:/home/otserv$ ./theforgottenserver & 2.4. Depois que o comando já estiver rodando, basta pressionar as teclas CONTROL, A e D (Ctrl  A + D). Ao "minimizar" a área de trabalho, o Screen vai exibir uma frase informando que "deu tudo certo".
     
    -> Por exemplo:
    screen -S tst nightz@servidor:~$ [detached from 13077.tst] 2.5. Para entrar novamente na Screen, basta utilizar o comando abaixo:
    screen -r -x NomeDaScreen -> Por exemplo:
    screen -r -x tst 2.6. Mas e se eu esquecer o nome da Screen? Calma.. Para listar todas as Screens em execução, utilize o seguinte comando:
    screen -ls -> Por exemplo:
    nightz@server:$ screen -ls There is a screen on:     13077.tst    (10-06-2014 08:55:37)    (Detached) 1 Socket in /var/run/screen/S-476175. nightz@server:$ * De azul, temos o nome das Screens (neste caso, da Screen) em execução.
     
    2.7. E para fechar uma Screen, ao em vez de minimizá-la, como faço? Simples! Utilize o comando abaixo após acessar a Screen que deseja fechar:
    exit Pronto!
     
    3. Correção de problemas:
     
    Aqui em baixo, vou postando soluções de possíveis problemas do Screen, a medida que forem sendo reportados. Até hoje, o único problema por qual já passei foi a pasta do Screen perder permissão, fazendo com que eu não consiga ver as Screens em aberto, mas esse problema só não permite que a mesma seja resumida, as Screens todas continuaram funcionando normalmente.
    + Problema: Directory '/var/run/screen' must have mode 777. + Solução: chmod 777 /var/run/screen. Façam bom proveito!
     
    (Esse tutorial foi completamente escrito por mim. Qualquer cópia deve ser previamente autorizada e conter os devidos créditos.)
  8. Gostei
    falling deu reputação a Natanael Beckman em [GlobalEvents]Raids Automáticas   
    Galera não encontrei um tutorial no fórum com esse script, mais caso haja por favor moderadores remova o tópico!
    Script útil a todos:
     
    TFS 0.4 e OTX
     
    Abra data/globalevents/globalevents.xml adicione a seguinte tag:
    <globalevent name="raids" interval="1000" event="script" value="raid.lua"/> Na pasta data/globalevents/scripts crie um arquivo .lua com o nome raid.lua adicione o seguinte code dentro do arquivo:
    --[[ - hour should be exact SERVER hour - to do the raid at clock 00 minutes 00 - to do the raid at exaxt date use type "exact" - to do the raid weekly use type "weekly" - days names are used only for weekly type and should be - "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday" - also should be inside a array -> {} ]] local raids =     {         [1] =             {                 name = 'Morgaroth',                 type = 'exact',                 date = {day = 15, month = 08},                 hour = 16,                 minu = 27             },         [2] =             {                 name = 'Zulazza the Corruptor',                 type = 'weekly',                 days = {'monday'},                 hour = 20,                 minu = 00             },         [3] =             {                 name = 'RatsThais',                 type = 'exact',                 date = {day = 31, month = 07},                 hour = 03,                 minu = 00             },         [4] =             {                 name = 'OrcsThais',                 type = 'exact',                 date = {day = 03, month = 08},                 hour = 17,                 minu = 00             },         [5] =             {                 name = 'Barbarian',                 type = 'exact',                 date = {day = 05, month = 08},                 hour = 18,                 minu = 00             },         [6] =             {                 name = 'Demodras',                 type = 'exact',                 date = {day = 07, month = 08},                 hour = 19,                 minu = 00             },         [7] =             {                 name = 'Elfos',                 type = 'exact',                 date = {day = 09, month = 08},                 hour = 20,                 minu = 00             },         [8] =             {                 name = 'Ferumbras',                 type = 'exact',                 date = {day = 11, month = 08},                 hour = 21,                 minu = 00             },         [9] =             {                 name = 'Ghazbaran',                 type = 'exact',                 date = {day = 13, month = 08},                 hour = 22,                 minu = 00             },         [10] =             {                 name = 'Horned Fox',                 type = 'exact',                 date = {day = 17, month = 08},                 hour = 23,                 minu = 00             },         [11] =             {                 name = 'Necropharus',                 type = 'exact',                 date = {day = 19, month = 08},                 hour = 00,                 minu = 00             },         [12] =             {                 name = 'Nomads',                 type = 'exact',                 date = {day = 21, month = 08},                 hour = 01,                 minu = 00             },         [13] =             {                 name = 'Orshabaal',                 type = 'exact',                 date = {day = 23, month = 08},                 hour = 14,                 minu = 00             },         [14] =             {                 name = 'Pirates',                 type = 'exact',                 date = {day = 25, month = 08},                 hour = 15,                 minu = 00             },         [15] =             {                 name = 'Quaras',                 type = 'exact',                 date = {day = 27, month = 08},                 hour = 16,                 minu = 00             },         [16] =             {                 name = 'Scarabs',                 type = 'exact',                 date = {day = 29, month = 08},                 hour = 17,                 minu = 00             },         [17] =             {                 name = 'Old Widow',                 type = 'exact',                 date = {day = 31, month = 08},                 hour = 18,                 minu = 00             },         [18] =             {                 name = 'Undead Army',                 type = 'exact',                 date = {day = 02, month = 09},                 hour = 19,                 minu = 00             },         [19] =             {                 name = 'Undead Darashia',                 type = 'exact',                 date = {day = 04, month = 09},                 hour = 20,                 minu = 00             },         [20] =             {                 name = 'Sir Valorcrest',                 type = 'weekly',                 days = {'monday'},                 hour = 20,                 minu = 00             },         [21] =             {                 name = 'Zevelong Duskbringer',                 type = 'weekly',                 days = {'tuesday'},                 hour = 20,                 minu = 00             },         [22] =             {                 name = 'Diblis The Fair',                 type = 'weekly',                 days = {'thursday'},                 hour = 20,                 minu = 00             },         [23] =             {                 name = 'Arachir the Ancient One',                 type = 'weekly',                 days = {'saturday'},                 hour = 20,                 minu = 00             },         [24] =             {                 name = 'Halloween Hare',                 type = 'exact',                 date = {day = 31, month = 10},                 hour = 16,                 minu = 00             }         }      local last_execsutes = {} function onThink(interval, lastExecution, thinkInterval)     local static_time = os.time()     for k, raid in ipairs(raids) do         if (raid.type == 'weekly') then             local day = os.date("%A", static_time):lower()             if isInArray(raid.days, day) then                 local hour = tonumber(os.date("%H", static_time))                 if (raid.hour == hour) then                     local minute = tonumber(os.date("%M", static_time))                     if (raid.minu == minute) then                         local day_number = tonumber(os.date("%d", static_time))                         if (last_execsutes[k] ~= day_number) then                             last_execsutes[k] = day_number                             doExecuteRaid(raid.name)                         end                     end                 end             end         elseif (raid.type == 'exact') then             local month = tonumber(os.date("%m", static_time))             if (raid.date.month == month) then                 local day = tonumber(os.date("%d", static_time))                 if (raid.date.day == day) then                     local hour = tonumber(os.date("%H", static_time))                     if (raid.hour == hour) then                         local minute = tonumber(os.date("%M", static_time))                         if (raid.minu == minute) then                             if (last_execsutes[k] ~= day) then                                 last_execsutes[k] = day                                 doExecuteRaid(raid.name)                             end                         end                     end                 end             end         end     end     return true end Como funciona? Veja abaixo alguns exemplos:
     
    Nessa raid abaixo está configurada pra ser executada, dia X, mês X, hora XX:XX minutos.
            [1] =             {                 name = 'Morgaroth',                 type = 'exact',                 date = {day = 15, month = 08},                 hour = 16,                 minu = 27             }, Essa outra abaixo é uma raid pra ser executada semanalmente no dia e horário que você desejar.
            [2] =             {                 name = 'Zulazza the Corruptor',                 type = 'weekly',                 days = {'monday'},                 hour = 20,                 minu = 00             }, Lembrado, name = 'Morgaroth', é necessário que essa raid esteja configurada na pasta data/raids.
     
    Os créditos eu não sei quem fez, só sei que foi alguém da otland
  9. Gostei
    falling deu reputação a Natanael Beckman em Bug MW   
    Galera eu fiz uma alteração no server pra uma certa melhora, o problema é que essa melhora bugou o MW e tipo ele fica sem exhausted pra renovar, bom procurei e encontrei uma solução, mais contém outro problema, a MW se renova no tempo certo o problema é que se usar uma MW não posso usar outra em outro SQM só pode usar após os 20 segundos quando termina a que lancei, alguém tem algum palpite pra da?
     
    local combat = createCombatObject()  setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)  setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)  setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)  function onCastSpell(cid, var) if exhaustion.check(cid, 1000) == false then exhaustion.set(cid,1000, 20) return doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid,1000).."]") end end  
  10. Gostei
    falling deu reputação a Summ em [Raids] Automaticas   
    Use esse que eu fiz em outro tópico :
     
    [paste]wWSEzjQm[/paste]
     
     
     
     
    tag :
    <globalevent name="Raids" interval="10000" script="raids.lua"/>
  11. Gostei
    falling deu reputação a LeoTK em Megatibia x Underwar   
    Br Hu3Hu3 senti uma treta as planted
  12. Gostei
    falling recebeu reputação de LeoTK em Megatibia x Underwar   
  13. Gostei
    falling recebeu reputação de Lykkan em (Resolvido)Shop System   
    Faz isso direto pelo MySQL no phpmyadmin
    Na coluna shop_offers
  14. Gostei
    falling deu reputação a Danihcv em [Procuro] Projeto Pok/Naruto p/ Patrocino   
    @Sullivan, amigo, por favor evite este tipo e comentário que não acrescenta nada ao tópico.
  15. Gostei
    falling deu reputação a luanluciano93 em (Resolvido)[Urgente][Fatal Error] site   
    ALTER TABLE `players`ADD `broadcasting` INT NOT NULL DEFAULT 0;.
  16. Gostei
    falling deu reputação a Wise em [Desafio] Alavanca bem Elaborada   
    local info = {1, 5} -- {souls, cooldown} local gstor = 78910 -- global storage local m = {name = 'Demon', pos = {x = 123, y = 456, z = 7}} -- monster function onUse(cid)     if getGlobalStorageValue(gstor) < os.time() then         setGlobalStorageValue(gstor, os.time() + info[2])         doPlayerAddSoul(cid, -info[1])         doCreateMonster(m.name, m.pos)         doSendMagicEffect(m.pos, CONST_ME_MAGIC_GREEN)     else         doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)     end          return true end
  17. Gostei
    falling deu reputação a Nemat em Summon System   
    da uma olhada config.lua
    maxPlayerSummons = 3 teleportAllSummons = true teleportPlayerSummons = true
  18. Gostei
    falling deu reputação a Wise em (Resolvido)Sub nivel e Privilégios   
    @falling
    Apesar de ter partes semelhantes, o que você quer não convém muito com o propósito desse tópico. E além do mais, ele já foi resolvido.
    Crie o seu próprio tópico, amigo, e nele informe sobre o pedido.
  19. Gostei
    falling deu reputação a Wise em (Resolvido)[Pedido] Comando !off   
    off.lua (data/talkactions/scripts):
    local stor = 54321 function ariseText(cid)     local time = 2 -- seconds to repeat the function     local text = 'ausente'     if isPlayer(cid) then         doSendAnimatedText(getCreaturePosition(cid), text, math.random(0, 255))         if getPlayerStorageValue(cid, stor) > 0 then             addEvent(ariseText, time * 1000, cid)         end     end          return true end function onSay(cid)     if getPlayerStorageValue(cid, stor) < 1 then         setPlayerStorageValue(cid, stor, 1)         doCreatureSetNoMove(cid, true)         ariseText(cid)         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'O modo ausente está ativado.')     else         doCreatureSetNoMove(cid, false)         setPlayerStorageValue(cid, stor, -1)         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'O modo ausente está desativado.')     end          return true end

    Tag - talkactions.xml (data/talkactions):
    <talkaction words="!off" event="script" value="off.lua"/>

    offlogout.lua (data/creaturescripts/scripts):
    function onLogout(cid)     local stor = 54321     if getPlayerStorageValue(cid, stor) > 0 then         return doPlayerSendCancel(cid, 'Você não pode fazer logout com o modo ausente ativado.') and false     end          return true end

    Tag - creaturescripts.xml (data/creaturescripts):
    <event type="logout" name="OffLogout" event="script" value="offlogout.lua"/>
  20. Gostei
    falling recebeu reputação de Wise em [Pedido] Teleport Por Estatua   
    Ta ai parceiro, eu consegui aqui, nao lembro com quem rs'
    Creditos by @SUICIDE
     
    Ta ai!
    PS: O Script ainda abre um aviso dizendo alguma frase, e ainda checa o level!
     
     
    local level = 100 local pos = {x=558, y=495, z=7} local txt = {"Voce foi teleportado!", "Voce precisa ser level 100 para se teleportar!"} function onUse(cid, fromPos, toPos) if getPlayerLevel(cid) >= level then doTeleportThing(cid, pos) doSendMagicEffect(toPos, CONST_ME_TELEPORT) doShowTextDialog(cid, 2175, txt[1]) else doShowTextDialog(cid, 2175, txt[2]) end return true end <action uniqueid="10587" event="script" value="NOMESCRIPT.lua"/>
     
    Ai voce coloca 10587 na statua!
  21. Gostei
    falling deu reputação a Danihcv em Npc De Mission Meio Dif   
    Então, o script do npc seria assim:
    Ao falar mission pela primeira vez, vc coloca uma storage x no player.
    Aí quando o player falar hi com o warrior, o script do warrior fará uma checagem pra se o player tem a storage x. Se tiver, ele prosegue a missão "settando" a storage y no player.
    Então, ao voltar pro npc e falar mission pela segunda vez, o script do npc fará uma checagem pra ver se o player tem a storage y, se tiver, ele vai falar "obrigado agora fale com jack" e vai "settar" a storage z no player.
    Aí quando o player falar hi com o jack, o script do jackfará uma checagem pra se o player tem a storage z. Se tiver, ele prosegue a missão "settando" a storage w no player.
    Então, ao voltar pro npc e falar mission pela terceira vez, o script do npc fará uma checagem pra ver se o player tem a storage w, se tiver, ele vai falar "obrigado agora fale com Douglas" e vai "settar" a storage a no player.
     
    E assim por diante.
    Eu faria ele agora se fosse mais cedo, mas ja ta tarde, to indo descansar... :/
    Amanhã, se ngm tiver te ajudado, eu vejo o que faço.

    Ja dei a ideia básica ae galera, vamo ajduar o cara.

    Se esclareci algo, pf REP+
     
  22. Gostei
    falling deu reputação a Wise em (Resolvido)[SIMPLES] ADICIONAR BLOCK LEVEL   
    A quebra de linha é representada por \n e não SHIFT+ENTER. Portanto, seria:
    local level = 100 local pos = {x=33212, y=31671, z=13} local txt = {"Parabens! Voce tem a oportunidade de concluir a Annihilator Quest.\nLevel Recomendado: 100\nRecompensa: Sword of Valor, Stonecutter Axe, Demon Armor ou Bonebreaker Adkko", "Você não pode ser teleportado por não ter level suficiente..blablabla"} function onUse(cid, fromPos, toPos)     if getPlayerLevel(cid) >= level then         doTeleportThing(cid, pos)         doSendMagicEffect(toPos, CONST_ME_TELEPORT)         doShowTextDialog(cid, 2175, txt[1])     else         doShowTextDialog(cid, 2175, txt[2])     end     return true end
  23. Gostei
    falling deu reputação a Wise em [Storage] Por dia   
    Desculpe. Eu esqueci que você queria que "zerasse" o tempo exatamente à meia noite.
    Nesse caso:
    function onUse(cid) local t = {item = {5432, 1}, stor = {50040, 50041}} -- {item = {itemID, amount}, stor = {storage, globalstorage}} if getGlobalStorageValue(t.stor[2]) < 1 then if getPlayerStorageValue(cid, t.stor[1]) < 1 then setPlayerStorageValue(cid, t.stor[1], 1) setGlobalStorageValue(t.stor[2], 1) doPlayerAddItem(cid, t.item[1], t.item[2]) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You received '..t.item[2]..' '..t.item[1]) else return doPlayerSendCancel(cid, 'You already have completed this quest.') end else return doPlayerSendCancel(cid, 'Someone already has done this quest today, try tomorrow.') end return true end


    resetquest.lua (data/globalevents/scripts):
    function onTime()     local globalstor = 50041     if getGlobalStorageValue(globalstor) > 0 then         setGlobalStorageValue(globalstor, -1)     end          return true end


    Tag - globalevents.xml (data/globalevents):
    <globalevent name="ResetQuest" time="00:00" event="script" value="resetquest.lua"/>
  24. Gostei
    falling deu reputação a Wise em (Resolvido)[AJUDA] Boss   
    boss.lua (data/creaturescripts/scripts):
    local t = {boss = 'Boss', storage = 54321} function onDeath(cid, killer)     if isMonster(cid) and getCreatureName(cid) == t.boss then         for i = 1, #killer do             setPlayerStorageValue(killer[i], t.storage, 1)         end         doCreatureSay(cid, 'You defeated me..now you can open the door.', TALKTYPE_ORANGE_1)     elseif isPlayer(cid) and getPlayerStorageValue(cid, t.storage) > 0 then         setPlayerStorageValue(cid, t.storage, -1)     end          return true end function onLogout(cid)     if getPlayerStorageValue(cid, t.storage) > 0 then         setPlayerStorageValue(cid, t.storage, -1)     end          return true end


    Tags - creaturescripts.xml (data/creaturescripts):
    <event type="death" name="BPDeath" event="script" value="boss.lua"/> <event type="logout" name="BPLogout" event="script" value="boss.lua"/>


    Registre o creature event, tanto no XML do monstro:
    <script> <event name="BPDeath"/> </script>


    Quanto em login.lua (data/creaturescripts/scripts):
    registerCreatureEvent(cid, "BPDeath")


    bossdoor.lua (data/actions/scripts):
    function onUse(cid, fromPos, toPos)     local storage = 54321     if getPlayerStorageValue(cid, storage) > 0 then         doTeleportThing(cid, toPos)         doSendMagicEffect(fromPos, CONST_ME_MAGIC_BLUE)     else         doSendMagicEffect(fromPos, CONST_ME_POFF)         doPlayerSendCancel(cid, 'You need to kill the boss to open the door.')     end          return true end


    Tag - actions.xml (data/actions):
    <action actionid="ACTIONID" script="bossdoor.lua"/> Nesse caso, sempre que morrer/fizer logout, o player vai ter o valor da storage setado como diferente do necessário para abrir a porta.
  25. Gostei
    falling deu reputação a Wise em (Resolvido)[PRECISO] 2 scripts (item at x Level/bless ate o level X)   
    Script do Printer.
    Amigo, callback onLogin não registra creature event.




     
    Você quer dizer não dropar loot se for morto por players durante os níveis 20~50, certo?
    lootp.lua (data/creaturescripts/scripts):
    function onPrepareDeath(cid, killer)     local level = {20, 50}     local player = Player(cid)     if player ~= nil and killer:isPlayer() and player:getLevel() >= level[1] and player:getLevel() < level[2] + 1 then         player:setDropLoot(false)     end          return true end

     
    Registre o creature event em login.lua:
    registerCreatureEvent(cid, "LootProtection")

     
    Tag - creaturescripts.xml (data/creaturescripts):
    <event type="preparedeath" name="LootProtection" script="lootp.lua"/>

Informação Importante

Confirmação de Termo