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

Firstitem.lua help, -.-'

Exempel

New Member
Joined
Jul 1, 2007
Messages
6
Reaction score
0
hiya,i use a SQL server,and when i try to change the starting eq in firstitem.lua i always mess it up,can someone do it for me?

Code:
local firstItems =
{
	2050,
	2382
}

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, 2651, 1)
		else
			doPlayerAddItem(cid, 2650, 1)
		end
		local bag = doPlayerAddItem(cid, 1987, 1)
		doAddContainerItem(bag, 2674, 1)
		setPlayerStorageValue(cid, 30001, 1)
	end
 	return TRUE
end
Thats the lua script,
can someone change it so the player begins with plate set,spike sword,dwarven shield,a backpack with a shovel,rope,bow,wand of vortex and snakebite rod .. Please,if you help me you're a god -.-'
 
Last edited by a moderator:
I will make it for u just don't spam post 1 time..

and use
Code:
[/ code] next time
without space so it would be like this
not [/ code]
i made it [/ code] so it wont make the tag

anyway gonna check the id's and post the edit.

kk the code

PHP:
local firstItems =
{
2463,
2383,
2647,
2643,
2457,
2525
}

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, 2544, 100)
else
doPlayerAddItem(cid, 2544, 100)
end
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2182, 1)
doAddContainerItem(bag, 2190, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2456, 1)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end

Till me if there is anything wrong.

Yours,
Clary
 
Last edited:
I will make it for u just don't spam post 1 time..

and use
Code:
[/ code] next time
without space so it would be like this
not [/ code]
i made it [/ code] so it wont make the tag

anyway gonna check the id's and post the edit.

kk the code

Code:
[b]local firstItems =
{
2463,
2383
}[/b]

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, 2647, 1)
doPlayerAddItem(cid, 2643, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2525, 100)
else
doPlayerAddItem(cid, 2647, 1)
doPlayerAddItem(cid, 2643, 1)
doPlayerAddItem(cid, 2457, 1)
doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2525, 100)
end
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2182, 1)
doAddContainerItem(bag, 2190, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2456, 1)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end

Till me if there is anything wrong.

Yours,
Clary

What's this for, then?
 
Sorry for not tabbing - copied from upper post.

PHP:
local firstItems =
{
2463,
2383,
2647,
2643,
2457,
2525
}

local bpItems = {
vortexid,
shovelid,
ropeid,
snakebiteid
}

function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems) do
doPlayerAddItem(cid, firstItems[i], 1)
end
local container = doPlayerAddItem(cid, 2000, 1)
for i = 1,table.maxn(bpItems) do
doAddContainerItem(container, bpItems[i], 1)
end
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end

Fill in bpItems IDs
 
Last edited:
@up this isn't what he want no backpack no arrow xD
I added arrows since paladin for sure will need arrows with bow hehe
 
hiya,i use a SQL server,and when i try to change the starting eq in firstitem.lua i always mess it up,can someone do it for me?

Code:
local firstItems =
{
	2050,
	2382
}

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, 2651, 1)
		else
			doPlayerAddItem(cid, 2650, 1)
		end
		local bag = doPlayerAddItem(cid, 1987, 1)
		doAddContainerItem(bag, 2674, 1)
		setPlayerStorageValue(cid, 30001, 1)
	end
 	return TRUE
end
Thats the lua script,
can someone change it so the player begins with plate set,spike sword,dwarven shield,a backpack with a shovel,rope,bow,wand of vortex and snakebite rod .. Please,if you help me you're a god -.-'

He didnt stated that he really want the vocation check, so why would I bother in more few lines. :thumbup:
 
I didn't add vocation check o_O
see my script:
PHP:
local firstItems =
{
2463,
2383,
2647,
2643,
2457,
2525
}

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, 2544, 100)
else
doPlayerAddItem(cid, 2544, 100)
end
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2182, 1)
doAddContainerItem(bag, 2190, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2456, 1)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end
 
PHP:
local firstItems =
{
2463,
2383,
2647,
2643,
2457,
2525
}

local bpItems = {
shovelid,
ropeid,
}

function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems) do
doPlayerAddItem(cid, firstItems[i], 1)
end
local container = doPlayerAddItem(cid, 2000, 1)
for i = 1,table.maxn(bpItems) do
doAddContainerItem(container, bpItems[i], 1)
end
if isKnight(cid) == TRUE then
doContainerAddItem(container, katanaID, 1)
elseif isPaladin(cid) == TRUE then
doContainerAddItem(container, bowID, 1)
doContainerAddItem(container, arrowID, 100)
elseif isSorcerer(cid) == TRUE then
doContainerAddItem(container, vortexID, 1)
elseif isDruid(cid) == TRUE then
doContainerAddItem(container, snakebiteID, 1)
end
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end

Guess it is it.
 
Back
Top