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

First items prevents players from logging in

Albanon

New Member
Joined
Mar 5, 2011
Messages
93
Reaction score
1
Below is the code I used to replace first items in my server (Mystic spirit 2.11pl2) Whenever I replace first items in
the creature scripts with this code, it prevents anyone from logging onto the server - the players just sit there "loading" the character. Can any one help? Why doesn't this work?



Code:
local firstItems =
{
	1988,
	2413,
	2530,
	2464,
	2458,
	2648
}

local secondItems =
{
	1988,
	2394,
	2530,
	2464,
	2458,
	2648
}

function onLogin(cid)
	if getPlayerStorageValue(cid, 30001) == -1 and getPlayerVocation(cid) == 9 then
		for i = 1, table.maxn(firstItems) do
			doPlayerAddItem(cid, firstItems[i], 1)
			setPlayerStorageValue(cid, 30001, 1)
		end
			
		if getPlayerStorageValue(cid, 30001) == -1 and getPlayerVocation(cid) == 12 then
		for i = 1, table.maxn(secondItems) do
			doPlayerAddItem(cid, secondItems[i], 1)
			setPlayerStorageValue(cid, 30001, 1)
		end
		
	end
 	return TRUE
end
end
 
I don't have a mods folder, I'm using mystic spirit 2.11pl2. What exactly do you mean bad configuration? What should I look for?
 
The only thing that happens in the console is that the character logs in and is immediately logged back out. The tibia client displays "connecting to the game world please wait"
 
I found out what it is...but I dont know how to fix it...for some reason vocation id 12 is what's causing it....every other vocation gets their starting equipment now that I rewrote it, but anyone who is vocation 12 doesn't load.
 
Back
Top