CorpsCool 0 Postado Setembro 22, 2005 Share Postado Setembro 22, 2005 vo incina a fazer runa de manafluid para 7.5 e o npc para vende faça o seguinte abra a pasta "data/actions/script" e abra qualquer um arquivo e delete tudo e coloquei o seguinte codigo: function onUse(cid, item, frompos, item2, topos) mag = getPlayerMagLevel(cid) if mag >= 3 then doSendMagicEffect(topos,1) doPlayerSay(cid,"Ahhhh! Fresh mana fluid!",16) doPlayerAddMana(cid, 150) 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 magic level to use that rune.") end return 1 end Feito isso vai em salva como e salve como nome "mf" e salve na pasta "data/actions/scripts". Agora abra o arquivoo "actions" localizado na pasta "data/actions" abra ela e coloque: <action itemid="3121" script="mf.lua" /> Agora a parte mais importante abra o arquivo "items" localizado na pasta "data/items" a faça o seguinte e certinho abra e vai em localiza ou F3 e localize o a palavra "runes" ele vai localiza a palavra --runes agora aonde tiver <item id="3085" name="blank rune" type="rune" maglevel="0" weight="0.1" /> esses codigos coloque o seguinte codigo: <item id="3121" name="manafluid rune" type="rune" maglevel="1" weight="0.1" /> Feito isso salva e deu esta feito a sua runa de manafluid agora vamus ao NPC so vo por os codigo: -- Respawn position set ox = 18 oy = 105 oz = 6 -- sven, the bewitched bunny -- it's a sample script, i dont know lua well enough to -- make some fancy code -- the good thing is, that this scripts can easily be developed -- seperately from the main programm -- perhaps we should write some docu -- the id of the creature we are attacking, following, etc. focus = 0 talk_start = 0 target = 0 following = false attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(id, stackpos) if id == focus then focus = 0 selfSay("Goodbye, then.") end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) if msgcontains(msg, 'hi') and focus == 0 and getDistanceToCreature(cid) < 3 then selfSay('Hello, ' .. creatureGetName(cid) .. '! I sell blank runes.') focus = cid talk_start = os.clock() end if msgcontains(msg, 'hello') and focus == 0 and getDistanceToCreature(cid) < 3 then selfSay('Hello, ' .. creatureGetName(cid) .. '! I sell blank runes and manafluids.') focus = cid talk_start = os.clock() end if msgcontains(msg, 'heal') and focus == cid then selfSay('Sorry, ' .. creatureGetName(cid) .. '! I cannot heal you.') focus = 0 talk_start = 0 end if msgcontains(msg, 'manafluid') and focus == cid then sell(cid,2969,3121,100,100,"Here you are.","You need 100 gold.") talk_start = os.clock() end if msgcontains(msg, 'mf') and focus == cid then sell(cid,2969,3121,100,100,"Here you are.","You need 100 gold.") talk_start = os.clock() end if msgcontains(msg, 'mana fluid') and focus == cid then sell(cid,2969,3121,100,100,"Here you are.","You need 100 gold.") talk_start = os.clock() end end function onCreatureChangeOutfit(creature) end function onThink() if (os.clock() - talk_start) > 40 then if focus > 0 then selfSay('Who is the next?...') end focus = 0 end --nothing special has happened --but perhaps we want to walk around a bit? if focus == 0 then cx, cy, cz = selfGetPosition() randmove = math.random(1,50) if randmove == 1 then nx = cx + 1 end if randmove == 2 then nx = cx - 1 end if randmove == 3 then ny = cy + 1 end if randmove == 4 then ny = cy - 1 end if randmove >= 5 then nx = cx ny = cy end moveToPosition(nx, ny, cz) --summons = 30 --summons2 = 30 end end e é isso ai espero que gostem dai apouco vo por um codigo para troca dinhero dando 2 click no dinhero mais to no trampo mais é isso ai flw se naum gosta naum comenta Link para o comentário https://xtibia.com/forum/topic/1167-mana-fluid-runes/ Compartilhar em outros sites More sharing options...
Pizzamama 0 Postado Setembro 24, 2005 Share Postado Setembro 24, 2005 Pow qndu eu falo "MF" ou "MANA FLUID" cai o server =/ arruma issu ae por favor Link para o comentário https://xtibia.com/forum/topic/1167-mana-fluid-runes/#findComment-5283 Compartilhar em outros sites More sharing options...
CorpsCool 0 Postado Setembro 26, 2005 Autor Share Postado Setembro 26, 2005 Voce coloco o codigo da mf la no items.xml <item id="3121" name="manafluid rune" type="rune" maglevel="1" weight="0.1" /> ou seu ot naum é 7.5 ou naum suporta o tipo de codigo do npc :lol: os codigos estao certo o erro deve ser algo que voce esqueceu de por Link para o comentário https://xtibia.com/forum/topic/1167-mana-fluid-runes/#findComment-5342 Compartilhar em outros sites More sharing options...
Guilherme Schafer 0 Postado Outubro 9, 2005 Share Postado Outubro 9, 2005 mas só da pra usa uma vez a runa, não tem como fazer pra usar mais não? Link para o comentário https://xtibia.com/forum/topic/1167-mana-fluid-runes/#findComment-6355 Compartilhar em outros sites More sharing options...
x9kill 1 Postado Outubro 9, 2005 Share Postado Outubro 9, 2005 guilherme para dechar a runa infinita vc tem q deixar assim no arquivo mf.lua function onUse(cid, item, frompos, item2, topos) mag = getPlayerMagLevel(cid) if mag >= 3 then doSendMagicEffect(topos,1) doPlayerSay(cid,"Ahhhh! Fresh mana fluid!",16) doPlayerAddMana(cid, 150) if item.type > 1 then doChangeTypeItem(item.uid,item.type-1) else doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.") end return 1 end Link para o comentário https://xtibia.com/forum/topic/1167-mana-fluid-runes/#findComment-6358 Compartilhar em outros sites More sharing options...
Guilherme Schafer 0 Postado Outubro 11, 2005 Share Postado Outubro 11, 2005 thanks fi, me ajudo pa kraio XD Link para o comentário https://xtibia.com/forum/topic/1167-mana-fluid-runes/#findComment-6568 Compartilhar em outros sites More sharing options...
CorpsCool 0 Postado Outubro 13, 2005 Autor Share Postado Outubro 13, 2005 Para para 100x é so edita o npc para vende exemplo: if msgcontains(msg, 'manafluid') and focus == cid then sell(cid,2969,3121,100,100,"Here you are.","You need 100 gold.") talk_start = os.clock() end Link para o comentário https://xtibia.com/forum/topic/1167-mana-fluid-runes/#findComment-6926 Compartilhar em outros sites More sharing options...
CorpsCool 0 Postado Outubro 24, 2005 Autor Share Postado Outubro 24, 2005 Movi pra ca porque tava no luga errado Link para o comentário https://xtibia.com/forum/topic/1167-mana-fluid-runes/#findComment-11024 Compartilhar em outros sites More sharing options...
bozolino 0 Postado Outubro 29, 2005 Share Postado Outubro 29, 2005 criei a runa mas ela eh uma blank rune q qd c da look diz"manafluid rune", mas eh uma blank rune e nao da pra usar,nem tem a aparencia da runa de manafluid, oq deu errado? Link para o comentário https://xtibia.com/forum/topic/1167-mana-fluid-runes/#findComment-12256 Compartilhar em outros sites More sharing options...
CorpsCool 0 Postado Outubro 29, 2005 Autor Share Postado Outubro 29, 2005 de certo voce coloco as paradas ali do items.xml errado no lugar da blank rune siga os codigos certin Link para o comentário https://xtibia.com/forum/topic/1167-mana-fluid-runes/#findComment-12266 Compartilhar em outros sites More sharing options...
bozolino 0 Postado Outubro 29, 2005 Share Postado Outubro 29, 2005 devo colokar o codigo do mf no lugar da blank rune, ou logo após? Link para o comentário https://xtibia.com/forum/topic/1167-mana-fluid-runes/#findComment-12355 Compartilhar em outros sites More sharing options...
bozolino 0 Postado Outubro 29, 2005 Share Postado Outubro 29, 2005 ah!! obrigado, consegui fazer a runa, mas uso ela uma vez, mas ja eh um começo =) vlw ae Link para o comentário https://xtibia.com/forum/topic/1167-mana-fluid-runes/#findComment-12356 Compartilhar em outros sites More sharing options...
CorpsCool 0 Postado Outubro 29, 2005 Autor Share Postado Outubro 29, 2005 Bota o npc pra vende mais 10x 50x 100x se voce quizer Link para o comentário https://xtibia.com/forum/topic/1167-mana-fluid-runes/#findComment-12357 Compartilhar em outros sites More sharing options...
bozolino 0 Postado Outubro 30, 2005 Share Postado Outubro 30, 2005 ah,sou novo ainda em mexer nas programacoes do ot, nao sei c saberia criar o npc =/...pra cria-lo, tem q ir em data/npc,criar uma pasta com o nome desejado e por akeles codigos q vc disse? c for axo q consigo! ...vlw :lol: Link para o comentário https://xtibia.com/forum/topic/1167-mana-fluid-runes/#findComment-12553 Compartilhar em outros sites More sharing options...
CorpsCool 0 Postado Outubro 31, 2005 Autor Share Postado Outubro 31, 2005 Num itendi o que voce quis falar Link para o comentário https://xtibia.com/forum/topic/1167-mana-fluid-runes/#findComment-12779 Compartilhar em outros sites More sharing options...
Posts Recomendados