Various optimization to config.php and LUA scripts

* Update config.php
* spaces to tabs and new line at eof
* updated playerdeath.lua to match latest one from master
This commit is contained in:
Evil Puncker
2020-05-29 16:40:28 -03:00
committed by GitHub
parent a78d26b103
commit e056898f31
16 changed files with 404 additions and 397 deletions

View File

@@ -1,6 +1,6 @@
function onLogin(cid)
local storage = 30055 -- storage value
local sorcItems = {
2460, -- Brass helmet
2465, -- Brass armor
@@ -39,39 +39,39 @@ function onLogin(cid)
1988, -- Brown backpack
2050 -- torch
}
if getPlayerStorageValue(cid, storage) == -1 then
setPlayerStorageValue(cid, storage, 1)
if getPlayerVocation(cid) == 1 then
-- Sorcerer
for i = 1, table.getn(sorcItems), 1 do
doPlayerAddItem(cid, sorcItems[i], 1, FALSE)
doPlayerAddItem(cid, sorcItems[i], 1, false)
end
elseif getPlayerVocation(cid) == 2 then
-- Druid
for i = 1, table.getn(druidItems), 1 do
doPlayerAddItem(cid, druidItems[i], 1, FALSE)
doPlayerAddItem(cid, druidItems[i], 1, false)
end
elseif getPlayerVocation(cid) == 3 then
-- Paladin
for i = 1, table.getn(pallyItems), 1 do
doPlayerAddItem(cid, pallyItems[i], 1, FALSE)
doPlayerAddItem(cid, pallyItems[i], 1, false)
end
-- 8 arrows
doPlayerAddItem(cid, 2544, 8, FALSE)
doPlayerAddItem(cid, 2544, 8, false)
elseif getPlayerVocation(cid) == 4 then
-- Knight
for i = 1, table.getn(kinaItems), 1 do
doPlayerAddItem(cid, kinaItems[i], 1, FALSE)
doPlayerAddItem(cid, kinaItems[i], 1, false)
end
end
-- Common for all
doPlayerAddItem(cid, 2674, 5, FALSE) -- 5 apples
doPlayerAddItem(cid, 2120, 1, FALSE) -- 1 rope
doPlayerAddItem(cid, 2674, 5, false) -- 5 apples
doPlayerAddItem(cid, 2120, 1, false) -- 1 rope
end
return true
end