Ir para conteúdo
  • 0

Spell Que Muda Vocação....


juan500

Pergunta

12 respostass a esta questão

Posts Recomendados

  • 0

Tente essa ae:

 

 

local outfit = {lookType = 32} -- Roupa que ira transformar no caso seu corpo ficara em choque

local tempo = 60 * 1000 -- Tempo, nesse caso esta 60 segundos Lembrando que 1000 = 1 segundo

 

local ml = 2 -- quantos ira aumentar o skill de ML

local skillfist = 2 -- quantos ira aumentar o skill de Fist

local skillsword = 2 -- quantos ira aumentar o skill de Sword

local skillaxe = 2 -- quantos ira aumentar o skill de Axe

local skillclub = 2 -- quantos ira aumentar o skill de Club

local skilldistance = 2 -- quantos ira aumentar o skill de Distance

local skillshield = 2 -- quantos ira aumentar o skill de Shield

local health = 20 -- A cada 1 segundo quantos aumentar de vida

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_EFFECT, 48)

setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 48)

setCombatParam(combat2, COMBAT_PARAM_AGGRESSIVE, 0)

 

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 48)

setCombatParam(combat3, COMBAT_PARAM_AGGRESSIVE, 0)

 

local combat4 = createCombatObject()

setCombatParam(combat4, COMBAT_PARAM_EFFECT, 48)

setCombatParam(combat4, COMBAT_PARAM_AGGRESSIVE, 0)

 

local combat5 = createCombatObject()

setCombatParam(combat5, COMBAT_PARAM_EFFECT, 48)

setCombatParam(combat5, COMBAT_PARAM_AGGRESSIVE, 0)

 

local combat6 = createCombatObject()

setCombatParam(combat6, COMBAT_PARAM_EFFECT, 48)

setCombatParam(combat6, COMBAT_PARAM_AGGRESSIVE, 0)

 

local combat7 = createCombatObject()

setCombatParam(combat7, COMBAT_PARAM_EFFECT, 48)

setCombatParam(combat7, COMBAT_PARAM_AGGRESSIVE, 0)

 

local combat8 = createCombatObject()

setCombatParam(combat8, COMBAT_PARAM_EFFECT, 48)

setCombatParam(combat8, COMBAT_PARAM_AGGRESSIVE, 0)

 

local combat9 = createCombatObject()

setCombatParam(combat9, COMBAT_PARAM_EFFECT, 48)

setCombatParam(combat9, COMBAT_PARAM_AGGRESSIVE, 0)

 

local condition = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition, CONDITION_PARAM_TICKS, tempo)

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)

setCombatCondition(combat2, condition)

setCombatCondition(combat3, condition)

setCombatCondition(combat4, condition)

setCombatCondition(combat5, condition)

setCombatCondition(combat6, condition)

setCombatCondition(combat7, condition)

setCombatCondition(combat8, condition)

setCombatCondition(combat9, condition)

 

local condition = createConditionObject(CONDITION_HASTE)

setConditionParam(condition, CONDITION_PARAM_SPEED, 250)

setConditionParam(condition, CONDITION_PARAM_TICKS, tempo)

setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)

setCombatCondition(combat, condition)

setCombatCondition(combat2, condition)

setCombatCondition(combat3, condition)

setCombatCondition(combat4, condition)

setCombatCondition(combat5, condition)

setCombatCondition(combat6, condition)

setCombatCondition(combat7, condition)

setCombatCondition(combat8, condition)

setCombatCondition(combat9, condition)

 

local condition = createConditionObject(CONDITION_REGENERATION)

setConditionParam(condition, CONDITION_PARAM_SUBID, 1)

setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)

setConditionParam(condition, CONDITION_PARAM_TICKS, tempo)

setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)

setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)

setCombatCondition(combat, condition)

setCombatCondition(combat2, condition)

setCombatCondition(combat3, condition)

setCombatCondition(combat4, condition)

setCombatCondition(combat5, condition)

setCombatCondition(combat6, condition)

setCombatCondition(combat7, condition)

setCombatCondition(combat8, condition)

setCombatCondition(combat9, condition)

 

local sys = createConditionObject(CONDITION_OUTFIT)

setConditionParam(sys, CONDITION_PARAM_TICKS, tempo)

addOutfitCondition(sys, outfit)

setCombatCondition(combat, sys)

 

local sys2 = createConditionObject(CONDITION_OUTFIT)

setConditionParam(sys2, CONDITION_PARAM_TICKS, tempo)

addOutfitCondition(sys2, {lookType = 442})

setCombatCondition(combat2, sys2)

 

local sys3 = createConditionObject(CONDITION_OUTFIT)

setConditionParam(sys3, CONDITION_PARAM_TICKS, tempo)

addOutfitCondition(sys3, {lookType = 447})

setCombatCondition(combat3, sys3)

 

local sys4 = createConditionObject(CONDITION_OUTFIT)

setConditionParam(sys4, CONDITION_PARAM_TICKS, tempo)

addOutfitCondition(sys4, {lookType = 452})

setCombatCondition(combat4, sys4)

 

local sys5 = createConditionObject(CONDITION_OUTFIT)

setConditionParam(sys5, CONDITION_PARAM_TICKS, tempo)

addOutfitCondition(sys5, {lookType = 457})

setCombatCondition(combat5, sys5)

 

local sys6 = createConditionObject(CONDITION_OUTFIT)

setConditionParam(sys6, CONDITION_PARAM_TICKS, tempo)

addOutfitCondition(sys6, {lookType = 462})

setCombatCondition(combat6, sys6)

 

local sys7 = createConditionObject(CONDITION_OUTFIT)

setConditionParam(sys7, CONDITION_PARAM_TICKS, tempo)

addOutfitCondition(sys7, {lookType = 467})

setCombatCondition(combat7, sys7)

 

local sys8 = createConditionObject(CONDITION_OUTFIT)

setConditionParam(sys8, CONDITION_PARAM_TICKS, tempo)

addOutfitCondition(sys8, {lookType = 472})

setCombatCondition(combat8, sys8)

 

local sys9 = createConditionObject(CONDITION_OUTFIT)

setConditionParam(sys9, CONDITION_PARAM_TICKS, tempo)

addOutfitCondition(sys9, {lookType = 477})

setCombatCondition(combat9, sys9)

 

 

 

function onCastSpell(cid, var)

setPlayerStorageValue(cid, 102050,0)

if getPlayerStorageValue(cid, 102059) ~= 1 then

if (getCreatureOutfit(cid).lookType == 441 or getCreatureOutfit(cid).lookType == 442 or getCreatureOutfit(cid).lookType == 443 or getCreatureOutfit(cid).lookType == 444 or getCreatureOutfit(cid).lookType == 445) then

return doCombat(cid, combat2, var)

end

if (getCreatureOutfit(cid).lookType == 446 or getCreatureOutfit(cid).lookType == 447 or getCreatureOutfit(cid).lookType == 448 or getCreatureOutfit(cid).lookType == 449 or getCreatureOutfit(cid).lookType == 450) then

return doCombat(cid, combat3, var)

end

if (getCreatureOutfit(cid).lookType == 451 or getCreatureOutfit(cid).lookType == 452 or getCreatureOutfit(cid).lookType == 453 or getCreatureOutfit(cid).lookType == 454 or getCreatureOutfit(cid).lookType == 455) then

return doCombat(cid, combat4, var)

end

if (getCreatureOutfit(cid).lookType == 456 or getCreatureOutfit(cid).lookType == 457 or getCreatureOutfit(cid).lookType == 458 or getCreatureOutfit(cid).lookType == 459 or getCreatureOutfit(cid).lookType == 460) then

return doCombat(cid, combat5, var)

end

if (getCreatureOutfit(cid).lookType == 461 or getCreatureOutfit(cid).lookType == 462 or getCreatureOutfit(cid).lookType == 463 or getCreatureOutfit(cid).lookType == 464 or getCreatureOutfit(cid).lookType == 465) then

return doCombat(cid, combat6, var)

end

if (getCreatureOutfit(cid).lookType == 466 or getCreatureOutfit(cid).lookType == 467 or getCreatureOutfit(cid).lookType == 468 or getCreatureOutfit(cid).lookType == 469 or getCreatureOutfit(cid).lookType == 470) then

return doCombat(cid, combat7, var)

end

if (getCreatureOutfit(cid).lookType == 471 or getCreatureOutfit(cid).lookType == 472 or getCreatureOutfit(cid).lookType == 473 or getCreatureOutfit(cid).lookType == 474 or getCreatureOutfit(cid).lookType == 475) then

return doCombat(cid, combat8, var)

end

if (getCreatureOutfit(cid).lookType == 476 or getCreatureOutfit(cid).lookType == 477 or getCreatureOutfit(cid).lookType == 478 or getCreatureOutfit(cid).lookType == 479 or getCreatureOutfit(cid).lookType == 480) then

return doCombat(cid, combat9, var)

end

 

return doCombat(cid, combat, var)

else

setPlayerStorageValue(cid, 102050,1)

doPlayerSendCancel(cid, "Desculpe.. agora não pode se transformar.")

end

end

 

 

Link para o comentário
Compartilhar em outros sites

  • 0

@Overllord

 

Ae #Milbradt, Entra No Naruto Preciso Fala Com Você.. Urgente :D

 

Rapaz, isso é flood. Reportado.

 

@juan500

 

Fiz um aqui via talk. Tenta ai.

 

talkactions.xml:

 

<talkaction words="!transform" script="transform.lua"/>

 

transform.lua:

 

-- Script by LuckOake

function onSay(cid, words)

local waittime = 20 -- Tempo de exhaustion

local storage = 6811

local tempo = 10 -- Tempo em segundos até a vocation sumir

local vocation = 10 -- Vocation ID

local mana = 100 -- Mana necessária

local outfit = {lookType = 123, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Outfit

 

if exhaustion.check(cid, storage) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.") return true

elseif getPlayerMana(cid) < mana then

doPlayerSendCancel(cid, "Not enough mana.") return true

end

 

exhaustion.set(cid, storage, waittime)

doPlayerAddMana(cid, -mana)

setPlayerStorageValue(cid, 8152, getPlayerVocation(cid))

doSetCreatureOutfit(cid, outfit, -1)

doPlayerSetVocation(cid, vocation)

addEvent(doPlayerSetVocation, tempo*1000, cid, getPlayerStorageValue(cid, 8152))

addEvent(doRemoveCondition, tempo*1000, cid, CONDITION_OUTFIT)

return true

end

 

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

  • 0

@Overllord

 

Ae #Milbradt, Entra No Naruto Preciso Fala Com Você.. Urgente :D

 

Rapaz, isso é flood. Reportado.

 

@juan500

 

Fiz um aqui via talk. Tenta ai.

 

talkactions.xml:

 

<talkaction words="!transform" script="transform.lua"/>

 

transform.lua:

 

-- Script by LuckOake

function onSay(cid, words)

local waittime = 20 -- Tempo de exhaustion

local storage = 6811

local tempo = 10 -- Tempo em segundos até a vocation sumir

local vocation = 10 -- Vocation ID

local mana = 100 -- Mana necessária

local outfit = {lookType = 123, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Outfit

 

if exhaustion.check(cid, storage) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.") return true

elseif getPlayerMana(cid) < mana then

doPlayerSendCancel(cid, "Not enough mana.") return true

end

 

exhaustion.set(cid, storage, waittime)

doPlayerAddMana(cid, -mana)

setPlayerStorageValue(cid, 8152, getPlayerVocation(cid))

doSetCreatureOutfit(cid, outfit, -1)

doPlayerSetVocation(cid, vocation)

addEvent(doPlayerSetVocation, tempo*1000, cid, getPlayerStorageValue(cid, 8152))

addEvent(doRemoveCondition, tempo*1000, cid, CONDITION_OUTFIT)

return true

end

 

 

e onde coloco as vocações que poderão usa a transform??????

Link para o comentário
Compartilhar em outros sites

  • 0

voce apenas por o script láh e onde tem local vocation = 10 você poe a vocaiton e aqui o outfit local outfit = {lookType = 123, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Outfit voce ver o outfit, dando /newtype ou com o dat editor. tendeu ?

Link para o comentário
Compartilhar em outros sites

  • 0

@juan500

 

Esqueci de configurar isso.

 

 

-- Script by LuckOake

function onSay(cid, words)

local waittime = 20 -- Tempo de exhaustion

local storage = 6811

local tempo = 10 -- Tempo em segundos até a vocation sumir

local vocation = 10 -- Vocation ID

local mana = 100 -- Mana necessária

local outfit = {lookType = 123, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Outfit

local useable_vocs = {"Elder Druid", "Elite Knight"} -- Vocations que podem usar a talk

 

if not isInArray(useable_vocs, getPlayerVocationName(cid))

doPlayerSendCancel(cid, "Your vocation cannot use this spell.") return true

end

 

if exhaustion.check(cid, storage) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.") return true

elseif getPlayerMana(cid) < mana then

doPlayerSendCancel(cid, "Not enough mana.") return true

end

 

exhaustion.set(cid, storage, waittime)

doPlayerAddMana(cid, -mana)

setPlayerStorageValue(cid, 8152, getPlayerVocation(cid))

doSetCreatureOutfit(cid, outfit, -1)

doPlayerSetVocation(cid, vocation)

addEvent(doPlayerSetVocation, tempo*1000, cid, getPlayerStorageValue(cid, 8152))

addEvent(doRemoveCondition, tempo*1000, cid, CONDITION_OUTFIT)

return true

end

 

 

Configure aqui:

 

local useable_vocs = {"Elder Druid", "Elite Knight"} -- Vocations que podem usar a talk

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

×
×
  • Criar Novo...