Warning: Event [checkscript] can not load script. /script/firstitems.lua
data/creaturescripts/scripts/firstitems.lua:1: '=' Expected
local firstItems = {
-- ITEMS ALL VOCS RECEIVE
{itemid=2480}, -- legion helmet
{itemid=2464}, -- chain armor
{itemid=2468}, -- studded legs
{itemid=2643}, -- leather boots
{itemid=2120}, -- rope
{itemid=5710} -- shovel
}
local firstItems = {
{ -- SORC ITEMS
{itemid=2190}, -- wand of vortex
{itemid=2175} -- spellbook
},
{ -- DRUID ITEMS
{itemid=2182}, -- snakebite rod
{itemid=2175} -- spellbook
},
{ -- PALADIN ITEMS
{itemid=2456}, -- bow
{itemid=2544, count=100} -- 100 arrows
},
{ -- KNIGHT ITEMS
{itemid=2412}, -- katana
{itemid=2530} -- copper shield
}
}
for _, items in ipairs(firstItems) do
for _, item in ipairs(commonItems) do
table.insert(items, item)
end
end
local storage = 35353
function onLogin(cid)
if getPlayerGroupId(cid) < 2 and getPlayerStorageValue(cid, storage) < 1 then
--[[local backpack = ]]doPlayerAddItem(cid, 2365, 1)
local giveItems = firstItems[getPlayerVocation(cid)]
if giveItems 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 first items!")
end
setPlayerStorageValue(cid, storage, 1)
end
return TRUE
end
data/creaturescripts/scripts/firstitems.lua:1: '=' Expected
local firstItems = {
-- ITEMS ALL VOCS RECEIVE
{itemid=2480}, -- legion helmet
{itemid=2464}, -- chain armor
{itemid=2468}, -- studded legs
{itemid=2643}, -- leather boots
{itemid=2120}, -- rope
{itemid=5710} -- shovel
}
local firstItems = {
{ -- SORC ITEMS
{itemid=2190}, -- wand of vortex
{itemid=2175} -- spellbook
},
{ -- DRUID ITEMS
{itemid=2182}, -- snakebite rod
{itemid=2175} -- spellbook
},
{ -- PALADIN ITEMS
{itemid=2456}, -- bow
{itemid=2544, count=100} -- 100 arrows
},
{ -- KNIGHT ITEMS
{itemid=2412}, -- katana
{itemid=2530} -- copper shield
}
}
for _, items in ipairs(firstItems) do
for _, item in ipairs(commonItems) do
table.insert(items, item)
end
end
local storage = 35353
function onLogin(cid)
if getPlayerGroupId(cid) < 2 and getPlayerStorageValue(cid, storage) < 1 then
--[[local backpack = ]]doPlayerAddItem(cid, 2365, 1)
local giveItems = firstItems[getPlayerVocation(cid)]
if giveItems 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 first items!")
end
setPlayerStorageValue(cid, storage, 1)
end
return TRUE
end