• 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!

Request Firstitems

Johannes10

New Member
Joined
Mar 10, 2010
Messages
181
Reaction score
1
Can Someone make my script(firstitems)
When they make a char they will have plate armor,plate legs, steel helmet, boots, dwarven shield, katana sword, bow and c bow, mace, a axe....

if someone have a better idea then post the script on the thread and say what stuff it is on the script...

I hope everbody understand me sorry for my bad english

version 0.3.6 (Crying Damson)

Here is my script can some change it to the stuff i said!!


<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes">
<config name="firstitems_config"><![CDATA[
config = {
storage = 30001,
items = {2050, 2382}
}
]]></config>
<event type="login" name="FirstItems" event="script"><![CDATA[
domodlib('firstitems_config')

function onLogin(cid)
if(getPlayerStorageValue(cid, config.storage) > 0) then
return true
end

for _, id in ipairs(config.items) do
doPlayerAddItem(cid, id, 1)
end

if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then
doPlayerAddItem(cid, 2651, 1)
else
doPlayerAddItem(cid, 2650, 1)
end

doAddContainerItem(doPlayerAddItem(cid, 1987, 1), 2674, 1)
setPlayerStorageValue(cid, config.storage, 1)
return true
end
]]></event>
</mod>
 
creaturescripts:
Lua:
local commonItems = {
    -- ITEMS ALL VOC RECEIVE
    {itemid=2457, count=1}, -- steel helmet
    {itemid=2463, count=1}, -- plate armor
    {itemid=2647, count=1}, -- plate legs
    {itemid=7457, count=1}, -- fur boots
    {itemid=2152, count=50}, -- 1 gold coin
    {itemid=2120, count=1}, -- rope
    {itemid=5710, count=1}, -- shovel
    {itemid=2789, count=100}, -- food
}
 
local firstItems = {
    { -- SORC ITEMS
        {itemid=2190, count=1}, -- wand of vortex
    },
    { -- DRUID ITEMS
        {itemid=2182, count=1}, -- snakebite rod
    },
    { -- PALADIN ITEMS
        {itemid=2455, count=1}, -- crossbow
        {itemid=2543, count=100}, -- bolts
    },
    { -- KNIGHT ITEMS
        {itemid=2383, count=1}, -- spike sword
      {itemid=2521, count=1}, -- dark 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
 
        if getPlayerStorageValue(cid, 30002) ~= 1 then
            --[[local backpack = ]]doPlayerAddItem(cid, 1988, TRUE)
 
            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, "You received your first items depending on your vocation.")
            end
            setPlayerStorageValue(cid, 30002, 1)
        end
    end
    return TRUE
end
 
Back
Top Bottom