Elviis 0 Postado Setembro 11, 2012 Share Postado Setembro 11, 2012 Cooé Rapaziada sussa? Ai to querendo um script de magias de cargar no meu ot eu botei um boss que quando tu mata ele tu ganha um magia mas eu quero ela por com carga Ex:mata o bixo ganha 3x Da Magia Diablo Rain... Falou Lekada ! Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/ Compartilhar em outros sites More sharing options...
0 Newtonnotwen 80 Postado Setembro 11, 2012 Share Postado Setembro 11, 2012 Seção errada. Dúvidas sobre scripts é neste tópico: http://www.xtibia.com/forum/forum/86-pedidos-e-duvidas-scripting/ Atenção da próxima vez e não esqueça de ler as regras da seção. Reportado para moverem. Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/#findComment-1336968 Compartilhar em outros sites More sharing options...
0 Elviis 0 Postado Setembro 11, 2012 Autor Share Postado Setembro 11, 2012 @ Newtonnotwen Valeu eu nem sabia so novo ake ! Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/#findComment-1337094 Compartilhar em outros sites More sharing options...
0 LuckOake 400 Postado Setembro 11, 2012 Share Postado Setembro 11, 2012 (editado) creaturescripts.xml: <event type="death" name="MonsterCharge" script="monstercharge.lua"/> monstercharge.lua: function onDeath(cid, deathList) mmsg = "sim" -- Mandar mensagem? Sim ou nao msg = "Você obteve 1x charge de spell." -- Mensagem que será mandada stor = getPlayerStorageValue(cid, 3172) if stor == -1 then setPlayerStorageValue(deathList[1], 3172, 1) else setPlayerStorageValue(deathList[1], 3172, stor+1) end if mmsg == "sim" then doPlayerSendTextMessage(deathList[1], MESSAGE_STATUS_CONSOLE_ORANGE, msg) end return true end No monstro que você quer, adiciona isso antes de </monster>: <script> <event name="MonsterCharge"/> </script> Adicione isso no script da spell que você quer que tenha charges, abaixo de onCastSpell: if getPlayerStorageValue(cid, 3172) == 0 then doPlayerSendCancel(cid, "Not enough charges.") return false end charges = getPlayerStorageValue(3172) setPlayerStorageValue(cid, 3172, charges-1) Editado Setembro 11, 2012 por LuckOake Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/#findComment-1337105 Compartilhar em outros sites More sharing options...
0 Newtonnotwen 80 Postado Setembro 11, 2012 Share Postado Setembro 11, 2012 (editado) Eu vi que o Luck postou ai, só que já tava acabando uma, então apenas ignore. Quem quiser usar: Fiz uma que só pode usar se tiver certo item: Usei o exemplo com um skyring. Testado em TSF 8.6. Em data/spells/scripts crie um arquivo.lua nomeie para skyring e adicione: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 47) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -5.9, -68, -4.9, 109) local arr1 = { {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, } local area = createCombatArea(arr1) setCombatArea(combat, area) function onCastSpell(cid, var) if getPlayerSlotItem(cid, CONST_SLOT_RING).itemid == 2123 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You use POWER ENERGY!") return doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Você não possui o Skyring.") doSendMagicEffect(getPlayerPosition(cid), 2) end end Editando: -Azul: Areá de efeito e hit (1 para ativar e 0 para desativar) -Marrom: Efeito (/z) -Teal: Formula de attack -Laranja: Local do slot Lista: head = CONST_SLOT_HEAD, armor = CONST_SLOT_ARMOR, legs = CONST_SLOT_LEGS, feet = CONST_SLOT_FEET, ring = CONST_SLOT_RING, necklace = CONST_SLOT_NECKLACE -Roxo: Id do item -Vermelho: Mensagem em baixo da tela -Verde: Mensagem no centro da tela Em spells.xml: <instant name="skyring" words="energy power" lvl="100" mana="1600" prem="1" exhaustion="1200" selftarget="1" needlearn="0" script="skyring.lua"> <vocation id="2"/> <vocation id="6"/> <vocation id="1"/> <vocation id="5"/> </instant> Qualquer dúvida para editar a tag pergunte. Editado Setembro 11, 2012 por Newtonnotwen Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/#findComment-1337115 Compartilhar em outros sites More sharing options...
0 Elviis 0 Postado Setembro 11, 2012 Autor Share Postado Setembro 11, 2012 @ LuckOake Deu erro ! [11/09/2012 18:53:01] data/creaturescripts/scripts/monstercharge.lua:7: attempt to index local 'deathList' (a number value) [11/09/2012 18:53:01] stack traceback: [11/09/2012 18:53:01] data/creaturescripts/scripts/monstercharge.lua:7: in function <data/creaturescripts/scripts/monstercharge.lua:1> Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/#findComment-1337143 Compartilhar em outros sites More sharing options...
0 LuckOake 400 Postado Setembro 11, 2012 Share Postado Setembro 11, 2012 (editado) Hm... Tá, tenta ai. Não prometo que funciona, mas tentemos. function onDeath(cid, deathList) mmsg = "sim" -- Mandar mensagem? Sim ou nao msg = "Você obteve 1x charge de spell." -- Mensagem que será mandada stor = getPlayerStorageValue(cid, 3172) tkiller = getPlayerGUID(deathList[1]) if stor == -1 then setPlayerStorageValue(tkiller, 3172, 1) else setPlayerStorageValue(tkiller, 3172, stor+1) end if mmsg == "sim" then doPlayerSendTextMessage(tkiller, MESSAGE_STATUS_CONSOLE_ORANGE, msg) end return true end Editado Setembro 11, 2012 por LuckOake Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/#findComment-1337145 Compartilhar em outros sites More sharing options...
0 Elviis 0 Postado Setembro 11, 2012 Autor Share Postado Setembro 11, 2012 Deu erro ainda se liga lek eu tenho um script desses ai só que tipo não ta com carga se eu mandar pra tu tu poe carga nele ? Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/#findComment-1337155 Compartilhar em outros sites More sharing options...
0 LuckOake 400 Postado Setembro 11, 2012 Share Postado Setembro 11, 2012 Sim. Manda ele ai. Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/#findComment-1337156 Compartilhar em outros sites More sharing options...
0 Elviis 0 Postado Setembro 11, 2012 Autor Share Postado Setembro 11, 2012 Pode ser pelo skype ou msn ? Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/#findComment-1337157 Compartilhar em outros sites More sharing options...
0 LuckOake 400 Postado Setembro 11, 2012 Share Postado Setembro 11, 2012 Não, só atendo pedidos via Private Message aqui no XTibia. Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/#findComment-1337158 Compartilhar em outros sites More sharing options...
0 Elviis 0 Postado Setembro 11, 2012 Autor Share Postado Setembro 11, 2012 Vishi como manda privat RIARIAI so novo malz :x vou enviar como msg tá ? Mandei como msg ! Viiiiu ? @ LuckOake Ta Aew ? Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/#findComment-1337163 Compartilhar em outros sites More sharing options...
0 LuckOake 400 Postado Setembro 11, 2012 Share Postado Setembro 11, 2012 Rapaz, por favor, não fique floodando no tópico, isso não é permitido. Espere um pouco que já edito aqui, vou tentar fazer o que você pediu. Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/#findComment-1337173 Compartilhar em outros sites More sharing options...
0 Elviis 0 Postado Setembro 11, 2012 Autor Share Postado Setembro 11, 2012 Malz é que eu to agoniado pensei que tu tinha deixado pra la :s Mas valeu leks pela consideração Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/#findComment-1337177 Compartilhar em outros sites More sharing options...
0 Eskylo 175 Postado Setembro 11, 2012 Share Postado Setembro 11, 2012 (editado) o script q vc colocar na pasta creaturescripts/scripts function onDeath(cid, corpse, deathList) addchar = 3 --quantas cargas add ao matar mmsg = "sim" -- Mandar mensagem? Sim ou nao msg = "Você obteve "..addchar.."x charge de spell." -- Mensagem que será mandada stor = getPlayerStorageValue(deathList[1], 3172) if stor == -1 then setPlayerStorageValue(deathList[1], 3172, addchar) else setPlayerStorageValue(deathList[1], 3172, stor+addachar) end if mmsg == "sim" then doPlayerSendTextMessage(deathList[1], MESSAGE_STATUS_CONSOLE_ORANGE, msg) end return true end Editado Setembro 11, 2012 por Eskylo Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/#findComment-1337195 Compartilhar em outros sites More sharing options...
0 Elviis 0 Postado Setembro 12, 2012 Autor Share Postado Setembro 12, 2012 Eskylo Deu erro também :s ai eu tenho um script parecido tipo tu mata o bixo aparece a msg pra todos PLAYER deu o ultimo hit no Boss Gran Tower e recebeu aura full só que tipo fica permanente eu queria por carga vou por o script ake ! local function Teleport(cid) doSendAnimatedText(getPlayerPosition(cid), "Aaaaah...", TEXTCOLOR_BLUE) local templo = {x=442, y=549, z=7} for j = 0, 60 do starting = {x=839 + j, y=952, z=7, stackpos=253} for i = 0, 60 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid, templo) end end end for j = 0, 61 do starting = {x=1128 + j, y=1120, z=6, stackpos=253} for i = 0, 6 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end for j = 0, 14 do starting = {x=1151 + j, y=1115, z=6, stackpos=253} for i = 0, 5 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end for j = 0, 14 do starting = {x=1151 + j, y=1127, z=6, stackpos=253} for i = 0, 5 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end for j = 0, 49 do starting = {x=1134 + j, y=1120, z=5, stackpos=253} for i = 0, 6 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end for j = 0, 14 do starting = {x=1151 + j, y=1115, z=5, stackpos=253} for i = 0, 5 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end for j = 0, 14 do starting = {x=1151 + j, y=1127, z=5, stackpos=253} for i = 0, 5 do checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos} creature= getThingfromPos(checking) if isPlayer(creature.uid) == TRUE then doTeleportThing(creature.uid,templo) end end end return TRUE end function onKill(cid, target, lastHit) local monstros ={"Gran Tower","gran tower"} if getCreatureTarget(cid) ~= 0 then if isMonster(target) == TRUE then for i = 1, 2 do nome = getCreatureName(getCreatureTarget(cid)) if (nome == monstros) then if getPlayerStorageValue(cid, 10007) ~= 1 then setPlayerStorageValue(cid,10005,1) setPlayerStorageValue(cid,10002,1) setPlayerStorageValue(cid,10007,1) setPlayerStorageValue(cid,10001,1) doSendMagicEffect(getCreaturePosition(cid), 47) broadcastMessage("O player ".. getPlayerName(cid) .." derrotou o Boss ".. nome ..", e por isso recebeu Aura Full!", MESSAGE_EVENT_ADVANCE) end addEvent(Teleport, 1000, cid) end end end end return TRUE end Link para o comentário https://xtibia.com/forum/topic/193938-magia-com-carga/#findComment-1337275 Compartilhar em outros sites More sharing options...
Pergunta
Elviis 0
Cooé Rapaziada sussa? Ai to querendo um script de magias de cargar no meu ot eu botei um boss que quando tu mata ele tu ganha um magia mas eu quero ela por com carga Ex:mata o bixo ganha 3x Da Magia Diablo Rain... Falou Lekada !
Link para o comentário
https://xtibia.com/forum/topic/193938-magia-com-carga/Compartilhar em outros sites
24 respostass a esta questão
Posts Recomendados