Admin Necro ADMINISTRADOR
Mensajes : 64 Fecha de inscripción : 04/11/2010 Edad : 27 Localización : Mi Casa
| Tema: [TUTORIAL] Como Poner Los Primeros Items Jue Nov 04, 2010 11:38 am | |
| Buenoo este es un tutoriaal para algunoos server que no te daan items al iniciar y tampoco hay chest que te lo den bueno empesare con el tutorial SERVER/data/creaturescripts/scriptsY copian cualquier archivo de ahi y le cambian el nombre a firstitems.lua entran y borran todo y ponen estoo - Código:
-
local commonItems = { -- ITEMS ALL VOCS RECEIVE {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=2173, count=1} -- amulet of loss {itemid=2160, count=10} -- crystal coin }
local firstItems = { { -- SORC ITEMS {itemid=2190, count=1}, -- wand of vortex {itemid=2175, count=1} -- spellbook }, { -- DRUID ITEMS {itemid=2182, count=1}, -- snakebite rod {itemid=2175, count=1} -- spellbook }, { -- PALADIN ITEMS {itemid=2456, count=1}, -- bow {itemid=2544, count=100} -- 100 arrows }, { -- KNIGHT ITEMS {itemid=2383, count=1}, -- spike sword {itemid=2428, count=1}, -- orcish axe {itemid=2525, count=1} -- dwarven shield } }
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, "Recibiste Tus Primeros Items!") end setPlayerStorageValue(cid, 67708, 1) end end return TRUE end Bueno ahora explicaree estoo yo puse los items mas utilizados que son plate armor,plate legs y esoo buenoo si lo quieren cambiar solo cambian lo ke kiereen cambiar asii por ejemplo el armor si lo kieren cambiar le ponen {itemid=2463, count=1}, -- plate armor en itemid ponen el id del item ke kieren ke dee y en count la cantidad asi con todos,los pueden cambiaar,a lo demaas no le muevaan nada CREDITOS: Esthela Ramirez | |
|