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

Lua Give prize when skill level reached.

sestorme

Member
Joined
Dec 9, 2011
Messages
272
Reaction score
6
Location
Birmingham, UK
function onAdvance(cid, skill, oldLevel, newLevel)
if skill < (getPlayerSkillLevel(cid, 5)) then
doPlayerGiveItem(cid, 2250,1)
end
return true
end

I am clueless, how to get it working? Everywhere where I seek it's only about levels, never about skills.
Thanks in advance, rep.

//edit
Changed condition into this:
if skill < (getPlayerSkillLevel(cid, SKILL_AXE)) then

and it's 100% positively added to creature events. Still not working.
 
LUA:
function onAdvance(cid, skill, oldLevel, newLevel)
	if skill == SKILL_AXE and newLevel >= 60 and getCreatureStorage(cid, 100) == -1 then
		doCreatureSetStorage(cid, 100, 1)
		doPlayerAddItem(cid, 2250, 1)
		doCreatureSay(cid, 'You have received a prize!', TALKTYPE_ORANGE_1)
	end
	return true
end
 
Back
Top