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

max / min skills.

calum69

New Member
Joined
Aug 12, 2007
Messages
346
Reaction score
3
Location
Great Britain
hello im needing a script that is something like this

Lua:
function onLogin(cid)
	if getPlayerVocation(cid) == 4 and getPlayerSkill(cid, SKILL_SWORD) < 68 then
		for i = 1, -getPlayerSkillLevel(cid, SKILL_SWORD)+70 do doPlayerAddSkill(cid, SKILL_SWORD, 1) end
	end
return true
end
but works with maximum skills of 100 also.

so if a player goes below skill 70 he will get 70 skills again voc

and if he goes above 100 skills he will be reset to skill level 100

i also need to do this for magic level if magic level drops below 50 it will restore to 50 and if it goes above 100 it will be reset to 100 (voc 1, 2, 5, 6)

thanks :)
 
I'm a master of long scripts :S
Lua:
function onLogin(cid)
    if isKnight(cid) then
		if getPlayerSkill(cid, SKILL_SWORD) < 70 then
			doPlayerAddSkill(cid, SKILL_SWORD, 70-getPlayerSkill(cid,SKILL_SWORD))
		elseif getPlayerSkill(cid, SKILL_SWORD) > 100 then
			doPlayerAddSkill(cid, SKILL_SWORD, 100-getPlayerSkill(cid,SKILL_SWORD))
	elseif isDruid(cid) or isSorcerer(cid) then
		if getPlayerMagLevel(cid) < 50 then
			doPlayerAddMagLevel(cid, 50-getPlayerMagLevel(cid))
		elseif getPlayerMagLevel(cid) > 100 then
			doPlayerAddMagLevel(cid, 100-getPlayerMagLevel(cid))
		end
	elseif isPaladin(cid) then
		if getPlayerSkill(cid, SKILL_DISTANCE) < 70 then
			doPlayerAddSkill(cid, SKILL_SWORD, 70-getPlayerSkill(cid,SKILL_SWORD))
		elseif getPlayerSkill(cid, SKILL_DISTANCE) > 100 then
			doPlayerAddSkill(cid, SKILL_SWORD, 100-getPlayerSkill(cid,SKILL_SWORD)
		end
	end	
	return true
end
It is simple so it should work :p
 
got some words in the wrong place like SKILL_SWORD, but i can edit that thanks man aint spoken to you in a while :p

also will "isdruid" work for promoted vocations?

is it SKILL_SHIELD or SKILL_SHIELDING?
 
Are you looking for a script that makes you skills min 70 max 100 ON LOGIN, or if you're playing and go below 70 or above 100 it returns them to 70/100 INSTANTLY?

Cause if it is the second one then it shouldnt be with onLogin :p
 
how it will work is if a player drops to skill 69 he will be reset to skill 70. if a player gets above skill 100 he cant skill to 101 as it will reset back to 100.

do you have a better way to do the script? im open for all idea's :)
 
but the only way a player goes below 70 is when he dies but above 100 i know what you mean but once he dies and relogs he will only have 100 :eek:

its a war server :)
 
Back
Top