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

how to add items to the rook sample??

Status
Not open for further replies.

rossi

New Member
Joined
Jun 21, 2009
Messages
74
Reaction score
0
Location
Chile
in my serv mistyc spirit 0.2.2 the new player (rook) starts without an item and i want to put it into the new player....
i saw in creature scripts the first items but only appear that of main (knight pally etc.) its ok because when they pass to main that items appear but nothing of the rook player....
PHP:
function onLogin(cid)
	if getPlayerGroupId(cid) == 1 and getPlayerStorageValue(cid, 50000) == -1 then
		if isSorcerer(cid) then
			local bag = doPlayerAddItem(cid, 1988, 1)
	
			doAddContainerItem(bag, 2120, 1)
			doAddContainerItem(bag, 2554, 1)
			doAddContainerItem(bag, 2152, 2)
		
			doPlayerAddItem(cid, 2175, 1)
			doPlayerAddItem(cid, 2190, 1)
			doPlayerAddItem(cid, 8819, 1)
			doPlayerAddItem(cid, 8820, 1)
			doPlayerAddItem(cid, 2468, 1)
			doPlayerAddItem(cid, 2643, 1)

		setPlayerStorageValue(cid, 50000, 1)

		elseif isDruid(cid) then
			local bag = doPlayerAddItem(cid, 1988, 1)
			doAddContainerItem(bag, 2120, 1)
			doAddContainerItem(bag, 2554, 1)
			doAddContainerItem(bag, 2152, 2)
		
			doPlayerAddItem(cid, 2175, 1)
			doPlayerAddItem(cid, 2182, 1)
			doPlayerAddItem(cid, 8819, 1)
			doPlayerAddItem(cid, 8820, 1)
			doPlayerAddItem(cid, 2468, 1)
			doPlayerAddItem(cid, 2643, 1)

			setPlayerStorageValue(cid, 50000, 1)

		elseif isPaladin(cid) then
			local bag = doPlayerAddItem(cid, 1988, 1)
			doAddContainerItem(bag, 2120, 1)
			doAddContainerItem(bag, 2554, 1)
			doAddContainerItem(bag, 2152, 2)
		
			doPlayerAddItem(cid, 2456, 1)
			doPlayerAddItem(cid, 2544, 100)
			doPlayerAddItem(cid, 2660, 1)
			doPlayerAddItem(cid, 2480, 1)
			doPlayerAddItem(cid, 8923, 1)
			doPlayerAddItem(cid, 2643, 1)

			setPlayerStorageValue(cid, 50000, 1)

		elseif isKnight(cid) then
			local bag = doPlayerAddItem(cid, 1988, 1)
			doAddContainerItem(bag, 2120, 1)
			doAddContainerItem(bag, 2554, 1)
			doAddContainerItem(bag, 2152, 2)
			doAddContainerItem(bag, 2439, 1)
			doAddContainerItem(bag, 8601, 1)
		
			doPlayerAddItem(cid, 2509, 1)
			doPlayerAddItem(cid, 8602, 1)
			doPlayerAddItem(cid, 2465, 1)
			doPlayerAddItem(cid, 2481, 1)
			doPlayerAddItem(cid, 2478, 1)
			doPlayerAddItem(cid, 2643, 1)

			setPlayerStorageValue(cid, 50000, 1)
		end
	end
 	return TRUE
end

this appear but i need to put in the rook option... how i do it?
 
Code:
  elseif isNone(cid) then
            local bag = doPlayerAddItem(cid, 1988, 1)
            doAddContainerItem(bag, 2120, 1)
            doAddContainerItem(bag, 2554, 1)
            doAddContainerItem(bag, 2152, 2)
            doAddContainerItem(bag, 2439, 1)
            doAddContainerItem(bag, 8601, 1)
        
            doPlayerAddItem(cid, 2509, 1)
            doPlayerAddItem(cid, 8602, 1)
            doPlayerAddItem(cid, 2465, 1)
            doPlayerAddItem(cid, 2481, 1)
            doPlayerAddItem(cid, 2478, 1)
            doPlayerAddItem(cid, 2643, 1)

            setPlayerStorageValue(cid, 50000, 1)

Try add that line in, not sure if that'd work... But you can try add it under

Code:
function onLogin(cid)
    if getPlayerGroupId(cid) == 1 and getPlayerStorageValue(cid, 50000) == -1 then


Make sure you make a BACKUP of your current one.


Zer0xe
 
Status
Not open for further replies.
Back
Top