LE

Acc Manager Rep+

Por leonvenigor, 20 de abr. de 2012 em Scripts

4
1.2k
leonvenigorL
20 de abril de 2012 às 11:37

gostaria de saber como q edita pro player quando criar acc (account manager) começar com tal item (nao tem no cofig.lua), e tipo quando o carinha cria o char ele começa com uma outfit nada a ve (hydra), mais dai qnd ele da set outfit da pra ele escolher outra, como faço pra tirar essa outfit de hydra quando ele começa.

jhon992J
20 de abril de 2012 às 12:16

O novo player comasa sem nenhum item?

Se começar com algum entao o arquivo firstitens jah existe e esta localizado na pasta data/creaturescripts/scripts/firstitens.lua ou mods/firsitems.xml

 

Caso n comece com item algum, vai na pasta data/creaturescripts/scripts/ duplica um arquivo e nomeia para "firstitens" sem as aspas e nele cole:

local firstItems = {}
firstItems[0] =
{
2173,
2525,
3965,
2124,
2457,
2647,
2643
}
firstItems[1] =
{
2173,
2525,
2190,
2124,
2457,
2647,
2643
}
firstItems[2] =
{
2173,
2525,
2182,
2124,
2457,
2647,
2643
}
firstItems[3] =
{
2173,
2525,
2399,
2124,
2457,
2647,
2643
}
firstItems[4] =
{
2173,
2525,
2428,
2124,
2457,
2647,
2643
}

function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do
doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1)
end
if getPlayerSex(cid) == 0 then
doPlayerAddItem(cid, 2463, 1)
else
doPlayerAddItem(cid, 2463, 1)
end
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2160, 2)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 7618, 1)
setPlayerStorageValue(cid, 30001, 1)
doCreatureChangeOutfit(cid, {lookType = 128})
end
return TRUE
end

 

Em creaturescripts.xml cole a tag:

<event type="login" name="First" script="firstitens.lua"/>

 

Pronto, esse script tbm resolvera o outfit;

Editado Abril 20 por Jhon992

VildenV
20 de abril de 2012 às 12:44

Já a outfit é só você ir na database

 e edite o looktype do account manager[/font]
leonvenigorL
20 de abril de 2012 às 13:55

como faço pra editar o mysql?