Ir para conteúdo
  • 0

Criando Nova Profissão


Pedrohost

Pergunta

Holá eu tenho aqui comigo um ot server bem bacana eu gostaria de editar também as profissoes encontrei um tutorial na ala tutoriais mas lá só mostra como criar na vocations.xml

 

 

Indo Direto Ao Asssunto.

Gostaria que me ajudassem a como colocar a minha nova profissao em um NPC de promotion semelhante ao Johnny

 

Ai Vai minha profissao caso algo esteja errado

 

 

 

 

 

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 = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})

node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, 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())

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Johnny" script="data/npc/scripts/promotion.lua" walkinterval="2000" floorchange="0">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="133" head="114" body="119" legs="132" feet="114"/>
</npc>

vocations.xml

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

3 respostass a esta questão

Posts Recomendados

  • 0

Editado Obrigado :) Vou Postar Aqui Tambem A Nova Profissao

<!--
<vocation id="9" name="CCO Sorcerer" description="an CCO sorcerer" needpremium="2" gaincap="10" gainhp="6" gainmana="12" gainhpticks="1" gainhpamount="100" gainmanaticks="1" gainmanaamount="200" manamultiplier="1.1" attackspeed="300" soulmax="300" gainsoulticks="1" fromvoc="1" 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="CCO Druid" description="an CCO Druid" needpremium="2" gaincap="10" gainhp="6" gainmana="12" gainhpticks="1" gainhpamount="100" gainmanaticks="1" gainmanaamount="200" manamultiplier="1.1" attackspeed="300" soulmax="300" gainsoulticks="1" fromvoc="2" 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="2.0" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="2.0" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="11" name="CCO Paladin" description="an CCO Paladin" needpremium="2" gaincap="20" gainhp="8" gainmana="10" gainhpticks="1" gainhpamount="200" gainmanaticks="1" gainmanaamount="100" manamultiplier="2.3" attackspeed="300" soulmax="300" gainsoulticks="1" fromvoc="3" 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="2.0" club="2.0" sword="2.0" axe="2.0" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="12" name="CCO Knight" description="an CCO Knight" needpremium="2" gaincap="25" gainhp="17" gainmana="7" gainhpticks="1" gainhpamount="300" gainmanaticks="1" gainmanaamount="50" manamultiplier="3.4" attackspeed="300" soulmax="200" gainsoulticks="15" fromvoc="4" 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="2.0" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
-->
</vocations>

 

Editado ~~

 

Eu estava vendo tipo eu ja fiz um teste para por no npc percebi que em cima da nova profissão tem algo meio que assim <!-- Isso faz com que a profissao nao pegue no jhonny?

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

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...