Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 04/06/18 em todas áreas

  1. War anti-entrosa 100% funcional

    KotZletY reagiu a maleskinho por uma resposta no tópico

    1 ponto
    Olá pessoal, vi que muitos estavam tentando resolver o problema de um "CityWar Anti-Entrosa".de tal Empresa... "O script só roda uma vez a war e depois ele TRAVA, ." Estava olhando o script aonde ocorria o problema e consegui resolver fiz vários testes e está rodando 100% sem erros! No arquivo tem o tutorial que ensina a instalar, se ajudei deixa um rep+ File:Link Scan: Link -- EDIT--- Summon que matava os player na war fazia cair o servidor, agora está 100% estável o script. Substituir o arquivo diretório talkactions/lib/war.lua @Way20 Créditos pela ajuda.
  2. [DÚVIDA]Como usar o for nessa situação ?

    Shadow.Styller reagiu a WooX por uma resposta no tópico

    1 ponto
    Participe do nosso clube de estudos, quando tiver alguma duvida relacionada a linguagem, pode perguntar lá.
  3. Até o que seu dinheiro paga?

    WooX reagiu a vyctor17 por uma resposta no tópico

    1 ponto
    Bom eu comecei a "brincar" com OT-servers aproximadamente (04-11-2008), tirei a data de registro de outro fórum relacionado, era muito diferente em diversas questões na comunidade, com novos sistemas/scripts sendo desenvolvidos quase diariamente por ótimos programadores, aulas completas de programão, e pouco se falava sobre venda/compra de scripts a comunidade meio que se ajudava no geral, outra coisa é que eu percebia é uma vontade muito grande de aprender na comunidade. sem acomodação já que existia pouca coisa pronta então o minimo era aprender um pouco de programação, maping e etc..., eu mesmo entrei leigo e agora me considero um bom programador. tive ajuda de alguns dos melhores programadores na minha opinião do mundo do otserv, (mock, skyen hasus, conde2, entre outros não menos importantes mais que não me recordo). hoje a comunidade virou acomodada, é só por exemplo você ver as bases de poketibia que ate hoje são feitas com um monte de gambiarra. então em uma comunidade com pouca vontade de aprender é logico que o mercado vai se sobre sair, já que é muito mais fácil você pagar pra alguém fazer algo que aprender a fazer o mesmo, oque não é errado também, mas eu ainda gostaria de ver a comunidade com fome de conhecimento, quando eu posto algo (showoff), eu só vejo pessoas falando "podia liberar pra comunidade", mas não tenho mais a minima vontade de contribuir pra comunidade preguiçosa que não quer aprender, só sugar como parasitas.
  4. (Resolvido)Task System

    felippepsa reagiu a Vodkart por uma resposta no tópico

    1 ponto
    vdd fiz na pressa, valeu por avisar! boa observação!
  5. (Resolvido)Task System

    Vodkart reagiu a felippepsa por uma resposta no tópico

    1 ponto
    Deu certo, só faltou uma coisa na parte das vocações tava abrindo com { e fechando com ele também deixei ela assim! domodlib('task_func') 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,msg, str,rst = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid, msg:lower(),"","" local task,daily, hours = getTaskMission(cid),getDailyTaskMission(cid), 24 if isInArray({"task","tasks","missao","mission"}, msg) then if task_sys[task] then if getPlayerStorageValue(cid, task_sys[task].start) <= 0 then if getPlayerLevel(cid) >= task_sys[task].level then setPlayerStorageValue(cid, task_sys[task].start, 1) npcHandler:say("[Task System] Parabéns, agora você está participando da Task do "..task_sys[task].name.." e deverá matar "..task_sys[task].count.." desta lista: "..getMonsterFromList(task_sys[task].monsters_list)..". "..(#task_sys[task].items > 0 and "Ah e por favor me traga "..getItemsFromList(task_sys[task].items).." para mim." or "").."" , cid) else npcHandler:say("Desculpe, Mas você precisa alcançar level "..task_sys[task].level.." para poder participar da Task dos "..task_sys[task].name.."!", cid) end else npcHandler:say("Desculpe, Mas você atualmente está na task "..task_sys[task].name..". Você pode {entregar} caso já tenha terminado.", cid) end else npcHandler:say("Desculpe, Mas por enquanto não tenho mais nenhuma task para você!", cid) end elseif isInArray({"diaria","daili","daily","dayli","diario"}, msg) then if getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() > 0 then npcHandler:say("Desculpe, você deve esperar até "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6])).." para iniciar uma nova task diaria!", cid) return true elseif daily_task[daily] and getPlayerStorageValue(cid, task_sys_storages[5]) >= daily_task[daily].count then npcHandler:say("Desculpe, você tem task para {entregar} !", cid) return true end local r = doRandomDailyTask(cid) if r == 0 then npcHandler:say("Desculpe, mas você não tem level para completar nenhuma Task diaria.", cid) return true end setPlayerStorageValue(cid, task_sys_storages[4], r) setPlayerStorageValue(cid, task_sys_storages[6], os.time()+hours*3600) setPlayerStorageValue(cid, task_sys_storages[7], 1) setPlayerStorageValue(cid, task_sys_storages[5], 0) local dtask = daily_task[r] npcHandler:say("[Daily Task System] Parabéns, agora você está participando da Task Diaria do "..dtask.name.." e deverá matar "..dtask.count.." monstros desta lista: "..getMonsterFromList(dtask.monsters_list).." até "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6]))..". Boa sorte!" , cid) elseif isInArray({"receber","reward","recompensa","report","reportar","entregar","entrega"}, msg) then local v, k = task_sys[task], daily_task[daily] if v then -- original task if getPlayerStorageValue(cid, v.start) > 0 then if getPlayerStorageValue(cid,task_sys_storages[3]) >= v.count then if #v.items > 0 and not doRemoveItemsFromList(cid, v.items) then npcHandler:say("Desculpe, Mas você também precisa entregar os itens desta lista: "..getItemsFromList(v.items), cid) return true end if v.exp > 0 then doPlayerAddExp(cid, v.exp) str = str.."".. (str == "" and "" or ", ") .." "..v.exp.." de exp" end if v.points > 0 then setPlayerStorageValue(cid, task_sys_storages[2], (getTaskPoints(cid)+v.points)) str = str.."".. (str == "" and "" or ", ") .." + "..v.points.."task points" end if v.money > 0 then doPlayerAddMoney(cid, v.money) str = str.."".. (str == "" and "" or ", ") ..""..v.money.." gps" end if table.maxn(v.reward) > 0 then GiveRewardsTask(cid, v.reward) str = str.."".. (str == "" and "" or ", ") ..""..getItemsFromList(v.reward) end npcHandler:say("Obrigado pela sua ajuda Recompensas: "..(str == "" and "nenhuma" or ""..str.."").." por ter completado a task do "..v.name, cid) setPlayerStorageValue(cid, task_sys_storages[3], 0) setPlayerStorageValue(cid, task_sys_storages[1], (task+1)) if not task_sys[getTaskMission(cid)] then -- end all mission setPlayerStorageValue(cid, 89745, 6) local vocs = { -- [vocation] and outfit [1] = {[0] = 136, [1] = 128}, -- sex 0 female outfit, sex 1 male outfit [2] = {[0] = 142, [1] = 134}, [3] = {[0] = 139, [1] = 129}, [4] = {[0] = 141, [1] = 133} } doPlayerAddOutfit(cid, vocs[getPlayerVocation(cid)][getPlayerSex(cid)], 3) npcHandler:say("Parabens! Você completou todas as quest e recebeu uma outfit nova!", cid) end else npcHandler:say("Desculpe, Mas você ainda não terminou a sua task do "..v.name..". Preciso que mate mais "..(getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and v.count or -(getPlayerStorageValue(cid,task_sys_storages[3])-v.count)).." Destes monstros terriveis!", cid) end end end if k then -- daily task if getPlayerStorageValue(cid, task_sys_storages[7]) > 0 then if getPlayerStorageValue(cid, task_sys_storages[5]) >= k.count then if k.exp > 0 then doPlayerAddExp(cid, v.exp) rst = rst.."".. (rst == "" and "" or ", ") .." "..k.exp.." de exp" end if k.points > 0 then setPlayerStorageValue(cid, task_sys_storages[2], (getTaskPoints(cid)+k.points)) rst = rst.."".. (rst == "" and "" or ", ") .." + "..k.points.."task points" end if k.money > 0 then doPlayerAddMoney(cid, k.money) rst = rst.."".. (rst == "" and "" or ", ") ..""..k.money.." gps" end if table.maxn(k.reward) > 0 then GiveRewardsTask(cid, k.reward) rst = rst.."".. (rst == "" and "" or ", ") ..""..getItemsFromList(k.reward) end npcHandler:say("Obrigado pela sua ajuda! Recompensas: "..(rst == "" and "nenhuma" or ""..rst.."").." por ter completado a task do "..k.name, cid) setPlayerStorageValue(cid, task_sys_storages[4], 0) setPlayerStorageValue(cid, task_sys_storages[5], 0) setPlayerStorageValue(cid, task_sys_storages[7], 0) else npcHandler:say("Desculpe, Mas você ainda não terminou a sua task diaria do "..k.name..". Preciso que mate mais "..(getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and k.count or -(getPlayerStorageValue(cid,task_sys_storages[5])-k.count)).." Destes monstros!", cid) end end end elseif msg == "no" then selfSay("Tudo bem então", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  6. [DÚVIDA]Como usar o for nessa situação ?

    Shadow.Styller reagiu a WooX por uma resposta no tópico

    1 ponto
    @Shadow.Styller Você pode adicionar esse for na própria função, verificando assim todas as áreas contidas na tabela positionsToCheck. E você utiliza da seguinte maneira:
  7. (Resolvido)Task System

    felippepsa reagiu a Vodkart por uma resposta no tópico

    1 ponto
    domodlib('task_func') 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,msg, str,rst = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid, msg:lower(),"","" local task,daily, hours = getTaskMission(cid),getDailyTaskMission(cid), 24 if isInArray({"task","tasks","missao","mission"}, msg) then if task_sys[task] then if getPlayerStorageValue(cid, task_sys[task].start) <= 0 then if getPlayerLevel(cid) >= task_sys[task].level then setPlayerStorageValue(cid, task_sys[task].start, 1) npcHandler:say("[Task System] Parabéns, agora você está participando da Task do "..task_sys[task].name.." e deverá matar "..task_sys[task].count.." desta lista: "..getMonsterFromList(task_sys[task].monsters_list)..". "..(#task_sys[task].items > 0 and "Ah e por favor me traga "..getItemsFromList(task_sys[task].items).." para mim." or "").."" , cid) else npcHandler:say("Desculpe, Mas você precisa alcançar level "..task_sys[task].level.." para poder participar da Task dos "..task_sys[task].name.."!", cid) end else npcHandler:say("Desculpe, Mas você atualmente está na task "..task_sys[task].name..". Você pode {entregar} caso já tenha terminado.", cid) end else npcHandler:say("Desculpe, Mas por enquanto não tenho mais nenhuma task para você!", cid) end elseif isInArray({"diaria","daili","daily","dayli","diario"}, msg) then if getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() > 0 then npcHandler:say("Desculpe, você deve esperar até "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6])).." para iniciar uma nova task diaria!", cid) return true elseif daily_task[daily] and getPlayerStorageValue(cid, task_sys_storages[5]) >= daily_task[daily].count then npcHandler:say("Desculpe, você tem task para {entregar} !", cid) return true end local r = doRandomDailyTask(cid) if r == 0 then npcHandler:say("Desculpe, mas você não tem level para completar nenhuma Task diaria.", cid) return true end setPlayerStorageValue(cid, task_sys_storages[4], r) setPlayerStorageValue(cid, task_sys_storages[6], os.time()+hours*3600) setPlayerStorageValue(cid, task_sys_storages[7], 1) setPlayerStorageValue(cid, task_sys_storages[5], 0) local dtask = daily_task[r] npcHandler:say("[Daily Task System] Parabéns, agora você está participando da Task Diaria do "..dtask.name.." e deverá matar "..dtask.count.." monstros desta lista: "..getMonsterFromList(dtask.monsters_list).." até "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6]))..". Boa sorte!" , cid) elseif isInArray({"receber","reward","recompensa","report","reportar","entregar","entrega"}, msg) then local v, k = task_sys[task], daily_task[daily] if v then -- original task if getPlayerStorageValue(cid, v.start) > 0 then if getPlayerStorageValue(cid,task_sys_storages[3]) >= v.count then if #v.items > 0 and not doRemoveItemsFromList(cid, v.items) then npcHandler:say("Desculpe, Mas você também precisa entregar os itens desta lista: "..getItemsFromList(v.items), cid) return true end if v.exp > 0 then doPlayerAddExp(cid, v.exp) str = str.."".. (str == "" and "" or ", ") .." "..v.exp.." de exp" end if v.points > 0 then setPlayerStorageValue(cid, task_sys_storages[2], (getTaskPoints(cid)+v.points)) str = str.."".. (str == "" and "" or ", ") .." + "..v.points.."task points" end if v.money > 0 then doPlayerAddMoney(cid, v.money) str = str.."".. (str == "" and "" or ", ") ..""..v.money.." gps" end if table.maxn(v.reward) > 0 then GiveRewardsTask(cid, v.reward) str = str.."".. (str == "" and "" or ", ") ..""..getItemsFromList(v.reward) end npcHandler:say("Obrigado pela sua ajuda Recompensas: "..(str == "" and "nenhuma" or ""..str.."").." por ter completado a task do "..v.name, cid) setPlayerStorageValue(cid, task_sys_storages[3], 0) setPlayerStorageValue(cid, task_sys_storages[1], (task+1)) if not task_sys[getTaskMission(cid)] then -- end all mission setPlayerStorageValue(cid, 89745, 6) local vocs = { -- [vocation] and outfit [1] = {[0] = 136, [1] = 128}, -- sex 0 female outfit, sex 1 male outfit [2] = {[0] = 142, [1] = 134}, [3] = {[0] = 139, [1] = 129}, [4] = {[0] = 141, [1] = 133} { doPlayerAddOutfit(cid, vocs[getPlayerVocation(cid)][getPlayerSex(cid)], 3) npcHandler:say("Parabens! Você completou todas as quest e recebeu uma outfit nova!", cid) end else npcHandler:say("Desculpe, Mas você ainda não terminou a sua task do "..v.name..". Preciso que mate mais "..(getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and v.count or -(getPlayerStorageValue(cid,task_sys_storages[3])-v.count)).." Destes monstros terriveis!", cid) end end end if k then -- daily task if getPlayerStorageValue(cid, task_sys_storages[7]) > 0 then if getPlayerStorageValue(cid, task_sys_storages[5]) >= k.count then if k.exp > 0 then doPlayerAddExp(cid, v.exp) rst = rst.."".. (rst == "" and "" or ", ") .." "..k.exp.." de exp" end if k.points > 0 then setPlayerStorageValue(cid, task_sys_storages[2], (getTaskPoints(cid)+k.points)) rst = rst.."".. (rst == "" and "" or ", ") .." + "..k.points.."task points" end if k.money > 0 then doPlayerAddMoney(cid, k.money) rst = rst.."".. (rst == "" and "" or ", ") ..""..k.money.." gps" end if table.maxn(k.reward) > 0 then GiveRewardsTask(cid, k.reward) rst = rst.."".. (rst == "" and "" or ", ") ..""..getItemsFromList(k.reward) end npcHandler:say("Obrigado pela sua ajuda! Recompensas: "..(rst == "" and "nenhuma" or ""..rst.."").." por ter completado a task do "..k.name, cid) setPlayerStorageValue(cid, task_sys_storages[4], 0) setPlayerStorageValue(cid, task_sys_storages[5], 0) setPlayerStorageValue(cid, task_sys_storages[7], 0) else npcHandler:say("Desculpe, Mas você ainda não terminou a sua task diaria do "..k.name..". Preciso que mate mais "..(getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and k.count or -(getPlayerStorageValue(cid,task_sys_storages[5])-k.count)).." Destes monstros!", cid) end end end elseif msg == "no" then selfSay("Tudo bem então", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  8. Criando suas Raids

    CoyoteStark reagiu a Kimoszin por uma resposta no tópico

    1 ponto
    Olá galerinha, hoje vou ensinar como vocês podem criar suas proprias Raids. - Mais oque são Raids? São invasões, eventos, que em determinado tempo podem acontecer. - Para que servem? Deixar seu servidor mais legal, as raids acontecem automaticamente, ou seja, você nao precisa estar com o GOD, CM, GM online para que as invasões começem. - Opa, gostei... como eu começo? Simples, vou ensinar a vocês agora mesmo. 1. Vá para \data\raids e crie um arquivo .xml com o nome de um monstre (Exemplo: Monk) 2. Logo em seguida, adicione os seguintes codigos: <raid> <announce delay="0" type="event" message="Message1"> Quando executar a raid, com o tempo do delay ira mandar a Message1 /> <announce delay="2000" type="event" message="Message2"> Quando executar a raid, com o tempo do delay ira mandar a Message2 /> <announce delay="4000" type="event" message="Message3"> Quando executar a raid, com o tempo do delay ira mandar a Message3 /> <singlespawn delay="6000" name="Monk" x="XXXX" y="YYYY" z="ZZ"> Quando executar a raid, com o tempo do delay ira summonar o Monk, nas posições X, Y, Z. /> </raid> 3. Seja coerente, sempre bote umas diferença de tempo (delay) para funcionar tudo perfeitamente. 4. Agora para a Raid funcionar, você deve adicionar ela em \data\raids\raids.xml a seguinte linha <raid name="MonkRaid" file="Monk.xml" chance="10" interval2="60" margin="0"> A cada 60 minutos tem a chance de 10% da raid iniciar /> 5. Para você adicionar mais de um bixo na raid, basta adicionar as seguintes linhas. <singlespawn delay="1500" name="Rat" x="592" y="603" z="6"> <singlespawn delay="1500" name="Cave Rat" x="602" y="573" z="7"> <singlespawn delay="1500" name="Bat" x="607" y="573" z="7"> Variaveis: delay=" " -- Tempo para executar message=" " -- Mensagem quando executar. name=" " -- Nome do monstro que ira summonar x=" " y=" " z=" " -- Posição que ira summonar o monstro raid name=" " -- Nome da raid file=" " -- Nome do arquivo xml da raid chance=" " -- Quanto de chance tem para executar a raid, porcentagem interval2=" " -- Tempo em minutos Bom é isso, tentei explicar ao maximo para vocês conseguirem criar suas proprias raids. Qualquer duvida estarei aqui. Abraços.
  9. Criando suas Raids

    Bissonho reagiu a BoneFox por uma resposta no tópico

    1 ponto
    Creio que seja isso que a Huziwara queria mostrar <raid> <announce delay="1000" type="event" message="Elf Scouts have been sighted near Venore!" /> <announce delay="20000" type="event" message="The elves attack from shadowthorn!" /> <announce delay="60000" type="event" message="Venore is under attack!" /> <!--Area Spawns--> <areaspawn delay="60000" fromx="32853" fromy="32123" fromz="7" tox="32861" toy="32130" toz="7"> <monster name="elf" amount="25" /> <monster name="elf scout" amount="20" /> <monster name="elf arcanist" amount="15" /> </areaspawn> <areaspawn delay="60000" fromx="32932" fromy="32158" fromz="7" tox="32944" toy="32168" toz="7"> <monster name="elf" amount="25" /> <monster name="elf scout" amount="20" /> <monster name="elf arcanist" amount="15" /> </areaspawn> <areaspawn delay="60000" fromx="32853" fromy="32025" fromz="7" tox="32868" toy="32034" toz="7"> <monster name="elf" amount="25" /> <monster name="elf scout" amount="20" /> <monster name="elf arcanist" amount="15" /> </areaspawn> </raid>[/html] [size=6][b]EDIT!! ----------------------------[/b][/size] Me responde uma coisa [b]Kismozin[/b] No meu raid.xml ta assim <raid name="Necropharus" file="Necropharus.xml" chance="50" interval2="30" margin="1800" enabled="yes"/> <raid name="Hornedfox" file="Hornedfox.xml" chance="50" interval2="30" margin="1800" enabled="yes"/> <raid name="Halloweenhare" file="Halloweenhare.xml" chance="50" interval2="40" margin="1800" enabled="yes"/> Sabe me explicar o porque desse [html]margin="1800" Eu tentei tirar + deu erro no distro e eu não sei se isso também é o tempo, sendo que tem o interval se você souber, me responde please eu to muito enrolado com esse lance de invasão eu coloquei margin bem baixa e ficou dando invasão toda hora por isso preciso saber o que significa, pra calcular o tempo certo entre o interval e o margin Obrigado pelo espaço BoneFox
Líderes está configurado para São Paulo/GMT-03:00

Informação Importante

Confirmação de Termo