• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Script Support

hahawithout

Spanisher
Joined
Apr 21, 2014
Messages
16
Reaction score
1
Hello i have this at firstitems.lua

function onLogin(cid)
local storage = 30055 -- storage value

local sorcItems = {
2457, -- Steel helmet
2463, -- Plate armor
2190, -- Wand of vortex
2525, -- Dwarven shield
2647, -- Plate legs
2643, -- Leather boots
1988, -- Brown backpack
2050 -- torch
}
local druidItems = {
2457, -- Steel helmet
2463, -- Plate armor
2525, -- Dwarven shield
2182, -- Snakebite rod
2647, -- Plate legs
2643, -- Leather boots
1988, -- Brown backpack
2050 -- torch
}
local pallyItems = {
2457, -- Steel helmet
2463, -- Plate armor
2456, -- Bow
2647, -- Plate legs
2643, -- Leather boots
1988, -- Brown backpack
}
local kinaItems = {
2457, -- Steel helmet
2463, -- Plate armor
2525, -- Dwarven shield
8602, -- Jagged sword
2647, -- Plate legs
2643, -- Leather boots
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, 1, FALSE)
end

elseif getPlayerVocation(cid) == 2 then
-- Druid
for i = 1, table.getn(druidItems), 1 do
doPlayerAddItem(cid, druidItems, 1, FALSE)
end

elseif getPlayerVocation(cid) == 3 then
-- Paladin
for i = 1, table.getn(pallyItems), 1 do
doPlayerAddItem(cid, pallyItems, 1, FALSE)
end
-- 8 arrows
doPlayerAddItem(cid, 2544, 8, FALSE)

elseif getPlayerVocation(cid) == 4 then
-- Knight
for i = 1, table.getn(kinaItems), 1 do
doPlayerAddItem(cid, kinaItems, 1, FALSE)
end
end

-- Common for all
doPlayerAddItem(cid, 2789, 100, FALSE) -- 100 brown mushroom
doPlayerAddItem(cid, 2120, 1, FALSE) -- 1 rope
doPlayerAddItem(cid, 5710, 1, FALSE) -- 1 light shovel
doPlayerAddItem(cid, 2160, 2, FALSE) -- 2 crystal coins
end
return true
end


could you check if there is something wrong ? when i run my ot... player has NO EQ all vocations appear empty.
 
Iam using this and it works perfect

Code:
function onLogin(cid)
    local storage = 30055 -- storage value
   
    local sorcItems = {
            2323, -- Hat of the Mad
            8870, -- Spirit Cloak
            2190, -- Wand of vortex
            2175, -- Spellbook
            2647, -- Plate legs
            2643, -- Leather boots
            9774, -- Brocade backpack
        }
    local druidItems = {
            2323, -- Hat of the Mad
            8870, -- Spirit Cloak
            2175, -- Spellbook
            2182, -- Snakebite rod
            2647, -- Plate legs
            2643, -- Leather boots
            9774, -- Brocade backpack
        }
    local pallyItems = {
            2457, -- Steel Helmet
            2476, -- Knight Armor
            2525, -- Dwarven Shield
            2647, -- Plate legs
            2643, -- Leather boots
            9774, -- Brocade backpack
        }
    local kinaItems = {
            2457, -- Steel Helmet
            2476, -- Knight Armor
            2525, -- Dwarven Shield
            8601, -- Steel Axe
            8602, -- Jagged Sword
            2439, -- Daramian Mace       
            2647, -- Plate legs
            2643, -- Leather boots
            9774, -- Brocade backpack
        }
   
    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)
            end
       
        elseif getPlayerVocation(cid) == 2 then
            -- Druid
            for i = 1, table.getn(druidItems), 1 do
                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)
            end
            -- 5 Spear
            doPlayerAddItem(cid, 2389, 5, FALSE)
       
        elseif getPlayerVocation(cid) == 4 then
            -- Knight
            for i = 1, table.getn(kinaItems), 1 do
                doPlayerAddItem(cid, kinaItems[i], 1, FALSE)
            end
        end
       
        -- Common for all
        doPlayerAddItem(cid, 5710, 1, FALSE)    --Light Shovel--
        doPlayerAddItem(cid, 7731, 1, FALSE)    --Elvenhair Rope--
        doPlayerAddItem(cid, 2160, 2, FALSE)    --Crystal Coin--
        doPlayerAddItem(cid, 7620, 20, FALSE)    --Mana Pot--
        doPlayerAddItem(cid, 2789, 10, FALSE)    --Brown Mushroom--
        doPlayerAddItem(cid, 7618, 10, FALSE)    -- Health Pot --
    end
    return true
end
 
Back
Top