Ir para conteúdo

Bodak Reborn

Membro
  • Registro em

  • Última visita

Tudo que Bodak Reborn postou

  1. Tem que colocar a tag também...
  2. @magera, eu comentei no script como fazer isso, é só criar novas linhas.
  3. @Sepultura local heldTable = { -- X -- [13494] = {attribute = "heldx", ident = 1}, -- Defense 1 [13495] = {attribute = "heldx", ident = 2}, -- Defense 2 [13496] = {attribute = "heldx", ident = 3}, -- Defense 3 [13497] = {attribute = "heldx", ident = 4}, -- Defense 4 [13498] = {attribute = "heldx", ident = 5}, -- Defense 5 [13499] = {attribute = "heldx", ident = 6}, -- Defense 6 [13500] = {attribute = "heldx", ident = 7}, -- Defense 7 [13487] = {attribute = "heldx", ident = 8}, -- Attack 1 [13488] = {attribute = "heldx", ident = 9}, -- Attack 2 [13489] = {attribute = "heldx", ident = 10}, -- Attack 3 [13490] = {attribute = "heldx", ident = 11}, -- Attack 4 [13491] = {attribute = "heldx", ident = 12}, -- Attack 5 [13492] = {attribute = "heldx", ident = 13}, -- Attack 6 [13493] = {attribute = "heldx", ident = 14}, -- Attack 7 [13565] = {attribute = "heldx", ident = 15}, -- Return 1 [13566] = {attribute = "heldx", ident = 16}, -- Return 2 [13567] = {attribute = "heldx", ident = 17}, -- Return 3 [13568] = {attribute = "heldx", ident = 18}, -- Return 4 [13569] = {attribute = "heldx", ident = 19}, -- Return 5 [13570] = {attribute = "heldx", ident = 20}, -- Return 6 [13571] = {attribute = "heldx", ident = 21}, -- Return 7 [13558] = {attribute = "heldx", ident = 22}, -- Hellfire 1 [13559] = {attribute = "heldx", ident = 23}, -- Hellfire 2 [13560] = {attribute = "heldx", ident = 24}, -- Hellfire 3 [13561] = {attribute = "heldx", ident = 25}, -- Hellfire 4 [13562] = {attribute = "heldx", ident = 26}, -- Hellfire 5 [13563] = {attribute = "heldx", ident = 27}, -- Hellfire 6 [13564] = {attribute = "heldx", ident = 28}, -- Hellfire 7 [13572] = {attribute = "heldx", ident = 29}, -- Poison 1 [13573] = {attribute = "heldx", ident = 30}, -- Poison 2 [13574] = {attribute = "heldx", ident = 31}, -- Poison 3 [13575] = {attribute = "heldx", ident = 32}, -- Poison 4 [13576] = {attribute = "heldx", ident = 33}, -- Poison 5 [13577] = {attribute = "heldx", ident = 34}, -- Poison 6 [13578] = {attribute = "heldx", ident = 35}, -- Poison 7 [13579] = {attribute = "heldx", ident = 78}, -- Elemental 1 [13580] = {attribute = "heldx", ident = 79}, -- Elemental 2 [13581] = {attribute = "heldx", ident = 80}, -- Elemental 3 [13582] = {attribute = "heldx", ident = 81}, -- Elemental 4 [13583] = {attribute = "heldx", ident = 82}, -- Elemental 5 [13584] = {attribute = "heldx", ident = 83}, -- Elemental 6 [13585] = {attribute = "heldx", ident = 84}, -- Elemental 7 -- Y -- [13550] = {attribute = "heldy", ident = 1}, -- Regeneration 1 [13551] = {attribute = "heldy", ident = 2}, -- Regeneration 2 [13552] = {attribute = "heldy", ident = 3}, -- Regeneration 3 [13553] = {attribute = "heldy", ident = 4}, -- Regeneration 4 [13554] = {attribute = "heldy", ident = 5}, -- Regeneration 5 [13555] = {attribute = "heldy", ident = 6}, -- Regeneration 6 [13556] = {attribute = "heldy", ident = 7}, -- Regeneration 7 [13543] = {attribute = "heldy", ident = 8}, -- Cure 1 [13544] = {attribute = "heldy", ident = 9}, -- Cure 2 [13545] = {attribute = "heldy", ident = 10}, -- Cure 3 [13546] = {attribute = "heldy", ident = 11}, -- Cure 4 [13547] = {attribute = "heldy", ident = 12}, -- Cure 5 [13548] = {attribute = "heldy", ident = 13}, -- Cure 6 [13549] = {attribute = "heldy", ident = 14}, -- Cure 7 } function onUse(cid, item, frompos, item2, topos) pokename = getItemAttribute(item2.uid, "poke") heldname = getItemInfo(item.itemid).name held = heldTable[item.itemid] if not isPokeball(item2.itemid) or #getCreatureSummons(cid) > 0 then return false end if not heldTable[item.itemid] then return false end if getItemAttribute (item2.uid, "ehditto") or getItemAttribute (item2.uid, "poke") == "Ditto" then for i = 13941, 13947 do if item.itemid == i then return doPlayerSendCancel (cid, "Você não pode usar este item em um Ditto."), false end end end doSetItemAttribute(item2.uid, held.attribute, held.ident) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 14) sendMsgToPlayer(cid, 27, "Your "..pokename.." has gained a "..heldname..".") return true end
  4. Não achei o erro do script anterior, mas okay, que bom que funcionou. =')
  5. local config = { monster = {"Demon", "Dragon"}, -- nome dos monstros, separado por vírgulas. item = {[1] = 2160, [2] = 2159}, -- [um numero maior que o anterior] = ID do item1, ID do item2, ID do item3... qnt = {[1] = 2, [2] = 5}, -- [um numero maior que o anterior] = quantidade do item1, quantidade do item2, quantidade do item3... effect = 27, -- efeito ao matar o monstro. } local function isMC (cid) for _, pid in pairs(getPlayersOnline()) do if(cid ~= pid and getPlayerIp(cid) == getPlayerIp(pid)) then return false end end return true end function onKill(cid, target) if isInArray(config.monster, getCreatureName(target)) then if isMC (cid) then for i = 1, #config.item do doPlayerAddItem (cid, config.item[i], config.qnt[i]) end doPlayerSendTextMessage (cid, 19, "Você receberá uma recompensa por derrotar o "..getCreatureName(target)..".") doSendMagicEffect (getThingPos (cid), config.effect) else doPlayerSendTextMessage (cid, 19, "Você não receberá recompensa por estar de MC.") end end return true end
  6. Eu testei aqui e funcionou.
  7. local delay = 3000 --Intervalo de tempo entre o efeito, em milésimos de segundo. function sendVipEffect(cid) if isPlayer(cid) and getPlayerStorageValue(cid, 13500) > os.time() then doSendAnimatedText(getThingPos(cid), "GOLDENVIP", math.random(1, 255)) addEvent(sendVipEffect, delay, cid) end end function onLogin(cid) sendVipEffect(cid) return true end
  8. Tem certeza que pegou o código atualizado..?
  9. Editei o comentário com o código, teste novamente.
  10. local config = { monster = {"Amon", "Basilisco","Azazel"}, -- nome dos monstros, separado por vírgulas. item = {[1] = 2160, [2] = 2159}, -- [um numero maior que o anterior] = ID do item1, ID do item2, ID do item3... qnt = {[1] = 2, [2] = 5}, -- [um numero maior que o anterior] = quantidade do item1, quantidade do item2, quantidade do item3... effect = 27, -- efeito ao matar o monstro. } local function isMC (cid) for _, pid in ipairs(getPlayersOnline()) do if cid ~= pid and getPlayerIp(cid) == getPlayerIp(pid) then return false end end return true end function onKill(cid, target) if isInArray (config.monster, getCreatureName (target)) then if isMC (cid) then for i = 1, #config.item do doPlayerAddItem (cid, config.item, config.qnt) end doPlayerSendTextMessage (cid, 19, "You will receive a reward for defeating the "..getCreatureName(target)..".") doSendMagicEffect (getThingPos (cid), config.effect) else doPlayerSendTextMessage (cid, 19, "You will not receive a reward for is Multi-Client.") end end return true end
  11. if isMC (cid) and isInArray (config.monster, getCreatureName (target)) then
  12. Eu acho que tu pode fazer aqui, já que no título tu não especificou o script. ;P
  13. Tenta assim: local delay = 3000 --Intervalo de tempo entre o efeito, em milésimos de segundo. function sendVipEffect(cid) if isPlayer(cid) and getPlayerStorageValue(cid, 13500) > 0 then doSendAnimatedText(getThingPos(cid), "GOLDENVIP", math.random(1, 255)) addEvent(sendVipEffect, delay, cid) end end function onLogin(cid) sendVipEffect(cid) return true end
  14. Tu chegou a testar?
  15. function onUse(cid, item, frompos, item2, topos) tile1 = {x = 32100, y = 32205, z = 8, stackpos = 1} tile2 = {x = 32101, y = 32205, z = 8, stackpos = 1} local playerTile = {x = 32100, y = 32205, z = 8} local playerTile1 = {x = 32101, y = 32205, z = 8} gettile1 = getThingfromPos(tile1) gettile2 = getThingfromPos(tile2) if item.itemid == 1945 then for i = 1133, 1134 do doTransformItem(item.uid, 1946) end doCreateItem(493,1,tile1) doCreateItem(493,1,tile2) doCreateItem(4799,1,tile1) doCreateItem(4797,1,tile2) if isCreature(getTopCreature(playerTile).uid) then doTeleportThing(getTopCreature(playerTile).uid, {x = 32102, y = 32205, z = 8}) end if isCreature(getTopCreature(playerTile1).uid) then doTeleportThing(getTopCreature(playerTile1).uid, {x = 32102, y = 32205, z = 8}) end elseif item.itemid == 1946 then for i = 1133, 1134 do doTransformItem(item.uid, 1945) end doCreateItem(1284,1, tile1) doCreateItem(1284,1, tile2) doRemoveItem(gettile1.uid, 1) doRemoveItem(gettile2.uid, 1) else doPlayerSendCancel(cid,"Sorry, not possible.") end return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) end
  16. No script de VIP do seu servidor o storage 13500 é removido?
  17. O script é do DukeeH, ele apenas esqueceu uma palavra. ;P
  18. @Yan Liima, assim vai remover 70 de life. O erro do script foi esquecer do "Player" ao chamar a função, ele colocou "doRemoveHealthPercent" ao invés de "doPlayerRemoveHealthPercent".
  19. Isso se chama Golden Arena, diversos servidores já tem esse sistema ao baixar. São vários arquivos, eu não tenho eles aqui... se eu não me engano, este servidor: possui este sistema, baixa ele e procura por tudo com Golden Arena. (:
  20. function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller) if isPlayer(cid) then setPlayerStorageValue(cid, 329406, 1) end return true end function doPlayerRemoveHealthPercent(cid, percent) local health = getCreatureMaxHealth(cid) doPlayerRemoveHealth(cid, (health / 100) * percent) return TRUE end function onLogin(cid) registerCreatureEvent(cid, "PorcentDeath") if getPlayerStorageValue(cid, 329406) == 1 then doPlayerRemoveHealthPercent(cid,70) setPlayerStorageValue(cid, 329406, 0) end return true end Eu não sabia da existência dessa função doPlayerRemoveHealth, no meu servidor não tem. Caso no seu não tenha também, tente assim: function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller) if isPlayer(cid) then setPlayerStorageValue(cid, 329406, 1) end return true end function doPlayerRemoveHealthPercent(cid, percent) local health = getCreatureMaxHealth(cid) local life = health/100 local all = life * percent doCreatureAddHealth(cid, -all) return TRUE end function onLogin(cid) registerCreatureEvent(cid, "PorcentDeath") if getPlayerStorageValue(cid, 329406) == 1 then doPlayerRemoveHealthPercent(cid,70) setPlayerStorageValue(cid, 329406, 0) end return true end
  21. @Striker Macabrus function onThink(cid, interval, lastExecution) local config = { storage = 65121, check = 65122, timeToRespawn = 4, -- tempo em horas para nascer outro boss, caso tenha nascido um. city = "Thais", -- cidade para o broadcast. chance = 35 -- porcentagem de chance de nascer. } local monster = { [1] = {name = "Dragon", pos = {x=1050, y=1054, z=7}, effect = 19, tempoSpawn = 60}, [2] = {name = "Demon", pos = {x = 1630, y = 1520, z = 7}, effect = 40, tempoSpawn = 5}, [3] = {name = "Hero", pos = {x = 1356, y = 1325, z = 7}, effect = 27, tempoSpawn = 5}, -- [um número maior que o anterior] = nome do monstro, posição que ele vai nascer, efeito ao nascer, tempo em segundos para nascer. } local percent = math.random (1, config.chance) if getGlobalStorageValue (config.storage) < os.time () then setGlobalStorageValue (config.check, getGlobalStorageValue (config.check) + 1) if percent <= config.chance then for i = 1, #monster do addEvent (doSummonCreature, monster[i].tempoSpawn * 1000, monster[i].name, monster[i].pos) addEvent (doSendMagicEffect, monster[i].tempoSpawn * 1000, monster[i].pos, monster[i].effect) end setGlobalStorageValue (config.storage, config.timeToRespawn * 60 * 60 + os.time ()) setGlobalStorageValue (config.check, 0) doBroadcastMessage("Um boss acaba de aparecer em "..config.city.."!") end elseif getGlobalStorageValue (config.check) == 4 and getGlobalStorageValue (config.storage) < os.time() then for i = 1, #monster do addEvent (doSummonCreature, monster[i].tempoSpawn * 1000, monster[i].name, monster[i].pos) addEvent (doSendMagicEffect, monster[i].tempoSpawn * 1000, monster[i].pos, monster[i].effect) end setGlobalStorageValue (config.check, 0) setGlobalStorageValue (config.storage, config.timeToRespawn * 60 * 60 + os.time ()) doBroadcastMessage("Um boss acaba de aparecer em "..config.city.."!") end return true end @brendoonh function onThink(cid, interval, lastExecution) local config = { storage = 65121, check = 65122, timeToRespawn = 4, -- tempo em horas para nascer outro boss, caso tenha nascido um. name = "Dragon", -- nome do boss. pos = {x=1050, y=1054, z=7}, -- posição que ele vai nascer. city = "Thais", -- cidade para o broadcast. chance = 35, -- porcentagem de chance de nascer. effect = 27 -- efeito ao nascer. } local percent = math.random (1, config.chance) if getGlobalStorageValue (config.storage) < os.time () then setGlobalStorageValue (config.check, getGlobalStorageValue (config.check) + 1) if percent <= config.chance then setGlobalStorageValue (config.storage, config.timeToRespawn * 60 * 60 + os.time ()) setGlobalStorageValue (config.check, 0) doSummonCreature(config.name, config.pos) doSendMagicEffect (config.pos, config.effect) doBroadcastMessage("Um boss acaba de aparecer em "..config.city.."!") end elseif getGlobalStorageValue (config.check) == 4 and getGlobalStorageValue (config.storage) < os.time() then setGlobalStorageValue (config.check, 0) setGlobalStorageValue (config.storage, config.timeToRespawn * 60 * 60 + os.time ()) doSummonCreature(config.name, config.pos) doBroadcastMessage("Um boss acaba de aparecer em "..config.city.."!") end return true end
  22. @Striker Macabrus No fórum. Lendo scripts, tentando entender e fazendo coisas parecidas depois. Eu li muitos scripts do @zipter98, @xWhiteWolf, @Vodkart, @DukeeH, @Absolute, @luanluciano93, entre muitos outros. Caso queira aprender, não só lua, como PHP também, recomendo visitar o perfil deles que lá tem ótimos scripts, e a partir deles tu vai achar outros ótimos programadores/scripters também. @je19921992 Caso queira saber o que eu aprendi em um mês, olhe o meu histórico. Enfim, o tópico não é sobre isso, não vou discutir com você, parece que você não leu o que eu disse. O tamanho do ID não tem nada a ver com isso.
  23. Ele vai nascer apenas uma vez em apenas uma posição? Serão vários bosses, certo? Eu pensei em sumonar um boss aleatório dos que você listar no script. Quer que eu faça assim ou que nasça apenas um boss fixo? Fiz um esboço aqui, não sei se está funcionando, não consegui testar. globalevents/scripts nome_arquivo.lua function onThink(cid, interval, lastExecution) local bosses = { [1] = {name = "Dragon", pos = {x=1050, y=1054, z=7}, city = "Thais", chance = 35, effect = 12}, [2] = {name = "Demon", pos = {x=1080, y=1034, z=7}, city = "Carlin", chance = 15, effect = 28}, -- [um numero maior que o de cima] = nome do boss, posição que ele vai nascer, cidade que ele vai nascer (para o broadcast), porcentagem de chance de nascer. } local config = { storage = 65121, check = 65122, timeToRespawn = 4, -- tempo em horas para nascer outro boss, caso tenha nascido um. } if getGlobalStorageValue (config.storage) < os.time () then setGlobalStorageValue (config.check, getGlobalStorageValue (config.check) + 1) local boss = math.random (#bosses) local percent = math.random (1, bosses[boss].chance) if percent <= bosses[boss].chance then setGlobalStorageValue (config.check, 0) setGlobalStorageValue (config.storage, config.timeToRespawn * 60 * 60 + os.time ()) doSummonCreature(bosses[boss].name, bosses[boss].pos) doSendMagicEffect (bosses[boss].pos, bosses[boss].effect) doBroadcastMessage("Um boss acaba de aparecer em "..bosses[boss].city.."!") end elseif getGlobalStorageValue (config.check) == 4 and getGlobalStorageValue (config.storage) < os.time() then local boss = math.random (#bosses) setGlobalStorageValue (config.check, 0) setGlobalStorageValue (config.storage, config.timeToRespawn * 60 * 60 + os.time ()) doSummonCreature(bosses[boss].name, bosses[boss].pos) doBroadcastMessage("Um boss acaba de aparecer em "..bosses[boss].city.."!") end return true end XML: <globalevent name="bossSpawnRandomTime" interval="3600" event="script" value="nome_arquivo.lua"/> Lembrando, o interval está em segundos.
  24. Colocou a tag e registrou no login.lua?
  25. Mês passado eu fiz um post pedindo um script e ninguém me respondeu, e eu agradeço muito isso, pois eu resolvi aprender lua um dia depois. Agora eu vejo porque "ninguém" ajuda. Todos que pedem ajuda no fórum, normalmente não tem o intuito de aprender lua, querem o script pronto e acabou. Exemplo: o cara tem um script, mas ele quer que adicione um item a mais para o player. Isso é uma coisa muito simples, mas ninguém tem interesse em aprender. Quem faz scripts, faz por gostar, por querer ajudar. E é muito frustrante ver que o cara no qual você está ajudando, quer apenas o código pronto. No ano de 2014 os posts eram mais respondidos porque a galera tinha mais interesse em aprender. Os scripters estão fortemente sumindo do fórum por alguns fatos, incluindo este. OBS: Ninguém vai fazer nada por rep. OBS2: Tentei não ser grosso. \; Sobre o tópico: é possível, muitos OTs tem esse sistema.

Informação Importante

Confirmação de Termo