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

[Global Events] Login > Starterkit

alissonlinneker

New Member
Joined
Oct 8, 2008
Messages
106
Reaction score
0
Location
Brazil
Who can generate this script to me?

the player needs to start with the global items.
items of the same when it comes ne main.



The same items in each vocation.
Items that gets out of the Rook.
 
Script thanks to StreamSide based on Rudolf script...
In Creaturescripts:

Create a new file named start.lua paste this:

PHP:
function onLogin(cid)
local items = { 
	[0] = { 8819, 8820, 2468, 2509, 2643, 2190 },
	[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 }
}
	if getPlayerStorageValue(cid, 7878) == -1 then
		for voc, item in pairs(items) do
			if getPlayerVocation(cid) == voc then
				local container = doPlayerAddItem(cid, 1988, 1)
				for i = 1, table.maxn(item) do
					doAddContainerItem(container, item[i], 1)
				end
				setPlayerStorageValue(cid, 7878, 1)
			end
		end
	end
	return TRUE
end

Go to creaturescripts.xml and add this:

PHP:
<event type="login" name="StarItems" script="start.lua"/

Now open login.lua and above of function onLogin(cid) add this:

PHP:
registerCreatureEvent(cid, "StartItems")

PD: You just need to edit the items from each vocation... in "items"

Enjoy IT!

Rep++++?
 
Back
Top