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

Low Skills onLogin {Request}

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,858
Reaction score
96
Location
Brazil
I have this script, when player login if he is lower than level 150 he receive level 150.
(level 150 is the minimum in server)
Lua:
function onLogin(cid)
	if(getPlayerLevel(cid) < 150) then
		local setPlayerLevelOnLogin = 150
		doPlayerAddExperience(cid, (getExperienceForLevel(setPlayerLevelOnLogin) - getPlayerExperience(cid)))
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Go kill someone!")
	end
	return TRUE
end

Is possible an script to minimum skills and ml?
- Knights: melee 80 shielding 80 ml 9
- Paladins: distance 80 shielding 80 ml 23
- Mages: ML70
 
Why do this scripts don't works?

Minimum ML
Lua:
function onLogin(cid)
	if isSorcerer(cid) then
			if getPlayerMagLevel(cid) ~= 70 then
				doPlayerAddMagLevel(cid, -getPlayerMagLevel(cid))
				doPlayerAddMagLevel(cid, 70)
			end
	end
	if isDruid(cid) then
			if getPlayerMagLevel(cid) ~= 70 then
				doPlayerAddMagLevel(cid, -getPlayerMagLevel(cid))
				doPlayerAddMagLevel(cid, 70)
			end
	end
	if isPaladin then
		if getPlayerMagLevel(cid) ~= 22 then
			doPlayerAddMagLevel(cid, -getPlayerMagLevel(cid))
			doPlayerAddMagLevel(cid, 22)
		end
	end
	if isKnight(cid)
		if getPlayerMagLevel(cid) ~= 8 then
			doPlayerAddMagLevel(cid, -getPlayerMagLevel(cid))
			doPlayerAddMagLevel(cid, 8)
		end
	end
return TRUE
end

Minimum Skill
Lua:
function onLogin(cid)


if isPaladin(cid) then
	if getPlayerSkillLevel(cid, SKILL_DISTANCE) < 85 then
		doPlayerAddSkill(cid, SKILL_DISTANCE, -getPlayerSkillLevel(cid))
		doPlayerAddSkill(cid, SKILL_SHIELD, -getPlayerSkillLevel(cid))
		doPlayerAddSkill(cid, SKILL_DISTANCE, 90)
		doPlayerAddSkill(cid, SKILL_SHIELD, 75)
	end
end

if isKnight(cid) then
	if getPlayerSkillLevel(cid, SKILL_AXE) < 85 then
		doPlayerAddSkill(cid, SKILL_SWORD, -getPlayerSkillLevel(cid))
		doPlayerAddSkill(cid, SKILL_CLUB, -getPlayerSkillLevel(cid))
		doPlayerAddSkill(cid, SKILL_AXE, -getPlayerSkillLevel(cid))
		doPlayerAddSkill(cid, SKILL_SHIELD, -getPlayerSkillLevel(cid))
		doPlayerAddSkill(cid, SKILL_SWORD, 85)
		doPlayerAddSkill(cid, SKILL_CLUB, 85)
		doPlayerAddSkill(cid, SKILL_AXE, 85)
		doPlayerAddSkill(cid, SKILL_SHIELD, 80)
	end
end



end
return TRUE
end
 
Last edited:
Back
Top