Ir para conteúdo
  • 0

Spell De Buff Que Fique Saindo Efeito


nickissonlobo

Pergunta

7 respostass a esta questão

Posts Recomendados

  • 0

Cole na pasta DATA/BUUFFS/VOCAÇÃO DESEJADA um script.lua e dentro dele cole isso:

 

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

 

local level = getPlayerLevel(cid)

local mlevel = getPlayerMagLevel(cid)

 

local exhausted_seconds = 0

local exhausted_storagevalue = 10

 

local mana_minimum = 70000

local mana_maximum = 70000

 

local mana_add = math.random(mana_minimum, mana_maximum)

 

 

if(item.type >= 1) then

if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then

if(isPlayer(cid) == 1) then

doSendMagicEffect(topos,13)

doSendMagicEffect(topos,14)

doPlayerAddMana(cid, mana_add)

doPlayerAddHealth(cid, mana_add)

doPlayerSay(cid, 'Senzu Normal!', TALKTYPE_ORANGE_1)

setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)

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

else

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exchausted.")

end

else

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exhausted.")

end

else

if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exhausted.")

else

if(isPlayer(cid) == 1) then

doSendMagicEffect(topos,13)

doSendMagicEffect(topos,14)

doPlayerAddMana(cid, mana_add)

doPlayerAddHealth(cid, mana_add*1.5)

doPlayerSay(cid,"Senzu Normal!",1)

setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)

doRemoveItem(item.uid, 1)

else

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exchausted.")

end

end

end

 

return 1

end

 

e em buffs.xml coloca isso

 

<buff name="NOME DESEJADO" src=" nome do arquivo que esta na pasta">

 

pronto AJUDEI PORRA? intao +REP beurk.gif

 

Ta ae o script cola qualquer outro arquivo.lua na pasta buffs e cole esse script:

 

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

 

local level = getPlayerLevel(cid)

local mlevel = getPlayerMagLevel(cid)

 

local exhausted_seconds = 0

local exhausted_storagevalue = 10

 

local mana_minimum = 70000

local mana_maximum = 70000

 

local mana_add = math.random(mana_minimum, mana_maximum)

 

 

if(item.type >= 1) then

if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then

if(isPlayer(cid) == 1) then

doSendMagicEffect(topos,13)

doSendMagicEffect(topos,14)

doPlayerAddMana(cid, mana_add)

doPlayerAddHealth(cid, mana_add)

doPlayerSay(cid, 'Senzu Normal!', TALKTYPE_ORANGE_1)

setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)

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

else

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exchausted.")

end

else

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exhausted.")

end

else

if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exhausted.")

else

if(isPlayer(cid) == 1) then

doSendMagicEffect(topos,13)

doSendMagicEffect(topos,14)

doPlayerAddMana(cid, mana_add)

doPlayerAddHealth(cid, mana_add*1.5)

doPlayerSay(cid,"Senzu Normal!",1)

setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)

doRemoveItem(item.uid, 1)

else

doSendMagicEffect(frompos, CONST_ME_POFF)

doPlayerSendCancel(cid, "You are exchausted.")

end

end

end

 

return 1

end

 

e reinicia o server e pronto.

Link para o comentário
Compartilhar em outros sites

  • 0

Em spells/spell.xml add essa tag:

<instant name="Susano" words="susano" aggressive="0" selftarget="1" lvl="200" mana="1000"  exhaustion="1500" event="script" value="susano.lua">

 

Em spells/scripts/susano.lua:

local tempo = 60 -- tempo em segundos.
local effect = {136} -- effect no player

local ml = 6 -- quantos ira aumentar o skill de ML
local skillfist = 5 -- quantos ira aumentar o skill de Fist
local skillsword = 5 -- quantos ira aumentar o skill de Sword
local skillaxe = 5 -- quantos ira aumentar o skill de Axe
local skillclub = 5 -- quantos ira aumentar o skill de Club
local skilldistance = 5 -- quantos ira aumentar o skill de Distance
local skillshield = 5 -- quantos ira aumentar o skill de Shield
local health = 150 -- A cada 1 segundo quantos aumentar de vida
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml)
setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, skillfist)
setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, skillsword)
setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, skillaxe)
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield)
setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit)
setCombatCondition(combat, condition)

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_SPEED, 250)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)

local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)
setCombatCondition(combat, condition)

function magicEffect(tempo2,tempo3,cid)
if (isCreature(cid)) then
if getPlayerStorageValue(cid, 102053) > 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then
	for i=1, #effect do
	local position = {x=getPlayerPosition(cid).x+1, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}
doSendMagicEffect(position, effect[i])
	end
end
end
end

function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 102053) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then
doCombat(cid, combat, var)
tempo2 = 0
while (tempo2 ~= (tempo*1000)) do
	addEvent(magicEffect, tempo2, tempo2, tempo*1000, cid)
	tempo2 = tempo2 + 300
end
setPlayerStorageValue(cid, 102053,1) -- storage verifica transformado, quando = 1 player esta transformado.
else
doPlayerSendCancel(cid, "Voce ja esta com Buff.")
end
end

Editado por milbradt
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...