cigarretts 0 Postado Janeiro 30, 2008 Share Postado Janeiro 30, 2008 Gente .. aki vou ensinar como fazer os potions sem bugar as hotkeys .. pra aparecer empty flask ! >.< Prestem Atenção! Façam uma pasta em data/actions/scripts Chamada : MP HP Potions e dentro dela vc cria um arquivo chamado OBS: TODOS OS POTIONS ABAIXO SÂO NA MESMA PASTA MP HP POTIONS!!!! health potion.lua e dentro do health potion.lua coloque isto function onUse(cid, item, frompos, item2, topos) mag = getPlayerMagLevel(cid) if mag >= 1 then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) doPlayerAddHealth(cid, math.random(80, 200)) doSendMagicEffect(topos, 12) if item.type > 1 then doChangeTypeItem(item.uid,item.type-1) else doRemoveItem(item.uid,1) end else doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"You don't have the required level to use that potion.") end return 1 end Helath potion OK! Agora vamos pro strong health potion! Faça a mesma coisa.. Crie um arquivo chamado strong health potion.lua abra-o e coloque isto: function onUse(cid, item, frompos, item2, topos) mag = getPlayerMagLevel(cid) if getPlayerLevel(cid) < 50 then doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"This potion can only be consumed by paladins and knights of level 50 or higher.") return 1 end if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 7 or getPlayerVocation(cid) == 8 then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) doPlayerAddHealth(cid, math.random(200, 400)) doSendMagicEffect(topos, 12) if item.type > 1 then doChangeTypeItem(item.uid,item.type-1) else doRemoveItem(item.uid,1) end else doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"This potion can only be consumed by paladins and knights of level 50 or higher.") end return 1 end Agora vamos pro Great Health potion! Crie um arquivo chamado great health potion.lua e dentro dele coloque: function onUse(cid, item, frompos, item2, topos) mag = getPlayerMagLevel(cid) if getPlayerLevel(cid) < 80 then doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"This potion can only be consumed by paladins and knights of level 80 or higher.") return 1 end if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 7 or getPlayerVocation(cid) == 8 then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) doPlayerAddHealth(cid, math.random(200, 400)) doSendMagicEffect(topos, 12) if item.type > 1 then doChangeTypeItem(item.uid,item.type-1) else doRemoveItem(item.uid,1) end else doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"This potion can only be consumed by paladins and knights of level 80 or higher.") end return 1 end Agora Vamos Para os Mana Potions!!! Crie um arquivo na mesma pasta MP HP Potions.> chamado mana potion.lua e dentro dele coloque: function onUse(cid, item, frompos, item2, topos) mag = getPlayerMagLevel(cid) if mag >= 1 then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) doPlayerAddMana(cid, math.random(50, 100)) doSendMagicEffect(topos, 12) if item.type > 1 then doChangeTypeItem(item.uid,item.type-1) else doRemoveItem(item.uid,1) end else doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"You don't have the required level to use that potion.") end return 1 end Agora vamos para o Strong mana potion !! Crie um arquivo chamado strong mana potion.lua e dentro dele coloque: function onUse(cid, item, frompos, item2, topos) mag = getPlayerMagLevel(cid) if getPlayerLevel(cid) < 50 then doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"This potion can only be consumed by paladins, druids and sorcerers of level 50 or higher.") return 1 end if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 or getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 6 then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) doPlayerAddHealth(cid, math.random(200, 400)) doSendMagicEffect(topos, 12) if item.type > 1 then doChangeTypeItem(item.uid,item.type-1) else doRemoveItem(item.uid,1) end else doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"This potion can only be consumed by sorcerers, paladins and druids of level 50 or higher.") end return 1 end function onUse(cid, item, frompos, item2, topos) mag = getPlayerMagLevel(cid) if getPlayerLevel(cid) < 80 then doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"This potion can only be consumed by paladins, druids and sorcerers of level 80 or higher.") return 1 end if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 6 then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) doPlayerAddMana(cid, math.random(250, 500)) doSendMagicEffect(topos, 12) if item.type > 1 then doChangeTypeItem(item.uid,item.type-1) else doRemoveItem(item.uid,1) end else doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"This potion can only be consumed by sorcerers and druids of level 80 or higher.") end return 1 end Pronto ! Agora va em actions.xml na pasta data/actions e cole isso\/ Agora o Ultimo !!! Great Mana Potion!! Crie um arquivo chamado great mana potion.lua e dentro dele coloque: function onUse(cid, item, frompos, item2, topos) mag = getPlayerMagLevel(cid) if getPlayerLevel(cid) < 80 then doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"This potion can only be consumed by paladins, druids and sorcerers of level 80 or higher.") return 1 end if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 6 then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) doPlayerAddMana(cid, math.random(250, 500)) doSendMagicEffect(topos, 12) if item.type > 1 then doChangeTypeItem(item.uid,item.type-1) else doRemoveItem(item.uid,1) end else doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"This potion can only be consumed by sorcerers and druids of level 80 or higher.") end return 1 end Agora va em actions.xml na pasta data/actions e cole isto lá <!-- Potions --> -- Life potions <action itemid="7618" exhaustion="1" script="MP HP Potions/health potion.lua" /> <action itemid="7588" exhaustion="1" script="MP HP Potions/strong health potion.lua" /> <action itemid="7591" exhaustion="3" script="MP HP Potions/great health potion.lua" /> -- Mana potions <action itemid="7620" exhaustion="1" script="MP HP Potions/mana potion.lua" /> <action itemid="7589" exhaustion="1" script="MP HP Potions/strong mana potion.lua" /> <action itemid="7590" exhaustion="1" script="MP HP Potions/great mana potion.lua" /> Pronto !!! ta feito suas potions !!! CREDITOS 100% By Cigarretts Cya !! espero ter ajudado !! ByE! Link para o comentário https://xtibia.com/forum/topic/75791-potions-81-com-level-e-voca%C3%A7%C3%B5es/ Compartilhar em outros sites More sharing options...
DaNDaNrOxX 15 Postado Janeiro 31, 2008 Share Postado Janeiro 31, 2008 Vlw aqui funfou sertinho Link para o comentário https://xtibia.com/forum/topic/75791-potions-81-com-level-e-voca%C3%A7%C3%B5es/#findComment-471154 Compartilhar em outros sites More sharing options...
sfmlarl 0 Postado Janeiro 31, 2008 Share Postado Janeiro 31, 2008 Legal, parabens. Dandanrox>> sertinho? LOLLLLLLLLL Perola :X Link para o comentário https://xtibia.com/forum/topic/75791-potions-81-com-level-e-voca%C3%A7%C3%B5es/#findComment-471172 Compartilhar em outros sites More sharing options...
gorno 2 Postado Fevereiro 1, 2008 Share Postado Fevereiro 1, 2008 (editado) Cara... valew msm... funcionou :smile_positivo: você é bom nisso :icon1: Só tem um problema... nao ficam os viais vasios na bp :icon2: Editado Fevereiro 1, 2008 por gorno Link para o comentário https://xtibia.com/forum/topic/75791-potions-81-com-level-e-voca%C3%A7%C3%B5es/#findComment-471814 Compartilhar em outros sites More sharing options...
Shadow Knight 0 Postado Fevereiro 1, 2008 Share Postado Fevereiro 1, 2008 põe um exausted :x isto aí tá lagando d+ o ot Link para o comentário https://xtibia.com/forum/topic/75791-potions-81-com-level-e-voca%C3%A7%C3%B5es/#findComment-472278 Compartilhar em outros sites More sharing options...
cigarretts 0 Postado Fevereiro 1, 2008 Autor Share Postado Fevereiro 1, 2008 pow entao gente .. c alguem souber colocar os vial sem aparecer no hotkeys.(empty potions) agradeço! enquanto ao exausted é só mudar no config lua pra tira um pouco o intervalo de actions dexa 1000 q fica bom... lags com isso axo q num da pra ocorrer :\ qlquer coisa ou duvida.. criticas.. etc.. msg aki ;D Link para o comentário https://xtibia.com/forum/topic/75791-potions-81-com-level-e-voca%C3%A7%C3%B5es/#findComment-472313 Compartilhar em outros sites More sharing options...
capeta7 0 Postado Fevereiro 8, 2008 Share Postado Fevereiro 8, 2008 (editado) no meu ot n funfo :S meu ot eh edron pvp enforced n tah funfando n acho q eh pq nesse ot n existe os potions em lugar nenhum nem no items.xml como add isso lah ?? Editado Fevereiro 8, 2008 por capeta7 Link para o comentário https://xtibia.com/forum/topic/75791-potions-81-com-level-e-voca%C3%A7%C3%B5es/#findComment-476766 Compartilhar em outros sites More sharing options...
matheusbm 0 Postado Fevereiro 9, 2008 Share Postado Fevereiro 9, 2008 Gostei ficou legal mesmo. Link para o comentário https://xtibia.com/forum/topic/75791-potions-81-com-level-e-voca%C3%A7%C3%B5es/#findComment-477044 Compartilhar em outros sites More sharing options...
Felipets 0 Postado Fevereiro 9, 2008 Share Postado Fevereiro 9, 2008 Mto bom vo colok certo nu meu ot pq aki funfou direitinho. Vlw :smile_positivo: Link para o comentário https://xtibia.com/forum/topic/75791-potions-81-com-level-e-voca%C3%A7%C3%B5es/#findComment-477112 Compartilhar em outros sites More sharing options...
dougauche 0 Postado Fevereiro 9, 2008 Share Postado Fevereiro 9, 2008 MUITO BOM CARA Muito bom MESMO NOTA 10! Link para o comentário https://xtibia.com/forum/topic/75791-potions-81-com-level-e-voca%C3%A7%C3%B5es/#findComment-477170 Compartilhar em outros sites More sharing options...
Skulls 331 Postado Fevereiro 17, 2008 Share Postado Fevereiro 17, 2008 (editado) Cara... valew msm... funcionou :smile_positivo:você é bom nisso :icon1: Só tem um problema... nao ficam os viais vasios na bp :icon2: Bom primeiramente isso vai ocorrer por causa de: doRemoveItem(item.uid,1) e porque a funcao que ele fez o player somente usa o vial (na verdade teria de usar o vial em si mesmo) eu nao testei, pois nao tenho ot 8.1, mas voce tambem nao colocou exhausted. Bom eu estou fazendo as pocoes para um amigo que me pediu.. quando eu acabar eu posto.. quem quiser vai tar na minha fan bar. __ Sobre o tutorial. A great health potion nao pode ser usadas por paladinos e no seu script pd. Voce repetiu (sem querer creio eu) o script da great mana potion. E a quantia de recuperacao das pocoes estao equivocadas (nas de health nem tanto, mas nas de mana estao muito elevadas). fora isso esta bom. e quero so exclarecer uma coisa eu nao estou denegrindo nem diminuindo a importancia de seu trabalho apontando esses erros/informacoes... sao criticas positivas, para que voce va aprimorando e que em trabalhos proximos corriga esses erros ja citados espero que compreenda. fui, skulls Editado Fevereiro 17, 2008 por Skulls Link para o comentário https://xtibia.com/forum/topic/75791-potions-81-com-level-e-voca%C3%A7%C3%B5es/#findComment-482384 Compartilhar em outros sites More sharing options...
Posts Recomendados