Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''action''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Encontrar resultados em...

Encontrar resultados que contenham...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Sou

  1. Fala galera, vim compartilhar com vcs um dos sistemas que eu fiz baseado no jogo Bird Hunt e que foi imbutido em alguns servidores famosos, sendo o Korelin um deles. Obs: Testado em TFS 0.3.6 mas deve funcionar em TFS 0.4 sem problema aqui tem uma pequena imagem demonstrando o sistema sendo utilizado: Bom, antes de tudo eu vou ensinar vocês a criar um mapa apropriado pois isso é 90% das dificuldades que os players enfrentam quando tentam adicionar o sistema. Inicialmente vc vai precisar criar uma area no seu mapa editor +- parecida com a que eu fiz na imagem abaixo: Feito isso vc deverá colocar uniqueid 16480 na porta e actionid 14874 em todos os lugares que o player pode percorrer (da placa pra \/ todos os quadrados verdes deverão conter esse actionid) Colocado os ids, vc deverá fazer a sala à prova de bugs, para isso você terá que seguir essas especificações: Note que em verde são os lugares que vc deverá colocar protect zone e em roxo os locais onde vc deve colocar no logout zone. Agora perceba que nas posições onde o player irá andar, você vai colocar tanto no logout zone como protect zone, isso pra evitar ele de matar o bixo com spells e pra evitar que ele deslogue durante o mini game. Essa contagem de sqms eu vou explicar mais tarde na configuração do script, mas tenham ela em mente. Agora vamos aos scripts: Comece criando em data/lib um arquivo chamado 045- Bird Hunt Lib.lua e colocando isso dentro dele: Feito isso vá em data/actions/scripts e adicione um arquivo chamado seagul.lua que deverá conter: e adicione em actions.xml: <action uniqueid="16480" event="script" value="seagul.lua"/> Agora vá em data/movements/scripts e crie um arquivo chamado seagulmove.lua com o seguinte conteúdo: E adicione as tags em movements.xml: <movevent type="StepIn" actionid="14872" event="script" value="seagulmove.lua"/> <movevent type="StepOut" actionid="14872" event="script" value="seagulmove.lua"/> Agora, pra deixar nosso sistema mais real e difícil, altere a velocidade do seagul de 200 pra 300 na pasta data/monsters/Birds/seagull.xml eu alterei tb a quantidade de vida q ele começa a fugir pra vida atual dele e fiz outras alterações pra tornar mais difícil, mas isso é com vcs. A maioria das coisas tá bem compreensível, com exceção das duas primeiras linhas de actions: rangecima = {x = -8, y = -4}, -- distancia em x e y da topos (ate a pos de cima) rangebaixo = {x = 0, y = 4}, -- distancia em x e y da topos (ate a pos de baixo) é aqui que entra aquela imagem, vc vai considerar a porta (o ponto cinza) como sendo nossa origem, ou seja, o ponto (0,0) rangecima é a distancia que eu tenho que percorrer em x e y pra chegar até a ponta de cima < e rangebaixo é a distancia que eu tenho que percorrer em x e y pra chegar até a ponta de baixo. Se vcs mudarem o tamanho da sala, fiquem ligados nisso. Obs: algumas pessoas fazem a sala virada pra direita também, nesse caso vc mantém a actions (pode usar inclusive o mesmo arquivo), só tem que alterar o movements pois lá vc define se é direita ou esquerda. É isso, espero que tenham gostado. O jogo é só por diversão mas vc pode alterar a função de atirar pra ganhar dinheiro por cada acerto ou então criar um npc que vc te dá X premio dependendo do seu recorde.. podendo esse premio inclusive ser uma key pra uma quest. Usem a imaginação e espero que aproveitem esse sistema. Abraços do Lobo.
  2. Olá, vim trazer à comunidade esse código. Ele permite adicionar tempo para resetar a dh quest. Ele foi postado originalmente pelo membro Lundrial, da otland. Bem, não há mais o que dizer. DH LEVER TIME lever.lua local timetoreset = 5 -- Time to reset the quest in minutes.local objectid = xxxx -- Id of the item Blocking the pathlocal p = { Position(x, y, z), -- Position of the item blocking the path Position(x, y, z), -- Teleport Creation position Position(x, y, z) -- Position where it sends you}function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey) local stone = Tile(p[1]) local tp = Tile(p[2]) if item.itemid == 1945 then cid:sendTextMessage(MESSAGE_EVENT_ORANGE, 'The object in your path has been removed for ' .. timetoreset .. ' minutes.') doCreateTeleport(1387, p[3], p[2]) stone:getItemById(objectid):remove() p[1]:sendMagicEffect(CONST_ME_POFF) p[2]:sendMagicEffect(CONST_ME_TELEPORT) Item(item.uid):transform(1946) addEvent(function(stonePos) Game.createItem(objectid, 1, stonePos) stonePos:sendMagicEffect(CONST_ME_TELEPORT) p[2]:sendMagicEffect(CONST_ME_POFF) tp:getItemById(1387):remove() Tile(toPosition):getItemById(1946):transform(1945) end, timetoreset * 60000, stone:getPosition()) elseif item.itemid == 1946 then return false end return trueend
  3. Créditos totais à Kazuza. Versão: Testada somente na "10.31". (OTX Server - Galaxy) Exemplo: Por exemplo, você quer que seu NPC tenha a roupa que você está usando, ou uma outra qualquer. Porem você não quer perder tempo, então você digita: /outfit e irá aparecer no seu CHAT: <look type="128" head="117" body="5" legs="0" feet="116" addons="1" mount="0"/> Pronto, só copiar e colar no seu npc. Tutorial Data > TalkActions> Scripts, crie "Outfit.lua". OBS: Se tiver montaria use este: function onSay(cid, words, param) r = getCreatureOutfit(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '<look type="'..r.lookType..'" head="'..r.lookHead..'" body="'..r.lookBody..'" legs="'..r.lookLegs..'" feet="'..r.lookFeet..'" addons="'..r.lookAddons..'" mount="'..r.lookMount..'"/>') return true end Se não, use este: function onSay(cid, words, param) r = getCreatureOutfit(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '<look type="'..r.lookType..'" head="'..r.lookHead..'" body="'..r.lookBody..'" legs="'..r.lookLegs..'" feet="'..r.lookFeet..'" addons="'..r.lookAddons..'"/>') return true end "Data > TalkActions" em talkactions.xml adicione: <talkaction log="yes" group="4" access="3" words="/outfit" event="script" value="outfit.lua"/>
  4. Demonstração O script consiste em fazer um minigame da Snake (lá do nokia, heheh). Quanto mais a "cobra" pegar os bolos/comida irá acrescentar mais e mais caixas/blocos ao seu "corpo". Instalação: snakesys.lua (data/lib) [EDITE DE ACORDO COM SEU SERVIDOR] Edite essas linhas em sua lib para combinar com o mapa: itemid=1860, freeglobalstorage=28103, -- se nao souber mexer, nao mexa itemFood=6394, controlpos= {x = 28, y = 198, z = 6}, -- posiçao onde o player vai ficar exitpos = {x = 36, y = 190, z = 7}, -- posiçao que o player vai sair centerpos= {x = 27, y = 197, z = 7}, -- posiçao central wallID = 1486, -- id da parede ao redor da arena interval = 300, -- velocidade no qual a cobra ira se mover Quatro pisos ao redor da posição de controle: local generated = { {x = 28, y = 197, z = 6}, {x = 29, y = 198, z = 6}, {x = 28, y = 199, z = 6}, {x = 27, y = 198, z = 6} } Primeiro piso: Segundo piso: actions.xml (data/actions) <action actionid="200" script="snake.lua"/> snake.lua (data/actions/scripts) function onUse(player, item, fromPosition, itemEx, toPosition) if (Game.getStorageValue(SNAKE.freeglobalstorage)) ~= 1 then player:teleportTo(SNAKE.controlpos) SNAKE.timer(player.uid,1,nil,1000) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Segure o CTRL e use as setas para controlar a cobra.') SNAKE.generateFood() else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Aguarde, por favor.') end end PS: Peguei de um fórum que estava em inglês e traduzi. PS²: É um script antigo porém funcional. Créditos: Mock the bear
  5. Oi, gente queria um script, que se um player pisar em uma tile, outro qualquer player so possa pisar la depois de 30 minutos... Ex.:Eu pisei em uma tile pra entrar em uma quest, ai outro player QUALQUER, foi tentar fazer o mesmo, só que não conseguiu, porque eu ja havia pisado antes, e ainda não se passou 30 mins. Objetivo: eu coloquei uma action id em uma tile do servidor que quando eu pisar nela vou ser teletransportado para uma tal area, agora quero uma unique id, como a pedida, que ao pisar, outro player so possa pisar lá, depois de 30 minutos, se ele pisar ele sera interrompido no caminho, com a mensagem:"O portal ainda não está pronto para uso, espere alguns minutos" espero que tenham entendido , quem me ajudar dou Reputação+
  6. Auguem pode me ajudar nesse bug ele acontece quando auguem captura um pokémon
  7. Seguinte Galera, No meu server tem um outfit exclusivo, você só pode usa-lo se matar o boss Gonka... Acontece que Queria Achar a Pasta a onde Edito ele... E aparece uma mensagem assim no chat 13:54 Você não é digno de usar esse outfit. Somente aqueles que derrotaram o Gonka podem usá-lo. Queria Pedir a Ajuda de Voces onde Posso Encontrar este Arquivo nas Pastas do Meu Server... exemplo;actions,creaturescripts...
  8. Cara, estou 2 dias tentando resolver esse problema está impossível... :'( " O POKÉMON NÃO TÁ EVOLUINDO " Abaixo tá o script level system Ajudem pls
  9. Ola amigos, sera que alguem poderia modificar meu duel system do PDA para poder mandar ou aceitar duel apenas em uma area do mapa, no caso criarei uma area destinada para duelos. Duel do order em actions. Duel System da lib. Basicamente acho eu seria colocar uma tabela de x, y, z das cordenadas da area que poderia se mandar ou aceitar o duel. kkk só acho, sou noob em scripts. Desde ja agradeço e rep+
  10. Então galera a um tempo resetei meu servidor que é MYSQL, desde então meu exiva tem mostrado que o player exivado está offline, não funciona de jeito nenhum, tem como alguem me ajudar ? se não souber a solução desse problema peço uma talkaction ou spell que tenha a mesma função pois já estou perdendo players por causa disso desde já agradeço muito qualquer ajuda !
  11. Olá, estou tentando fazer que o valor de um storage apareça na minha janela de skills do otclient, mas não estou conseguindo,ja tentei atravez de talkaction e extendedopcode mas não sei fazer o otclient receber e adaptar não achei nada muito detalhado ensinando, eu quero fazer o numero do storage 16900 aparecer do lado do Kanto Caughts: EDIT: Ja consegui resolver, podem fechar o topico.
  12. Eu queria um script que, quando um player usasse este item = 5905, ele dará ao player um desses items dentro de uma bp = 6548, 6547, 6549.. eu queria que a escolha escorresse a mesma chance para os 3 items. alguns detalhes importantes> após o player usar o item 5905, ele some e só assim é adicionado outro item... o maximo de item qe o player pode ganhar dentro da bp é 1 ... eu gostaria q saísse um efeito e um falante na posição do player após o uso, e uma msg no default pra ele em laranja..
  13. Pessoal, eu sempre tive a duvida de como criar uma porta que só poderá ser aberta por certa chave Eu jogava um servidor a um tempo atras, que em um quest, vc ganhava uma chave, e essa chave servia para abrir uma porta que era a entrada de uma certa cave gostaria que vocês me ajudassem, obrigado ! OBS: esse é o script que eu tenho REVERSE_DOORS, CHILD_DOORS = {}, {} for k, v in pairs(DOORS) do REVERSE_DOORS[v] = k local tmp = getItemInfo(v) if(tmp.transformUseTo ~= 0) then CHILD_DOORS[tmp.transformUseTo] = k end end function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.aid > 0 and itemEx.aid > 0) then if(isPlayerPzLocked(cid) and getTileInfo(toPosition).protection) then doPlayerSendDefaultCancel(cid, RETURNVALUE_ACTIONNOTPERMITTEDINPROTECTIONZONE) return true end local doors = DOORS[itemEx.itemid] if(not doors) then doors = REVERSE_DOORS[itemEx.itemid] end if(not doors) then doors = CHILD_DOORS[itemEx.itemid] end if(doors) then if(item.actionid ~= itemEx.actionid) then doPlayerSendCancel(cid, "The key does not match.") else doTransformItem(itemEx.uid, doors) end return true end end return false end
  14. Ola, bom como vocês debem saber o X-Attack é outro dos helds mais bugados de qualquer PDA um pokemon qualquer um sem tier por ejemplo bate 27k ai um você coloca um tier 2 e ele fica batendo 54k... eu tentei balançar pra deixar como deberia ser porem deu em falha, o tier 7 fez oque eu queria por ejemplo... mas se o pokemon bate 24k sem held, você colocaba um tier 2 e ele ficaba batendo 19k... entao o erro debe estar na formula e certamente acho q o defense debe estar bugado tb nem fiz test nele nem nunca peguei reportes enquanto ele pois é um held raramente usado report por parte de 1 player: 14:53 Petrusrj: um possivel bug, eu fiz um teste agora com sh typhlo +50 sem held e tirava em media em todos os testes 32k no inferno e com o atack 2 todos os testes deu em media 25k de dano nas mesmas condiçoes. entao deberia ser assim: Meu Exp2.0 configuraçao no lib config: meu level system pro o defense:
  15. ola! queria o sistema de ball que tipo x ball tem maior chance de pegar pokemons de x type ej: Pokéballs feitas por engenheiros:Obs.: São 30% melhores que a Ultra Ball. Dusk Ball Melhor chance de captura em pokémons do tipo ROCK e FIGHTING. Fast Ball Melhor chance de captura em pokémons rápidos. Heavy Ball Melhor chance de captura em pokémons pesados. Janguru Ball Melhor chance de captura em pokémons do tipo POISON e GRASS. Magu Ball Melhor chance de captura em pokémons do tipo FIRE e GROUND. Moon Ball Melhor chance de captura em pokémons do tipo DARK e GHOST. Net Ball Melhor chance de captura em pokémons do tipo BUG e WATER. Sora Ball Melhor chance de captura em pokémons do tipo ICE e FLYING. Tale Ball Melhor chance de captura em pokémons do tipo DRAGON e FAIRY. Tinker Ball Melhor chance de captura em pokémons do tipo ELECTRIC a STEEL. Yume Ball Melhor chance de captura em pokémons do tipo NORMAL e PSYCHIC. entao queria um system pra isso, ja tinha visto um pra PDE mas foi retirado do forum procurei e procurei e nao achei outro, alem de meu catch system estar bugado ja u,u
  16. Hey, então, o script da talkaction fui eu que fiz, tentei colocar na pokedex e não consegui. O script da talkaction diz quantas stones faltam para seu pokémon chegar ao boost +50, a dex também funciona assim, mas caso algum jogador use a dex no seu pokémon, irá mostrar o boost do pokémon dele e quantas stones faltam para este chegar ao boost +50. O dalvorsn me ajudou a colocar o script na pokedex e a simplificá-lo, então, créditos dele. Muito obrigado, @dalvorsn! Eu editei a pergunta, pois o dalvorsn me ajudou por mensagem. Script para quem quiser: data/lib/pokedex system.lua coloquem isso nas primeiras linhas: procure por table.insert(stt, "Name: "..name.."\n") e embaixo coloque local others = {"Steelix", "Dragonite", "Skarmory", "Scizor", "Salamence"} if not virtual and isPlayer(getCreatureMaster(item2.uid)) then if isInArray(others, name) then local boost = getItemAttribute(ball.uid, "boost") or 0 local stones = metalcrystal[boost] local calculo = 70 - stones table.insert(stt, "Boost level: +"..boost..".\n"..calculo.." stones left to +50.\n") else local boost = getItemAttribute(ball.uid, "boost") or 0 local stones = normais[boost] local calculo = 338 - stones table.insert(stt, "Boost level: +"..boost..".\n"..calculo.." stones left to +50.\n") end end em "local others =" vocês vão colocar os pokémon que são boostados com Crystal/Metal/Ancient Stone, caso no seu ot tenha o sistema desse tipo de pokémon ser boostado com 1 stone por boost até o boost 30, e nos próximos boosts, ser boostado com 2 stones por boost. Se você não quer esse sistema ou não tem esse sistema, deixe assim: if not virtual and isPlayer(getCreatureMaster(item2.uid)) then if isInArray(others, name) then local boost = getItemAttribute(ball.uid, "boost") or 0 local stones = normais[boost] local calculo = 338 - stones table.insert(stt, "Boost level: +"..boost..".\n"..calculo.." stones left to +50.\n") endend Caso você queira que seja por talkaction e não na dex, use esse script: data/talkactions/scripts crie um arquivo .lua stonestofifty.lua: talkactions.xml:
  17. eae galera então fazia tempo que não mexia com meu site resolvi mexer um pouco nele e apareceu o seguinte erro os arquivos estão editados corretamente editei a senha e o banco de dados para segurança mas os dois estão certinhos na database alguem pode me dizer o que pode estar havendo? #edit está aparecendo este erro Parse error: syntax error, unexpected T_ELSE in C:\xampp\htdocs\system\libraries\Loader.php on line 1087 loader.php
  18. Fala galera, estava desde ontem tentando criar o Otserver 10.90 global... Finalmente consegui, porém as talkactions para GOD não funcionam, mesmo estando de god. Eu coloco minha group id 3 na database, porém os comandos de god não funcionam, apenas os de GM. é como se eu não tivesse acesso a eles. se alguem puder ajudar agradeço TalkActions: <?xml version="1.0" encoding="UTF-8"?><talkactions> <!-- Gods --> <talkaction words="/addskill" separator=" " script="add_skill.lua" /> <talkaction words="/chameleon" separator=" " script="chameleon.lua" /> <talkaction words="/clean" script="clean.lua" /> <talkaction words="/closeserver" separator=" " script="closeserver.lua" /> <talkaction words="/i" separator=" " script="create_item.lua" /> <talkaction words="/ghost" script="ghost.lua" /> <talkaction words="/hide" script="hide.lua" /> <talkaction words="/mccheck" script="mccheck.lua" /> <talkaction words="/openserver" script="openserver.lua" /> <talkaction words="/owner" separator=" " script="owner.lua" /> <talkaction words="/m" separator=" " script="place_monster.lua" /> <talkaction words="/s" separator=" " script="place_npc.lua" /> <talkaction words="/summon" separator=" " script="place_summon.lua" /> <talkaction words="/save" script="save.lua" /> <talkaction words="/ban" separator=" " script="ban.lua" /> <talkaction words="/ipban" separator=" " script="ipban.lua" /> <talkaction words="/unban" separator=" " script="unban.lua" /> <!-- Achievements Commands --> <talkaction words="/addach" separator=" " script="achievements.lua" /> <talkaction words="/removeach" separator=" " script="achievements.lua" /> <!-- Gamemasters --> <talkaction words="/up" script="up.lua" /> <talkaction words="/down" script="down.lua" /> <talkaction words="/c" separator=" " script="teleport_creature_here.lua" /> <talkaction words="/goto" separator=" " script="teleport_to_creature.lua" /> <talkaction words="/gotopos" separator=" " script="teleport_to_pos.lua" /> <talkaction words="/t" script="teleport_home.lua" /> <talkaction words="/town" separator=" " script="teleport_to_town.lua" /> <talkaction words="/a" separator=" " script="teleport_ntiles.lua" /> <talkaction words="/pos" separator=" " script="position.lua" /> <talkaction words="/info" separator=" " script="info.lua" /> <talkaction words="/r" separator=" " script="removething.lua" /> <talkaction words="/kick" separator=" " script="kick.lua" /> <talkaction words="/B" separator=" " script="broadcast.lua" /> <talkaction words="/looktype" separator=" " script="looktype.lua" /> <talkaction words="/mounts" separator=" " script="allmounts.lua" /> <talkaction words="/addons" separator=" " script="alladdons.lua" /> <!-- Senior Tutors --> <talkaction words="/addtutor" separator=" " script="add_tutor.lua" /> <talkaction words="/removetutor" separator=" " script="remove_tutor.lua" /> <!-- player talkactions --> <talkaction words="!buypremium" script="buyprem.lua" /> <talkaction words="!buyhouse" script="buyhouse.lua" /> <talkaction words="!leavehouse" script="leavehouse.lua" /> <talkaction words="!aol" script="aol.lua" /> <talkaction words="!bless" script="bless.lua" /> <talkaction words="!changesex" script="changesex.lua" /> <talkaction words="!uptime" script="uptime.lua" /> <talkaction words="!deathlist" script="deathlist.lua" /> <talkaction words="!kills" script="kills.lua" /> <talkaction words="!online" script="online.lua" /> <talkaction words="!serverinfo" script="serverinfo.lua" /> <talkaction words="!addon" script="addon.lua" /> <talkaction words="!cast" separator=" " script="start_cast.lua" /> <talkaction words="!cast off" separator=" " script="stop_cast.lua" /> <talkaction words="!stopcast" script="stop_cast.lua" /> <!-- test talkactions --> <talkaction words="!z" separator=" " script="magiceffect.lua" /> <talkaction words="!x" separator=" " script="animationeffect.lua" /></talkactions> Groups: <?xml version="1.0" encoding="UTF-8"?><groups> <group id="1" name="Player" flags="0" access="0" maxdepotitems="0" maxvipentries="0" /> <group id="2" name="Gamemaster" flags="137438953471" access="1" maxdepotitems="0" maxvipentries="200" /> <group id="3" name="Administrator" flags="272730398714" access="1" maxdepotitems="0" maxvipentries="200" /></groups>
  19. Então, como faz para entregar 5kk do shop? sendo que eu coloco la para entregar 5kk mas só recebe 1kk? se possível tem como fazer receber os itens em uma bag? local SHOP_MSG_TYPE = MESSAGE_EVENT_ORANGElocal SQL_interval = 30 function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do local id = tonumber(result_plr:getDataInt("id")) local action = tostring(result_plr:getDataString("action")) local delete = tonumber(result_plr:getDataInt("delete_it")) local cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while iter ~= container_count do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) doItemSetAttribute(new_item, "aid", getPlayerGUID(cid)+10000) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.') end end if not(result_plr:next()) then break end end result_plr:free() end return trueend
  20. Taava precisando De ajuda Nesse Script .. Queria q ele Resetasse a Mana e Hp tbm Mas O player Ganha Uma Guantidade A cada Reset Q ele Fizer \/ --[[ <(Advanced Reset System 2.0)> Autor: Juniior Cwb ;*. Contato: (Juniior_Cwb@@Hotmail.com) Versão: 2.0 Testado em: 8.50 e 8.60 TFS: 0.3.6 and 0.4.0 Atenção , Se Achar Esse Sistema em outro site ou forum favor comunicar Eu ( Juniior Cwb ) Juniior_Cwb@@Hotmail.com ) -=[Características]=- ~( Versão 2.0 )~ - Resets agora Armazenados na DataBase; (Sem Valor de Storage) - Instala o System e cria a Tabela de Resets com o comando "/installreset"; - Resets no Look do jogador ex: 22:10 You see Marcello [Reset 2] (Level 8). He is an elder druid.; - [sTAGES] para "Premium Account" e "Free Account"; ]] --=[Functions]=-- -- installReset()' [instala o Sistema.] -- tableResetInstall()' [Verifica Se o Sistema ja foi instaladao.] -- nowReseting()' [Verifica, retorna o erro ou reseta.] -- getPlayerReset(cid)' [Pega numero de resets do player.] -- checLevelStageReset(cid)' [Verifica o Level para Resetar.] -- newReset(cid)' [Verifica todas as Condições de Reset.] -- addValue(value)' [Adiciona numero de resets.] --=[Comandos de Jogadores]=-- -- "!resetar" -- Para Resetar. local exhaustionMinutes = 10 -- exausted em segundos local storageUse = 34538 -- storage usado no exausted. function onSay(cid, words, param) if words =="!resetar" then if(exhaustion.check(cid, storageUse) == TRUE) then if (exhaustion.get(cid, storageUse) >= 5) then doPlayerSendCancel(cid, "Voçê só pode usar após [" .. math.floor(exhaustion.get(cid, storageUse) / 5 + 1) .."] Segundos.") end if (exhaustion.get(cid, storageUse) <= 5) then doPlayerSendCancel(cid, "Voçê só pode usar após [" .. exhaustion.get(cid, storageUse).."] segundos.") end return TRUE end exhaustion.set(cid, storageUse, exhaustionMinutes*5) --[ Condições de Reset ] -- local coNdConf = { needPz = false, -- Precisa estar em Pz pra resetar? [false, false] needPa = false, -- Precisa ser Premium Account Pra resetar? [true, false] withe = false, -- Players com Pk Withe podem resetar? [false, false] red = true, -- Players com Pk Red pode resetar? [false, false] battle = true, -- Players precisão estar sem battle pra resetar? [true, true] teleport = false, -- Teleportar Player para o templo após resetar? [false, false] look = true, -- Aparecer Resets no Look do Player? [true, true] pid = getPlayerGUID(cid), -- Não Mexer. --[ Configurações do Reset ] -- resetConf = { Level = 510, -- Level Necessário para Resetar. [Valor] backLvl = 8, -- Level que voltará após o Reset. [Valor] time = 5, manamax = (10*getCreatureMaxMana(cid)/100 +2000), -- Mana que ficará após o reset. [valor] hpmax = (5*getCreatureMaxHealth(cid)/100 +300), -- HP que ficará após o reset. [valor] -- Tempo para o Player deslogar ao resetar, em segundos. [Valor] }, } --[[>> STAGES <<]]-- x=true;X=true -- Não Mexer. local stage = {Abilitar = {x}, Desabilitar = {}, --<< Abilitar Stages?? >>-- [{x};{}] -- [RESETS] | [PREMMY] | [FREE] stage1= {resets= 1, premmy= 330, free= 330}, stage2= {resets= 5, premmy= 355, free= 355}, -- EXPLICANDO e Configurando stages. (Se estiver Abilitado [Abilitar = {x}]) stage3= {resets= 10, premmy= 360, free= 360}, -- resets = Número de resets para o Stage; stage4= {resets= 15, premmy= 365, free= 365}, -- premmy = Level necessário para Premium Accounts; stage5= {resets= 20, premmy= 380, free= 380}, -- free = Level necessário para Free Accounts; stage6= {resets= 25, premmy= 390, free= 390}, -- Coloque em Ordem... stage7= {resets= 30, premmy= 410, free= 410}, -- [OBS: MARQUE UM "X" PARA ABILITAR OU DESABILITAR OS STAGES] stage8= {resets= 35, premmy= 430, free= 430}, -- EX: para desabilitar mude: Abilitar = {}, Desabilitar = {x} stage9= {resets= 40, premmy= 450, free= 450}, stage10={resets= 45, premmy= 480, free= 480}, stage11={resets= 50, premmy= 510, free= 510}, stage12={resets= 55, premmy= 550, free= 550}, stage13={resets= 60, premmy= 610, free= 610}, stage14={resets= 65, premmy= 750, free= 750}, stage15={resets= 70, premmy= 760, free= 760}, stage16={resets= 75, premmy= 900, free= 900}, stage17={resets= 80, premmy= 1000, free= 1000}, stage18={resets= 85, premmy= 1300, free= 1300}, stage19={resets= 90, premmy= 1500, free= 1500}, stage20={resets= 95, premmy= 3000, free= 3000}, stage21={resets= 100, premmy= 2800, free= 2800}, stage22={resets= 105, premmy= 2900, free= 2900}, stage23={resets= 110, premmy= 3200, free= 3200}, stage24={resets= 115, premmy= 3500, free= 3500}, stage25={resets= 120, premmy= 4300, free= 4300}, stage26={resets= 125, premmy= 4500, free= 4500}, stage27={resets= 130, premmy= 99500, free= 99500}, } --[[>> FIM STAGES <<]]-- --=[Pega Valor de Resets]=-- function getPlayerReset(cid) local qr = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..coNdConf.pid..";") rss = qr:getDataInt("reset", coNdConf.pid) if rss < 0 then rss = 0 end return rss end local success = " ~~ Sucesso! ~~ \nVocê tem agora "..(getPlayerReset(cid)+1).." resets. \nVocê será deslogado em "..coNdConf.resetConf.time.." segundos." ;err = doPlayerSendTextMessage local qrt = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..coNdConf.pid..";");rss_db = qrt:getDataInt("reset", coNdConf.pid) local lvl_query = "UPDATE `players` SET `level` = "..(coNdConf.resetConf.backLvl)..", `experience` = 0 WHERE `id`= " .. coNdConf.pid .. ";" db.executeQuery("UPDATE `players` SET `manamax` = "..config.resetStatus.manamax..",`mana` = "..config.resetStatus.manamax.." WHERE `id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `healthmax` = "..config.resetStatus.hpmax..",`health` = "..config.resetStatus.hpmax.." WHERE `id` = "..config.resetStatus.player) local reset_query = "UPDATE `players` SET `reset` = "..(getPlayerReset(cid)+(1)).." WHERE `id`= " .. coNdConf.pid .. ";" local nolook_query = "UPDATE `players` SET `description` = '' WHERE `players`.`id`= " .. coNdConf.pid .. ";" local look_query = "UPDATE `players` SET `description` = ' [Reset "..(getPlayerReset(cid)+(1)).."]' WHERE `players`.`id`= " .. coNdConf.pid .. ";" --=[Reseta]=-- function addValue(value) if coNdConf.look == false then doRemoveCreature(cid) db.executeQuery(lvl_query);db.executeQuery(reset_query);db.executeQuery(nolook_query) else doRemoveCreature(cid) db.executeQuery(lvl_query);db.executeQuery(reset_query);db.executeQuery(look_query) return LUA_NO_ERROR end end function nowReseting() if (getPlayerLevel(cid) < coNdConf.resetConf.Level) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "- Level Necessário Para o Reset ["..coNdConf.resetConf.Level.."]. Faltam "..coNdConf.resetConf.Level-getPlayerLevel(cid).." level's para você Resetar. -") return true end if getPlayerLevel(cid) >= coNdConf.resetConf.Level and (coNdConf.teleport == false) then doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1, value) else doPlayerPopupFYI(cid, success) addEvent(doTeleportThing, coNdConf.resetConf.time*900, cid, getTownTemplePosition(getPlayerTown(cid))) addEvent(addValue, coNdConf.resetConf.time*1000, value) return true end end --[sTAGES Nao mexer em nada.]-- function checkLevelStageReset(cid) local stages = { {resets= stage.stage1.resets, premmy= stage.stage1.premmy, free= stage.stage1.free}, {resets= stage.stage2.resets, premmy= stage.stage2.premmy, free= stage.stage2.free}, {resets= stage.stage3.resets, premmy= stage.stage3.premmy, free= stage.stage3.free}, {resets= stage.stage4.resets, premmy= stage.stage4.premmy, free= stage.stage4.free}, {resets= stage.stage5.resets, premmy= stage.stage5.premmy, free= stage.stage5.free}, {resets= stage.stage6.resets, premmy= stage.stage6.premmy, free= stage.stage6.free}, {resets= stage.stage7.resets, premmy= stage.stage7.premmy, free= stage.stage7.free}, {resets= stage.stage8.resets, premmy= stage.stage8.premmy, free= stage.stage8.free}, {resets= stage.stage9.resets, premmy= stage.stage9.premmy, free= stage.stage9.free}, {resets=stage.stage10.resets, premmy=stage.stage10.premmy, free=stage.stage10.free}, {resets=stage.stage11.resets, premmy=stage.stage11.premmy, free=stage.stage11.free}, {resets=stage.stage12.resets, premmy=stage.stage12.premmy, free=stage.stage12.free}, {resets=stage.stage13.resets, premmy=stage.stage13.premmy, free=stage.stage13.free}, {resets=stage.stage14.resets, premmy=stage.stage14.premmy, free=stage.stage14.free}, {resets=stage.stage15.resets, premmy=stage.stage15.premmy, free=stage.stage15.free}, {resets=stage.stage16.resets, premmy=stage.stage16.premmy, free=stage.stage16.free}, {resets=stage.stage17.resets, premmy=stage.stage17.premmy, free=stage.stage17.free}, {resets=stage.stage18.resets, premmy=stage.stage18.premmy, free=stage.stage18.free}, {resets=stage.stage19.resets, premmy=stage.stage19.premmy, free=stage.stage19.free}, {resets=stage.stage20.resets, premmy=stage.stage20.premmy, free=stage.stage20.free}, {resets=stage.stage21.resets, premmy=stage.stage21.premmy, free=stage.stage21.free}, {resets=stage.stage22.resets, premmy=stage.stage22.premmy, free=stage.stage22.free}, {resets=stage.stage23.resets, premmy=stage.stage23.premmy, free=stage.stage23.free}, {resets=stage.stage24.resets, premmy=stage.stage24.premmy, free=stage.stage24.free}, {resets=stage.stage25.resets, premmy=stage.stage25.premmy, free=stage.stage25.free}, {resets=stage.stage26.resets, premmy=stage.stage26.premmy, free=stage.stage26.free}, {resets=stage.stage27.resets, premmy=stage.stage27.premmy, free=stage.stage27.free}, } local resets = getPlayerReset(cid) for i, tab in ipairs(stages) do if resets <= tab.resets then coNdConf.resetConf.Level = isPremium(cid) and tab.premmy or tab.free break end end if (getPlayerLevel(cid) < coNdConf.resetConf.Level) then err(cid, MESSAGE_STATUS_CONSOLE_BLUE, "- Level Necessário Para o Reset ["..coNdConf.resetConf.Level.."]. Faltam "..coNdConf.resetConf.Level-getPlayerLevel(cid).." level's para você Resetar. -") return TRUE end if getPlayerLevel(cid) >= coNdConf.resetConf.Level and (coNdConf.teleport == false) then doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) else doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) addEvent(doTeleportThing, coNdConf.resetConf.time*900, cid, getTownTemplePosition(getPlayerTown(cid))) return true end end function newReset(cid) if(coNdConf.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == LUA_ERROR) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar em Protection Zone Para Resetar. -") return TRUE end if(coNdConf.needPa == true) and not isPremium(cid) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa ser Premium Account para Resetar. -") return TRUE end if(coNdConf.withe == false) and (getCreatureSkullType(cid) == 3) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Withe. -") return TRUE end if(coNdConf.red == false) and (getCreatureSkullType(cid) == 4) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Red. -") return TRUE end if(coNdConf.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar sem Battle para Resetar. -") return TRUE end local xy = {true,false} table.insert(stage.Abilitar, false) table.insert(stage.Desabilitar, false) if stage.Abilitar[1] == xy[1] and stage.Desabilitar[1] == xy[2] then checkLevelStageReset(cid) elseif stage.Abilitar[1] == xy[2] and stage.Desabilitar[1] == xy[1] then nowReseting() else doPlayerPopupFYI(cid, "LUA_ERROR; Configure corretamente o Sistema de STAGES!") end return true end function tableResetInstall() print(not rss_db and LUA_ERROR or "Tabela de Resets: Instalada ... [success] ") addEvent(newReset, 1000, cid) return false end if tableResetInstall() then end end --=[install System]=-- function installReset() if db.executeQuery("ALTER TABLE `players` ADD reset INT(11) NOT NULL DEFAULT 0;") then print("[MarcelloMkez] -= Advanced Reset System 2.0 por DataBase =- Instalado com sucesso!") return TRUE end print('[Advanced Reset System/MarcelloMkez] Não foi possível instalar o Sistema.') return FALSE end local tt = { "Preparando Instalação...", "Instalando: TableReset Db...", "Instalando: getPlayerReset()...", "Instalando: addValue()...", "Instalando: checkLevelStageReset()...", "Instalando: newReset() and nowReseting()...", "Finalizando Instalação...", "...", success = { "Iniciando...", "function: TableReset Db... [success]", "function: getPlayerReset()... [success]", "function: addValue(value)... [success]", "function: checkLevelStageReset()... [success]", "function: newReset() and nowReseting()... [success]", "Fim da Instalação. ", "by: ~~ MarcelloMkez ~~ \nContato: marcello_dirt@@Hotmail.com", inst = {"MarcelloMkez","Advanced Reset System 2.0 por DataBase" }, }, } if words == "/installresetguiizeera" and getPlayerAccess(cid) >= 3 then function install() if installReset() then print(""..tt.success[7].."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,""..tt.success[8].."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "["..tt.success.inst[1].."] -="..tt.success.inst[2].."=- Instalado com sucesso!") else print("["..tt.success.inst[1].."] FALHA NA INSTALAÇÃO! [O sistema ja foi instalado].") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "["..tt.success.inst[1].."] FALHA NA INSTALAÇÃO! [O sistema ja foi instalado].") end return 1 end function concl(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[7].."") print(""..tt[8].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[7].."") doPlayerSendTextMessage(cid, typetx,""..tt[8].."") addEvent(install, 1000,cid) end function finall(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[6].."") print(""..tt[7].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[6].."") doPlayerSendTextMessage(cid, typetx,""..tt[7].."") addEvent(concl, 3000,cid) end function installDd(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[5].."") print(""..tt[6].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[5].."") doPlayerSendTextMessage(cid, typetx,""..tt[6].."") addEvent(finall, 1000,cid) end function installCc(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[4].."") print(""..tt[5].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[4].."") doPlayerSendTextMessage(cid, typetx,""..tt[5].."") addEvent(installDd, 1000,cid) end function installBb(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[3].."") print(""..tt[4].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[3].."") doPlayerSendTextMessage(cid, typetx,""..tt[4].."") addEvent(installCc, 1000,cid) end function installAa(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[2].."") print(""..tt[3].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[2].."") doPlayerSendTextMessage(cid, typetx,""..tt[3].."") addEvent(installBb, 1000,cid) end function toInstall() local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[1].."") print(""..tt[2].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[1].."") doPlayerSendTextMessage(cid, typetx,""..tt[2].."") addEvent(installAa, 1000,cid) end function preparation() local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt[1].."") doPlayerSendTextMessage(cid, typetx,""..tt[1].."") addEvent(toInstall, 3000,cid) end if preparation() then end end return 1 end --=[by: Juniior Cwb ;* ]=--
  21. Eu coloco para chegar 5kk no meu gesior, mas só chega 1kk alguém sabe como colocar para vim o resto? local SHOP_MSG_TYPE = MESSAGE_EVENT_ORANGElocal SQL_interval = 30 function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do local id = tonumber(result_plr:getDataInt("id")) local action = tostring(result_plr:getDataString("action")) local delete = tonumber(result_plr:getDataInt("delete_it")) local cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while iter ~= container_count do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) doItemSetAttribute(new_item, "aid", getPlayerGUID(cid)+10000) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.') end end if not(result_plr:next()) then break end end result_plr:free() end return trueend
  22. Tenho esse script de dominar cidades feito pelo zipster98, algo assim, alias muito obrigado... Mas queria mudar 2 coisas q me faltam conhecimento, alguem mais experiente poderia me ajudar? Scripts: /lib/GOTlib.lua cityMonsters = { --["monster_name"] = recomendo número anterior + 1, ["Chanceler Carlin"] = 1, ["Chanceler Venore"] = 2, ["Chanceler Thais"] = 3, ["Chanceler Darashia"] = 4, ["Chanceler Ankrahmun"] = 5, ["Chanceler Edron"] = 6, ["Chanceler Rookgaard"] = 7, ["Chanceler Svargrond"] = 8, --etc}DEFAULT_STORAGE = 49198function setGuildExperience(guildId, exp) for _, pid in pairs(getPlayersOnline()) do if getPlayerGuildId(pid) == guildId then doPlayerSetExperienceRate(pid, exp) end endendfunction getGuildExpRate(guildId) for _, pid in pairs(getPlayersOnline()) do local playerRate = getPlayerRates(pid)[8] if getPlayerGuildId(pid) == guildId and playerRate > 1 then return playerRate end end return 1.0endfunction getGuildName(guild_id) --Omega local query = db.getResult("SELECT name FROM guilds WHERE id = "..guild_id) local ret = query:getID() == -1 and false or query:getDataString("name") print(query:getDataString("name")) query:free() return retend Monster exemple: <monster name="Chanceler Carlin" file="GOT/chanceler carlin.xml"/> <?xml version="1.0" encoding="UTF-8"?><monster name="Chanceler Carlin" nameDescription="Chanceler Carlin" race="blood" experience="0" speed="0" manacost="0"> <health now="6" max="6"/> <look type="140" head="0" body="0" legs="0" feet="0" addons="3" corpse="6080"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> </flags> <attacks> <attack name="melee" interval="2000" skill="45" attack="20"/> </attacks> <defenses armor="9" defense="11"> <defense name="healing" interval="1000" chance="9" min="750" max="1250"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="healing" interval="1000" chance="17" min="300" max="500"> <attribute key="areaEffect" value="blueshimmer"/> </defense> </defenses> <immunities> <immunity lifedrain="1"/> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="Guards!" yell="1"/> </voices> <script> <event name="mDeath"/> </script></monster> <movevent type="StepIn" actionid="12000-12100" event="script" value="GOT/throne_capturing.lua"/> <movevent type="StepIn" actionid="2391-2398" event="script" value="GOT/tile_acess_members_of_throne.lua"/> /movemments/throne_capturing.lua local config = { level = 50, count = 5, messages = { [12000] = "[GOT]The guild %s is entering the castle.", [12001] = "[GOT]The guild %s is already inside the castle.", [12002] = "[GOT]The guild %s is close to conquer the castle." }, actionId = {12000, 4819}}function tableInsert(table, value) -- technically this doesn't need to be #table + 1, it can just be #table table[#table + 1] = valueendfunction onStepIn(cid, item, position, fromPosition) local pid, ip = {}, {} -- now they will hold the values generated by get getGuildOnlineMembers local function getGuildOnlineMembers(guildId) for _, cid in pairs(getPlayersOnline()) do if getPlayerGuildId(cid) == guildId and getPlayerLevel(cid) >= config.level and not isInArray(ip, getPlayerIp(cid)) then tableInsert(pid, cid) tableInsert(ip, getPlayerIp(cid)) end end return pid end if not isPlayer(cid) then return true end if item.actionid == config.actionId[1] then if getPlayerGuildId(cid) < 1 or #getGuildOnlineMembers(getPlayerGuildId(cid)) < config.count then doPlayerSendCancel(cid, "You need to be on guild or your guild must have at least "..config.count.." players level "..config.level.." or more.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) doTeleportThing(cid, fromPosition, true) return true end end if getGlobalStorageValue(item.actionid + config.actionId[2]) < os.time() then broadcastMessage(config.messages[item.actionid]:format(getPlayerGuildName(cid))) setGlobalStorageValue(item.actionid + config.actionId[2], os.time() + 10) end doCreatureSetSkullType(cid, 3) return trueend /movemments/tile_acess_members_of_throne.lua local guilds = { --[actionid] = número da cidade configurado em cityMonsters, [2391] = 1, [2392] = 2, [2393] = 3, [2394] = 4, [2395] = 5, [2396] = 6, [2397] = 7, [2398] = 8,} function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end local guildId = getGlobalStorageValue(guilds[item.actionid] + DEFAULT_STORAGE) if getPlayerGuildId(cid) ~= guildId then doTeleportThing(cid, fromPosition) doPlayerSendCancel(cid, 'This territory is not of your Guild') end return trueend CreatureScripts <!-- Guild own throne +25%de exp --> <event type="death" name="mDeath" event="script" value="GOT/expbonus_got.lua"/> <event type="statschange" name="mStatsChange" event="script" value="GOT/expbonus_got.lua"/> <event type="target" name="mTarget" event="script" value="GOT/expbonus_got.lua"/> <event type="login" name="mLogin" event="script" value="GOT/expbonus_got.lua"/> /creaturescripts/scripts/expbonus_got.lua function onTarget(cid, target) local m, playerGuild = cityMonsters[getCreatureName(target)], getPlayerGuildId(cid) if isPlayer(cid) and isMonster(target) and m and playerGuild > 0 then return getGlobalStorageValue(DEFAULT_STORAGE + m) ~= playerGuild end return trueendfunction onStatsChange(cid, attacker, type, combat, value) if isPlayer(attacker) and isMonster(cid) and type == STATSCHANGE_HEALTHLOSS then local m, playerGuild = cityMonsters[getCreatureName(cid)], getPlayerGuildId(attacker) if m and playerGuild > 0 then return getGlobalStorageValue(DEFAULT_STORAGE + m) ~= playerGuild end end return trueendfunction onLogin(cid) local guildId = getPlayerGuildId(cid) if guildId > 0 and getGuildExpRate(guildId) > 1 then doPlayerSetExperienceRate(cid, getGuildExpRate(guildId)) end registerCreatureEvent(cid, "mTarget") registerCreatureEvent(cid, "mStatsChange") return trueend function onDeath(cid, corpse, deathList) local killer, m = deathList[1], cityMonsters[getCreatureName(cid)] if killer and isPlayer(killer) and m then local atualGuild, playerGuild = getPlayerStorageValue(cid, DEFAULT_STORAGE + m), getPlayerGuildId(killer) if playerGuild > 0 and atualGuild ~= playerGuild then if atualGuild > -1 then setGuildExperience(atualGuild, getGuildExpRate(atualGuild) - 0.25) end setGuildExperience(playerGuild, getGuildExpRate(playerGuild) + 0.25) setGlobalStorageValue(DEFAULT_STORAGE + m, playerGuild) broadcastMessage("The guild "..getPlayerGuildName(killer).."just dominate the throne of"..getCreatureName(cid):explode(" ")[2].."!") end end return trueend Preciso de ajuda com duas coisas: 1- Como fazer pra fazer cancelamentos se já tiver um territorio Como por exemplo: function onTarget(cid, target) if SUAGUILDA TEM ALGUM TERRITORIO CANCELA O ATK DIZENDO QUE SUA GUILDA JA TEM UM TERRITORIO end local m, playerGuild = cityMonsters[getCreatureName(target)], getPlayerGuildId(cid) if isPlayer(cid) and isMonster(target) and m and playerGuild > 0 then return getGlobalStorageValue(DEFAULT_STORAGE + m) ~= playerGuild end return trueend if SUAGUILDA TEM ALGUM TERRITORIO doPlayerSendCancel(cid, "Your guild already has a throne dominated! Only one per guild.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) doTeleportThing(cid, fromPosition, true) return true end 2- Como fazer uma placa pra eu colocar em frente de cada castelo, que quando os caras derem look aparecesse o nome da guilda dominante? Sei la algo como esse pseudo codigo onlook item sing value = NAOSEI local guildName = getGuildName(getGlobalStorageValue(value)) if guildName then "City owned by guild"..guildName.."!" else "No one guild own this city!" end
  23. Boa noite, gostaria de um exp potion por %, por exemplo 50% a maioria dos scripts de exp potion estão bugados.. alguém consegue fazer por percentagem? TSF 0.4 edit: Eu achei esse script bem completo mas ta bugado.. depois que usa a potion não da pra usar de novo... alguém sabe arrumar isso? <?xml version="1.0" encoding="UTF-8"?><mod name="AdvancedExpPotionSystem" enabled="yes" author="MatheusMkalo" forum="um fórum que não merece ser citado.com"><!-- Configs and Functions --><config name="PotionExpConfigs"><![CDATA[------ CONFIGURE SEU SCRIPT ------ TRUE ou FALSEconfigs = {time = 60, ---- TIME IN MINUTESneedpa = FALSE,needlvl = {TRUE, level = 10},costmana = {TRUE, mana = 100},addrate = 25, -- Exp que vai adicionar em %removeonuse = TRUE}function getTime(s)local n = math.floor(s / 60)s = s - (60 * n)return n, sendCreatureEventChecker = function(event, ...) -- Colexif isCreature(arg[1]) thenevent(unpack(arg))endendcreatureEvent = function(event, delay, ...) -- ColexaddEvent(CreatureEventChecker, delay, event, unpack(arg))endfunction getPlayerExtraExpRate(cid) -- By MatheusMkaloreturn (getPlayerRates(cid)[8]-1)*100end]]></config><!-- exppotion.lua --><action itemid="12328" event="script"><![CDATA[domodlib('PotionExpConfigs')if getPlayerStorageValue(cid, 62164) >= 1 thenreturn doPlayerSendCancel(cid, "You are already taking effect from this item.")endif configs.needpa and not isPremium(cid) thenreturn doPlayerSendCancel(cid, "You need to be a premmium account to use this item.")endif configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level thenreturn doPlayerSendCancel(cid, "You need to be level " .. configs.needlvl.level .. " to use this item.")endif configs.costmana[1] thenif getCreatureMana(cid) < configs.costmana.mana thenreturn doPlayerSendCancel(cid, "You need " .. configs.costmana.mana .. " mana to use this item.")elsedoCreatureAddMana(cid, -configs.costmana.mana)endendif configs.removeonuse thendoRemoveItem(item.uid, 1)endfor i = configs.time*60, 1, -1 dolocal a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60))if #a < 4 thena = string.sub(a,1,2) .. "0" .. string.sub(a, 3)endif i == configs.time*60 thencreatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "The effect of the exp potion end.")endcreatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, "The effect of the exp potion will end in "..a..".")enddoPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100))creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100)))doPlayerSendTextMessage(cid, 22, "Agora voce ira receber mais exp por matar os mosntros.")setPlayerStorageValue(cid, 62164, os.time())creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 62164, 0)return TRUE]]></action><creaturescript type="login" name="ExpPotion" event="script"><![CDATA[domodlib('PotionExpConfigs')local time = configs.timeif os.time()-getPlayerStorageValue(cid, 62164) < time *60 thendoPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100))creatureEvent(doPlayerSetExperienceRate, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100)))creatureEvent(setPlayerStorageValue, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000 , cid, 62164, 0)for i = (time*60-(os.time()-getPlayerStorageValue(cid, 62164))), 1, -1 dolocal a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60))if #a < 4 thena = string.sub(a,1,2) .. "0" .. string.sub(a, 3)endif i == (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) thencreatureEvent(doPlayerSendCancel, (time*60-(os.time()-getPlayerStorageValue(cid, 62164)))*1000, cid, "The effect of the exp potion end.")endcreatureEvent(doPlayerSendCancel, ((time*60-(os.time()-getPlayerStorageValue(cid, 62164)))-i)*1000, cid, "The effect of the exp potion will end in "..a..".")endendreturn TRUE]]></creaturescript></mod>
  24. eae galera bom dia então eu estou usando a simple task [mod] do vodkart e gostária de saber se alguém pode fazer uma alteração nela assim que alguem terminar todas as task e ganha o premio depois de 1 hora a pessoa que terminou todas "resete" as tasks para ser feita denovo ou alguma coisa do genero porque pelo que eu percebi só pode fazer esta task uma vez e eu queria algo que fosse infinito que os players sempre ficassem competindo para ver quem termina primeiro etc... para ganhar as recompensas porém pelo que percebi só pode ser feita uma vez algum scripter poderia fazer está mudança para min por gentileza? grato desde já MOD NPC NPC/Script é isso galera se alguém puder me ajudar ficarei no aguardo
  25. Olá galera, depois de seguir os procedimentos nesse link usando como base o Pokemon Stage, obtive o seguinte erro após usar a spell Mega Evolution: [28/03/2016 01:05:09] [Error - TalkAction Interface] [28/03/2016 01:05:09] data/talkactions/scripts/move1.lua:onSay [28/03/2016 01:05:09] Description: [28/03/2016 01:05:09] data/lib/level system.lua:272: attempt to index field '?' (a nil value) [28/03/2016 01:05:09] stack traceback: [28/03/2016 01:05:09] data/lib/level system.lua:272: in function 'adjustStatus' [28/03/2016 01:05:09] data/lib/pokemon moves.lua:274: in function 'docastspell' [28/03/2016 01:05:09] data/talkactions/scripts/move1.lua:201: in function <data/talkactions/scripts/move1.lua:21> Como podem ver no GIF abaixo, após usar a spell, as spells na cdBar não atualizam para as do Mega Charizard X, aparece um "m11" após o "Charizard, Mega Evolve!" e além disso todas as skills param de funcionar, aparece apenas "m1", "m2", "m3" e etc seguidos de erros na distro: Segue abaixo os arquivos que aparentemente estão com erros: move1.lua level system.lua pokemon moves.lua Podem fechar o tópico, já consegui resolver o erro.
×
×
  • Criar Novo...