Ir para conteúdo

Pergunta

Galera Preciso de um kit iniciais para os player que criarem a conta , tipo eu coloquei uma de um baiak só que só tem para 4 vocation , só que meu ot tem 9 vocações queria um kit iniciais que eu pode-se configurar por exemplo:

 

Kits iniciais Vocation Id = 5,

 

é aqui embaixo os id dos item que o player vai ter quando logar!

 

só que tem quer ter para 9 vocation , 1,2,3,4,5,6,7,8,9 é pronto Simples!

 

Quem Me ajudar não vai se arrepender do rep +

 

Abraços!

Link para o comentário
https://xtibia.com/forum/topic/213320-kits-iniciais-para-9-vocation/
Compartilhar em outros sites

7 respostass a esta questão

Posts Recomendados

  • 0

vai em mod/firstitems.xml

 

depois da ultima linha

setPlayerStorageValue(cid, 50000, 1)

 

adiciona isso com o nome da sua vocation 9 (tudo junto sem as aspas) exemplo elseif isknight(cid) then

elseif is"NOME DA SUA VOCATION"(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)
doAddContainerItem(bag, 8602, 1)
doAddContainerItem(bag, 2439, 1)

doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2789, 10)
doPlayerAddItem(cid, 2200, 1)
doPlayerAddItem(cid, 8601, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 7457, 1)

setPlayerStorageValue(cid, 50000, 1)

 

doPlayerAddItem(cid, 7457, 1) << 7457 é id do item e 1 é a quantidade...

 

 

espero ter ajudado

Editado por Cell18
Link para o comentário
https://xtibia.com/forum/topic/213320-kits-iniciais-para-9-vocation/#findComment-1513065
Compartilhar em outros sites

  • 0

OK, na pasta mod do seu ot, crie um arquivo com nome firstitems.xml

 

dentro coloca isso...

 

<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes">
<config name="firstitems_config"><![CDATA[
config = {
storage = 30001,
items = {2050, 2382}
}
]]></config>
<event type="login" name="FirstItems" event="script">
<![CDATA[ 
domodlib('firstitems_config')

function onLogin(cid)
if getPlayerGroupId(cid) == 1 and getPlayerStorageValue(cid, 50000) == -1 then
if isSorcerer(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)

doAddContainerItem(bag, 2120, 1)
                       doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)

doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2190, 1)
                 doPlayerAddItem(cid, 2789, 10)
                 doPlayerAddItem(cid, 2200, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 7457, 1)

setPlayerStorageValue(cid, 50000, 1)

elseif isDruid(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1)
                       doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)

doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2182, 1)
                 doPlayerAddItem(cid, 2789, 10)
                 doPlayerAddItem(cid, 2200, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 7457, 1)

setPlayerStorageValue(cid, 50000, 1)

elseif isPaladin(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1)
                       doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)

doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2389, 1)
                 doPlayerAddItem(cid, 2789, 10)
                 doPlayerAddItem(cid, 2200, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 7457, 1)

setPlayerStorageValue(cid, 50000, 1)

elseif isKnight(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1)
                       doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)
doAddContainerItem(bag, 8602, 1)
                       doAddContainerItem(bag, 2439, 1)

doPlayerAddItem(cid, 2525, 1)
                       doPlayerAddItem(cid, 2789, 10)
                       doPlayerAddItem(cid, 2200, 1)
                       doPlayerAddItem(cid, 8601, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 7457, 1)

setPlayerStorageValue(cid, 50000, 1)
end
end
 return TRUE
end


 ]]> 
 </event>
 </mod>

 

 

OBS: Aí só tem as 4 vocações originais do tibia, para adicionar as outras existentes no seu ot, siga a dica que te dei acima sobre como adicionar novos 'first items' para novas vocações...

Link para o comentário
https://xtibia.com/forum/topic/213320-kits-iniciais-para-9-vocation/#findComment-1514011
Compartilhar em outros sites

  • 0

preguiça é mato!

 

<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes">
<config name="firstitems_config"><![CDATA[
config = {
storage = 30001,
items = {2050, 2382}
}
]]></config>
<event type="login" name="FirstItems" event="script">
<![CDATA[
domodlib('firstitems_config')

function onLogin(cid)
if getPlayerGroupId(cid) == 1 and getPlayerStorageValue(cid, 50000) == -1 then
if isSorcerer(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)

doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)

doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2190, 1)
doPlayerAddItem(cid, 2789, 10)
doPlayerAddItem(cid, 2200, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 7457, 1)

setPlayerStorageValue(cid, 50000, 1)

elseif isDruid(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)

doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2182, 1)
doPlayerAddItem(cid, 2789, 10)
doPlayerAddItem(cid, 2200, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 7457, 1)

setPlayerStorageValue(cid, 50000, 1)

elseif isPaladin(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)

doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2389, 1)
doPlayerAddItem(cid, 2789, 10)
doPlayerAddItem(cid, 2200, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 7457, 1)

setPlayerStorageValue(cid, 50000, 1)

elseif isKnight(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)
doAddContainerItem(bag, 8602, 1)
doAddContainerItem(bag, 2439, 1)

doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2789, 10)
doPlayerAddItem(cid, 2200, 1)
doPlayerAddItem(cid, 8601, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 7457, 1)

setPlayerStorageValue(cid, 50000, 1)

elseif is"NOME DA SUA VOCATION"(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)
doAddContainerItem(bag, 8602, 1)
doAddContainerItem(bag, 2439, 1)

doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2789, 10)
doPlayerAddItem(cid, 2200, 1)
doPlayerAddItem(cid, 8601, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 7457, 1)

setPlayerStorageValue(cid, 50000, 1)
elseif is"NOME DA SUA VOCATION"(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)
doAddContainerItem(bag, 8602, 1)
doAddContainerItem(bag, 2439, 1)

doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2789, 10)
doPlayerAddItem(cid, 2200, 1)
doPlayerAddItem(cid, 8601, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 7457, 1)

setPlayerStorageValue(cid, 50000, 1)
elseif is"NOME DA SUA VOCATION"(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)
doAddContainerItem(bag, 8602, 1)
doAddContainerItem(bag, 2439, 1)

doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2789, 10)
doPlayerAddItem(cid, 2200, 1)
doPlayerAddItem(cid, 8601, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 7457, 1)

setPlayerStorageValue(cid, 50000, 1)
elseif is"NOME DA SUA VOCATION"(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)
doAddContainerItem(bag, 8602, 1)
doAddContainerItem(bag, 2439, 1)

doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2789, 10)
doPlayerAddItem(cid, 2200, 1)
doPlayerAddItem(cid, 8601, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 7457, 1)

setPlayerStorageValue(cid, 50000, 1)
elseif is"NOME DA SUA VOCATION"(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2152, 20)
doAddContainerItem(bag, 8602, 1)
doAddContainerItem(bag, 2439, 1)

doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2789, 10)
doPlayerAddItem(cid, 2200, 1)
doPlayerAddItem(cid, 8601, 1)
doPlayerAddItem(cid, 2463, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 7457, 1)

setPlayerStorageValue(cid, 50000, 1)
end
end
  return TRUE
end
  ]]>
  </event>
  </mod>

Editado por Cell18
Link para o comentário
https://xtibia.com/forum/topic/213320-kits-iniciais-para-9-vocation/#findComment-1514725
Compartilhar em outros sites

×
×
  • Criar Novo...