Ir para conteúdo

Schulzinho

Membro
  • Registro em

  • Última visita

  1. Adventure reagiu a uma resposta no tópico: Private Área System
  2. import br.Furbot.* import Numero public static void main (String[] args) { Numero num = null; int soma = 0; while(ehVazio(DIREITA) && !ehFim(DIREITA)){ if(getObjeto(Direita) != null){ num = getObjeto(DIREITA); soma = soma + num; } andarDireita(); } System.out.print("O resultado é de " + soma ); }
  3. Schulzinho reagiu a uma resposta no tópico: Private Área System
  4. Uma dúvida, você quer que ganhe uma outffit nova e mude para a mesma ou que apenas mude para outra ja existente?
  5. Eu precisava do sistema de anti divulgação, o de reset não interfere em nada
  6. Manda o script do sistema de divulgação
  7. É um script, ele já deve existir aqui no server Só dar uma procurada
  8. Mas o item ja some doRemoveItem(item.uid, 1)
  9. xZonaah reagiu a uma resposta no tópico: X item que teleporta c/tempo.
  10. function onUse(cid, item, fromPosition, itemEx, toPosition) local tempo = 900 -- 9s local storage = 23585 local cidade = getPlayerTown(cid) local pos = getTownTemplePosition(cidade) if getCreatureCondition(cid, CONDITION_INFIGHT) == CONDITION_INFIGHT then return true end if exhaustion.check(cid, storage) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Mensagem dizendo ao player que ele tem que esperar") return true end doTeleportThing(cid,pos) exhaustion.set(cid, storage, tempo) doSendMagicEffect(getPlayerPosition(cid),53) doRemoveItem(item.uid, 1) return true end
  11. Axion Nitron reagiu a uma resposta no tópico: Private Área System
  12. @Atualização Script Mais Organizado, e agora o script funciona por table
  13. function onUse(cid, item, frompos, item2, topos) local tempo = 14400000 -- 4 horas local storage = 24896 local pausa = 60*60*1000 -- (1000 = 1 segundos) Tempo que o script durará local texto = "Sua experience agora está em dobro durante 60 minutos. Perde o efeito se deslogar ou morrer!" -- Texto que irá receber ao usar a potion. local exp = 2 -- O quanto que você quer que dobre sua experiencia, por exemplo 2 é 2x as rates do seu server. expfinal = 1 --Não mude, isso é para a experiencia voltar ao normal. if getPlayerStorageValue(cid, storage) == 1 then doPlayerSendTextMessage(cid,22,Você ja utilizou o exp boost, espere 4 horas para utilizar novamente) return true end if item.itemid == 7443 then doRemoveItem(item.uid,1) doPlayerSetExperienceRate(cid,exp) doSendMagicEffect(frompos,13) doPlayerSendTextMessage(cid,22,texto) setPlayerStorageValue(cid, storage, 1) addEvent(potion,pausa,cid) addEvent(useagain,tempo,storage) end end function potion(pos, cid) doPlayerSetExperienceRate(pos,expfinal) end function useagain(storage) setPlayerStorageValue(cid, storage, 0) end Não testei mas acredito que funcione
  14. Axion Nitron reagiu a uma resposta no tópico: Private Área System
  15. zPerseu reagiu a uma resposta no tópico: Private Área System
  16. Sim, vou fazer um por table. Apenas postei esse porque tinha 2 pessoas pedindo um script parecido com esse.
  17. Wase Wiss reagiu a uma resposta no tópico: Private Área System
  18. Axion Nitron reagiu a uma resposta no tópico: Private Área System
  19. Wakon reagiu a uma resposta no tópico: Private Área System
  20. O que esse sistema faz? R:Ele teleporta um player que "usou" uma alavanca para determinado local. Porém ele identifica se o player tem o money necessário e se há mais alguém dentro da área. Após ele entrar, o player ficara tempo X determinado la dentro antes que seja teleportado para fora novamente. Mas onde o script pode ser usado? R:Pode ser usado para quests, sistemas de hunting privados, entre outros. Em Actions/Scripts, coloque: privatesystem.lua -- Private Área System, Feito por Schulzinho function getPlayersInArea(fromPos, toPos) -- function by amoeba13 playersInArea = {} for x = fromPos.x, toPos.x do for y = fromPos.y, toPos.y do for z = fromPos.z, toPos.z do totalArea = {x=x, y=y, z=z} playerz = getTopCreature(totalArea) if isPlayer(playerz.uid) then table.insert(playersInArea, playerz.uid) end end end end return playersInArea end local CONFIGS = { [8939] = {tempo = 60000, posArena1 = {x = 1032, y = 978, z = 6}, posArena2 = {x = 1040, y = 983, z = 6}, posEntrada = {x = 1032, y = 981, z = 6}, posSaida = {x = 1032, y = 991, z = 6}, coins = 10000}, [8940] = {tempo = 60000, posArena1 = {x = 1032, y = 978, z = 6}, posArena2 = {x = 1040, y = 983, z = 6}, posEntrada = {x = 1025, y = 981, z = 6}, posSaida = {x = 1032, y = 991, z = 6}, coins = 10000}, } function onUse(cid, item, fromPosition, itemEx, toPosition) local config = CONFIGS[item.actionid] local area = getPlayersInArea(config.posArena1, config.posArena2) if area then for i = 1, (#area) do doPlayerSendCancel(cid, "Você Não pode entrar no momento") return true end end if doPlayerRemoveMoney(cid, config.coins) == FALSE then doPlayerSendCancel(cid, 'You don\'t have enough money.') return true end doTeleportThing(cid, config.posEntrada, true) addEvent(function() doTeleportThing(cid, config.posSaida, true) end, config.tempo) end Em Actions.xml Coloque: <action actionid="8939;8940" event="script" value="privatesystem.lua"/> Configure seguindo o exemplo da imagem: [8939] -- Actionid tempo (60000 = 60 segundos) -- Tempo para sair após entrar na area privada posArena1 -- Primeira posição para determinar a área posArena2 -- Segunda posição para determinar a área posEntrada -- Posição que o player ira ser teleportado para dentro da área posSaida -- Posição que o player sera teleportado após acabar o tempo
  21. Magalhaes92 reagiu a uma resposta no tópico: USAR O ITEMS QUANTAS VEZES QUISER
  22. Pode usar esse reduzido, funciona da mesma forma: -- Script By: Abreu -- local exp2 = 50000000 -- Exp ganha ao usar function onUse(cid, item, frompos, topos) doPlayerAddExp(cid, exp2) doRemoveItem(item.uid, 1) doPlayerPopupFYI(cid, 'Você ganhou 50.000.000 de EXP') return true end
  23. Ele detecta o ultimo player acima do level determinado que matou no server, e da um premio a quem matar ele que é calculado baseado no nivel do player que esta hunted.
  24. Tenho esse sistema de Hunted que veio junto com server do baiak 8.60 master. Creditos: Romulo Souza Hunted.xml <?xml version="1.0" encoding="UTF-8"?> <mod name="Hunted System" version="1.0" author="Romulo Souza" contact="[email protected]" enabled="yes"> <description> </description> <config name="config_hunted"><![CDATA[ --// configuracoes Basicas hunted_min_level = 150 -- Level minimo. hunted_premio = 1000 -- * (vezes) o level do player que sera morto --//// configuracoes Avancadas hunted_storage = 62363 --///////////////////////////// ]]></config> <!-- ////////////////////////////////////////////////////////////////// --> <!-- /////////////Configure o abaixo em Interval ( em segundos )/////// --> <!-- ////////////////////////////////////////////////////////////////// --> <globalevent name="hunted" interval= "1000000" event="script"><![CDATA[ function onThink(interval, lastExecution, thinkInterval) domodlib("config_hunted") local query = db.getResult("Select * FROM `players` WHERE `level` > ".. hunted_min_level .." and `online`=1 and `group_id` < 2 ORDER BY `level` DESC;") if query:getID() ~= -1 then local name = query:getDataString("name") if isPlayerOnline(name) then local pid = getCreatureByName(name) local premio_ = getPlayerLevel(pid) * hunted_premio doBroadcastMessage("Extra Extra! The most Wanted of the World is \""..name.."\", and if you kill he, The king pay for you ".. premio_/1000 .." k !") setGlobalStorageValue(hunted_storage, getPlayerGUID(pid) ) end end return TRUE end function isPlayerOnline(name) players=getPlayersOnline() for _,pid in ipairs(players) do if getCreatureName(pid):lower() == name:lower() then return true end end return false end ]]></globalevent> <event type = "kill" name ="kill_hunted" event = "script"><![CDATA[ function onKill(cid, target, lastHit) domodlib("config_hunted") if isPlayer(target) then if getGlobalStorageValue(hunted_storage) == getPlayerGUID(target) then -- se passar, ele ganhou. local hunted_premio_ = getPlayerLevel(target)*hunted_premio doPlayerAddMoney(cid,hunted_premio_) doBroadcastMessage("The king pay to \"".. getCreatureName(cid) .."\" ".. hunted_premio_/1000 .." k for the head of \" ".. getCreatureName(target)..".") setGlobalStorageValue(hunted_storage, -1) end end return TRUE end ]]></event> <event type ="login" name="login_hunted" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "kill_hunted") return TRUE end ]]></event> </mod>

Informação Importante

Confirmação de Termo