• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent Addons system by level

Acordion

Member
Joined
Mar 26, 2010
Messages
150
Reaction score
6
Location
Mèxico
Example:
When Player Advance to level 30, Get's Citizen Addons
When Player Advance to level 50, Get's Hunter addons
Etc. ^_^

Creature Event
XML:
<event type="advance" name="Addons" event="script" value="Addons.lua"/>

Data\creaturescripts\scripts\Login.lua
Lua:
registerCreatureEvent(cid, "Addons")

Addons.lua
Lua:
function onAdvance(cid, skill, oldLevel, newLevel)


--- Other Config ---
local TextType = MESSAGE_STATUS_CONSOLE_ORANGE

--- Citizen ---
local citizentext = "You have now citizen addons."
local citizenlevel = 30
local citizenstorage = 11500
--- Hunter ---
local huntertext = "You have now hunter addons."
local hunterlevel = 50
local hunterstorage = 11505
--- Mage ---
local magetext = "You have now mage addons."
local magelevel = 60
local magestorage = 11510
--- Knight ---
local knighttext = "You have now knight addons."
local knightlevel = 70
local knightstorage = 11515
--- Noble ---
local nobletext = "You have now noble addons."
local noblelevel = 90
local noblestorage = 11520
--- Summoner ---
local summonertext = "You have now summoner addons."
local summonerlevel = 100
local summonerstorage = 11525
--- Warrior ---
local Warriortext = "You have now Warrior addons."
local Warriorlevel = 120
local Warriorstorage = 11530
--- Barbarian ---
local Barbariantext = "You have now Barbarian addons."
local Barbarianlevel = 125
local Barbarianstorage = 11605
--- Druid ---
local Druidtext = "You have now Druid addons."
local Druidlevel = 130
local Druidstorage = 11535
--- Wizard ---
local Wizardtext = "You have now Wizard addons."
local Wizardlevel = 135
local Wizardstorage = 11540
--- Oriental ---
local Orientaltext = "You have now Oriental addons."
local Orientallevel = 150
local Orientalstorage = 11545
--- Pirate ---
local Piratetext = "You have now Pirate addons."
local Piratelevel = 155
local Piratestorage = 11550
--- Assassin ---
local Assassintext = "You have now Assassin addons."
local Assassinlevel = 170
local Assassinstorage = 11555
--- Beggar ---
local Beggartext = "You have now Beggar addons."
local Beggarlevel = 175
local Beggarstorage = 11560
--- Shaman ---
local Shamantext = "You have now Shaman addons."
local Shamanlevel = 270
local Shamanstorage = 11565
--- Norse ---
local Norsetext = "You have now Norse addons."
local Norselevel = 180
local Norsestorage = 11570
--- Nightmare ---
local Nightmaretext = "You have now Nightmare addons."
local Nightmarelevel = 190
local Nightmarestorage = 11575
--- Jester ---
local Jestertext = "You have now Jester addons."
local Jesterlevel = 200
local Jesterstorage = 11580
--- Brotherhood ---
local Brotherhoodtext = "You have now Brotherhood addons."
local Brotherhoodlevel = 220
local Brotherhoodstorage = 11585
--- Demonhunter ---
local Demonhuntertext = "You have now Demonhunter addons."
local Demonhunterlevel = 240
local Demonhunterstorage = 11590
--- Yalaharian ---
local Yalahariantext = "You have now Yalaharian addons."
local Yalaharianlevel = 245
local Yalaharianstorage = 11595
--- Warmaster ---
local Warmastertext = "You have now Warmaster addons."
local Warmasterlevel = 260
local Warmasterstorage = 11600


--- Citizen ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= citizenlevel) then
			if(getPlayerStorageValue(cid, citizenstorage) == -1)then 
				doPlayerAddOutfit(cid, 136, 3)
				doPlayerAddOutfit(cid, 128, 3)
				setPlayerStorageValue(cid, citizenstorage, 1)
				doPlayerSendTextMessage(cid, TextType, citizentext)
				end
		end
	end
--- Hunter ---	
	if (skill == SKILL__LEVEL) then
		if(newLevel >= hunterlevel) then
			if(getPlayerStorageValue(cid, hunterstorage) == -1)then 
				doPlayerAddOutfit(cid, 137, 3)
				doPlayerAddOutfit(cid, 129, 3)
				setPlayerStorageValue(cid, hunterstorage, 1)
				doPlayerSendTextMessage(cid, TextType, huntertext)
				end
		end
	end
--- Mage ---	
	if (skill == SKILL__LEVEL) then
		if(newLevel >= magelevel) then
			if(getPlayerStorageValue(cid, magestorage) == -1)then 
				doPlayerAddOutfit(cid, 138, 3)
				doPlayerAddOutfit(cid, 130, 3)
				setPlayerStorageValue(cid, magestorage, 1)
				doPlayerSendTextMessage(cid, TextType, magetext)
				end
		end
	end
--- Knight ---	
	if (skill == SKILL__LEVEL) then
		if(newLevel >= knightlevel) then
			if(getPlayerStorageValue(cid, knightstorage) == -1)then 
				doPlayerAddOutfit(cid, 139, 3)
				doPlayerAddOutfit(cid, 131, 3)
				setPlayerStorageValue(cid, knightstorage, 1)
				doPlayerSendTextMessage(cid, TextType, knighttext)
				end
		end
	end
--- Nobleman and Noblewoman ---	
	if (skill == SKILL__LEVEL) then
		if(newLevel >= noblelevel) then
			if(getPlayerStorageValue(cid, noblestorage) == -1)then 
				doPlayerAddOutfit(cid, 140, 3)
				doPlayerAddOutfit(cid, 132, 3)
				setPlayerStorageValue(cid, noblestorage, 1)
				doPlayerSendTextMessage(cid, TextType, nobletext)
				end
		end
	end
--- Summoner ---	
	if (skill == SKILL__LEVEL) then
		if(newLevel >= summonerlevel) then
			if(getPlayerStorageValue(cid, summonerstorage) == -1)then 
				doPlayerAddOutfit(cid, 141, 3)
				doPlayerAddOutfit(cid, 133, 3)
				setPlayerStorageValue(cid, summonerstorage, 1)
				doPlayerSendTextMessage(cid, TextType, summonertext)
				end
		end
	end
	--- Warrior ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Warriorlevel) then
			if(getPlayerStorageValue(cid, Warriorstorage) == -1)then 
				doPlayerAddOutfit(cid, 142, 3)
				doPlayerAddOutfit(cid, 134, 3)
				setPlayerStorageValue(cid, Warriorstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Warriortext)
				end
		end
	end
	--- Barbarian ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Barbarianlevel) then
			if(getPlayerStorageValue(cid, Barbarianstorage) == -1)then 
				doPlayerAddOutfit(cid, 147, 3)
				doPlayerAddOutfit(cid, 143, 3)
				setPlayerStorageValue(cid, Barbarianstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Barbariantext)
				end
		end
	end
	--- Druid ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Druidlevel) then
			if(getPlayerStorageValue(cid, Druidstorage) == -1)then 
				doPlayerAddOutfit(cid, 148, 3)
				doPlayerAddOutfit(cid, 144, 3)
				setPlayerStorageValue(cid, Druidstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Druidtext)
				end
		end
	end
	--- Wizard ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Wizardlevel) then
			if(getPlayerStorageValue(cid, Wizardstorage) == -1)then 
				doPlayerAddOutfit(cid, 149, 3)
				doPlayerAddOutfit(cid, 145, 3)
				setPlayerStorageValue(cid, Wizardstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Wizardtext)
				end
		end
	end
	--- Oriental ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Orientallevel) then
			if(getPlayerStorageValue(cid, Orientalstorage) == -1)then 
				doPlayerAddOutfit(cid, 150, 3)
				doPlayerAddOutfit(cid, 146, 3)
				setPlayerStorageValue(cid, Orientalstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Orientaltext)
				end
		end
	end
	--- Pirate ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Piratelevel) then
			if(getPlayerStorageValue(cid, Piratestorage) == -1)then 
				doPlayerAddOutfit(cid, 155, 3)
				doPlayerAddOutfit(cid, 151, 3)
				setPlayerStorageValue(cid, Piratestorage, 1)
				doPlayerSendTextMessage(cid, TextType, Piratetext)
				end
		end
	end
	--- Assassin ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Assassinlevel) then
			if(getPlayerStorageValue(cid, Assassinstorage) == -1)then 
				doPlayerAddOutfit(cid, 156, 3)
				doPlayerAddOutfit(cid, 152, 3)
				setPlayerStorageValue(cid, Assassinstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Assassintext)
				end
		end
	end
	--- Beggar ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Beggarlevel) then
			if(getPlayerStorageValue(cid, Beggarstorage) == -1)then 
				doPlayerAddOutfit(cid, 157, 3)
				doPlayerAddOutfit(cid, 153, 3)
				setPlayerStorageValue(cid, Beggarstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Beggartext)
				end
		end
	end
	--- Shaman ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Shamanlevel) then
			if(getPlayerStorageValue(cid, Shamanstorage) == -1)then 
				doPlayerAddOutfit(cid, 158, 3)
				doPlayerAddOutfit(cid, 154, 3)
				setPlayerStorageValue(cid, Shamanstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Shamantext)
				end
		end
	end
	--- Norse ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Norselevel) then
			if(getPlayerStorageValue(cid, Norsestorage) == -1)then 
				doPlayerAddOutfit(cid, 252, 3)
				doPlayerAddOutfit(cid, 251, 3)
				setPlayerStorageValue(cid, Norsestorage, 1)
				doPlayerSendTextMessage(cid, TextType, Norsetext)
				end
		end
	end
	--- Nightmare ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Nightmarelevel) then
			if(getPlayerStorageValue(cid, Nightmarestorage) == -1)then 
				doPlayerAddOutfit(cid, 269, 3)
				doPlayerAddOutfit(cid, 268, 3)
				setPlayerStorageValue(cid, Nightmarestorage, 1)
				doPlayerSendTextMessage(cid, TextType, Nightmaretext)
				end
		end
	end
	--- Jester ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Jesterlevel) then
			if(getPlayerStorageValue(cid, Jesterstorage) == -1)then 
				doPlayerAddOutfit(cid, 270, 3)
				doPlayerAddOutfit(cid, 273, 3)
				setPlayerStorageValue(cid, Jesterstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Jestertext)
				end
		end
	end
	--- Brotherhood ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Brotherhoodlevel) then
			if(getPlayerStorageValue(cid, Brotherhoodstorage) == -1)then 
				doPlayerAddOutfit(cid, 279, 3)
				doPlayerAddOutfit(cid, 278, 3)
				setPlayerStorageValue(cid, Brotherhoodstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Brotherhoodtext)
				end
		end
	end
	--- Demonhunter ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Demonhunterlevel) then
			if(getPlayerStorageValue(cid, Demonhunterstorage) == -1)then 
				doPlayerAddOutfit(cid, 288, 3)
				doPlayerAddOutfit(cid, 289, 3)
				setPlayerStorageValue(cid, Demonhunterstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Demonhuntertext)
				end
		end
	end
	--- Yalaharian ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Yalaharianlevel) then
			if(getPlayerStorageValue(cid, Yalaharianstorage) == -1)then 
				doPlayerAddOutfit(cid, 324, 3)
				doPlayerAddOutfit(cid, 325, 3)
				setPlayerStorageValue(cid, Yalaharianstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Yalahariantext)
				end
		end
	end
	--- Warmaster ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Warmasterlevel) then
			if(getPlayerStorageValue(cid, Warmasterstorage) == -1)then 
				doPlayerAddOutfit(cid, 336, 3)
				doPlayerAddOutfit(cid, 335, 3)
				setPlayerStorageValue(cid, Warmasterstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Warmastertext)
				end
		end
	end

	
	return true
	end
 
would be good if you made a script for highest level on the server gets like special outfit (dwarf, elf)
 
@Bok

Script
Lua:
function onAdvance(cid, skill, oldLevel, newLevel)

--- Other Config ---
local TextType = MESSAGE_STATUS_CONSOLE_ORANGE

--- Citizen ---
local citizentext = "You have now citizen addons."
local citizenlevel = 30
local citizenstorage = 11500
--- Hunter ---
local huntertext = "You have now hunter addons."
local hunterlevel = 50
local hunterstorage = 11505
--- Mage ---
local magetext = "You have now mage addons."
local magelevel = 60
local magestorage = 11510
--- Knight ---
local knighttext = "You have now knight addons."
local knightlevel = 70
local knightstorage = 11515
--- Noble ---
local nobletext = "You have now noble addons."
local noblelevel = 90
local noblestorage = 11520
--- Summoner ---
local summonertext = "You have now summoner addons."
local summonerlevel = 100
local summonerstorage = 11525
--- Warrior ---
local Warriortext = "You have now Warrior addons."
local Warriorlevel = 120
local Warriorstorage = 11530
--- Barbarian ---
local Barbariantext = "You have now Barbarian addons."
local Barbarianlevel = 125
local Barbarianstorage = 11605
--- Druid ---
local Druidtext = "You have now Druid addons."
local Druidlevel = 130
local Druidstorage = 11535
--- Wizard ---
local Wizardtext = "You have now Wizard addons."
local Wizardlevel = 135
local Wizardstorage = 11540
--- Oriental ---
local Orientaltext = "You have now Oriental addons."
local Orientallevel = 150
local Orientalstorage = 11545
--- Pirate ---
local Piratetext = "You have now Pirate addons."
local Piratelevel = 155
local Piratestorage = 11550
--- Assassin ---
local Assassintext = "You have now Assassin addons."
local Assassinlevel = 170
local Assassinstorage = 11555
--- Beggar ---
local Beggartext = "You have now Beggar addons."
local Beggarlevel = 175
local Beggarstorage = 11560
--- Shaman ---
local Shamantext = "You have now Shaman addons."
local Shamanlevel = 270
local Shamanstorage = 11565
--- Norse ---
local Norsetext = "You have now Norse addons."
local Norselevel = 180
local Norsestorage = 11570
--- Nightmare ---
local Nightmaretext = "You have now Nightmare addons."
local Nightmarelevel = 190
local Nightmarestorage = 11575
--- Jester ---
local Jestertext = "You have now Jester addons."
local Jesterlevel = 200
local Jesterstorage = 11580
--- Brotherhood ---
local Brotherhoodtext = "You have now Brotherhood addons."
local Brotherhoodlevel = 220
local Brotherhoodstorage = 11585
--- Demonhunter ---
local Demonhuntertext = "You have now Demonhunter addons."
local Demonhunterlevel = 240
local Demonhunterstorage = 11590
--- Yalaharian ---
local Yalahariantext = "You have now Yalaharian addons."
local Yalaharianlevel = 245
local Yalaharianstorage = 11595
--- Warmaster ---
local Warmastertext = "You have now Warmaster addons."
local Warmasterlevel = 260
local Warmasterstorage = 11600


--- Citizen ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= citizenlevel) then
			if(getPlayerStorageValue(cid, citizenstorage) == -1)then
			if(getPlayerPremiumDays(cid) >= 1)then			
				doPlayerAddOutfit(cid, 136, 3)
				doPlayerAddOutfit(cid, 128, 3)
				setPlayerStorageValue(cid, citizenstorage, 1)
				doPlayerSendTextMessage(cid, TextType, citizentext)
				end
				end
		end
	end
--- Hunter ---	
	if (skill == SKILL__LEVEL) then
		if(newLevel >= hunterlevel) then
			if(getPlayerStorageValue(cid, hunterstorage) == -1)then 
			if(getPlayerPremiumDays(cid) >= 1)then
			doPlayerAddOutfit(cid, 137, 3)
				doPlayerAddOutfit(cid, 129, 3)
				setPlayerStorageValue(cid, hunterstorage, 1)
				doPlayerSendTextMessage(cid, TextType, huntertext)
				end
				end
		end
	end
--- Mage ---	
	if (skill == SKILL__LEVEL) then
		if(newLevel >= magelevel) then
			if(getPlayerStorageValue(cid, magestorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 138, 3)
				doPlayerAddOutfit(cid, 130, 3)
				setPlayerStorageValue(cid, magestorage, 1)
				doPlayerSendTextMessage(cid, TextType, magetext)
				end
				end
		end
	end
--- Knight ---	
	if (skill == SKILL__LEVEL) then
		if(newLevel >= knightlevel) then
			if(getPlayerStorageValue(cid, knightstorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 139, 3)
				doPlayerAddOutfit(cid, 131, 3)
				setPlayerStorageValue(cid, knightstorage, 1)
				doPlayerSendTextMessage(cid, TextType, knighttext)
				end
				end
		end
	end
--- Nobleman and Noblewoman ---	
	if (skill == SKILL__LEVEL) then
		if(newLevel >= noblelevel) then
			if(getPlayerStorageValue(cid, noblestorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 140, 3)
				doPlayerAddOutfit(cid, 132, 3)
				setPlayerStorageValue(cid, noblestorage, 1)
				doPlayerSendTextMessage(cid, TextType, nobletext)
				end
				end
		end
	end
--- Summoner ---	
	if (skill == SKILL__LEVEL) then
		if(newLevel >= summonerlevel) then
			if(getPlayerStorageValue(cid, summonerstorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 141, 3)
				doPlayerAddOutfit(cid, 133, 3)
				setPlayerStorageValue(cid, summonerstorage, 1)
				doPlayerSendTextMessage(cid, TextType, summonertext)
				end
				end
		end
	end
	--- Warrior ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Warriorlevel) then
			if(getPlayerStorageValue(cid, Warriorstorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 142, 3)
				doPlayerAddOutfit(cid, 134, 3)
				setPlayerStorageValue(cid, Warriorstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Warriortext)
				end
				end
		end
	end
	--- Barbarian ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Barbarianlevel) then
			if(getPlayerStorageValue(cid, Barbarianstorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 147, 3)
				doPlayerAddOutfit(cid, 143, 3)
				setPlayerStorageValue(cid, Barbarianstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Barbariantext)
				end
				end
		end
	end
	--- Druid ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Druidlevel) then
			if(getPlayerStorageValue(cid, Druidstorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 148, 3)
				doPlayerAddOutfit(cid, 144, 3)
				setPlayerStorageValue(cid, Druidstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Druidtext)
				end
				end
		end
	end
	--- Wizard ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Wizardlevel) then
			if(getPlayerStorageValue(cid, Wizardstorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 149, 3)
				doPlayerAddOutfit(cid, 145, 3)
				setPlayerStorageValue(cid, Wizardstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Wizardtext)
				end
				end
		end
	end
	--- Oriental ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Orientallevel) then
			if(getPlayerStorageValue(cid, Orientalstorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 150, 3)
				doPlayerAddOutfit(cid, 146, 3)
				setPlayerStorageValue(cid, Orientalstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Orientaltext)
				end
				end
		end
	end
	--- Pirate ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Piratelevel) then
			if(getPlayerStorageValue(cid, Piratestorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 155, 3)
				doPlayerAddOutfit(cid, 151, 3)
				setPlayerStorageValue(cid, Piratestorage, 1)
				doPlayerSendTextMessage(cid, TextType, Piratetext)
				end
				end
		end
	end
	--- Assassin ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Assassinlevel) then
			if(getPlayerStorageValue(cid, Assassinstorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 156, 3)
				doPlayerAddOutfit(cid, 152, 3)
				setPlayerStorageValue(cid, Assassinstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Assassintext)
				end
				end
		end
	end
	--- Beggar ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Beggarlevel) then
			if(getPlayerStorageValue(cid, Beggarstorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 157, 3)
				doPlayerAddOutfit(cid, 153, 3)
				setPlayerStorageValue(cid, Beggarstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Beggartext)
				end
				end
		end
	end
	--- Shaman ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Shamanlevel) then
			if(getPlayerStorageValue(cid, Shamanstorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 158, 3)
				doPlayerAddOutfit(cid, 154, 3)
				setPlayerStorageValue(cid, Shamanstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Shamantext)
				end
				end
		end
	end
	--- Norse ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Norselevel) then
			if(getPlayerStorageValue(cid, Norsestorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 252, 3)
				doPlayerAddOutfit(cid, 251, 3)
				setPlayerStorageValue(cid, Norsestorage, 1)
				doPlayerSendTextMessage(cid, TextType, Norsetext)
				end
				end
		end
	end
	--- Nightmare ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Nightmarelevel) then
			if(getPlayerStorageValue(cid, Nightmarestorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 269, 3)
				doPlayerAddOutfit(cid, 268, 3)
				setPlayerStorageValue(cid, Nightmarestorage, 1)
				doPlayerSendTextMessage(cid, TextType, Nightmaretext)
				end
				end
		end
	end
	--- Jester ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Jesterlevel) then
			if(getPlayerStorageValue(cid, Jesterstorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 270, 3)
				doPlayerAddOutfit(cid, 273, 3)
				setPlayerStorageValue(cid, Jesterstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Jestertext)
				end
				end
		end
	end
	--- Brotherhood ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Brotherhoodlevel) then
			if(getPlayerStorageValue(cid, Brotherhoodstorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 279, 3)
				doPlayerAddOutfit(cid, 278, 3)
				setPlayerStorageValue(cid, Brotherhoodstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Brotherhoodtext)
				end
				end
		end
	end
	--- Demonhunter ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Demonhunterlevel) then
			if(getPlayerStorageValue(cid, Demonhunterstorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 288, 3)
				doPlayerAddOutfit(cid, 289, 3)
				setPlayerStorageValue(cid, Demonhunterstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Demonhuntertext)
				end
				end
		end
	end
	--- Yalaharian ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Yalaharianlevel) then
			if(getPlayerStorageValue(cid, Yalaharianstorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 324, 3)
				doPlayerAddOutfit(cid, 325, 3)
				setPlayerStorageValue(cid, Yalaharianstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Yalahariantext)
				end
				end
		end
	end
	--- Warmaster ---
	if (skill == SKILL__LEVEL) then
		if(newLevel >= Warmasterlevel) then
			if(getPlayerStorageValue(cid, Warmasterstorage) == -1)then 
				if(getPlayerPremiumDays(cid) >= 1)then
				doPlayerAddOutfit(cid, 336, 3)
				doPlayerAddOutfit(cid, 335, 3)
				setPlayerStorageValue(cid, Warmasterstorage, 1)
				doPlayerSendTextMessage(cid, TextType, Warmastertext)
				end
				end
		end
	end

	
	return true
	end
 
Last edited:
This is crap o_O

Code:
local config = {
	color = MESSAGE_STATUS_CONSOLE_ORANGE,
	addons = {
		{ name = "citizen", outfits = { 136, 128 }, addon = 3, skill = SKILL__LEVEL, level = 50, storage = 666 }
	}
}
 
function onAdvance(cid, skill, oldLevel, newLevel)
	for _, addon in ipairs(config.addons) do
		if(addon.skill == skill and newLevel >= level and getPlayerStorageValue(cid, addon.storage) > 0) then
			for _, outfit in ipairs(addon.outfits) do
				doPlayerAddOutfit(cid, outfit, addon.addon)
			end

			setPlayerStorageValue(cid, addon.storage)
			doPlayerSendTextMessage(cid, config.color, "You have now " .. addon.name .. " addon" .. (addon.addon == 3 and "s" or " #" .. addon.addon) .. ".")
		end
	end

	return TRUE
end

Here you go, learn from it ;p
 
Last edited:
Lua:
local t = {
	{level = 30, name = 'Citizen'},
	{level = 50, name = 'Hunter'},
	{level = 60, name = 'Mage'},
	{level = 70, name = 'Knight'},
	{level = 90, name = 'Noble'},
	{level = 100, name = 'Summoner'},
	{level = 120, name = 'Warrior'},
	{level = 125, name = 'Barbarian'},
	{level = 130, name = 'Druid'},
	{level = 135, name = 'Wizard'},
	{level = 150, name = 'Oriental'},
	{level = 155, name = 'Pirate'},
	{level = 170, name = 'Assassin'},
	{level = 175, name = 'Beggar'},
	{level = 270, name = 'Shaman'},
	{level = 180, name = 'Norse'},
	{level = 190, name = 'Nightmare'},
	{level = 200, name = 'Jester'},
	{level = 220, name = 'Brotherhood'},
	{level = 240, name = 'Demonhunter'},
	{level = 245, name = 'Yalaharian'},
	{level = 260, name = 'Warmaster'}
}

function onAdvance(cid, skill, oldLevel, newLevel)

	if skill == SKILL__LEVEL then
		for k, v in ipairs(t) do
			if newLevel >= v.level and not canPlayerWearOutfitId(cid, k, 3) then
				doPlayerAddOutfitId(cid, k, 3)
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'You can now wear ' .. v.name .. ' addons.')
				break
			end
		end
	end

	return true
end
17189-130475-RageFace2png-620x.jpg
 
Last edited:
This is crap o_O

Code:
local config = {
	color = MESSAGE_STATUS_CONSOLE_ORANGE,
	addons = {
		{ name = "citizen", outfits = { 136, 128 }, addon = 3, skill = SKILL__LEVEL, level = 50, storage = 666 }
	}
}
 
function onAdvance(cid, skill, oldLevel, newLevel)
	for _, addon in ipairs(config.addons) do
		if(addon.skill == skill and newLevel >= level and getCreatureStorage(cid, addon.storage) > 0) then
			for _, outfit in [B][color="red"]ipairs[/color][/B](addon.outfits) do
				doPlayerAddOutfit(cid, outfit, addon.addon)
			end

			doCreatureSetStorage(cid, addon.storage)
			doPlayerSendTextMessage(cid, config.color, "You have now " .. addon.name .. " addon" .. (addon.addon == 3 and "s" or " #" .. addon.addon) .. ".")
		end
	end

	return true
end

Here you go, learn from it ;p
best be trollin
 
@Cykotitan| Dont understand something, What is the function of this?

Lua:
for _, v

and, wath is "k"?
Lua:
canPlayerWearOutfitId(cid, k, 3) then
				doPlayerAddOutfitId(cid, k, 3)

Thanks ;)
 
Back
Top