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