Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Bom Galera preciso criar um NPC que venda mais de uma PROMOTION, exemplo : HELL, ULTIMATE, EXTREME, ETC...

O que eu tentei criar ele até Oferece mais na hora que fala YES a PROMOTION não vai para o PLAYER. Agradeço dês de já!!!  :cool: 

 

 

Vip King Tibianus

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({'hell'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 100000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 100000, level = 100, promotion = 2, text = 'Congratulations! You are now Hell 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())
 
local node2 = keywordHandler:addKeyword({'ultimate'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 200000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 200000, level = 200, promotion = 3, text = 'Congratulations! You are now Ultimate 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())
 
local node3 = keywordHandler:addKeyword({'extreme'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 300000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 300000, level = 300, promotion = 4, text = 'Congratulations! You are now Extreme 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())
 
local node4 = keywordHandler:addKeyword({'omega'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 400000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 400000, level = 400, promotion = 5, text = 'Congratulations! You are Omega 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())
 
local node5 = keywordHandler:addKeyword({'forgotten'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 500000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 500000, level = 500, promotion = 6, text = 'Congratulations! You are now Forgotten 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())

 
Vocations.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="1200" 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="5" gainmanaticks="3" gainmanaamount="60" manamultiplier="1.1" attackspeed="1200" 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="5" gainmanaticks="3" gainmanaamount="60" manamultiplier="1.1" attackspeed="1200" 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="5" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="1200" 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="5" gainmanaticks="6" gainmanaamount="60" manamultiplier="3.0" attackspeed="1200" 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="Dark Sorcerer" description="a dark sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="60" manamultiplier="1.1" attackspeed="1100" 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="Dark Druid" description="an dark druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="60" manamultiplier="1.1" attackspeed="1100" 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="Dark Paladin" description="a dark paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="60" manamultiplier="1.4" attackspeed="1100" 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="Dark Knight" description="an dark knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="4" gainmanaamount="60" manamultiplier="3.0" attackspeed="1100" 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="9" name="Hell Sorcerer" description="an hell sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1000" 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="Hell Druid" description="an hell druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1000" 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="Hell Paladin" description="an hell paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="1000" 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="Hell Knight" description="an hell knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="1000" 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>
<vocation id="13" name="Ultimate Sorcerer" description="an ultimate sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1000" 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="14" name="Ultimate Druid" description="an ultimate druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1000" 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="15" name="Ultimate Paladin" description="an ultimate paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="1000" 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="16" name="Ultimate Knight" description="an ultimate knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="1000" 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>
<vocation id="17" name="Extreme Sorcerer" description="an extreme sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1000" 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="18" name="Extreme Druid" description="an extreme druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1000" 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="19" name="Extreme Paladin" description="an extreme paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="1000" 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="20" name="Extreme Knight" description="an extreme knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="1000" 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>
<vocation id="21" name="Omega Sorcerer" description="an omega sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1000" 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="22" name="Omega Druid" description="an omega druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1000" 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="23" name="Omega Paladin" description="an omega paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="1000" 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="24" name="Omega Knight" description="an omega knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="1000" 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>
<vocation id="25" name="Forgotten Sorcerer" description="an forgotten sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1000" 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="26" name="Forgotten Druid" description="an forgotten druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1000" 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="27" name="Forgotten Paladin" description="an forgotten paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="1000" 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="28" name="Forgotten Knight" description="an forgotten knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="1000" 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>

 
Lib/031-Vocations

function isSorcerer(cid)
return isInArray({1, 5, 9, 13, 17, 21, 25}, getPlayerVocation(cid))
end
 
function isDruid(cid)
return isInArray({2, 6, 10, 14, 18, 22, 26}, getPlayerVocation(cid))
end
 
function isPaladin(cid)
return isInArray({3, 7, 11, 15, 19, 23, 27}, getPlayerVocation(cid))
end
 
function isKnight(cid)
return isInArray({4, 8, 12, 16, 20, 24, 28}, getPlayerVocation(cid))
end
 
function isRookie(cid)
return isInArray({0}, getPlayerVocation(cid))
end

 
 
 
 
 

 

Editado por tiroleivi (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

O tópico foi movido para a área correta, preste mais atenção da próxima vez!

Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

Este tópico foi movido:

De: "OTServScriptingMonsters e NPCs"

Para: "OTServSuporte OTServSuporte de Scripts"

Link para o post
Compartilhar em outros sites

Amigo tente 

 

Vip king tibianus

 

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({'hell'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 100000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 100000, level = 100, promotion = 1, text = 'Congratulations! You are now Hell 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())

local node2 = keywordHandler:addKeyword({'ultimate'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 200000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 200000, level = 200, promotion = 2, text = 'Congratulations! You are now Ultimate 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())

local node3 = keywordHandler:addKeyword({'extreme'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 300000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 300000, level = 300, promotion = 3, text = 'Congratulations! You are now Extreme 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())

local node4 = keywordHandler:addKeyword({'omega'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 400000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 400000, level = 400, promotion = 4, text = 'Congratulations! You are Omega 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())

local node5 = keywordHandler:addKeyword({'forgotten'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 500000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 500000, level = 500, promotion = 5, text = 'Congratulations! You are now Forgotten 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())

Scripter: |||||||||| 10%

 

 

Te ajudei?? REP + e ficamos quites...  ;D

 

Atenciosamente,

                   Lucas.

Abraços!

Link para o post
Compartilhar em outros sites
Bom Dia.
 
llukas75 ainda continua mesma coisa, ele oferece a promotion mais não pega no char.
 
ai eu mudei essa parte \/
 

 
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({'hell'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 100000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 100000, level = 100, promotion = 1, text = 'Congratulations! You are now Hell 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())
 
local node2 = keywordHandler:addKeyword({'ultimate'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 200000 gold coins. Do you want me to promote you?'})
node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 200000, level = 200, promotion = 2, text = 'Congratulations! You are now Ultimate promoted.'})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
 
npcHandler:addModule(FocusModule:new())
 
local node3 = keywordHandler:addKeyword({'extreme'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 300000 gold coins. Do you want me to promote you?'})
node3:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 300000, level = 300, promotion = 3, text = 'Congratulations! You are now Extreme promoted.'})
node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
 
npcHandler:addModule(FocusModule:new())
 
local node4 = keywordHandler:addKeyword({'omega'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 400000 gold coins. Do you want me to promote you?'})
node4:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 400000, level = 400, promotion = 4, text = 'Congratulations! You are Omega promoted.'})
node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
 
npcHandler:addModule(FocusModule:new())
 
local node5 = keywordHandler:addKeyword({'forgotten'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 500000 gold coins. Do you want me to promote you?'})
node5:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 500000, level = 500, promotion = 5, text = 'Congratulations! You are now Forgotten promoted.'})
node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
 
npcHandler:addModule(FocusModule:new())
 

 
Agora ele vende fala que o char foi promovido mais o char fica sem promotion nenhuma.
Editado por tiroleivi (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Tente essa:

 

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

function npcPromotion(cid, message, keywords, parameters, node)
	if(not npcHandler:isFocused(cid)) then return false end

	local lvl_promote = 100
	local cost_promote = 20000
	
	if (isPremium(cid)) then
		if (getPlayerLevel(cid) >= lvl_promote) then
			if (getPlayerVocation(cid) >= 5 and getPlayerVocation(cid) <=8) then
				if(getPlayerMoney(cid) >= cost_promote) then
					doPlayerRemoveMoney(cid, cost_promote)
					doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
					doPlayerSendTextMessage(cid, 20, "Voce é um ".. getPlayerVocationName(cid) .."!")
				else
					doPlayerSendTextMessage(cid, 20, "Voce nao o valor necessario!")
				end
			else
				doPlayerSendTextMessage(cid, 20, "Voce não possui a promotion anterior ou já esta promovido.")
			end
		else
			doPlayerSendTextMessage(cid, 20, "Voce nao possui level para ser promovido.")
		end
	else
		doPlayerSendTextMessage(cid, 20, "Voce nao possui premmium account.")
	end
end

local node1 = keywordHandler:addKeyword({'promote'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want me to promote you?'})
	node1:addChildKeyword({'yes'}, npcPromotion, {})
	node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then.', reset = true})

npcHandler:addModule(FocusModule:new())
Link para o post
Compartilhar em outros sites
Link para o post
Compartilhar em outros sites

Ngm pra ajuda ??? :/

Tiroleivi, só por curiosidade, me manda seu aquivo vocations.xml, irei analisar e darei um retorno para vc!

Editado por Carinhah (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Ngm pra ajuda ??? :/

Tente desta forma!

 

no script do promotion.lua

 

PS: se der certo vai repetindo o procedimento para cada promotion.

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

local node2 = keywordHandler:addKeyword({'epic'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can epicize you for 200000 gold coins. Do you want me to epicize you?'})
	node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 200000, level = 120, promotion = 2, text = 'Congratulations! You are now epicized.'})
	node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
	

npcHandler:addModule(FocusModule:new())

Editado por Carinhah (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por Duality
      Alguem pode me passar um PIC EDITOR para cliente 8.54 de preferencia um bom que nao da erro ao compilar e nem distorça a imagem, agradeçe.
    • Por gutx
      Pessoal, estou com um certo problema,
       
      não consigo criar um outro arquivo exe pelo vapus, por exemplo, para o client que encontrei do ot que quero fazer,
       
      encontrei outra solução que é fazer a edição pelo próprio executável do client (.exe),
       
      mas o que tenho aqui é limite 9,
       
      quero saber se tem como aumentar esse limite,
       
      pois não consigo criar um ip tão pequeno,
       
      se alguém souber como criar um ip desse tamanho, também está ajudando,
       
      Valendo REP!
    • Por Danihcv
      Opa, então, gostaria de saber como faço pra que quando uma pessoa estiver cadastrando uma nova account pelo site, ela possa escolher a vocation do novo Char que ela está criando. Pra deixar mais claro, é nessa parte aqui ó:
       
       

       
      Eu uso Gesior 2012. Meu ot é versão 10.10.
       
      Por favor ajudem o mais rápido possível!!! T-T
       
      Dou REP++
       
      pfpfpf me ajudem...
       
      Desde já, obrigado pela atenção.
      Abraços.
    • Por Movie
      Olá pessoal , queria saber como eu crio uma nova town .
       
    • Por Danihcv
      Então galera, to com um problema no meu site. Na parte de "who is online", aparece numero certo, mas no canto superior direito do site só aparece "0 players online". Igual na imagem:

       
      Será que alguem pode me ajudar pfpfpf???
       
      Dou REP++
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo