Ir para conteúdo

Script Reset


lfelipebsilva05

Posts Recomendados

galera eu tenho um scrip de reset vocation aqui...

 

 

queria fazer 8 reset vocation dele

ai eu queria saber qual a storage de cada vocation

pra eu poder mudar no scipt

obg

 

 

 

script e esse

 

 

 

--[[ Reset System to Vocation, Mana and Life Por:

 

]]

 

function onSay(cid, words, param)

 

conf = {

 

pid = getPlayerGUID(cid), -- Não Mexer.

storage = 2323, -- Storage [Valor]

needPz = true, -- Precisa estar em Pz pra resetar? [true, false]

needPa = false, -- Precisa ser Premium Account Pra resetar? [true, false]

withe = false, -- Players com Pk Withe podem resetar? [true, false]

red = false, -- Players com Pk Red pode resetar? [true, false]

battle = false, -- Players precisam estar sem battle pra resetar? [true, false]

addLimite = true, -- Abilitar Limite de Resets? [true / false]

 

Reset = {

 

Level = 150000, -- Level Necessário para Resetar. [Valor]

backLvl = 80000, -- Level que voltará após o Reset. [Valor]

limite = 4, -- Máximo de resets que um player pode chegar. [Valor]

time = 5, -- Tempo para o Player deslogar, em segundos. [Valor]

vocationID = 12 -- Id da vocação Nova. [Valor]

 

},

 

}

 

--[Reset]--

 

function onReset(cid)

 

reset = getResets(cid)

setPlayerStorageValue(cid, conf.storage,reset+4)

setPlayerPromotionLevel(cid, getPlayerPromotionLevel(cid)+1)

doPlayerSetVocation(cid, conf.Reset.vocationID)

doRemoveCreature(cid)

 

db.executeQuery("UPDATE `players` SET `level` = "..conf.Reset.backLvl..", `experience` = 0 WHERE `id` = "..conf.pid)

 

 

return 1

 

end

 

function getResets(cid)

Resets = getPlayerStorageValue(cid, conf.storage)

 

if Resets <= 0 then

resets = 0

end

return Resets

end

 

local reseting =" -= Sucesso! Você será deslogado em "..conf.Reset.time.." segundos. =-"

 

if getPlayerPromotionLevel(cid) == 1 then

doPlayerSendTextMessage(cid, 22,"-= Você Deve Evoluir Para Outra Vocação ! =-")

return 1

end

 

if getResets(cid) == 1 then

doPlayerSendTextMessage(cid, 22,"-= Você Já Éh Espadachim! =-")

return 1

end

 

if (getPlayerPromotionLevel(cid) == 0) then

doPlayerSendTextMessage(cid,22,"-= Você Precisa Ser Promovido para Evoluir =-")

return TRUE

end

 

if(conf.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then

doPlayerSendTextMessage(cid,22,"- Você Precisa estar em Protection Zone Para Evoluir -")

return TRUE

elseif(conf.needPa == true) and not isPremium(cid) then

doPlayerSendTextMessage(cid,22,"- Você Precisa ser Premium Account Para Evoluir -")

return 1

 

elseif(conf.withe == false) and (getCreatureSkullType(cid) == 3) then

doPlayerSendTextMessage(cid,22,"- Você não pode Evoluir em condições de PK Withe -")

return 1

 

elseif(conf.red == false) and (getCreatureSkullType(cid) == 4) then

doPlayerSendTextMessage(cid,22,"- Você não pode Evoluir em condições de PK Red -")

return 1

 

elseif(conf.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then

doPlayerSendTextMessage(cid,22,"- Você Precisa estar sem Battle para Evoluir. -")

return 1

end

 

if getPlayerLevel(cid) >= conf.Reset.Level then

doPlayerPopupFYI(cid, reseting)

addEvent(onReset, conf.Reset.time*1000, cid)

else

doPlayerSendTextMessage(cid, 22, "-= Level Necessário Para a Evolução: ["..conf.Reset.Level.."]. Faltam "..conf.Reset.Level-getPlayerLevel(cid).." Level's Para Você Evoluir.=-")

end

return TRUE

 

end

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

o storage esta fixo para todas as vocs.

mas podes utilizar asism por exemplo

storage_knight = 2323,

storage_sorc = 2324

 

e asism so editar no script pra cada vocation.

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

galera e que tipo

tenho systema de reset

ai tpw

minhas vocation ta assim.

mais nao funfa

 

vocation.xml

 

 

<?xml version="1.0" encoding="UTF-8"?>

<vocations>

<vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>

<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="1">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>

<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="2">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>

<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="5" gainmanaticks="4" gainmanaamount="5" manamultiplier="1.4" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="3">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>

<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" manamultiplier="3.0" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="4">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>

<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="5" name="Mixed Assassin" description="an Mixed Assassin" needpremium="0" gaincap="10" gainhp="20" gainmana="20" gainhpticks="2" gainhpamount="100" gainmanaticks="2" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="1">

<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>

<skill id="0" multiplier="1.0"/>

<skill id="1" multiplier="1.0"/>

<skill id="2" multiplier="1.0"/>

<skill id="3" multiplier="1.0"/>

<skill id="4" multiplier="1.0"/>

<skill id="5" multiplier="1.0"/>

<skill id="6" multiplier="1.0"/>

</vocation>

<vocation id="6" name="Mixed Assassin" description="an Mixed Assassin" needpremium="0" gaincap="10" gainhp="20" gainmana="20" gainhpticks="2" gainhpamount="100" gainmanaticks="2" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="2">

<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>

<skill id="0" multiplier="1.0"/>

<skill id="1" multiplier="1.0"/>

<skill id="2" multiplier="1.0"/>

<skill id="3" multiplier="1.0"/>

<skill id="4" multiplier="1.0"/>

<skill id="5" multiplier="1.0"/>

<skill id="6" multiplier="1.0"/>

</vocation>

<vocation id="7" name="Mixed Assassin" description="an Mixed Assassin" needpremium="0" gaincap="10" gainhp="20" gainmana="20" gainhpticks="2" gainhpamount="100" gainmanaticks="2" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="3">

<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>

<skill id="0" multiplier="1.0"/>

<skill id="1" multiplier="1.0"/>

<skill id="2" multiplier="1.0"/>

<skill id="3" multiplier="1.0"/>

<skill id="4" multiplier="1.0"/>

<skill id="5" multiplier="1.0"/>

<skill id="6" multiplier="1.0"/>

</vocation>

<vocation id="8" name="Mixed Assassin" description="an Mixed Assassin" needpremium="0" gaincap="10" gainhp="20" gainmana="20" gainhpticks="2" gainhpamount="100" gainmanaticks="2" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="4">

<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>

<skill id="0" multiplier="1.0"/>

<skill id="1" multiplier="1.0"/>

<skill id="2" multiplier="1.0"/>

<skill id="3" multiplier="1.0"/>

<skill id="4" multiplier="1.0"/>

<skill id="5" multiplier="1.0"/>

<skill id="6" multiplier="1.0"/>

</vocation>

<vocation id="9" name="Spin Assasin" description="an Spin Assassin" needpremium="0" gaincap="10" gainhp="25" gainmana="25" gainhpticks="2" gainhpamount="110" gainmanaticks="2" gainmanaamount="110" manamultiplier="1.1" attackspeed="500" soulmax="900" gainsoulticks="15" fromvoc="8">

<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>

<skill id="0" multiplier="1.0"/>

<skill id="1" multiplier="1.0"/>

<skill id="2" multiplier="1.0"/>

<skill id="3" multiplier="1.0"/>

<skill id="4" multiplier="1.0"/>

<skill id="5" multiplier="1.0"/>

<skill id="6" multiplier="1.0"/>

</vocation>

<vocation id="10" name="Sacred Martyr" description="an Sacred Martyr" needpremium="0" gaincap="10" gainhp="30" gainmana="30" gainhpticks="2" gainhpamount="120" gainmanaticks="2" gainmanaamount="120" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="15" fromvoc="9">

<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>

<skill id="0" multiplier="1.0"/>

<skill id="1" multiplier="1.0"/>

<skill id="2" multiplier="1.0"/>

<skill id="3" multiplier="1.0"/>

<skill id="4" multiplier="1.0"/>

<skill id="5" multiplier="1.0"/>

<skill id="6" multiplier="1.0"/>

</vocation>

<vocation id="11" name="Lonely Star" description="an Lonely Star" needpremium="0" gaincap="10" gainhp="35" gainmana="35" gainhpticks="2" gainhpamount="130" gainmanaticks="2" gainmanaamount="130" manamultiplier="1.1" attackspeed="700" soulmax="200" gainsoulticks="15" fromvoc="10">

<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>

<skill id="0" multiplier="1.0"/>

<skill id="1" multiplier="1.0"/>

<skill id="2" multiplier="1.0"/>

<skill id="3" multiplier="1.0"/>

<skill id="4" multiplier="1.0"/>

<skill id="5" multiplier="1.0"/>

<skill id="6" multiplier="1.0"/>

</vocation>

<vocation id="12" name="Falling Star" description="an Falling Star" needpremium="0" gaincap="10" gainhp="40" gainmana="40" gainhpticks="2" gainhpamount="140" gainmanaticks="2" gainmanaamount="140" manamultiplier="1.1" attackspeed="600" soulmax="200" gainsoulticks="15" fromvoc="11">

<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>

<skill id="0" multiplier="1.0"/>

<skill id="1" multiplier="1.0"/>

<skill id="2" multiplier="1.0"/>

<skill id="3" multiplier="1.0"/>

<skill id="4" multiplier="1.0"/>

<skill id="5" multiplier="1.0"/>

<skill id="6" multiplier="1.0"/>

</vocation>

<vocation id="12" name="Hellborn Deathdriver" description="an Hellborn Deathdriver" needpremium="0" gaincap="10" gainhp="45" gainmana="45" gainhpticks="2" gainhpamount="200" gainmanaticks="2" gainmanaamount="200" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="12">

<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>

<skill id="0" multiplier="1.0"/>

<skill id="1" multiplier="1.0"/>

<skill id="2" multiplier="1.0"/>

<skill id="3" multiplier="1.0"/>

<skill id="4" multiplier="1.0"/>

<skill id="5" multiplier="1.0"/>

<skill id="6" multiplier="1.0"/>

</vocation>

<vocation id="13" name="Supreme Hellborn King" description="an Supreme Hellborn King" needpremium="0" gaincap="10" gainhp="50" gainmana="50" gainhpticks="2" gainhpamount="250" gainmanaticks="2" gainmanaamount="250" manamultiplier="1.1" attackspeed="400" soulmax="200" gainsoulticks="15" fromvoc="13">

<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>

<skill id="0" multiplier="1.0"/>

<skill id="1" multiplier="1.0"/>

<skill id="2" multiplier="1.0"/>

<skill id="3" multiplier="1.0"/>

<skill id="4" multiplier="1.0"/>

<skill id="5" multiplier="1.0"/>

<skill id="6" multiplier="1.0"/>

</vocation>

<vocation id="14" name="Apocalypse Deathbringer" description="an Apocalypse Deathbringer" needpremium="0" gaincap="10" gainhp="55" gainmana="55" gainhpticks="2" gainhpamount="300" gainmanaticks="2" gainmanaamount="300" manamultiplier="1.1" attackspeed="300" soulmax="200" gainsoulticks="15" fromvoc="14">

<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>

<skill id="0" multiplier="1.0"/>

<skill id="1" multiplier="1.0"/>

<skill id="2" multiplier="1.0"/>

<skill id="3" multiplier="1.0"/>

<skill id="4" multiplier="1.0"/>

<skill id="5" multiplier="1.0"/>

<skill id="6" multiplier="1.0"/>

</vocation>

<vocation id="15" name="Nova Heror" description="an Nova Hero" needpremium="0" gaincap="10" gainhp="60" gainmana="60" gainhpticks="2" gainhpamount="400" gainmanaticks="2" gainmanaamount="400" manamultiplier="1.1" attackspeed="100" soulmax="200" gainsoulticks="15" fromvoc="15">

<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>

<skill id="0" multiplier="1.0"/>

<skill id="1" multiplier="1.0"/>

<skill id="2" multiplier="1.0"/>

<skill id="3" multiplier="1.0"/>

<skill id="4" multiplier="1.0"/>

<skill id="5" multiplier="1.0"/>

<skill id="6" multiplier="1.0"/>

</vocation>

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

×
×
  • Criar Novo...