Newtonnotwen 80 Postado Setembro 7, 2012 Share Postado Setembro 7, 2012 (editado) Aew, outro script a pedido do juan500, "Doton Prision". O script consiste em teleportar o player atingido para um local onde o caster recebe a mana desse player que está "preso". (O vídeo se localiza no final do tópico, devido aos direitos autorais da Sony Music Entertainment (Japan) não foi permitido a execução do áudio pelo youtube.) Em data/movements/scripts crie um arquivo.lua nomeie para Jiroubo e adicione: function onStepIn(cid, item, position, fromPosition) function doHealthSecond(cid, quanty, delay) -- function by vodka if not isCreature(cid) then return LUA_ERROR end doCreatureAddMana(cid, quanty) doSendMagicEffect(getCreaturePosition(cid), 1) doSendAnimatedText(getCreaturePosition(cid), -100, 5) if delay ~= 1 then addEvent(doHealthSecond, 2000, cid, quanty, delay -1) elseif delay == 1 then doCreatureSetNoMove(cid, false) end end doHealthSecond(cid, -100, 10) return true end Editando: -Verde: Mana que vai perder. -Vermelho: Estabelecimento de contagem (1000 = 1 segundo) -Laranja: Numero de hits mediante o intervalo de tempo expresso em vermelho. Tile para player (atingido). Se você botar o intervalo = 1000 E o numero de hits = 10 Vai ficar: 1000 * 10 = 10000 = 10 segundos, o seu script total irá demorar 10 segundos sendo que cada hit terá o intervalo de tempo 1 segundo, assim perdendo 100 de mana por segundo durante 10 segundos, totalizando na perda de 1000 de mana. Caso não entenda pergunte. Novamente em data/movements/scripts crie um arquivo.lua nomeie para Jiroubo2 e adicione: function onStepIn(cid, item, position, fromPosition) function doHealthSecond(cid, quanty, delay) -- function by vodka if not isCreature(cid) then return LUA_ERROR end doCreatureAddMana(cid, quanty) doSendMagicEffect(getCreaturePosition(cid), 1) doSendAnimatedText(getCreaturePosition(cid), 100, 5) if delay ~= 1 then addEvent(doHealthSecond, 2000, cid, quanty, delay -1) elseif delay == 1 then doCreatureSetNoMove(cid, false) end end doHealthSecond(cid, 100, 10) return true end Editando: -Verde: Mana que vai ganhar. -Vermelho: Estabelecimento de contagem (1000 = 1 segundo) -Laranja: Numero de heal mediante o intervalo de tempo expresso em vermelho. Tile para caster. Se você botar o intervalo = 1000 E o numero de hits = 10 Vai ficar: 1000 * 10 = 10000 = 10 segundos, o seu script total irá demorar 10 segundos sendo que cada heal terá o intervalo de tempo 1 segundo, assim ganhando 100 de mana por segundo durante 10 segundos, totalizando na perda de 1000 de mana. Caso não entenda pergunte. Em movements.xml adicione: <movevent type="StepIn" actionid="1649" event="script" value="Jiroubo.lua"/> <movevent type="StepIn" actionid="1650" event="script" value="Jiroubo2.lua"/> Agora em data/talkactions/scripts crie um arquivo.lua nomeie para Jiroubo e adicione: function onSay(cid, words, param) local waittime = 20 -- Tempo de exhaustion local storage = 5560 local pos = getCreaturePosition(cid) local from = {x=pos.x, y=pos.y, z=pos.z} local to = {x = 584, y = 1007, z = 15} -- Onde estara o tile do player atingido local to1 = {x = 564, y = 1007, z = 15} -- Onde estara o tile do caster local area1 = {x = 578, y = 1002, z = 15} -- Ponta de cima na esquerda local area2 = {x = 590, y = 1014, z = 15} -- Ponta de baixo na direita local ppos = getCreaturePosition(cid) local level = 100 -- Level necessário local pl1 = {x=ppos.x-7, y=ppos.y-5, z=ppos.z} local pl2 = {x=ppos.x+7, y=ppos.y+5, z=ppos.z} if getPlayerLevel(cid) < level then doPlayerSendCancel(cid, "Você precisa de level "..level.." para usar essa magia.") return true end function back(cid) if isInArea(getCreaturePosition(cid), area1, area2) then doTeleportThing(cid, from) end end function go(cid) if isInArea(getCreaturePosition(cid), pl1, pl2) then doTeleportThing(cid, to) end end function gos(cid) if isInArea(getCreaturePosition(cid), from, from) then doTeleportThing(cid, to1) end end function goback(cid) if isInArea(getCreaturePosition(cid), to1, to1) then doTeleportThing(cid, from) end end if exhaustion.check(cid, storage) == false then for _, pid in ipairs(getPlayersOnline()) do addEvent(back, 20000, pid) -- Tempo para retornar ao lugar que foi atingido addEvent(go, 100, pid) addEvent(gos, 1, pid) addEvent(goback, 200, pid) doSendMagicEffect(getCreaturePosition(pid), 63) doCreatureSay(pid, "DOTON PRISION!", TALKTYPE_MONSTER) --- Mensagem addEvent(setPlayerStorageValue, 10000, pid, 1634, -1) end exhaustion.set(cid, storage, waittime) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.") end return true end Editando: Script auto-explicativo, variáveis em verde. Em talkactions.xml adicione: <talkaction words="doton" event="script" value="Jiroubo.lua"/> Editando: -Verde: "Palavra mágica" (palavra que executa a ação) Oque fazer no RME? Obs: Esqueci de botar esse detalhe no vídeo, então onde estiver nas coordenadas faça o seguinte: {x = 564, y = 1007, z = 15} -- Onde estara o tile do caster {x = 584, y = 1007, z = 15} -- Onde estara o tile do player atingido Nesses 2 tiles que vocês irão botar as coordenadas adicione neles os actionids: No primeiro: {x = 564, y = 1007, z = 15} -- Onde estara o tile do caster Adicione o actionid 1649. No segundo: {x = 584, y = 1007, z = 15} -- Onde estara o tile do player atingido Adicione o actionid 1650. Agora o tutorial: Vídeo demonstrativo (Spell): Créditos: Newtonnotwen, pelo script e pelo post. juan500, pela ideia da spell. LuckOake, pelo script inicial Vodkart, pelo tile Jhon992, pelo tile Por favor comentem, se tiver mal explicado eu edito. Editado Setembro 7, 2012 por Newtonnotwen Link para o comentário https://xtibia.com/forum/topic/193603-spell-doton-prision/ Compartilhar em outros sites More sharing options...
juan500 5 Postado Setembro 7, 2012 Share Postado Setembro 7, 2012 muito bom ate agr esse foi mior q tsukuyomi e o sakura spirit olha pra spell fica extremamente foda finality so ta faltando aparecer as pedras do lado de fora da prision pq eu achei estranho o cara usa doton prision e o player some (sim ele tem q sumi soque deveria ficar uma trap do lado de fora e no mesmo segundo q a trap saisse o boneco voltasse sakas XD Link para o comentário https://xtibia.com/forum/topic/193603-spell-doton-prision/#findComment-1333713 Compartilhar em outros sites More sharing options...
Newtonnotwen 80 Postado Setembro 7, 2012 Autor Share Postado Setembro 7, 2012 Ok, vou tentar fazer o update. Sobre o jutsu de Guren, aquele da prisão de cristal, pode utilizar deste mesmo script, mude apenas o "cenário". Link para o comentário https://xtibia.com/forum/topic/193603-spell-doton-prision/#findComment-1333727 Compartilhar em outros sites More sharing options...
RHCP 24 Postado Setembro 7, 2012 Share Postado Setembro 7, 2012 Antigamente, eu vi uma spell que criava umas paredes de magic wall em torno do player todo, acho que se achassem, poderia aproveitar ela e modificar ficando assim +- Link para o comentário https://xtibia.com/forum/topic/193603-spell-doton-prision/#findComment-1333728 Compartilhar em outros sites More sharing options...
Newtonnotwen 80 Postado Setembro 7, 2012 Autor Share Postado Setembro 7, 2012 Eu sei como fazer, mas obrigado pela dica. Tenho uma duvida quanto a spell: juan500 você poderia me informar se o "trap" seria ao redor do caster ou na sua frente e qual a areá do "trap"? Link para o comentário https://xtibia.com/forum/topic/193603-spell-doton-prision/#findComment-1333736 Compartilhar em outros sites More sharing options...
juan500 5 Postado Setembro 7, 2012 Share Postado Setembro 7, 2012 a da guren é uma prision em volta dela mesma pra se esquifar dos attackes ela se defende desse jeito criando paredes ja o jiroubo a trap dele e +/- assim: {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {0, 0, 2, 0, 0}, {0, 0, 0, 0, 0} Link para o comentário https://xtibia.com/forum/topic/193603-spell-doton-prision/#findComment-1333774 Compartilhar em outros sites More sharing options...
Skymagnum 234 Postado Setembro 7, 2012 Share Postado Setembro 7, 2012 Estou fazendo um parecido com esse da Guren ele cria uns item em volta de si mesmo e não pode levar ataque algum Link para o comentário https://xtibia.com/forum/topic/193603-spell-doton-prision/#findComment-1333789 Compartilhar em outros sites More sharing options...
juan500 5 Postado Setembro 7, 2012 Share Postado Setembro 7, 2012 Estou fazendo um parecido com esse da Guren ele cria uns item em volta de si mesmo e não pode levar ataque algum lek seria facil so cria itens em volta mais o poblema é que é uma grande cratera gigante com teto de vidro shouton ppor isso que dificulta... Link para o comentário https://xtibia.com/forum/topic/193603-spell-doton-prision/#findComment-1333947 Compartilhar em outros sites More sharing options...
Newtonnotwen 80 Postado Setembro 7, 2012 Autor Share Postado Setembro 7, 2012 A melhor opção seria teleportar, pois iria criar objetos em um lugar que já existe alguns, assim "destruindo" seu mapa. Mesmo que haja a remoção iria ficar estranho. Link para o comentário https://xtibia.com/forum/topic/193603-spell-doton-prision/#findComment-1334030 Compartilhar em outros sites More sharing options...
Foxmth 0 Postado Setembro 7, 2012 Share Postado Setembro 7, 2012 Otimo,Você está de parabéns continue assim e se alguem esta interessado criar server de poketibia eu tenho 1 pasta monsters editada por mim se vocês quiserem ta ai http://www.xtibia.com/forum/topic/193640-poketibia-monster/ Link para o comentário https://xtibia.com/forum/topic/193603-spell-doton-prision/#findComment-1334048 Compartilhar em outros sites More sharing options...
juan500 5 Postado Setembro 7, 2012 Share Postado Setembro 7, 2012 hmmm poisé soque tem aquelas traps de cricle que poderia ser ativada quando é usada a spell da guren... Link para o comentário https://xtibia.com/forum/topic/193603-spell-doton-prision/#findComment-1334054 Compartilhar em outros sites More sharing options...
Skymagnum 234 Postado Setembro 7, 2012 Share Postado Setembro 7, 2012 Tem uma função que checa se tem items naquela posição, ou também por efeito daria também. Link para o comentário https://xtibia.com/forum/topic/193603-spell-doton-prision/#findComment-1334056 Compartilhar em outros sites More sharing options...
juan500 5 Postado Setembro 7, 2012 Share Postado Setembro 7, 2012 Tem uma função que checa se tem items naquela posição, ou também por efeito daria também. poise poderia usa essa função daria certin!!!! manda a função pro cara criar o script ae sky Link para o comentário https://xtibia.com/forum/topic/193603-spell-doton-prision/#findComment-1334073 Compartilhar em outros sites More sharing options...
Newtonnotwen 80 Postado Setembro 7, 2012 Autor Share Postado Setembro 7, 2012 (editado) Faça o seguinte: Use esse talkaction: function onSay(cid, words, param) local waittime = 20 -- Tempo de exhaustion local storage = 5560 local pos = getCreaturePosition(cid) local from = {x=pos.x, y=pos.y, z=pos.z} local to = {x = 575, y = 1082, z = 15} -- Onde estara o tile do player atingido local to1 = {x = 569, y = 1077, z = 15} -- Onde estara o tile do caster local area1 = {x = 560, y = 1068, z = 15} -- Ponta de cima na esquerda local area2 = {x = 595, y = 1099, z = 15} -- Ponta de baixo na direita local ppos = getCreaturePosition(cid) local level = 100 -- Level necessário local pl1 = {x=ppos.x-7, y=ppos.y-5, z=ppos.z} local pl2 = {x=ppos.x+7, y=ppos.y+5, z=ppos.z} if getPlayerLevel(cid) < level then doPlayerSendCancel(cid, "Você precisa de level "..level.." para usar essa magia.") return true end function back(cid) if isInArea(getCreaturePosition(cid), area1, area2) then doTeleportThing(cid, from) end end function go(cid) if isInArea(getCreaturePosition(cid), pl1, pl2) then doTeleportThing(cid, to) end end function gos(cid) if isInArea(getCreaturePosition(cid), from, from) then doTeleportThing(cid, to1) end end if exhaustion.check(cid, storage) == false then for _, pid in ipairs(getPlayersOnline()) do addEvent(back, 5000, pid) -- Tempo para retornar ao lugar que usou a spell addEvent(go, 100, pid) addEvent(gos, 1, pid) doSendMagicEffect(getCreaturePosition(pid), 63) doCreatureSay(pid, "ULTIMATE SHOUTON PRISION!", TALKTYPE_MONSTER) --- Mensagem addEvent(setPlayerStorageValue, 10000, pid, 1634, -1) end exhaustion.set(cid, storage, waittime) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.") end return true end Tag: <talkaction words="shouton" event="script" value="Guren.lua"/> Depois crie uma areá como essa: Andar de cima: Andar de baixo: Ou use a spell do Jhon992: --<Script by Jhon992>-- local stonesId = {8633, 8634, 8635, 8636} -- ids dos diferente tipos de stones. 8633 8634 8635 8636 id dos crystais local timeRemove = 5 -- tempo para dumir as pedras em segundos. function createObject(cid, position, stonesPosition) if (isPlayer(cid)) then if getPlayerLookDir(cid) == 0 then positions = {x=position.x, y=position.y-1, z=position.z} elseif getPlayerLookDir(cid) == 1 then positions = {x=position.x+1, y=position.y, z=position.z} elseif getPlayerLookDir(cid) == 2 then positions = {x=position.x, y=position.y+1, z=position.z} elseif getPlayerLookDir(cid) == 3 then positions = {x=position.x-1, y=position.y, z=position.z} end if isWalkable(positions) then createStone(stonesPosition, positions, stonesId[math.random(1,#stonesId)], cid) addEvent(createObject, 250, cid, positions, stonesPosition) else addEvent(removeStones, timeRemove*1000, stonesPosition) end end end function createStone(stonesPosition, positions, stone, cid) doCreateItem(stone, 1, positions) stonesPosition[(#stonesPosition)+1] = {x=positions.x, y=positions.y, z=positions.z, stackpos=1} end function removeStones(stonesPosition) for i=1, #stonesPosition do for o=1, 2 do stonesPosition = {x=stonesPosition.x, y=stonesPosition.y, z=stonesPosition.z, stackpos=o} if isInArray(stonesId, getThingfromPos(stonesPosition).itemid) then doRemoveItem(getThingfromPos(stonesPosition).uid) end end end end function isWalkable(pos, creature, pz, proj) -- nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end local creature = getTopCreature(pos) if creature.type > 0 then return false end if getTilePzInfo(pos) and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function onCastSpell(cid, var) local stonesPosition = {} local position = getPlayerPosition(cid) createObject(cid, position, stonesPosition) return true end Tag: <instant name="Crystal Wall" words="ultimate trap" lvl="200" mana="800" prem="1" blockwalls="1" exhaustion="1000" groups="3,2000" icon="127" needlearn="0" event="script" value="crystal wall.lua"> <vocation id="1"/> <vocation id="2"/> <vocation id="3"/> <vocation id="4"/> <vocation id="5"/> <vocation id="6"/> <vocation id="7"/> <vocation id="8"/> </instant> Se quiser editar a velocidade das stones, os itens que cria, só perguntar. Vídeo demonstrativo: Editado Setembro 7, 2012 por Newtonnotwen Link para o comentário https://xtibia.com/forum/topic/193603-spell-doton-prision/#findComment-1334087 Compartilhar em outros sites More sharing options...
juan500 5 Postado Setembro 7, 2012 Share Postado Setembro 7, 2012 mais esse script vais com que o player seja teleportado ou crie uma area onde ele esta mesmo??? Link para o comentário https://xtibia.com/forum/topic/193603-spell-doton-prision/#findComment-1334102 Compartilhar em outros sites More sharing options...
Posts Recomendados