K2

Como Fazer Que Todos Tenham Itens E Level No Começo

Por k2lan, 12 de set. de 2011 em Archived

5
730
k2lanK
12 de setembro de 2011 às 10:45

Como faço para que todos que criarem conta no meu OT , já começem com Itens e level

Exemplo:

Criei um kina, ele irá começar com:

Level 100

Set Vip

1000 crystal coins

kevonusK
12 de setembro de 2011 às 11:46

Primeiro vá na pasta de seu ot data\creaturescripts\scripts

 

e abra o firstitems.lua ai contem os itens que ele irá receber, e já os leveis, você edita os Sample, Druid Sample, Knigh Sample e ETC..

 

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

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

		doPlayerAddItem(cid, 2525, 1)
		doPlayerAddItem(cid, 2190, 1)
		doPlayerAddItem(cid, 2463, 1)
		doPlayerAddItem(cid, 2457, 1)
		doPlayerAddItem(cid, 2647, 1)
		doPlayerAddItem(cid, 2643, 1)

	setPlayerStorageValue(cid, 50000, 1)

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

		doPlayerAddItem(cid, 2525, 1)
		doPlayerAddItem(cid, 2182, 1)
		doPlayerAddItem(cid, 2463, 1)
		doPlayerAddItem(cid, 2457, 1)
		doPlayerAddItem(cid, 2647, 1)
		doPlayerAddItem(cid, 2643, 1)

		setPlayerStorageValue(cid, 50000, 1)

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

		doPlayerAddItem(cid, 2389, 3)
		doPlayerAddItem(cid, 2525, 1)
		doPlayerAddItem(cid, 2457, 1)
		doPlayerAddItem(cid, 2643, 1)
		doPlayerAddItem(cid, 2647, 1)
                       doPlayerAddItem(cid, 2463, 1)
		setPlayerStorageValue(cid, 50000, 1)

	elseif isKnight(cid) then
		local bag = doPlayerAddItem(cid, 9774, 1)
		doAddContainerItem(bag, 2120, 1)
		doAddContainerItem(bag, 2554, 1)
		doAddContainerItem(bag, 2152, 20)
		doAddContainerItem(bag, 8601, 1)

                doPlayerAddItem(cid, 2525, 1)
		doPlayerAddItem(cid, 2463, 1)
		doPlayerAddItem(cid, 2457, 1)
		doPlayerAddItem(cid, 2647, 1)
		doPlayerAddItem(cid, 2643, 1)
                       doPlayerAddItem(cid, 8602, 1)
                       doPlayerAddItem(cid, 2439, 1)
		setPlayerStorageValue(cid, 50000, 1)
	end
end
	return TRUE
end

 

Vamus as explicão, que por encrivel que pareça já está na cara ai tem o nome de todas as vocações e o ID dos itens, você só irá trocar pelos itens que você deseja.

k2lanK
12 de setembro de 2011 às 12:12

mas mesmo sendo website tenho que editar pela pasta?

kevonusK
12 de setembro de 2011 às 17:24

mas mesmo sendo website tenho que editar pela pasta?

 

Sim, tem que editar na pasta onde fica o servidor, e os sample você edita no PHPmyadmin.

k2lanK
12 de setembro de 2011 às 19:03

vlw amigo, ai poderia me ajudar

http://www.xtibia.com/forum/topic/167633-tem-como-criar-acc-no-site-e-no-ot/