Ir para conteúdo
  • 0

Promotion por Quest


kaizy536

Pergunta

Bom galera, o titulo ja diz tudo ne? Eu to querendo fazer uma quest, pra quando o player terminar, ganhar promotion, tipo, a promotion 1 voce pode pegar no npc, que é aquela que todo ot tem, de Druid pra Elder Druid.. Knight pra Elite Knight.. e por ai vai, a que eu quero fazer, é a classe Epic, assim sendo de Druid pra Elder Druid atraves do Npc, e de Elder Druid pra Epic Elder Druid, atraves da quest..

Porem eu nao sei como fazer isso, qual o script.. eu ja procurei e nao consegui achar nada.. Se alguem puder me ajudar eu agradeço :)

Link para o comentário
Compartilhar em outros sites

Posts Recomendados

  • 0



local storage = 23232

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerStorageValue(cid, storage) < 1 then
        if getPlayerVocation(cid) > 4 then
            doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
            doPlayerSendTextMessage(cid, 25, "Parabens, voce foi promovido!")
            doPlayerSetStorageValue(cid, storage, 1)
        else
            doPlayerSendCancel(cid, "Voce precisa ser promovido pra se promover novamente.")
        end
    else
        doPlayerSendCancel(cid, "The chest is empty.")        
    end
    return true
end

Esse eh o script da quest, vc vai configurar ele igual uma quest normal, registrar no actions.xml e colocar uniqueID no bau

PS: Seu server ja ta arrumada a questao da voc nova ne? Nao fica perdendo dps q ganha e tambem ja ta na 031-vocations ?

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

  • 0

A maioria das pessoas, quando colocam uma vocacao nova, tem um problema: sempre que o cara desloga ele perde a voc nova.

 

Na pasta lib tem um arquivo chamado 031-vocations.lua que eh assim


function isSorcerer(cid)
	return isInArray({1, 5}, getPlayerVocation(cid))
end

function isDruid(cid)
	return isInArray({2, 6}, getPlayerVocation(cid))
end

function isPaladin(cid)
	return isInArray({3, 7}, getPlayerVocation(cid))
end

function isKnight(cid)
	return isInArray({4, 8}, getPlayerVocation(cid))
end

function isRookie(cid)
	return isInArray({0}, getPlayerVocation(cid))
end

E, pras vocacoes novas poderem usar todas as runas, magias e itens, vc tem que deixar assim:


function isSorcerer(cid)
    	return isInArray({1, 5, 9}, getPlayerVocation(cid))
end

function isDruid(cid)
    	return isInArray({2, 6, 10}, getPlayerVocation(cid))
end

function isPaladin(cid)
    	return isInArray({3, 7, 11}, getPlayerVocation(cid))
end

function isKnight(cid)
    	return isInArray({4, 8, 12}, getPlayerVocation(cid))
end

function isRookie(cid)
	return isInArray({0}, getPlayerVocation(cid))
end
Link para o comentário
Compartilhar em outros sites

  • 0

@ pode explicar melhor como funciona esse script? todas as classes poderam fazer de boas essa quest? tipo, no meu ot tem 6 classes normais.. sendo 6 classes na primeira promotion.. e 6 na segunda promotion

Link para o comentário
Compartilhar em outros sites

  • 0

Ele so deixar jogadores com a vocacao acima de 4 fazer essa quest, ou seja, master sorcerer, elder druid, royal paladin e elite knight. Dai ele da mais 4 de vocacao pro cara, ex: Se o cara eh master sorcerer (voc 5) ele passa a ser 9.

 

Mas pelo q vc falou ai que sao 6 classes de cada tipo, vai ter que ser um script diferente.

 

Me explica melhor essas classes e quais classes vc quer que possam fazer a quest.

Link para o comentário
Compartilhar em outros sites

  • 0

bom, vou postar o meu vocations.xml meu server é mapa radbr..

 

 

<?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="2000" 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" magDefense="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="100" gainmanaticks="3" gainmanaamount="200" manamultiplier="1.1" attackspeed="800" 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" magDefense="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="100" gainmanaticks="3" gainmanaamount="200" manamultiplier="1.1" attackspeed="800" 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" magDefense="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="150" gainmanaticks="4" gainmanaamount="150" manamultiplier="1.4" attackspeed="800" 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" magDefense="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="200" gainmanaticks="6" gainmanaamount="100" manamultiplier="3.0" attackspeed="800" 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" magDefense="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="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="10" gainmana="60" gainhpticks="4" gainhpamount="1000" gainmanaticks="2" gainmanaamount="3000" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="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="6" name="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="10" gainmana="60" gainhpticks="4" gainhpamount="1000" gainmanaticks="2" gainmanaamount="3000" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="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="7" name="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="20" gainhp="20" gainmana="30" gainhpticks="3" gainhpamount="1500" gainmanaticks="3" gainmanaamount="1500" manamultiplier="1.4" attackspeed="800" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="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="8" name="Elite Knight" description="an elite knight" needpremium="1" gaincap="25" gainhp="30" gainmana="10" gainhpticks="2" gainhpamount="3000" gainmanaticks="4" gainmanaamount="1000" manamultiplier="3.0" attackspeed="800" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="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="13" name="Drunou" description="a drunou" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="100" gainhpamount="150" gainmanaticks="4" gainmanaamount="150" manamultiplier="1.9" attackspeed="350" soulmax="100" gainsoulticks="5" fromvoc="13">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.1" sword="1.2" axe="1.2" distance="1.2" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="14" name="Lord Drunou" description="a lord drunou" needpremium="1" gaincap="20" gainhp="20" gainmana="30" gainhpticks="4" gainhpamount="1500" gainmanaticks="4" gainmanaamount="1500" manamultiplier="1.4" attackspeed="350" soulmax="200" gainsoulticks="5" fromvoc="13">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.1" sword="1.2" axe="1.2" distance="1.2" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="15" name="Infernalist" description="a infernalist" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="100" gainmanaticks="3" gainmanaamount="200" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="90" fromvoc="15">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.2" magDamage="1.2" magHealingDamage="1.2" defense="1.0" magDefense="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="16" name="Master Infernalist" description="a master infernalist" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="100" gainmanaticks="3" gainmanaamount="200" manamultiplier="1.1" attackspeed="1500" soulmax="200" gainsoulticks="90" fromvoc="15">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.2" magDamage="1.2" magHealingDamage="1.2" defense="1.0" magDefense="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="9" name="Epic Master Sorcerer" description="an epic master sorcerer" needpremium="0" gaincap="10" gainhp="15" gainmana="90" gainhpticks="4" gainhpamount="2000" gainmanaticks="2" gainmanaamount="6000" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50">
<formula meleeDamage="1.1" distDamage="1.1" wandDamage="1.1" magDamage="1.1" magHealingDamage="1.1" defense="1.1" magDefense="1.1" armor="1.1"/>
<skill fist="1.0" club="1.0" sword="1.0" axe="1.0" distance="1.0" shielding="1.5" fishing="1.1" experience="1.2"/>
</vocation>
<vocation id="10" name="Epic Elder Druid" description="an epic elder druid" needpremium="0" gaincap="10" gainhp="15" gainmana="90" gainhpticks="4" gainhpamount="2000" gainmanaticks="2" gainmanaamount="6000" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="50">
<formula meleeDamage="1.1" distDamage="1.1" wandDamage="1.1" magDamage="1.1" magHealingDamage="1.1" defense="1.1" magDefense="1.1" armor="1.1"/>
<skill fist="1.0" club="1.0" sword="1.0" axe="1.0" distance="1.0" shielding="1.5" fishing="1.1" experience="1.2"/>
</vocation>
<vocation id="11" name="Epic Royal Paladin" description="an epic royal paladin" needpremium="0" gaincap="20" gainhp="30" gainmana="45" gainhpticks="3" gainhpamount="1500" gainmanaticks="3" gainmanaamount="1500" manamultiplier="1.4" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50">
<formula meleeDamage="1.1" distDamage="1.1" wandDamage="1.1" magDamage="1.1" magHealingDamage="1.1" defense="1.1" magDefense="1.1" armor="1.1"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.2"/>
</vocation>
<vocation id="12" name="Epic Elite Knight" description="an epic elite knight" needpremium="0" gaincap="25" gainhp="45" gainmana="15" gainhpticks="3" gainhpamount="6000" gainmanaticks="2" gainmanaamount="1000" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50">
<formula meleeDamage="1.1" distDamage="1.1" wandDamage="1.1" magDamage="1.1" magHealingDamage="1.1" defense="1.1" magDefense="1.1" armor="1.1"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.2"/>
</vocation>
<vocation id="14" name="Epic Lord Drunou" description="an epic lord drunou" needpremium="0" gaincap="20" gainhp="30" gainmana="45" gainhpticks="2" gainhpamount="1500" gainmanaticks="2" gainmanaamount="1500" manamultiplier="1.4" attackspeed="350" soulmax="200" gainsoulticks="5" fromvoc="13">
<formula meleeDamage="1.1" distDamage="1.1" wandDamage="1.1" magDamage="1.1" magHealingDamage="1.1" defense="1.1" magDefense="1.1" armor="1.1"/>
<skill fist="1.2" club="1.1" sword="1.2" axe="1.2" distance="1.2" shielding="1.1" fishing="1.1" experience="1.2"/>
</vocation>
-->
</vocations>

 

Azul - Classes sem promotion

Vermelho - Promotion 1

Roxo - Promotion 2 (a que é atraves de quest)


obs: eu mudei o drunou para vocation id : 9 ; lord drunou para 13 ; e epic lord drunou pra 17 ; para ficar de 4 em 4

Link para o comentário
Compartilhar em outros sites

  • 0

Ta aqui:


local storage = 23232

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerStorageValue(cid, storage) > 0 then
        doPlayerSendCancel(cid, "Voce ja fez essa quest!")
        return false
    end
    
    if getPlayerVocation(cid) >= 5 and getPlayerVocation(cid) <= 8 then
        doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
        doPlayerSetStorageValue(cid, storage, 1)
        doPlayerSendTextMessage(cid, 25, "Parabens vc foi promovido!")
    elseif getPlayerVocation(cid) == 14 then
        doPlayerSetVocation(cid, 16)
        doPlayerSetStorageValue(cid, storage, 1)
        doPlayerSendTextMessage(cid, 25, "Parabens vc foi promovido!")
    end
    return true
end

Dae vc faz assim: deleta a vocacao master infernalist e bota id 16 na epic lord drunou

Link para o comentário
Compartilhar em outros sites

  • 0

Blz, vlw :) so mais uma coisa, como eu faço pra tirar a opçao de escolher infernalist no account manager?


@amoeba13 assim mano, eu fiz tudo que vc falou, dai eu fiz o bau, as actions e pa, botei o bau no mapa pelo rme, botei unique id, e na eu fui fazer a quest com meu royal paladin, de boas, eu fiz a quest, ele virou epic, porem eu reloguei e ele era royal paladin dnv x.x e eu botei nos 031-vocations, oq vc falou

 

function isSorcerer(cid)

return isInArray({1, 5, 9}, getPlayerVocation(cid))
end
function isDruid(cid)
return isInArray({2, 6, 10}, getPlayerVocation(cid))
end
function isPaladin(cid)
return isInArray({3, 7, 11}, getPlayerVocation(cid))
end
function isKnight(cid)
return isInArray({4, 8, 12}, getPlayerVocation(cid))
end
function isDrunou(cid)
return isInArray({13, 17, 21}, getPlayerVocation(cid))
end
function isRookie(cid)
return isInArray({0}, getPlayerVocation(cid))
end

 


Voce pode explicar o que sao esses numeros nessa parte do script?

 

if getPlayerVocation(cid) >= 5 and getPlayerVocation(cid) <= 8 then

doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
doPlayerSetStorageValue(cid, storage, 1)
doPlayerSendTextMessage(cid, 25, "Parabens vc foi promovido!")
elseif getPlayerVocation(cid) == 14 then
doPlayerSetVocation(cid, 16)
doPlayerSetStorageValue(cid, storage, 1)
doPlayerSendTextMessage(cid, 25, "Parabens vc foi promovido!")

o ID das vocaçoes é:

13 = Drunou

17 = Lord Drunou

21 = Epic Lord Drunou..

tem como arrumar um scritp pra 2nd promotion desse? ou explicar como fazer isso atraves desse seu script ?

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

  • 0

bom, isso eu sei, mais eu quero saber o que é cada 1 de cada parte, sobre qual vocation ta falando.. porque o id das minha vocations tao diferente, dai preciso saber oque é cada 1 pra ajeitar

 

 

olha, eu ja resolvi a parte das vocaçoes normais virando a 2nd promotion, tipo, EK, ED, RP, MS, porem Lord Drunou, quando eu faço a quest, ele vira, porem depois de deslogar ele nao é mais Epic x.x

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

  • 0

Ja fiz com os ids certos pro seu server, nao precisa mudar.

 

Essa coisa de relogar e perder, era disso q eu tava falando. Pra concerta isso tem que faze uma gambiarrinha no login, chegado em casa eu faço

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

×
×
  • Criar Novo...