Advanced Mana Rune

tibiaa4e
em Actions e Talkactions

tibiaa4e

Ex amante de Tibia
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 18/12/05Posts: 912Gênero: MasculinoChar no Tibia: Kohzete

Creditos:Colandus

 

Ela tem bastantes opções configuraveis no arkivo

num vou explica pq ta bem claro

+ se tiver duvidas eu falo :D

 

manarune.lua

-- 100% made by Colandus (Except exhaustion system).

-- If you edit on this script, be sure that you leave the credits to me, Colandus.

 

function onUse(cid, item, frompos, item2, topos)

       

        minMana = 30 -- How much mana minium will you get?

        maxMana = 70 -- How much mana max will you get?

        magToUse = 4 -- What magic level do you need to be to use the rune?

  runeID = 2270 -- Enter the item Id of the rune.

  loseCharges = true -- Write "true" if it shall lose charges. If not, then write something else such as "false".

  storeValue = 3567 -- Value where exhaust is saved.

  exhaustTime = 2 -- 1 = 1 second of exhaustion.

  animationColor = 41 -- The color of the "animation".

  mLvlLowMsg = "Your magic level is too low." -- Appears when player got too low magic level.

  missPlayerMsg = "You can only use this rune on players."-- Appears when you don't shoot on a player.

  exhaustMsg = "You are exhausted." -- Appears when you are exhausted.

 

  if item.itemid == runeID then

  if getThingfromPos({x=topos.x, y=topos.y, z=topos.z, stackpos=253}).itemid > 0 then

    if getPlayerMagLevel(cid) >= magToUse then

    if (exhaust(cid, storeValue, 1) > 0) then

      if loseCharges == true or loseCharges == True then

    if item.type > 1 then

      doChangeTypeItem(item.uid, item.type-1)

    else

      doRemoveItem(item.uid, 1)

    end

      end

    mana = math.random(minMana, maxMana)

    newMana = mana+getPlayerLevel(cid)+getPlayerMagLevel(cid)

    manaNow = getPlayerMana(item2.uid)

    doPlayerAddMana(item2.uid, 999999)

    manaMax = getPlayerMana(item2.uid)

    doPlayerAddMana(cid, - manaMax + manaNow)

    nMana = manaMax - manaNow

    if newMana > nMana then

    newMana = nMana

    end

    if getPlayerMana(item2.uid) == manaMax then

    if getPlayerPosition(cid).x == getPlayerPosition(item2.uid).x and getPlayerPosition(cid).y == getPlayerPosition(item2.uid).y then

      doPlayerSendCancel(item2.uid, "Your mana is already full.")

      doChangeTypeItem(item.uid, item.type)

      else

      doPlayerSendCancel(cid, "" .. getPlayerName(item2.uid) .. " mana is already full.")

      doChangeTypeItem(item.uid, item.type)

      end

    else

    if getPlayerPosition(cid).x == getPlayerPosition(item2.uid).x and getPlayerPosition(cid).y == getPlayerPosition(item2.uid).y then

    doSendMagicEffect(getPlayerPosition(cid), 12)

    doPlayerSendTextMessage(cid, 23, "You received " .. newMana .. " mana.")

    else

    doSendMagicEffect(getPlayerPosition(cid), 14)

    doSendMagicEffect(getPlayerPosition(item2.uid), 12)

    doPlayerSendTextMessage(item2.uid, 23, "You received " .. newMana .. " mana.")

    doPlayerSendTextMessage(cid, 23, "You gave " .. getPlayerName(item2.uid) .. " " .. newMana .. " mana.")

    end

    doPlayerAddMana(item2.uid, newMana)

    doSendAnimatedText(getPlayerPosition(item2.uid), newMana, animationColor)

    end

  else

    doPlayerSendCancel(cid, exhaustMsg)

  end

  else

    doSendMagicEffect(getPlayerPosition(cid), 2)

    doPlayerSendCancel(cid, mLvlLowMsg)

  end

  else

    doSendMagicEffect(getPlayerPosition(cid), 2)

                doPlayerSendCancel(cid, missPlayerMsg)

  end

  return 1

end

  end

 

 

-- Exhaustion system (Made by Alreth, bugfix by me)

-- DO NOT EDIT!

function exhaust(cid, storeValue, exhaustTime)

   

    newExhaust = os.time()

    oldExhaust = getPlayerStorageValue(cid, storeValue)

    if (oldExhaust == nil or oldExhaust < 0) then

        oldExhaust = 0

    end

    if (exhaustTime == nil or exhaustTime < 0) then

        exhaustTime = 1

    end

    diffTime = os.difftime(newExhaust, oldExhaust)

    if (diffTime >= exhaustTime) then

        setPlayerStorageValue(cid, storeValue, newExhaust)

        return 1

    else

        return 0

    end

end

 

e em action.xml

<action itemid="2270" script="manarune.lua" allowfaruse="1" blockwalls="0" />

 

funfa em 7.6 +

NAUM ESKEÇA SE FOR MUDAR A RUNE MUDAR NO ARQUIVO TBM

 

flws :hi:

Aposentado de OTserver e Tibia

Meus melhores tutoriais
Enciclopédia Pasta Data
Tutorial de quest

victor bacchi

avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 11/09/06Posts: 202

o.0 rox....vo estudar ela hehehe oia o colex ta lendo tbm jaja ele posta ^~ colex dps oia o meu la xD

voltando ao assunto...

muito boa chega dakela mana rune de da home e numca mais morrer....

coisas boas dela?

 

"you are exausted"

xDDD

 

sempre vc!

ty

//Bacchi

:hi:

Conheça o Marujos Marotos!

marujo.jpg

codorna

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 08/10/05Posts: 54

axu q da pra muda o min e max pra aumentar d acordo cum ml e level igual numa spell, axu q fika masi facil d usar assim recupera mais pra lv maior =P

arthurleao

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 18/06/07Posts: 19

Bom Scrip, ainda vou test :smile_positivo:

QUOTE
M.C.N.T.
Movimento comentem nos topicos!
Afinal, Não custa nada =D


---------ArThUr------------ Nããããããão!!!!!!!!! Sir Arthur!


[Spolier]_.-ºMeus Trabalhosº-._
Primeiro Trabalho rune deSummonmonter( não serve pra nada xD)
2º trabalho Runa de teleporte




Minha Fan Bar ^^:



SoU FaN De:






Quoteds ----------------\/

QUOTE
' ..::*PeDrO*::.. [p]¬¬p[c=!!%#@%$#e@%$@*¨%&%$¨%]dr~~[k=666\/*]o. diz:
KRa vc eh scripter neh?
Sir Arthur diz:
Sim
' ..::*PeDrO*::.. [p]¬¬p[c=!!%#@%$#e@%$@*¨%&%$¨%]dr~~[k=666\/*]o. diz:
entaum fais um script pra vitoria kla a boca
Sir Arthur diz:
uhahuahuauhahua Quoted

--------------------/\

wictor

Gamer 1337
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 11/01/08Posts: 9Char no Tibia: Wictor'rook

xD gratz pelo scripit

 

espero q funfe em 7.92

When this began                                                                      Inside of me
I had nothing to say                                                                 But all the vacancy the words revealed
And I get lost in the nothingness inside of me                    Is the only real thing that I've got left to feel
I was confused                                                                         Nothing to lose
And I let it all out to find                                                         Just stuck, hollow and alone
That I'm not the only person with these things in mind    And the fault is my own, and the fault is my own

__________________________________________________________________________________

bar1copy55nd.gif

Cleto

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 15/02/08Posts: 20Char no Tibia: GM Cleto

Funfa em 8.1??

 

 

se sim jah pego pq é bom! :winksmiley02: :smile_positivo:









Posts:

~~[10]~~ [X]
~~[20]~~ [X]
~~[30]~~ [X]
~~[40]~~ [ ]
~~[50]~~ [ ]
~~[60]~~ [ ]
~~[70]~~ [ ]
~~[80]~~ [ ]
~~[90]~~ [ ]
~~[100]~~ [ ]

Ery

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 29/07/06Posts: 16Char no Tibia: Não jogo mais.

Cara, funciona em todas as versões? Mesmo?! Tem que falar isso, né mano :/

tibia é uma m­erda! :D

gaarhen

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 23/03/08Posts: 12

muito bom, exatamente oq eu estava procurando

Runa com carga infinita eh muito sux, n tem graça

 

abraços

Darllan0

Darllan \___Bleach___/
avatar
Cavaleiro
Cavaleiro

INFOS

Grupo: CavaleiroRegistrado: 04/11/07Posts: 192Char no Tibia: Ranzor Raven

Aew so faltava issu ai msm cara

VLW agora vou ser seu fan ^^

Darllan Client Maker/Npc Maker
XD

Metas:
(x) 10 Posts
(x) 30 Posts
(x) 50 Posts
(x) 80 Posts
(x) 100 posts
(x) 200 Posts
(x) 250 Posts
(x) 280 Posts
(x) 300 Posts
(x) 350 Posts
( ) 380 Posts
( ) 400 Posts
( ) 450 Posts
( ) 480 Posts
( ) 500 Posts....

Sou Fan De:
<div style="margin:0px 0px 0px 0px">
<div class="smallfont" style="margin-bottom:0px">
<input type="button" value="Mostrar Spoil" style="width:80px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Esconder'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Mostrar Spoil'; }">
</div>
<div style="margin: 0px; padding: 0px; border: 0px inset;">
<div style="display: none;">
<img src="http://img156.imageshack.us/img156/2959/tymaoes949di7.png" border="0" class="linked-sig-image" />
<img src="http://img216.imageshack.us/img216/7688/sadfcopyyp9jm4df0.png" border="0" class="linked-sig-image" />
</div>
</div>
<img src="http://i492.photobucket.com/albums/rr287/Fliper_010/darllanxtibia.png" border="0" class="linked-sig-image" />

Ajudar é Humano e Tibiano =D:
<a href="http://s8.bitefight.com.pt/c.php?uid=95671" target="_blank">http://s8.bitefight.com.pt/c.php?uid=95671</a>

Te Ajudei ?, me ama?, me odeia? ou so que enfeitar sua assinatura? entao use
<img src="http://i492.photobucket.com/albums/rr287/Fliper_010/DarlanFANxtibia.png" border="0" class="linked-sig-image" />