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

Problem on login

zednem

New Member
Joined
Nov 15, 2008
Messages
108
Reaction score
0
I am using a script to premium extra exp on login.lua, and works perfect in tfs 0.3 beta2, but when a changed to tfs rc1 (cryingdamson), the players cannot login, appear the screen of select characters, but when try to login comeback to screen of select characters, what could be?

function onLogin(cid)
registerCreatureEvent(cid, "PlayerDeath")

if isPremium(cid) == TRUE and getPlayerLevel(cid) <= 100 then
setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid)+75)
setPlayerStorageValue(cid, 12345, 1)
elseif isPremium(cid) == TRUE and getPlayerLevel(cid) > 100 and getPlayerLevel(cid) <= 150 then
setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid)+45)
setPlayerStorageValue(cid, 12345, 2)
elseif isPremium(cid) == TRUE and getPlayerLevel(cid) > 150 and getPlayerLevel(cid) <= 200 then
setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid)+37.5)
setPlayerStorageValue(cid, 12345, 3)
elseif isPremium(cid) == TRUE and getPlayerLevel(cid) > 200 and getPlayerLevel(cid) <= 250 then
setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid)+30)
setPlayerStorageValue(cid, 12345, 4)
elseif isPremium(cid) == TRUE and getPlayerLevel(cid) > 250 and getPlayerLevel(cid) <= 300 then
setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid)+15)
setPlayerStorageValue(cid, 12345, 5)
elseif isPremium(cid) == TRUE and getPlayerLevel(cid) > 300 then
setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid)+7.5)
setPlayerStorageValue(cid, 12345, 6)



elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 1 then
setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid))
setPlayerStorageValue(cid, 12345, 0)

elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 2 then
setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid))
setPlayerStorageValue(cid, 12345, 0)

elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 3 then
setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid))
setPlayerStorageValue(cid, 12345, 0)

elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 4 then
setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid))
setPlayerStorageValue(cid, 12345, 0)

elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 5 then
setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid))
setPlayerStorageValue(cid, 12345, 0)

elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 6 then
setPlayerExtraExpRate(cid, getPlayerExtraExpRate(cid))
setPlayerStorageValue(cid, 12345, 0)

end

return TRUE
end

PS: Doesn't get any error on console
 
Well in the file of ot functions, exists that function =S
well that function appears to be compiled, so anyone can make this function for me??
 
Code:
function onLogin(cid)
local premmy = isPremium(cid)
local level = getPlayerLevel(cid)
local exprate = getPlayerExtraExpRate(cid)

if premmy == TRUE and level <= 100 then
	setPlayerExtraExpRate(cid, exprate + 75)
	setPlayerStorageValue(cid, 12345, 1)
elseif premmy == FALSE and getPlayerStorageValue(cid, 12345) == 1 then
	setPlayerExtraExpRate(cid, 0)
	setPlayerStorageValue(cid, 12345, 0)
end

if premmy == TRUE and level > 100 and level <= 150 then
	setPlayerExtraExpRate(cid, exprate + 45)
	setPlayerStorageValue(cid, 12345, 2)
elseif premmy == FALSE and getPlayerStorageValue(cid, 12345) == 2 then
	setPlayerExtraExpRate(cid, 0)
	setPlayerStorageValue(cid, 12345, 0)
end

if premmy == TRUE and level > 150 and level <= 200 then
	setPlayerExtraExpRate(cid, exprate + 37)
	setPlayerStorageValue(cid, 12345, 3)
elseif premmy == FALSE and getPlayerStorageValue(cid, 12345) == 3 then
	setPlayerExtraExpRate(cid, 0)
	setPlayerStorageValue(cid, 12345, 0)
end

if premmy == TRUE and level > 200 and level <= 250 then
	setPlayerExtraExpRate(cid, exprate + 30)
	setPlayerStorageValue(cid, 12345, 4)
elseif premmy == FALSE and getPlayerStorageValue(cid, 12345) == 4 then
	setPlayerExtraExpRate(cid, 0)
	setPlayerStorageValue(cid, 12345, 0)
end

if premmy == TRUE and level > 250 and level <= 300 then
	setPlayerExtraExpRate(cid, exprate + 15)
	setPlayerStorageValue(cid, 12345, 5)
elseif premmy == FALSE and getPlayerStorageValue(cid, 12345) == 5 then
	setPlayerExtraExpRate(cid, 0)
	setPlayerStorageValue(cid, 12345, 0)
end

if premmy == TRUE and level > 300 then
	setPlayerExtraExpRate(cid, exprate + 7)
	setPlayerStorageValue(cid, 12345, 6)
elseif premmy == FALSE and getPlayerStorageValue(cid, 12345) == 6 then
	setPlayerExtraExpRate(cid, 0)
	setPlayerStorageValue(cid, 12345, 0)
end
return TRUE
end
 
Is doesn't work =/
must the problem is with the function o need a function of setPlayerExtraExpRate and getPlayerExtraExpRate or exists something like that?

EDIT: Yeah, the problem is this functions don't exists anymore, so i there something like that??
To get the rate of xp and set a new one??
 
Last edited:
You can use doPlayerSetExperienceRate(cid, value)

I tried that, but get this error

luaDoPlayerSetSkillRate<>. Player not found

if isPremium(cid) == TRUE and getPlayerLevel(cid) <= 100 then
doPlayerSetExperienceRate(cid, 125)
setPlayerStorageValue(cid, 12345, 1)
elseif isPremium(cid) == TRUE and getPlayerLevel(cid) > 100 and getPlayerLevel(cid) <= 150 then
doPlayerSetExperienceRate(cid, 75)
setPlayerStorageValue(cid, 12345, 2)
elseif isPremium(cid) == TRUE and getPlayerLevel(cid) > 150 and getPlayerLevel(cid) <= 200 then
doPlayerSetExperienceRate(cid, 63)
setPlayerStorageValue(cid, 12345, 3)
elseif isPremium(cid) == TRUE and getPlayerLevel(cid) > 200 and getPlayerLevel(cid) <= 250 then
doPlayerSetExperienceRate(cid, 50)
setPlayerStorageValue(cid, 12345, 4)
elseif isPremium(cid) == TRUE and getPlayerLevel(cid) > 250 and getPlayerLevel(cid) <= 300 then
doPlayerSetExperienceRate(cid, 25)
setPlayerStorageValue(cid, 12345, 5)
elseif isPremium(cid) == TRUE and getPlayerLevel(cid) > 300 then
doPlayerSetExperienceRate(cid, 13)
setPlayerStorageValue(cid, 12345, 6)

elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 1 then
doPlayerSetExperienceRate(cid, 50)
setPlayerStorageValue(cid, 12345, 0)

elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 2 then
doPlayerSetExperienceRate(cid, 30)
setPlayerStorageValue(cid, 12345, 0)

elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 3 then
doPlayerSetExperienceRate(cid, 25)
setPlayerStorageValue(cid, 12345, 0)

elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 4 then
doPlayerSetExperienceRate(cid, 20)
setPlayerStorageValue(cid, 12345, 0)

elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 5 then
doPlayerSetExperienceRate(cid, 10)
setPlayerStorageValue(cid, 12345, 0)

elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 6 then
doPlayerSetExperienceRate(cid, 5)
setPlayerStorageValue(cid, 12345, 0)
 
Try this:
Code:
function onLogin(cid)
 local premmy = isPremium(cid)
 local level = getPlayerLevel(cid)

	if ((premmy == TRUE) and (level <= 100)) then
	   setPlayerExtraExpRate(cid, 75)
	   setPlayerStorageValue(cid, 12345, 1)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 1)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
end
	if ((premmy == TRUE) and (level > 100) and (level <= 150)) then
	   setPlayerExtraExpRate(cid, 45)
	   setPlayerStorageValue(cid, 12345, 2)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 2)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
end
	if ((premmy == TRUE) and (level > 150) and (level <= 200)) then
	   setPlayerExtraExpRate(cid, 37)
	   setPlayerStorageValue(cid, 12345, 3)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 3)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
end
	if ((premmy == TRUE) and (level > 200) and (level <= 250)) then
	   setPlayerExtraExpRate(cid, 30)
	   setPlayerStorageValue(cid, 12345, 4)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 4)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
end
	if ((premmy == TRUE) and ((level > 250) and (level <= 300)) then
	   setPlayerExtraExpRate(cid, 15)
	   setPlayerStorageValue(cid, 12345, 5)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 5)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
end
	if ((premmy == TRUE) and (level > 300)) then
	   setPlayerExtraExpRate(cid, 7)
	   setPlayerStorageValue(cid, 12345, 6)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 6)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
 end
 return TRUE
end
 
Code:
function onLogin(cid)
 local premmy = isPremium(cid)
 local level = getPlayerLevel(cid)

	if ((premmy == TRUE) and (level <= 100)) then
	   doPlayerSetExperienceRate(cid, 75) 
	   setPlayerStorageValue(cid, 12345, 1)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 1)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
end
	if ((premmy == TRUE) and (level > 100) and (level <= 150)) then
	   doPlayerSetExperienceRate(cid, 45) 
	   setPlayerStorageValue(cid, 12345, 2)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 2)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
end
	if ((premmy == TRUE) and (level > 150) and (level <= 200)) then
	   doPlayerSetExperienceRate(cid, 37) 
	   setPlayerStorageValue(cid, 12345, 3)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 3)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
end
	if ((premmy == TRUE) and (level > 200) and (level <= 250)) then
	   doPlayerSetExperienceRate(cid, 30) 
	   setPlayerStorageValue(cid, 12345, 4)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 4)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
end
	if ((premmy == TRUE) and ((level > 250) and (level <= 300)) then
	   doPlayerSetExperienceRate(cid, 15) 
	   setPlayerStorageValue(cid, 12345, 5)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 5)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
end
	if ((premmy == TRUE) and (level > 300)) then
	   doPlayerSetExperienceRate(cid, 7) 
	   setPlayerStorageValue(cid, 12345, 6)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 6)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
 end
 return TRUE
end
 
Code:
function onLogin(cid)
 local premmy = isPremium(cid)
 local level = getPlayerLevel(cid)

	if ((premmy == TRUE) and (level <= 100)) then
	   doPlayerSetExperienceRate(cid, 75) 
	   setPlayerStorageValue(cid, 12345, 1)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 1)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
end
	if ((premmy == TRUE) and (level > 100) and (level <= 150)) then
	   doPlayerSetExperienceRate(cid, 45) 
	   setPlayerStorageValue(cid, 12345, 2)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 2)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
end
	if ((premmy == TRUE) and (level > 150) and (level <= 200)) then
	   doPlayerSetExperienceRate(cid, 37) 
	   setPlayerStorageValue(cid, 12345, 3)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 3)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
end
	if ((premmy == TRUE) and (level > 200) and (level <= 250)) then
	   doPlayerSetExperienceRate(cid, 30) 
	   setPlayerStorageValue(cid, 12345, 4)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 4)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
end
	if ((premmy == TRUE) and ((level > 250) and (level <= 300)) then
	   doPlayerSetExperienceRate(cid, 15) 
	   setPlayerStorageValue(cid, 12345, 5)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 5)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
end
	if ((premmy == TRUE) and (level > 300)) then
	   doPlayerSetExperienceRate(cid, 7) 
	   setPlayerStorageValue(cid, 12345, 6)
	 elseif ((premmy == FALSE) and (getPlayerStorageValue(cid, 12345) == 6)) then
	   setPlayerExtraExpRate(cid, 0)
	   setPlayerStorageValue(cid, 12345, 0)
 end
 return TRUE
end

Still geting this error

luaDoPlayerSetSkillRate<>. Player not found
 
Back
Top