Ir para conteúdo
  • 0

First Itens


jhowxd

Pergunta

Pessoal estou tendo um problema no OT, os players estao vindo pelados?!?!?!?

 

Ta assim meus códigos

no login.lua

registerCreatureEvent(cid, "FirstItems")

 

e no first itens assim:

 

 

local commonItems = {

-- ITEMS ALL VOCS RECEIVE

{itemid=2120, count=1}, -- rope

{itemid=5710, count=1}, -- shovel

{itemid=2789, count=10}, -- brown mushrooms

}

 

local firstItems = {

{ -- SORC ITEMS

{itemid=2457, count=1}, -- steel helmet

{itemid=2463, count=1}, -- plate armor

{itemid=2647, count=1}, -- plate legs

{itemid=2643, count=1}, -- leather boots

{itemid=2525, count=1}, -- dwarven shield

{itemid=2190, count=1}, -- wand of vortex

 

{itemid=7618, count=1}, -- health potion

{itemid=7620, count=3}, -- mana potion

},

{ -- DRUID ITEMS

{itemid=2457, count=1}, -- steel helmet

{itemid=2463, count=1}, -- plate armor

{itemid=2647, count=1}, -- plate legs

{itemid=2643, count=1}, -- leather boots

{itemid=2525, count=1}, -- dwarven shield

{itemid=2182, count=1}, -- snakebite rod

 

{itemid=7618, count=1}, -- health potion

{itemid=7620, count=3}, -- mana potion

},

{ -- PALADIN ITEMS

{itemid=2457, count=1}, -- steel helmet

{itemid=2463, count=1}, -- plate armor

{itemid=2647, count=1}, -- plate legs

{itemid=2643, count=1}, -- leather boots

{itemid=2525, count=1}, -- dwarven shield

{itemid=2389, count=1}, -- spear

 

{itemid=7618, count=2}, -- health potion

{itemid=7620, count=2}, -- mana potion

},

{ -- KNIGHT ITEMS

{itemid=2457, count=1}, -- steel helmet

{itemid=2463, count=1}, -- plate armor

{itemid=2647, count=1}, -- plate legs

{itemid=2643, count=1}, -- leather boots

{itemid=2525, count=1}, -- dwarven shield

{itemid=2439, count=1}, -- daramanian mace

{itemid=2428, count=1}, -- orcish axe

{itemid=2383, count=1}, -- spike sword

 

{itemid=7618, count=3}, -- health potion

{itemid=7620, count=1}, -- mana potion

}

}

 

for _, items in ipairs(firstItems) do

for _, item in ipairs(commonItems) do

table.insert(items, item)

end

end

 

function onLogin(cid)

if getPlayerGroupId(cid) < 2 then

local hasReceivedFirstItems = getPlayerStorageValue(cid, 67708)

 

if hasReceivedFirstItems == -1 then

--[[local backpack = ]]doPlayerAddItem(cid, 1988, 1)

 

local giveItems = firstItems[getPlayerVocation(cid)]

 

if giveItems ~= nil then

for _, v in ipairs(giveItems) do

--doAddContainerItem(backpack, v.itemid, v.count or 1)

doPlayerAddItem(cid, v.itemid, v.count or 1)

end

 

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have recieved your equipment")

setPlayerStorageValue(cid, 67708, 1)

end

end

end

return TRUE

end

 

Porem os player vem sem itens? Eu uso Gesior no meu ot.

Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

  • 0

Tenta esse:

local firstItems = {}

firstItems[0] =

{

2173,

2525,

2428,

2124,

2460,

2478,

2643

}

firstItems[1] =

{

2173,

2542,

2464,

2124,

2458,

2648,

7892

}

firstItems[2] =

{

2173,

2539,

2124,

2486,

3970,

7464,

7891

}

firstItems[3] =

{

2173,

2512,

2124,

2467,

7903,

2649,

7457

}

firstItems[4] =

{

2645,

2647,

2463,

2460,

2513,

2173,

2124

}

 

function onLogin(cid)

if getPlayerStorageValue(cid, 30001) == -1 then

for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do

doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)], 1)

end

if getPlayerSex(cid) == 0 then

doPlayerAddItem(cid, 2175, 1)

else

doPlayerAddItem(cid, 2175, 1)

end

local bag = doPlayerAddItem(cid, 1988, 1)

doAddContainerItem(bag, 2795, 20)

doAddContainerItem(bag, 2152, 10)

doAddContainerItem(bag, 2173, 1)

doAddContainerItem(bag, 2120, 1)

doAddContainerItem(bag, 2554, 1)

setPlayerStorageValue(cid, 30001, 1)

end

return TRUE

end

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

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...