• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[TFS 0.3] First items lua script

Jarhead

New Member
Joined
Feb 2, 2012
Messages
81
Reaction score
2
Location
Poland
Hi, I need firstitems script for tfs 0.3.0.0 with this items:

All vocations:
Backpack - 2003
10 platinium coins - 2152

Sorc:
Wand of vortex - 2190
Leather armor - 2467
Chain helmet - 2458
Leather legs - 2649
Leather boots - 2643
Wooden shield - 2512

Druid:
Snakebite rod - 2182
Leather armor - 2467
Chain helmet - 2458
Leather legs - 2649
Leather boots - 2643
Wooden shield - 2512

Paladin:
Rapier - 2384
Leather armor - 2467
Leather legs - 2649
Chain helmet - 2458
Wooden shield - 2512
Leather boots - 2643

Knight:
Rapier - 2384
Chain armor - 2464
Leather legs - 2649
Chain helmet - 2458
Wooden shield - 2512
Leather boots - 2643
 
Last edited:
I made this myself (all vocations will get leather set and other s**t :D)
Working on 0.3.0

Add to creaturescripts.xml:
Code:
<event type="login" name="FirstItems" script="firstitems.lua"/>
Create firstitems.lua in scripts:
Code:
local firstItems =
{
2512,
2384,
2643,
2458,
2649
}
function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems) do
doPlayerAddItem(cid, firstItems[i], 1)
end
if getPlayerSex(cid) == 0 then doPlayerAddItem(cid, 2467, 1)
else doPlayerAddItem(cid, 2467, 1)
end
local bag = doPlayerAddItem(cid, 2003, 1)
doAddContainerItem(bag, 2674, 10)
doAddContainerItem(bag, 2190, 1)
doAddContainerItem(bag, 2182, 1)
doAddContainerItem(bag, 2152, 10)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end
 
Last edited:
Code:
local items = {
    [1] = {
        {id = xxxx, count = x},
        {id = yyyy, count = y}
    }
}

function onLogin(cid)
    if not getPlayerStorageValue(cid, 30000) == 1 then
        local bp = doPlayerAddItem(1988)
        local voc = items[getPlayerVocation(cid)]
        for i = 1, #voc do
            doAddContainerItem(bp, voc[i].id, voc[i].count)
        end
        doPlayerSetStorageValue(cid, 30000, 1)
    end
    return true
end
 
Back
Top