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

Reward at level 50 and also 100! plz check

Entral

C
Joined
May 1, 2009
Messages
371
Reaction score
0
Location
Sweden
Hello, when some1 gets to level 50, i want to reward him 5 cc...


THIS HAVNT BEEN ANSWERED!
Is it possible to have it for level 100 also??? how?
 
Last edited:
Code:
local config = {
	level = 50,
	skill = SKILL__LEVEL,
	item = 2160,
	count = 5,
	storage = 1337
}
function onAdvance(cid, skill, oldlevel, newlevel)
	if(skill == config.skill and newlevel >= config.level and getPlayerStorageValue(cid, config.storage) < 1) then
		setPlayerStorageValue(cid, config.storage, 1)
		doPlayerAddItem(cid, config.item, config.count)
	end
	return true
end
Also register in login.lua and creaturescripts.xml
 
Code:
local config = {
	level = 50,
	skill = SKILL__LEVEL,
	item = 2160,
	count = 5,
	storage = 1337
}
function onAdvance(cid, skill, oldlevel, newlevel)
	if(skill == config.skill and newlevel >= config.level and getPlayerStorageValue(cid, config.storage) < 1) then
		setPlayerStorageValue(cid, config.storage, 1)
		doPlayerAddItem(cid, config.item, config.count)
	end
	return true
end
Also register in login.lua and creaturescripts.xml

what shull i register in login.lua?
thanks :)
 
creaturescripts.xml
Code:
	<event type="advance" name="[B][COLOR="Red"]EventName[/COLOR][/B]" event="script" value="[B][COLOR="Red"]scriptname.lua[/COLOR][/B]"/>
login.lua
Code:
	registerCreatureEvent(cid, "[B][COLOR="Red"]EventName[/COLOR][/B]")
 
creaturescripts.xml
Code:
	<event type="advance" name="[B][COLOR="Red"]EventName[/COLOR][/B]" event="script" value="[B][COLOR="Red"]scriptname.lua[/COLOR][/B]"/>
login.lua
Code:
	registerCreatureEvent(cid, "[B][COLOR="Red"]EventName[/COLOR][/B]")

thanks alot :D!! rep++
 
creaturescripts.xml
Code:
	<event type="advance" name="[B][COLOR="Red"]EventName[/COLOR][/B]" event="script" value="[B][COLOR="Red"]scriptname.lua[/COLOR][/B]"/>
login.lua
Code:
	registerCreatureEvent(cid, "[B][COLOR="Red"]EventName[/COLOR][/B]")

put in the login.lua wherever?
 
Back
Top