• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent Certain Voc On Login Gets X Items

-.Savage.-

New Member
Joined
Jul 2, 2008
Messages
32
Reaction score
2
well hello i was wondering on Log in

if your a sorcerer you get x items, etc
and so when you log in all the eq goes to the right place.

heres's the script that was there first
but im starting a pvp server and so you dont get 345345 items when you log in you get what you need.

if any1 can edit it and reply id be greatful
thanks.

local firstItems =
{
2457,
2463,
2647,
2643,
2525,
2173,
2182,
2190,
2280,
2432,
2436,
2392
}

function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems) do
doPlayerAddItem(cid, firstItems, 1)
end
if getPlayerSex(cid) == 0 then
doPlayerAddItem(cid, 2651, 1)
else
doPlayerAddItem(cid, 2650, 1)
end
local bag = doPlayerAddItem(cid, 2000, 1)
doAddContainerItem(bag, 2160, 2)
doAddContainerItem(bag, 2280, 1)
doAddContainerItem(bag, 2268, 1)
doAddContainerItem(bag, 2273, 1)
doAddContainerItem(bag, 2304, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 2554, 1)

setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end
 
Awsome dude! but you should put it in
lua tags and tab it. like this: ([ Lua] [ /lua] without the spaces)
Lua:
local firstItems =
{
	2457,
	2463,
	2647,
	2643,
	2525,
	2173,
	2182,
	2190,
	2280,
	2432,
	2436,
	2392
}

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, 2000, 1)
		doAddContainerItem(bag, 2160, 2)
		doAddContainerItem(bag, 2280, 1)
		doAddContainerItem(bag, 2268, 1)
		doAddContainerItem(bag, 2273, 1)
		doAddContainerItem(bag, 2304, 1)
		doAddContainerItem(bag, 2120, 1)
		doAddContainerItem(bag, 2554, 1)

		setPlayerStorageValue(cid, 30001, 1)
	end
	return TRUE
end
 
Back
Top