Ir para conteúdo

Npc Que Troca Iten Por Vocation


LOrDoS

Posts Recomendados

eu ja tenho a scritp, tudo certinho, só um detalhe importante que eu nao consegui resolver, achei que aki poderia resolver o meu probleminha ;/

Tipo o npc ttroca itens por vocations, mais ele nao remove os itens que declaro, tentei de tudo , nao consegui ;/

 

vou por a script e ai vcs deem uma olhada ter uma noçao, deem uma ajuda, fale onde tenho que por , onde errei por favor, Deis de aj agradeço

 

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 promotion(cid, message, keywords, parameters, node)

if(not npcHandler:isFocused(cid)) then

return false

end

 

local config = {

money = 10000,

requirements = {

{itemid = 5879, count = 20},

{itemid = 5878, count = 20},

},

}

 

if isPremium(cid) then

if(getPlayerPromotionLevel(cid) >= parameters.promotion) then

npcHandler:say('You are already promoted!', cid)

elseif(getPlayerLevel(cid) < parameters.level) then

npcHandler:say('I am sorry, but I can only promote you

 

once you have reached level ' .. parameters.level .. '.', cid)

elseif getPlayerMoney(cid) < config.money then

npcHandler:say('You do not have enough money!', cid)

else

for k, v in pairs (config.requirements) do

if getPlayerItemCount(cid, v.itemid) < v.count

 

then

npcHandler:say("You don't have the all

 

of the items I need.", cid)

return true

end

end

setPlayerPromotionLevel(cid, parameters.promotion)

npcHandler:say(parameters.text, cid)

end

else

npcHandler:say("You need a premium account in order to get

 

promoted.", cid)

end

 

npcHandler:resetNpc()

return true

end

 

function promotion(cid, message, keywords, parameters, node)

if(not npcHandler:isFocused(cid)) then

return false

end

 

local config = {

money = 20000,

requirements = {

{itemid = 4852, count = 50},

{itemid = 2337, count = 35},

},

}

 

if isPremium(cid) then

if(getPlayerPromotionLevel(cid) >= parameters.promotion) then

npcHandler:say('You are already promoted!', cid)

elseif(getPlayerLevel(cid) < parameters.level) then

npcHandler:say('I am sorry, but I can only promote you

 

once you have reached level ' .. parameters.level .. '.', cid)

elseif getPlayerMoney(cid) < config.money then

npcHandler:say('You do not have enough money!', cid)

else

for k, v in pairs (config.requirements) do

if getPlayerItemCount(cid, v.itemid) < v.count

 

then

npcHandler:say("You don't have the all

 

of the items I need.", cid)

return true

end

end

setPlayerPromotionLevel(cid, parameters.promotion)

npcHandler:say(parameters.text, cid)

end

else

npcHandler:say("You need a premium account in order to get

 

promoted.", cid)

end

 

npcHandler:resetNpc()

return true

end

 

function promotion(cid, message, keywords, parameters, node)

if(not npcHandler:isFocused(cid)) then

return false

end

 

local config = {

money = 30000,

requirements = {

{itemid = 6500, count = 60},

{itemid = 2328, count = 50},

{itemid = 5880, count = 40},

{itemid = 2338, count = 30},

{itemid = 6546, count = 25},

},

}

 

if isPremium(cid) then

if(getPlayerPromotionLevel(cid) >= parameters.promotion) then

npcHandler:say('You are already promoted!', cid)

elseif(getPlayerLevel(cid) < parameters.level) then

npcHandler:say('I am sorry, but I can only promote you

 

once you have reached level ' .. parameters.level .. '.', cid)

elseif getPlayerMoney(cid) < config.money then

npcHandler:say('You do not have enough money!', cid)

else

for k, v in pairs (config.requirements) do

if getPlayerItemCount(cid, v.itemid) < v.count

 

then

npcHandler:say("You don't have the all

 

of the items I need.", cid)

return true

end

end

setPlayerPromotionLevel(cid, parameters.promotion)

npcHandler:say(parameters.text, cid)

end

else

npcHandler:say("You need a premium account in order to get

 

promoted.", cid)

end

 

npcHandler:resetNpc()

return true

end

 

function promotion(cid, message, keywords, parameters, node)

if(not npcHandler:isFocused(cid)) then

return false

end

 

local config = {

money = 40000,

requirements = {

{itemid = 4852, count = 70},

{itemid = 6500, count = 60},

{itemid = 2328, count = 50},

{itemid = 2336, count = 30},

{itemid = 5883, count = 40},

},

}

 

if isPremium(cid) then

if(getPlayerPromotionLevel(cid) >= parameters.promotion) then

npcHandler:say('You are already promoted!', cid)

elseif(getPlayerLevel(cid) < parameters.level) then

npcHandler:say('I am sorry, but I can only promote you

 

once you have reached level ' .. parameters.level .. '.', cid)

elseif getPlayerMoney(cid) < config.money then

npcHandler:say('You do not have enough money!', cid)

else

for k, v in pairs (config.requirements) do

if getPlayerItemCount(cid, v.itemid) < v.count

 

then

npcHandler:say("You don't have the all

 

of the items I need.", cid)

return true

end

end

setPlayerPromotionLevel(cid, parameters.promotion)

npcHandler:say(parameters.text, cid)

end

else

npcHandler:say("You need a premium account in order to get

 

promoted.", cid)

end

 

npcHandler:resetNpc()

return true

end

 

function promotion(cid, message, keywords, parameters, node)

if(not npcHandler:isFocused(cid)) then

return false

end

 

local config = {

money = 20000,

requirements = {

{itemid = 2157, count = 5},

{itemid = 2158, count = 5},

},

}

 

if isPremium(cid) then

if(getPlayerPromotionLevel(cid) >= parameters.promotion) then

npcHandler:say('You are already promoted!', cid)

elseif(getPlayerLevel(cid) < parameters.level) then

npcHandler:say('I am sorry, but I can only promote you

 

once you have reached level ' .. parameters.level .. '.', cid)

elseif getPlayerMoney(cid) < config.money then

npcHandler:say('You do not have enough money!', cid)

else

for k, v in pairs (config.requirements) do

if getPlayerItemCount(cid, v.itemid) < v.count

 

then

npcHandler:say("You don't have the all

 

of the items I need.", cid)

return true

end

end

setPlayerPromotionLevel(cid, parameters.promotion)

npcHandler:say(parameters.text, cid)

end

else

npcHandler:say("You need a premium account in order to get

 

promoted.", cid)

end

 

npcHandler:resetNpc()

return true

end

 

function promotion(cid, message, keywords, parameters, node)

if(not npcHandler:isFocused(cid)) then

return false

end

 

local config = {

money = 20000,

requirements = {

{itemid = 2157, count = 5},

{itemid = 2158, count = 5},

},

}

 

if isPremium(cid) then

if(getPlayerPromotionLevel(cid) >= parameters.promotion) then

npcHandler:say('You are already promoted!', cid)

elseif(getPlayerLevel(cid) < parameters.level) then

npcHandler:say('I am sorry, but I can only promote you

 

once you have reached level ' .. parameters.level .. '.', cid)

elseif getPlayerMoney(cid) < config.money then

npcHandler:say('You do not have enough money!', cid)

else

for k, v in pairs (config.requirements) do

if getPlayerItemCount(cid, v.itemid) < v.count

 

then

npcHandler:say("You don't have the all

 

of the items I need.", cid)

return true

end

end

setPlayerPromotionLevel(cid, parameters.promotion)

npcHandler:say(parameters.text, cid)

end

else

npcHandler:say("You need a premium account in order to get

 

promoted.", cid)

end

 

npcHandler:resetNpc()

return true

end

 

local node1 = keywordHandler:addKeyword({'squire elite knight'},

 

StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce

 

deseja realmente virar um Squire Elite Knight, Presisa ser lvl 280.'})

node1:addChildKeyword({'yes'}, promotion, {npcHandler = npcHandler,

 

cost = 10, level = 280, promotion = 2, text = 'Gz Man You are

 

Promoted'})

node1:addChildKeyword({'no'}, promotion, {npcHandler = npcHandler,

 

onlyFocus = true, text = 'Alright then, come back when you are ready.',

 

reset = true})

 

local node2 = keywordHandler:addKeyword({'gg elite knight'},

 

StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce

 

deseja realmente virar um fire Elite Knight, Presisa ser lvl 380.'})

node2:addChildKeyword({'yes'}, promotion, {npcHandler = npcHandler,

 

cost = 10, level = 380, promotion = 3, text = 'Gz Man You are

 

Promoted'})

node2:addChildKeyword({'no'}, promotion, {npcHandler = npcHandler,

 

onlyFocus = true, text = 'Alright then, come back when you are ready.',

 

reset = true})

 

local node3 = keywordHandler:addKeyword({'gg elite knight'},

 

StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce

 

deseja realmente virar um suprema elite knight, Presisa ser lvl 480

 

.'})

node3:addChildKeyword({'yes'}, promotion, {npcHandler = npcHandler,

 

cost = 10, level = 480, promotion = 4, text = 'Gz Man You are

 

Promoted'})

node3:addChildKeyword({'no'}, promotion, {npcHandler = npcHandler,

 

onlyFocus = true, text = 'Alright then, come back when you are ready.',

 

reset = true})

 

local node4 = keywordHandler:addKeyword({'gg elite knight'},

 

StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce

 

deseja realmente virar um lengendary bronze elite knight, Presisa ser

 

lvl 550.'})

node4:addChildKeyword({'yes'}, promotion, {npcHandler = npcHandler,

 

cost = 10, level = 550, promotion = 5, text = 'Gz Man You are

 

Promoted'})

node4:addChildKeyword({'no'}, promotion, {npcHandler = npcHandler,

 

onlyFocus = true, text = 'Alright then, come back when you are ready.',

 

reset = true})

 

local node5 = keywordHandler:addKeyword({'ffd2fds'}, StdModule.say,

 

{npcHandler = npcHandler, onlyFocus = true, text = 'Voce deseja

 

realmente virar um lengendary silver elite knight, Presisa ser lvl

 

350.'})

node5:addChildKeyword({'yes'}, promotion, {npcHandler = npcHandler,

 

cost = 0, level = 350, promotion = 6, text = 'Gz Man You are

 

Promoted'})

node5:addChildKeyword({'no'}, promotion, {npcHandler = npcHandler,

 

onlyFocus = true, text = 'Alright then, come back when you are ready.',

 

reset = true})

 

local node6 = keywordHandler:addKeyword({'ds1dsad'}, StdModule.say,

 

{npcHandler = npcHandler, onlyFocus = true, text = 'Voce deseja

 

realmente virar um lengendary gold elite knight, Presisa ser lvl

 

350.'})

node6:addChildKeyword({'yes'}, promotion, {npcHandler = npcHandler,

 

cost = 20000, level = 350, promotion = 7, text = 'Gz Man You are

 

Promoted'})

node6:addChildKeyword({'no'}, promotion, {npcHandler = npcHandler,

 

onlyFocus = true, text = 'Alright then, come back when you are ready.',

 

reset = true})

 

npcHandler:addModule(FocusModule:new())

Link para o comentário
Compartilhar em outros sites

huh.png Que script complicado em amigo, mas pelo que li nas falas é de promotion e não de vocation, olha, vo te passar o meu já editado com o que você pediu (retirar itens também):

 

 

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 onPlayerEndTrade(cid) npcHandler:onPlayerEndTrade(cid) end

function onPlayerCloseChannel(cid) npcHandler:onPlayerCloseChannel(cid) end

local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins and a talon. Do you want me to promote you?'})

node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, items = {{2151,1}}, level = 20, promotion =11, 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 and 2 talons. Do you want me to epicize you?'})

node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 200000, items = {{2151,2}}, 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())

 

 

 

Em vermelho é o que você deve editar pois esse é o meu, ta com valores diferentes e a minha segunda promotion é epic, não sei o nome da sua...

No caso os itens pra você por mais de um ficaria assim {{2151,1}, {5876,5}} sempre tendo uma chave a mais no primeiro e no ultimo item como ali, e se não for ter item ficaria assim {}, é o modelo do script...

Espero ter ajudado....

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

OPaa amigo vlw mesmo, tipo eu acho que escrevi errado mesmo é promotion mesmo,, Poww mais ja vlw, ja tirei uma base, agora só vou testar muito obrigado *-* posto aki se deu resultado

vo etntar usar a minha script pois foi um trabalhao , se nao der pulo pra sua *-*

 

nao deu :S, da a mesma coisa, ele entrega a promotion, mais nao remove os itens ;S

Link para o comentário
Compartilhar em outros sites

Pelo amor de Deus, que script bem embaralhado sahuda

 

Ta aew resolvido:

 

 

 

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 promotion(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end

local config = {
money = 10000,
requirements = {
{itemid = 5879, count = 20},
{itemid = 5878, count = 20},
},
}

if isPremium(cid) then
if(getPlayerPromotionLevel(cid) >= parameters.promotion) then
	npcHandler:say('You are already promoted!', cid)
elseif(getPlayerLevel(cid) < parameters.level) then
	npcHandler:say('I am sorry, but I can only promote you once you have reached level ' .. parameters.level .. '.', cid)
elseif getPlayerMoney(cid) < config.money then
	npcHandler:say('You do not have enough money!', cid)
else
	for k, v in pairs (config.requirements) do
		if getPlayerItemCount(cid, v.itemid) < v.count then
		npcHandler:say("You don't have the all of the items I need.", cid)
		return true
	end
end
setPlayerPromotionLevel(cid, parameters.promotion)
for k, v in pairs (config.requirements) do
doPlayerRemoveItem(cid, v.itemid, v.count)
end
npcHandler:say(parameters.text, cid)
end

else

npcHandler:say("You need a premium account in order to get promoted.", cid)
end

npcHandler:resetNpc()
return true
end

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

local config = {
money = 20000,
requirements = {
{itemid = 4852, count = 50},
{itemid = 2337, count = 35},
},
}

if isPremium(cid) then
if(getPlayerPromotionLevel(cid) >= parameters.promotion) then
	npcHandler:say('You are already promoted!', cid)
elseif(getPlayerLevel(cid) < parameters.level) then
	npcHandler:say('I am sorry, but I can only promote you once you have reached level ' .. parameters.level .. '.', cid)
elseif getPlayerMoney(cid) < config.money then
	npcHandler:say('You do not have enough money!', cid)
else
for k, v in pairs (config.requirements) do
	if getPlayerItemCount(cid, v.itemid) < v.count then
		npcHandler:say("You don't have the all of the items I need.", cid)
		return true
	end
end
setPlayerPromotionLevel(cid, parameters.promotion)
for k, v in pairs (config.requirements) do
doPlayerRemoveItem(cid, v.itemid, v.count)
end
npcHandler:say(parameters.text, cid)
end

else
npcHandler:say("You need a premium account in order to get promoted.", cid)
end

npcHandler:resetNpc()
return true
end

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

local config = {
money = 30000,
requirements = {
{itemid = 6500, count = 60},
{itemid = 2328, count = 50},
{itemid = 5880, count = 40},
{itemid = 2338, count = 30},
{itemid = 6546, count = 25},
},
}

if isPremium(cid) then
if(getPlayerPromotionLevel(cid) >= parameters.promotion) then
	npcHandler:say('You are already promoted!', cid)
elseif(getPlayerLevel(cid) < parameters.level) then
	npcHandler:say('I am sorry, but I can only promote you once you have reached level ' .. parameters.level .. '.', cid)
elseif getPlayerMoney(cid) < config.money then
	npcHandler:say('You do not have enough money!', cid)
else
for k, v in pairs (config.requirements) do
	if getPlayerItemCount(cid, v.itemid) < v.count then
		npcHandler:say("You don't have the all of the items I need.", cid)
	return true
	end
end
setPlayerPromotionLevel(cid, parameters.promotion)
for k, v in pairs (config.requirements) do
doPlayerRemoveItem(cid, v.itemid, v.count)
end
npcHandler:say(parameters.text, cid)
end

else
npcHandler:say("You need a premium account in order to get promoted.", cid)
end

npcHandler:resetNpc()
return true
end

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

local config = {
money = 40000,
requirements = {
{itemid = 4852, count = 70},
{itemid = 6500, count = 60},
{itemid = 2328, count = 50},
{itemid = 2336, count = 30},
{itemid = 5883, count = 40},
},
}

if isPremium(cid) then
if(getPlayerPromotionLevel(cid) >= parameters.promotion) then
	npcHandler:say('You are already promoted!', cid)
elseif(getPlayerLevel(cid) < parameters.level) then
	npcHandler:say('I am sorry, but I can only promote you once you have reached level ' .. parameters.level .. '.', cid)
elseif getPlayerMoney(cid) < config.money then
npcHandler:say('You do not have enough money!', cid)
else
for k, v in pairs (config.requirements) do
	if getPlayerItemCount(cid, v.itemid) < v.count then
		npcHandler:say("You don't have the all of the items I need.", cid)
		return true
	end
end
setPlayerPromotionLevel(cid, parameters.promotion)
for k, v in pairs (config.requirements) do
doPlayerRemoveItem(cid, v.itemid, v.count)
end
npcHandler:say(parameters.text, cid)
end

else
npcHandler:say("You need a premium account in order to get promoted.", cid)
end

npcHandler:resetNpc()
return true
end

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

local config = {
money = 20000,
requirements = {
{itemid = 2157, count = 5},
{itemid = 2158, count = 5},
},
}

if isPremium(cid) then
if(getPlayerPromotionLevel(cid) >= parameters.promotion) then
	npcHandler:say('You are already promoted!', cid)
elseif(getPlayerLevel(cid) < parameters.level) then
	npcHandler:say('I am sorry, but I can only promote you once you have reached level ' .. parameters.level .. '.', cid)
elseif getPlayerMoney(cid) < config.money then
npcHandler:say('You do not have enough money!', cid)
else
for k, v in pairs (config.requirements) do
	if getPlayerItemCount(cid, v.itemid) < v.count then
		npcHandler:say("You don't have the all of the items I need.", cid)
		return true
	end
end
setPlayerPromotionLevel(cid, parameters.promotion)
for k, v in pairs (config.requirements) do
doPlayerRemoveItem(cid, v.itemid, v.count)
end
npcHandler:say(parameters.text, cid)
end

else
npcHandler:say("You need a premium account in order to get promoted.", cid)
end

npcHandler:resetNpc()
return true
end

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

local config = {
money = 20000,
requirements = {
{itemid = 2157, count = 5},
{itemid = 2158, count = 5},
},
}

if isPremium(cid) then
if(getPlayerPromotionLevel(cid) >= parameters.promotion) then
	npcHandler:say('You are already promoted!', cid)
elseif(getPlayerLevel(cid) < parameters.level) then
	npcHandler:say('I am sorry, but I can only promote you once you have reached level ' .. parameters.level .. '.', cid)
elseif getPlayerMoney(cid) < config.money then
	npcHandler:say('You do not have enough money!', cid)
else
for k, v in pairs (config.requirements) do
	if getPlayerItemCount(cid, v.itemid) < v.count then
		npcHandler:say("You don't have the all of the items I need.", cid)
		return true
	end
end
setPlayerPromotionLevel(cid, parameters.promotion)
for k, v in pairs (config.requirements) do
doPlayerRemoveItem(cid, v.itemid, v.count)
end
npcHandler:say(parameters.text, cid)
end

else
npcHandler:say("You need a premium account in order to get promoted.", cid)
end

npcHandler:resetNpc()
return true
end

local node1 = keywordHandler:addKeyword({'squire elite knight'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce deseja realmente virar um Squire Elite Knight, Presisa ser lvl 280.'})
node1:addChildKeyword({'yes'}, promotion, {npcHandler = npcHandler, cost = 10, level = 280, promotion = 2, text = 'Gz Man You are Promoted'})
node1:addChildKeyword({'no'}, promotion, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})

local node2 = keywordHandler:addKeyword({'gg elite knight'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce deseja realmente virar um fire Elite Knight, Presisa ser lvl 380.'})
node2:addChildKeyword({'yes'}, promotion, {npcHandler = npcHandler, cost = 10, level = 380, promotion = 3, text = 'Gz Man You are Promoted'})
node2:addChildKeyword({'no'}, promotion, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})

local node3 = keywordHandler:addKeyword({'gg elite knight'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce deseja realmente virar um suprema elite knight, Presisa ser lvl 480.'})
node3:addChildKeyword({'yes'}, promotion, {npcHandler = npcHandler, cost = 10, level = 480, promotion = 4, text = 'Gz Man You are Promoted'})
node3:addChildKeyword({'no'}, promotion, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})

local node4 = keywordHandler:addKeyword({'gg elite knight'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce deseja realmente virar um lengendary bronze elite knight, Presisa ser lvl 550.'})
node4:addChildKeyword({'yes'}, promotion, {npcHandler = npcHandler, cost = 10, level = 550, promotion = 5, text = 'Gz Man You are Promoted'})
node4:addChildKeyword({'no'}, promotion, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})

local node5 = keywordHandler:addKeyword({'ffd2fds'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce deseja realmente virar um lengendary silver elite knight, Presisa ser lvl 350.'})
node5:addChildKeyword({'yes'}, promotion, {npcHandler = npcHandler, cost = 0, level = 350, promotion = 6, text = 'Gz Man You are Promoted'})
node5:addChildKeyword({'no'}, promotion, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})

local node6 = keywordHandler:addKeyword({'ds1dsad'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce deseja realmente virar um lengendary gold elite knight, Presisa ser lvl 350.'})
node6:addChildKeyword({'yes'}, promotion, {npcHandler = npcHandler, cost = 20000, level = 350, promotion = 7, text = 'Gz Man You are Promoted'})
node6:addChildKeyword({'no'}, promotion, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})

npcHandler:addModule(FocusModule:new())

 

 

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

akeopakeopakeopakoep é mto grande e loka , bem loka mais ta funcando askopaskoap, menos remover item, mais vo testar agora, esse teu mano, valee por tentarem me ajuda fico mto grato mesmo,

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...