FL
pedido

[Ajuda] First Itens Por Slot [Ajuda]

Por Flaah, 21 de nov. de 2012 em Scripts

ajuda
help
xtibia
tibia
brasil
script
5
1.4k
FlaahF
21 de novembro de 2012 às 17:39

Tipo eu queria que a bag 1987, começasse aonde esta circulado na foto:

 

igemjb.png

 

Script:

 

local firstItems = {
	    [0] = {
					    2647,
					    2643
	    },		  

	    [1] ={
					    2323,
					    1988
	    },

	    [2] = {
					    2323,
					    1988
	    },

	    [3] = {
					    2496,
					    1988
	    },

	    [4] = {
					    2496,
					    1988
	    },
}
function onLogin(cid)
	    if getPlayerStorageValue(cid, 30001) == -1 then
					    local tb = firstItems[getPlayerVocation(cid)] or firstItems[0]
					    for i = 1, table.maxn(tb) do
									    doPlayerAddItem(cid, tb[i], 1)
					    end

					    if getPlayerSex(cid) == 0 then
									    doPlayerAddItem(cid, 2160, 1)
					    else
									    doPlayerAddItem(cid, 2160, 1)
					    end

					    local bag = doPlayerAddItem(cid, 1987, 1)
									    doAddContainerItem(bag, 2789, 1)
									    doAddContainerItem(bag, 2789, 2)
									    doAddContainerItem(bag, 2789, 3)
									    doAddContainerItem(bag, 2789, 4)
									    doAddContainerItem(bag, 2789, 5)
									    doAddContainerItem(bag, 2789, 6)
									    doAddContainerItem(bag, 2789, 7)
									    doAddContainerItem(bag, 2789, 8)
									    setPlayerStorageValue(cid, 30001, 1)
	    end
	    return true
end

 

VALENDO +REP

SmiXS
22 de novembro de 2012 às 12:35

Vai em seu item.XML e procura o item que você quer editar e coloca essa linha nele:

<attribute key="slotType" value="ammo" />

 

Pronto, testa e me diz se funcionou...

FlaahF
22 de novembro de 2012 às 13:43

Foi não amigo :T

 

- <item id="1987" article="a" name="Golpes">
 <attribute key="weight" value="1" />
 <attribute key="containerSize" value="8" />
 <attribute key="slotType" value="backpack" />
 <attribute key="slotType" value="ammo" />
 <attribute key="description" value="Lista de golpes basicos e elementares." />
 </item>

 

Será que n tem outra forma?

 

VALENDO +REP

SmiXS
22 de novembro de 2012 às 15:18

tira o :

 

<attribute key="slotType" value="backpack" />

FlaahF
22 de novembro de 2012 às 15:47

Adianto nada não manolo :T

 

Acho q tem q ser na script, que manda direto pra lá.