Mana fluid runes

CorpsCool
em Actions e Talkactions
  • 1
  • 2

CorpsCool

Membro
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 06/09/05Posts: 43

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 :rolleyes:

[ASSINATURA IRREGULAR, REMOVIDA]

Pizzamama

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 24/09/05Posts: 4

Pow qndu eu falo "MF" ou "MANA FLUID" cai o server =/ arruma issu ae por favor

THE WORLD IS YOUR'S




SanTO AnDRé POWER
scarfaceom5.png

CorpsCool

Membro
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 06/09/05Posts: 43

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

[ASSINATURA IRREGULAR, REMOVIDA]

x9kill

Frésco ♪
avatar
Cavaleiro
Cavaleiro

INFOS

Grupo: CavaleiroRegistrado: 22/09/05Posts: 178Char no Tibia: Tibia sux.

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

do you wanna a suruba ?

-

vtc3wedzwocumnphw0if.jpg


brigads
arcazy
signmg5.jpg
-
flyw
test2vk7.png

p/ os mikows

gi8ng2hzulbxb0yagvue.jpg
-
le7qv4iz311k1ugg95.jpg

CorpsCool

Membro
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 06/09/05Posts: 43

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

[ASSINATURA IRREGULAR, REMOVIDA]

CorpsCool

Membro
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 06/09/05Posts: 43

Movi pra ca porque tava no luga errado :D

[ASSINATURA IRREGULAR, REMOVIDA]

bozolino

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/10/05Posts: 6

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?

CorpsCool

Membro
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 06/09/05Posts: 43

de certo voce coloco as paradas ali do items.xml errado no lugar da blank rune siga os codigos certin

[ASSINATURA IRREGULAR, REMOVIDA]

bozolino

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/10/05Posts: 6

devo colokar o codigo do mf no lugar da blank rune, ou logo após?

bozolino

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/10/05Posts: 6

ah!! obrigado, consegui fazer a runa, mas uso ela uma vez, mas ja eh um começo =)

vlw ae

CorpsCool

Membro
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 06/09/05Posts: 43

Bota o npc pra vende mais 10x 50x 100x se voce quizer

[ASSINATURA IRREGULAR, REMOVIDA]

bozolino

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/10/05Posts: 6

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:

CorpsCool

Membro
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 06/09/05Posts: 43

Num itendi o que voce quis falar

[ASSINATURA IRREGULAR, REMOVIDA]

  • 1
  • 2