Por TaaG, 31 de mai. de 2013 em Actions e Talkactions
info
Grupo: Artesão
Registrado: 19/11/12
Posts: 113
Reputação: +63
Não sei se tem já este tutorial mas.. Nunca se sabe rsrs. Vamo lá.
Vá na pasta actions/script/ crie um arquivo chamado rarecandy.lua
depois vá na pasta actions/ actions.xml
Cole isto <action itemid="6569" event="script" value="rarecandy.lua" allowfaruse="1"/>
e Depois Cole isto dentro do arquivo rarecandy.lua
---Elixir of Experience--- function onUse(cid, item, fromPosition, itemEx, toPosition) explevel = getExperienceForLevel(getPlayerLevel(cid)) explevel2 = getExperienceForLevel(getPlayerLevel(cid)+1) exp = (explevel2 - explevel)/100 random = math.random(100,100) expfinal = random*exp soul = getPlayerSoul(cid) if getPlayerLevel(cid) >= 35 then doPlayerSendTextMessage(cid,19,"Voce recebeu "..random.."% de experiencia, ("..expfinal.." points).") doPlayerAddExp(cid,expfinal) doPlayerAddSoul(cid, -(250)) doSendAnimatedText(getPlayerPosition(cid), expfinal, TEXTCOLOR_WHITE) doSendMagicEffect(getPlayerPosition(cid),12) doRemoveItem(item.uid,1) else doPlayerSendTextMessage(cid,22,"Somente level 35+ podem comer deste doce!") end return true end
function onUse(cid, item, fromPosition, itemEx, toPosition)
explevel = getExperienceForLevel(getPlayerLevel(cid))
explevel2 = getExperienceForLevel(getPlayerLevel(cid)+1)
exp = (explevel2 - explevel)/100
random = math.random(100,100)
expfinal = random*exp
soul = getPlayerSoul(cid)
if getPlayerLevel(cid) >= 35 then
doPlayerSendTextMessage(cid,19,"Voce recebeu "..random.."% de experiencia, ("..expfinal.." points).")
doPlayerAddExp(cid,expfinal)
doPlayerAddSoul(cid, -(250))
doSendAnimatedText(getPlayerPosition(cid), expfinal, TEXTCOLOR_WHITE)
doSendMagicEffect(getPlayerPosition(cid),12)
doRemoveItem(item.uid,1)
else
doPlayerSendTextMessage(cid,22,"Somente level 35+ podem comer deste doce!")
end
return true
PS: Não coloquei prints por não ser eu que criei este tópico.
Créditos: The Legend Youtube - 50% TaaG - 40% Desconhecido - 10%
Créditos:
The Legend Youtube - 50%
TaaG - 40%
Desconhecido - 10%
Editado Junho 1 por TaaG
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino
Amigo, como disse no outro tópico, isso não é um tutorial, movido para seção de códigos prontos.
info
Grupo: Artesão
Registrado: 19/11/12
Posts: 113
Reputação: +63
Não sei se tem já este tutorial mas.. Nunca se sabe rsrs. Vamo lá.
Vá na pasta actions/script/ crie um arquivo chamado rarecandy.lua
depois vá na pasta actions/ actions.xml
Cole isto <action itemid="6569" event="script" value="rarecandy.lua" allowfaruse="1"/>
e Depois Cole isto dentro do arquivo rarecandy.lua
PS: Não coloquei prints por não ser eu que criei este tópico.
Editado Junho 1 por TaaG