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

Starting EQ! [Advanced scripters join here] Really need help in this!!

Jokersman213

New Member
Joined
Dec 15, 2008
Messages
8
Reaction score
0
Hey.. I found that on my creature scripts im using TFS, I would like you to script something for me, Il really give a rep for it! Because its kinda hard I think? Hehe im just new in OTS.. well Its the starting scripts! As you can see if a player is a male he gets leather armor, torch and a club!, well if female he gets a coat neither the leather armor so Il need you guys to script something for me here is the script first :-

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


Il need you to do :-

Local items that every player should normally get :-

Plate armor , Plate legs , Steel Helmet , Leather Boots , Backpack , Scarf , In the backpack :- rope,shovel,5 hams

If a player create sorcerer we will add to the local items :-

Wand of Vortex
Dwarven Shield

If a player create druid we will add to the local items :-

SnakeBite Rod
Dwarven Shield

If a player creature Knight we will add to the local items :-

Bright sword , Fire Axe , Skull Staff , Dwarven Shield

If a player creature a paladin we will add to the local items :-

Crossbow , 1 Bolt .

Thats for all ------------ Note :- Ammunications are infinite, Cap system OFF!

Please help me in this, really need help!! Il be so happy if someone help me in this Il never do it alone :(

Il give rep++!

Thanks!
 
Code:
local items = { 
	[1] = { 8819, 8820, 2468, 2509, 2643, 2190 },
	[2] = { 8819, 8820, 2468, 2509, 2643, 2182 },
	[3] = { 2509, 2643, 8923, 8892, 2481, 2389 },
	[4] = { 2643, 2478, 2465, 2481, 2509 }
}
local inBackpack = {
        [ropeid] = 1,
        [shovelid] = 1,
        [hamid] = 1
}
function onLogin(cid)
	if getPlayerStorageValue(cid, 30001) == -1 then
		for voc, item in pairs(items) do
			if getPlayerVocation(cid) == voc then
				local container = doPlayerAddItem(cid, 1988, 1)
				for itemz, count in pairs(inBackpack) do
                                	doAddContainerItem(container, itemz, count)
				end
				setPlayerStorageValue(cid, 30001, 1)
			end
		end
	end
	return TRUE
end

Aff.

1 - Sorc, 2 - Druid, 3 - Pal, 4 - Kina.

Fill in the required IDs, customize, do what you want.
 
Last edited:
Code:
local items = { 
	[1] = { 8819, 8820, 2468, 2509, 2643, 2190 },
	[2] = { 8819, 8820, 2468, 2509, 2643, 2182 },
	[3] = { 2509, 2643, 8923, 8892, 2481, 2389 },
	[4] = { 2643, 2478, 2465, 2481, 2509 }
}
local inBackpack = {
        [ropeid] = 1,
        [shovelid] = 1,
        [hamid] = 1
}
function onLogin(cid)
	if getPlayerStorageValue(cid, 30001) == -1 then
		for voc, item in pairs(items) do
			if getPlayerVocation(cid) == voc then
				doPlayerAddItem(cid, item, 1)
				local container = doPlayerAddItem(cid, 1988, 1)
				for itemz, count in pairs(inBackpack) do
                                	doAddContainerItem(container, itemz, count)
				end
				setPlayerStorageValue(cid, 30001, 1)
			end
		end
	end
	return TRUE
end

Forgot to put the give-item part. :p
 
Back
Top