• 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 level protection, need help on function

otuserbyme

New Member
Joined
Nov 10, 2011
Messages
54
Reaction score
1
You guys have been great to help me with my last 2 questions , so here is another ;)
I have made a creaturescript function (not really it doesnt work yet) that will let characters that are level 7 or less and have vocation 0 to get a free blessing when they login so they wont loose items/skills/etc. while they are noob chars

Lua:
function onLogin
	if(isPlayer(cid))then
		if getPlayerLevel(cid) <=7 and if getPlayerVocation(cid) ==0 then
			doPlayerAddBlessing(cid, blessing) 5

I am using crying damson 3.6pl1 with 8.54 client and am wondering how to add full blessing( all 5).
Any help would be great since Im trying to learn lua right now (self-teaching is very slow when you know nothing ;) )
 
Lua:
function onLogin(cid)
	if getPlayerLevel(cid) <= 7 and getPlayerVocation(cid) == 0 then
		for k = 1, 5 do
			doPlayerAddBlessing(cid, k)
		end
	end
return TRUE
end
 
Back
Top Bottom