AN
action

[Action] Exp Ring Por Click

Por Animal Pak, 29 de nov. de 2011 em Actions e Talkactions

tibia
script
otserv
3
1.2k
Animal PakA
29 de novembro de 2011 às 14:50

[Action] Exp Ring Por Click

 

Ring Usado:

Death Ring:

Death_Ring.gif

 

Primeiro em actions.xml adcione isso:

<action itemid="6300" event="script" value="expring.lua"/>

<action itemid="6301" event="script" value="expringend.lua"/>

 

Na pasta actions/scripts crie um arquivo chamado expring e dentro coloque isso:

local config = {

rate = 1.5,

}

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

if doPlayerRemoveMoney(cid, 20000) then

itemEx=itemid == 6300

doCreatureSay(cid, "Sua exp extra está ativada! Sua exp agora é: " .. config.rate .. "x.", TALKTYPE_ORANGE_1, true, cid)

doPlayerSetExperienceRate(cid, config.rate)

doTransformItem(item.uid,6301)

else

doCreatureSay(cid, "Você não tem money suficiente para ativar a exp extra !", TALKTYPE_ORANGE_1, true, cid)

end

return true

end

 

Agora na mesma pasta crie um arquivo chamado expringend e dentro coloque isso:

if(item.itemid == 6301) then

doPlayerSetExperienceRate(cid, 1.0)

doCreatureSay(cid, "Sua exp extra acabou.",

 

TALKTYPE_ORANGE_1,true,cid)

doTransformItem(item.uid,6300)

end

end

 

Agora no items.xml coloque:

<item id="6300" article="a" name="disabled exp ring">
  <attribute key="weight" value="80" />
  <attribute key="slotType" value="ring" />
  <attribute key="transformEquipTo" value="6301" />
  <attribute key="stopduration" value="1" />
  <attribute key="showduration" value="0" />
  </item>
  <item id="6301" article="a" name="enabled exp ring">
  <attribute key="weight" value="80" />
  <attribute key="slotType" value="ring" />
  <attribute key="decayTo" value="0" />
  <attribute key="transformDeEquipTo" value="6300" />
  <attribute key="duration" value="480" />
  <attribute key="armor" value="1" />
  <attribute key="showduration" value="0" />
  </item>

Créditos:

xDoDox.

Editado Novembro 29 por SmoOkeR

30 de novembro de 2011 às 10:13

da hora vou por aki no ot e da uma editada pra ver !

2 meses depois...
conollyC
15 de janeiro de 2012 às 21:35

nao funcionou porq os script dos items estão incorretos !