Jump to content

Como Adicionar Items Nos Players?


caverna

Recommended Posts

Isso é no firstitems.lua

Vou deixar o script do Magus aqui:

local firstItems =
{
[0] = { -- No-vocation (sem vocação)
	2398, -- Mace
	2512, -- Wooden Shield
	2649, -- Leather Legs
	2170, -- Silver Amulet
	2461, -- Leather Helmet
	2467, -- Leather Armor
	2643, -- Leather Boots
},

[1] = { --Sorcerer
	2525, -- Shield
	2190, -- Weapon
	2661, -- Necklace
	2457, -- Helmet
	2463, -- Armor
	2647, -- Legs
	2643 -- Boots
},

[2] = { --Druid
	2525, -- Shield
	2182, -- Weapon
	2661, -- Necklace
	2457, -- Helmet
	2463, -- Armor
	2647, -- Legs
	2643 -- Boots
},

[3] = { --Paladin
	2455, -- Weapon
	{2543,100}, -- Ammunition,Count
	2661, -- Necklace
	2457, -- Helmet
	2463, -- Armor
	2647, -- Legs
	2643 -- Boots
},

[4] = { --Knight
	2383, -- Weapon (Sword)
	2428, -- Weapon (Axe)
	2422, -- Weapon (Club)
	2525, -- Shield
	2661, -- Necklace
	2457, -- Helmet
	2463, -- Armor
	2647, -- Legs
	2643 -- Boots
}
}

function onLogin(cid)
if getPlayerStorageValue(cid, 30001) <= 0 then
	local bag = doPlayerAddItem(cid, 1988, 1) -- Backpack
	doAddContainerItem(bag, 2554, 1) -- Shovel
	doAddContainerItem(bag, 2120, 1) -- Rope

	local mergeidx = getPlayerVocation(cid)
	for k,v in ipairs(firstItems[mergeidx]) do
	local isArray = type(v) == "table"
	doPlayerAddItem(cid, (isArray and v[1] or v), (isArray and v[2] or 1))
	end

	setPlayerStorageValue(cid, 30001, 1)
end

return TRUE
end 

 

obs: é 1 creature script é so substituir...

 

Se te ajudei da REP++ ai ;)

Edited by Dragonlordez
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...