Ir para conteúdo

Second Promotion ( Erro)


daaniel13

Posts Recomendados

Olá Eu Estou tentando fazer um npc que venda uma second promotion..

mais nao ta dandoo...

 

ele te da a promotion mais fica isso em você

15:07 You see yourself. You are .

Vou postar oq estou usando...

 

Promotion2.lua

local keywordHandler = KeywordHandler:new()

local npcHandler = NpcHandler:new(keywordHandler)

NpcSystem.parseParameters(npcHandler)

 

function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end

function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end

function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end

function onThink() npcHandler:onThink() end

 

local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Eu posso promovê-lo para Nova Promotion Por 50k. Posso Promove-lo?'})

node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 8, promotion = 2, text = 'Congratulations! You are now promoted.'})

node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})

 

npcHandler:addModule(FocusModule:new())

 

NPc: The Forgotten Lord

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

<npc name="The Forgotten Lord" script="data/npc/scripts/promotion2.lua" walkinterval="2000" floorchange="0">

<health now="100" max="100"/>

<look type="133" head="20" body="39" legs="45" feet="7" addons="0"/>

</npc>

 

E por Fim Minha Vocation.

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="400" 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="Master Sorcerer" description="a master sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.1" attackspeed="600" 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="Elder Druid" description="a elder druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.1" attackspeed="600" 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="Royal Paladin" description="a royal paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="50" gainmanaticks="4" gainmanaamount="50" manamultiplier="1.4" attackspeed="400" soulmax="100" gainsoulticks="120" fromvoc="3">

<formula meleeDamage="1.0" distDamage="1.2" 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="Elite Knight" description="a elite knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="50" gainmanaticks="6" gainmanaamount="50" manamultiplier="3.0" attackspeed="550" 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.1" shielding="1.1" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="5" name="Vip Baiak Sorcerer" description="a vip baiak sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="50" gainmanaticks="2" gainmanaamount="600" manamultiplier="1.1" attackspeed="450" 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="Vip Baiak Druid" description="an vip baiak druid" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="50" gainmanaticks="2" gainmanaamount="250" manamultiplier="1.1" attackspeed="450" 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="Vip Baiak Paladin" description="a vip baiak paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="50" gainmanaticks="3" gainmanaamount="150" manamultiplier="1.4" attackspeed="250" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">

<formula meleeDamage="1.0" distDamage="1.4" 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="Vip Baiak Knight" description="an vip baiak knight" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="50" gainmanaticks="4" gainmanaamount="150" manamultiplier="3.0" attackspeed="400" 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.1" shielding="1.1" fishing="1.1" experience="1.0"/>

</vocation>

<!--

<vocation id="9" name="Epic Master Sorcerer" description="an epic master sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="300" gainmanaticks="2" gainmanaamount="400" manamultiplier="1.1" attackspeed="00" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50">

<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="10" name="Epic Elder Druid" description="an epic elder druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="300" gainmanaticks="2" gainmanaamount="400" manamultiplier="1.1" attackspeed="400" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="50">

<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="11" name="Epic Royal Paladin" description="an epic royal paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="400" gainmanaticks="3" gainmanaamount="400" manamultiplier="1.4" attackspeed="400" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50">

<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="12" name="Epic Elite Knight" description="an epic elite knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="500" gainmanaticks="4" gainmanaamount="300" manamultiplier="3.0" attackspeed="400" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50">

<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>

-->

</vocations>

 

Obrigado Espero uq eme ajudem pessoal.

é muito importante para mim.

Agradeço Desde já

 

Esta dando esse Erro quando abre o server

http://imageshack.us/photo/my-images/135/imagemda.png/

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

Olá !

 

Bom , na minha opinião falta você colocar os ids das vocações na biblioteca do otserv.

 

Abra pasta do seu otserv > data > lib > abra o arquivo 031-vocations.

 

Depois disso é só você editar.

Pelo menos eu acho que seja isso ;)

Link para o comentário
Compartilhar em outros sites

Olá !

 

Bom , na minha opinião falta você colocar os ids das vocações na biblioteca do otserv.

 

Abra pasta do seu otserv > data > lib > abra o arquivo 031-vocations.

 

Depois disso é só você editar.

Pelo menos eu acho que seja isso ;)

 

meu Lib/vocation ta asim

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

 

 

 

pode arumar e dexar certinho para mim.

Obrigado

 

Aewww aeww Pode me ajudar..? com o erro acima..

 

Desculpem o Spamm Alguem ae pode me ajudar ?

Porfavorr ?

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

Segue abaixo o codigo concertado, um abraço e nao esqueça do REP +

 

 

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

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

×
×
  • Criar Novo...