Ir para conteúdo
  • 0

[Ajuda] Npc Reborn 8.54 [Ajuda]


Flaah

Pergunta

Boa Tarde amigos do XTIBIA, estou com um probleminha no meu NPC, ele fica dando o seguinte ERRO no console, quando diz: yes:

 

[25/07/2012 22:39:55] [Error - Npc interface]

[25/07/2012 22:39:55] data/npc/scripts/Reborn.lua:onCreatureSay

[25/07/2012 22:39:55] Description:

[25/07/2012 22:39:55] data/npc/scripts/Reborn.lua:59: attempt to index local 'voc' (a nil value)

[25/07/2012 22:39:55] stack traceback:

[25/07/2012 22:39:55] data/npc/scripts/Reborn.lua:59: in function 'callback'

[25/07/2012 22:39:55] data/npc/lib/npcsystem/npchandler.lua:383: in function 'onCreatureSay'

[25/07/2012 22:39:55] data/npc/scripts/Reborn.lua:7: in function <data/npc/scripts/Reborn.lua:7>

 

SCRIPT:

 

local keywordHandler = KeywordHandler:new()

local npcHandler = NpcHandler:new(keywordHandler)

NpcSystem.parseParameters(npcHandler)

local talkState = {}

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 config = {

--[Vocation] = ( Nova Vocation, New Outfit )

[21] = { 22, 137},

[254] = { 255, 351},

[36] = { 37, 148},

[51] = { 52, 144},

[65] = { 66, 152},

[378] = { 379, 451},

[80] = { 81, 150},

[93] = { 94, 150},

[107] = { 108, 509},

[118] = { 119, 118},

[131] = { 132, 34},

[144] = { 145, 15},

[155] = { 156, 15},

[167] = { 168, 173},

[179] = { 180, 178},

[191] = { 192, 184},

[205] = { 206, 190},

[217] = { 218, 221},

[229] = { 230, 281},

[242] = { 243, 60},

[254] = { 255, 351},

[265] = { 266, 334},

[275] = { 276, 80},

[286] = { 287, 338},

[296] = { 297, 198},

 

}

function creatureSayCallback(cid, type, msg)

if(not npcHandler:isFocused(cid)) then

return false

end

 

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

 

if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30025) == 4 then

selfSay('You are reborn.', cid)

focus = 0

talk_start = 0

 

elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 250 and getPlayerStorageValue(cid,30025) ~= 4 then

selfSay('Hehe, I say If you READY. You do not have 250 level.', cid)

 

elseif msgcontains(msg, 'reborn') then

selfSay('Are you sure? {yes}', cid)

talkState[talkUser] = 2

 

elseif msgcontains(msg, 'yes') and talkState[talkUser] ==2 and getPlayerLevel(cid) == 250 then

local voc = config[getPlayerVocation(cid)]

doPlayerSetVocation(cid, voc[1])

local outfit = {lookType = voc[2]}

doCreatureChangeOutfit(cid, outfit)

doPlayerAddExp(cid, -(getPlayerExperience(cid)-getExperienceForLevel(1)))

setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+20000)

setCreatureMaxMana(cid, getCreatureMaxMana(cid)+30000)

doCreatureAddHealth(cid, getCreatureMaxHealth(cid))

doCreatureAddMana(cid, getCreatureMaxMana(cid))

setPlayerStorageValue(cid,30025,4)

talkState[talkUser] = 0

 

elseif msgcontains(msg, 'yes') and getPlayerLevel(cid) ~= 250 then

selfSay('Desculpe, ' .. getCreatureName(cid) .. '! You need level 250 to reborn.', cid)

talkState[talkUser] = 0

 

elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then

selfSay('Sorry, ' .. getCreatureName(cid) .. '! You must revert or transform to reborn.', cid)

talkState[talkUser] = 0

 

elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then

selfSay('Good bye.', cid)

focus = 0

talk_start = 0

end

 

return true

end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

 

ALGUEM PODERIA AJUDAR PORFAVOR, VALENDO +REP

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

  • Respostas 49
  • Created
  • Última resposta

Top Posters For This Question

Posts Recomendados

  • 0

Amigo,tente este aki.

 

local keywordHandler = KeywordHandler:new()

local npcHandler = NpcHandler:new(keywordHandler)

NpcSystem.parseParameters(npcHandler)

local talkState = {}

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 config = {

--[Vocation] = ( Nova Vocation, New Outfit )

[7] = { 8, 137},

[21] = { 22, 152},

[31] = { 32, 451},

}

function creatureSayCallback(cid, type, msg)

if(not npcHandler:isFocused(cid)) then

return false

end

 

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

 

if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30025) == 4 then

selfSay('You are reborn.', cid)

focus = 0

talk_start = 0

 

elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 250 and getPlayerStorageValue(cid,30025) ~= 4 then

selfSay('Hmm, Desculpe. Você não tem level 250.', cid)

 

elseif msgcontains(msg, 'reborn') then

selfSay('Are you sure? {yes}', cid)

talkState[talkUser] = 2

 

elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 and getPlayerLevel(cid) >= 250 then

local voc = config[getPlayerVocation(cid)]

doPlayerSetVocation(cid, voc[1])

local outfit = {lookType = voc[2]}

doCreatureChangeOutfit(cid, outfit)

doPlayerAddExp(cid, -(getPlayerExperience(cid)-getExperienceForLevel(1)))

setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+20000)

setCreatureMaxMana(cid, getCreatureMaxMana(cid)+30000)

doCreatureAddHealth(cid, getCreatureMaxHealth(cid))

doCreatureAddMana(cid, getCreatureMaxMana(cid))

setPlayerStorageValue(cid,30025,4)

talkState[talkUser] = 0

 

elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then

selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Voce precisa reverter ou transformar para rebornar.', cid)

talkState[talkUser] = 0

 

elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then

selfSay('Good bye.', cid)

focus = 0

talk_start = 0

end

 

return true

end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

 

 

Este é meu sistema de reborn,que estou usando em meu servidor.

 

em Reborn.xml vc usa este;

 

<npc name="Reborn" script="data/npc/scripts/reborn.lua" access="6" lookdir="1">

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

<look type="288" head="95" body="86" legs="86" feet="38" addons="3"/>

</npc>

 

 

Espero que tenha ajudado!REP++

Link para o comentário
Compartilhar em outros sites

  • 0

Cara o NPC até reserta, mais depois da os seguintes ERROS:

 

QUANDO O NPC RESERTA:

 

Ele fica com uma oufiti branca.

 

QUANDO SAI E VOLTA PRO JOGO:

 

Ele volta pra vocation anterior.

 

ALGUEM PODERIA AJUDAR PORFAVOR, VALENDO +REP

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

  • 0

cara ele ja postou a script. preste mais atenção.

 

SCRIPT:

 

Quote

 

local keywordHandler = KeywordHandler:new()

local npcHandler = NpcHandler:new(keywordHandler)

NpcSystem.parseParameters(npcHandler)

local talkState = {}

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 config = {

--[Vocation] = ( Nova Vocation, New Outfit )

[21] = { 22, 137},

[254] = { 255, 351},

[36] = { 37, 148},

[51] = { 52, 144},

[65] = { 66, 152},

[378] = { 379, 451},

[80] = { 81, 150},

[93] = { 94, 150},

[107] = { 108, 509},

[118] = { 119, 118},

[131] = { 132, 34},

[144] = { 145, 15},

[155] = { 156, 15},

[167] = { 168, 173},

[179] = { 180, 178},

[191] = { 192, 184},

[205] = { 206, 190},

[217] = { 218, 221},

[229] = { 230, 281},

[242] = { 243, 60},

[254] = { 255, 351},

[265] = { 266, 334},

[275] = { 276, 80},

[286] = { 287, 338},

[296] = { 297, 198},

 

}

function creatureSayCallback(cid, type, msg)

if(not npcHandler:isFocused(cid)) then

return false

end

 

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

 

if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30025) == 4 then

selfSay('You are reborn.', cid)

focus = 0

talk_start = 0

 

elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 250 and getPlayerStorageValue(cid,30025) ~= 4 then

selfSay('Hehe, I say If you READY. You do not have 250 level.', cid)

 

elseif msgcontains(msg, 'reborn') then

selfSay('Are you sure? {yes}', cid)

talkState[talkUser] = 2

 

elseif msgcontains(msg, 'yes') and talkState[talkUser] ==2 and getPlayerLevel(cid) == 250 then

local voc = config[getPlayerVocation(cid)]

doPlayerSetVocation(cid, voc[1])

local outfit = {lookType = voc[2]}

doCreatureChangeOutfit(cid, outfit)

doPlayerAddExp(cid, -(getPlayerExperience(cid)-getExperienceForLevel(1)))

setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+20000)

setCreatureMaxMana(cid, getCreatureMaxMana(cid)+30000)

doCreatureAddHealth(cid, getCreatureMaxHealth(cid))

doCreatureAddMana(cid, getCreatureMaxMana(cid))

setPlayerStorageValue(cid,30025,4)

talkState[talkUser] = 0

 

elseif msgcontains(msg, 'yes') and getPlayerLevel(cid) ~= 250 then

selfSay('Desculpe, ' .. getCreatureName(cid) .. '! You need level 250 to reborn.', cid)

talkState[talkUser] = 0

 

elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then

selfSay('Sorry, ' .. getCreatureName(cid) .. '! You must revert or transform to reborn.', cid)

talkState[talkUser] = 0

 

elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then

selfSay('Good bye.', cid)

focus = 0

talk_start = 0

end

 

return true

end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

Link para o comentário
Compartilhar em outros sites

  • 0

Cara so tem um ERRO, só esse mesmo que é:

 

Quando o player sai do jogo e volta, ele volta pra vocation anterior.

 

Por isso vou posta meu vocation.lua e o meu vocation.xml, pra ver se tem algum problema neles, ou se é mesmo no NPC:

 

Vocation.lua

 

function isNaruto(cid)
	return isInArray({1, 16}, getPlayerVocation(cid))
end

function isSasuke(cid)
	return isInArray({2, 17}, getPlayerVocation(cid))
end

function isSakura(cid)
	return isInArray({3, 18}, getPlayerVocation(cid))
end

function isShikamaru(cid)
	return isInArray({4, 19}, getPlayerVocation(cid))
end

function isChouji(cid)
	return isInArray({5, 20}, getPlayerVocation(cid))
end
function isIno(cid)
	return isInArray({6, 21}, getPlayerVocation(cid))
end

function isKiba(cid)
	return isInArray({7, 22}, getPlayerVocation(cid))
end

function isShino(cid)
	return isInArray({8, 23}, getPlayerVocation(cid))
end

function isHinata(cid)
	return isInArray({9, 24}, getPlayerVocation(cid))
end

function isNeji(cid)
	return isInArray({10, 25}, getPlayerVocation(cid))
end

function isLee(cid)
	return isInArray({11, 26}, getPlayerVocation(cid))
end

function isTenten(cid)
	return isInArray({12, 27}, getPlayerVocation(cid))
end

function isGaara(cid)
	return isInArray({13, 28}, getPlayerVocation(cid))
end

function isKankuro(cid)
	return isInArray({14, 29}, getPlayerVocation(cid))
end

function isTemari(cid)
	return isInArray({15, 30}, getPlayerVocation(cid))
end

 

Vocation.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<vocations>
	<vocation id="0" name="None" description="a None" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="0">
			<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="1" name="Naruto" description="Naruto Uzumaki" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" 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.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="2" name="Sasuke" description="Sasuke Uchiha" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" 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.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="3" name="Sakura" description="Sakura Haruno" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" 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.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="4" name="Shikamaru" description="Shikamaru Nara" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" 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="Chouji" description="Chouji Akimichi" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="5">
			<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="6" name="Ino" description="Ino Yamanaka" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="6">
			<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="7" name="Kiba" description="Kiba Inuzuka" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="7">
			<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="8" name="Shino" description="Shino Amburame" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="8">
			<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="Hinata" description="Hinata Hyuuga" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="9">
			<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="10" name="Neji" description="Neji Hyuuga" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="10">
			<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="11" name="Lee" description="Rock Lee" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="11">
			<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="12" name="Tenten" description="Tenten" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="12">
			<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="13" name="Gaara" description="Gaara" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" 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.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="14" name="Kankuro" description="Kankuro" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="14">
			<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="15" name="Temari" description="Temari" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="15">
			<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="16" name="Naruto" description="Naruto Uzumaki (Chunnin)" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" 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.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="17" name="Sasuke" description="Sasuke Uchiha (Chunnin)" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" 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.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="18" name="Sakura" description="Sakura Haruno (Chunnin)" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" 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.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="19" name="Shikamaru" description="Shikamaru Nara (Chunnin)" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" 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="20" name="Chouji" description="Chouji Akimichi (Chunnin)" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="5">
			<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="21" name="Ino" description="Ino Yamanaka (Chunnin)" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="6">
			<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="22" name="Kiba" description="Kiba Inuzuka (Chunnin)" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="7">
			<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="23" name="Shino" description="Shino Amburame (Chunnin)" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="8">
			<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="24" name="Hinata" description="Hinata Hyuuga (Chunnin)" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="9">
			<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="25" name="Neji" description="Neji Hyuuga (Chunnin)" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="10">
			<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="26" name="Lee" description="Rock Lee (Chunnin)" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="11">
			<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="27" name="Tenten" description="Tenten (Chunnin)" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="12">
			<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="28" name="Gaara" description="Gaara (Chunnin)" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" 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.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="29" name="Kankuro" description="Kankuro (Chunnin)" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="14">
			<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="30" name="Temari" description="Temari (Chunnin)" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" soulmax="5" gainsoulticks="120" fromvoc="15">
			<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>
</vocations>

 

ALGUEM AJUDA PORFAVOR, VALENDO +REP

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

  • 0

vai em data/creaturescript/script abra o login.lua e antes do end return true end. cole isso.


if getPlayerStorageValue(cid, 650230) ~= -1 then
doPlayerSetVocation(cid, getPlayerStorageValue(cid, 650230))

Link para o comentário
Compartilhar em outros sites

  • 0

vai em data/creaturescript/script abra o login.lua e antes do end return true end. cole isso.


if getPlayerStorageValue(cid, 650230) ~= -1 then
doPlayerSetVocation(cid, getPlayerStorageValue(cid, 650230))

 

Coloquei o que vc mando, mais quando sai e voltei, n fico com a vocation, volto pra anterior.

 

Ai coloquei a STORAGE: 30025 que é a do Reborn, mais quando sai e voltei, fico com outra vocation que n tinha nada a ver com a que eu escoli.

 

ALGUEM AJUDA PORFAVOR, VALENDO +REP

Link para o comentário
Compartilhar em outros sites

  • 0

vai em data/creaturescript/script abra o login.lua e antes do end return true end. cole isso.


if getPlayerStorageValue(cid, 650230) ~= -1 then
doPlayerSetVocation(cid, getPlayerStorageValue(cid, 650230))

 

Coloquei o que vc mando, mais quando sai e voltei, n fico com a vocation, volto pra anterior.

 

Ai coloquei a STORAGE: 30025 que é a do Reborn, mais quando sai e voltei, fico com outra vocation que n tinha nada a ver com a que eu escoli.

 

ALGUEM AJUDA PORFAVOR, VALENDO +REP

 

Cara,tente assim:

if getPlayerStorageValue(cid, 650230) ~= +1 then

doPlayerSetVocation(cid, getPlayerStorageValue(cid, 650230))

Link para o comentário
Compartilhar em outros sites

  • 0

Deu esse ERRO no console:

 

[27/07/2012 15:02:14] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/login.lua:59: unexpected symbol near '+'

[27/07/2012 15:02:14] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/login.lua)

[27/07/2012 15:02:14] data/creaturescripts/scripts/login.lua:59: unexpected symbol near '+'

 

ALGUEM AJUDA PORFAVOR, VALENDO +REP

Link para o comentário
Compartilhar em outros sites

  • 0

Quando eu criei a conta deu esse ERRO no console:

 

 

[27/07/2012 15:08:09] Account Manager has logged in.

[27/07/2012 15:08:09] [Warning - Vocations::getVocation] Vocation 4294967295 not found.

[27/07/2012 15:08:20] Account Manager has logged out.

[27/07/2012 15:08:34] Account Manager has logged in.

[27/07/2012 15:08:34] [Warning - Vocations::getVocation] Vocation 4294967295 not found.

[27/07/2012 15:08:53] Account Manager has logged out.

[27/07/2012 15:08:59] Golo has logged in.

[27/07/2012 15:08:59] [Warning - Vocations::getVocation] Vocation 4294967295 not found.

 

Ai quando eu fiz o Reborn deu esse ERRO:

[27/07/2012 15:09:06] [Error - Npc interface]

[27/07/2012 15:09:06] data/npc/scripts/reborn.lua:onCreatureSay

[27/07/2012 15:09:06] Description:

[27/07/2012 15:09:06] data/npc/scripts/reborn.lua:60: attempt to index local 'voc' (a nil value)

[27/07/2012 15:09:06] stack traceback:

[27/07/2012 15:09:06] data/npc/scripts/reborn.lua:60: in function 'callback'

[27/07/2012 15:09:06] data/npc/lib/npcsystem/npchandler.lua:383: in function 'onCreatureSay'

[27/07/2012 15:09:06] data/npc/scripts/reborn.lua:8: in function <data/npc/scripts/reborn.lua:8>

 

ALGUEM AJUDA PORFAVOR, VALENDO +REP

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.

×
×
  • Criar Novo...