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

Give 3cc when level 20 Script Request!

Creaturescripts.xml
Code:
	<event type="advance" name="3cc" event="script" value="3cc.lua"/>
Login.lua
LUA:
	registerCreatureEvent(cid, "3cc")
3cc.lua
LUA:
function onAdvance(cid, skill, oldlevel, newlevel)
	if newlevel == 20 and skill == SKILL__LEVEL and getPlayerStorageValue(cid, 21920) == -1 then
	setPlayerStorageValue(cid, 21920, 1)
	doPlayerAddItem(cid, 2160, 3)
end
return true
end
 
Creaturescripts.xml
Code:
	<event type="advance" name="3cc" event="script" value="3cc.lua"/>
Login.lua
LUA:
	registerCreatureEvent(cid, "3cc")
3cc.lua
LUA:
function onAdvance(cid, skill, oldlevel, newlevel)
	if newlevel == 20 and skill == SKILL__LEVEL and getPlayerStorageValue(cid, 21920) == -1 then
	setPlayerStorageValue(cid, 21920, 1)
	doPlayerAddItem(cid, 2160, 3)
end
return true
end
LUA:
local levu = 20 --Level
local bb = 3 --How much ccs they will got 
function onAdvance(cid, skill, oldlevel, newlevel)
	if getPlayerLevel(cid) == levu and getPlayerStorageValue(cid, 21920) == -1 then
	setPlayerStorageValue(cid, 21920, 1)
	doPlayerAddItem(cid, 2160, bb)
end
return true
end
Edited
 
3cc at level 20+ !

Nice Script ! But only one problem... you only get the money when you are Level 20... Sorry I maby diddent expressed me enough but I ment when you are 20+ you get 3cc cuz now its many players that are like lvl 18~ then they jump over 20 and get lvl 22~ so they dont get any reward :/ Can someone help me? :D ^_^
 
Code:
function onAdvance(cid,skill,oldLevel,newLevel)
local s = 21920 -- storage
	if skill == SKILL_LEVEL and newLevel >= 20 and getPlayerStorageValue(cid,s) < 1 then
		setPlayerStorageValue(cid,s,1)
		doPlayerAddItem(cid,2160,3)
	end
	return true
end
 
Code:
function onAdvance(cid,skill,oldLevel,newLevel)
local s = 21920 -- storage
	if skill == SKILL_LEVEL and newLevel >= 20 and getPlayerStorageValue(cid,s) < 1 then
		setPlayerStorageValue(cid,s,1)
		doPlayerAddItem(cid,2160,3)
	end
	return true
end

That diddent work at all :O
 
LUA:
  local levu = 20 --Level
local bb = 3 --How much ccs they will got
function onAdvance(cid, skill, oldlevel, newlevel)
        if getPlayerLevel(cid) > levu and getPlayerStorageValue(cid, 21920) == -1 then
        setPlayerStorageValue(cid, 21920, 1)
        doPlayerAddItem(cid, 2160, bb)
end
return true
end
@Unknow: you are trying too complicated script :D
 
LUA:
  local levu = 20 --Level
local bb = 3 --How much ccs they will got
function onAdvance(cid, skill, oldlevel, newlevel)
        if getPlayerLevel(cid) > levu and getPlayerStorageValue(cid, 21920) == -1 then
        setPlayerStorageValue(cid, 21920, 1)
        doPlayerAddItem(cid, 2160, bb)
end
return true
end
@Unknow: you are trying too complicated script :D


Works Great, Good Job ! :wub:
 
Back
Top