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

Check player level when player level highter that required then give Addon! HELP

johny5608

johny
Joined
Oct 5, 2008
Messages
120
Reaction score
0
Location
Wien
Hello Otlanders again!,
I have got problem i search a script that add to player Addon when he had required level or highter! But i wanted with Talkaction: example[15]: !checkaddon then it give player addon when he had highter or required level!
I have found a script with Creaturescripts
function onAdvance(cid, skill, oldLevel, newLevel)
--- Other Config ---
local TextType = MESSAGE_STATUS_CONSOLE_ORANGE
--- Citizen ---
local citizentext = "Zdobyles citizen addons."
local citizenlevel = 3000
local citizenstorage = 11500
--- Hunter ---
local huntertext = "Zdobyles hunter addons."
local hunterlevel = 5000
local hunterstorage = 11505
--- Mage ---
local magetext = "Zdobyles mage addons."
local magelevel = 7000
local magestorage = 11510
--- Knight ---
local knighttext = "Zdobyles knight addons."
local knightlevel = 7500
local knightstorage = 11515
--- Noble ---
local nobletext = "Zdobyles noble addons."
local noblelevel = 1000
local noblestorage = 11520
--- Summoner ---
local summonertext = "Zdobyles summoner addons."
local summonerlevel = 500
local summonerstorage = 11525
--- Warrior ---
local Warriortext = "Zdobyles Warrior addons."
local Warriorlevel = 6000
local Warriorstorage = 11530
--- Barbarian ---
local Barbariantext = "Zdobyles Barbarian addons."
local Barbarianlevel = 10000
local Barbarianstorage = 11605
--- Druid ---
local Druidtext = "Zdobyles Druid addons."
local Druidlevel = 7600
local Druidstorage = 11535
--- Wizard ---
local Wizardtext = "Zdobyles Wizard addons."
local Wizardlevel = 15000
local Wizardstorage = 11540
--- Oriental ---
local Orientaltext = "Zdobyles Oriental addons."
local Orientallevel = 3000
local Orientalstorage = 11545
--- Pirate ---
local Piratetext = "Zdobyles Pirate addons."
local Piratelevel = 15500
local Piratestorage = 11550
--- Assassin ---
local Assassintext = "Zdobyles Assassin addons."
local Assassinlevel = 16000
local Assassinstorage = 11555
--- Beggar ---
local Beggartext = "Zdobyles Beggar addons."
local Beggarlevel = 17000
local Beggarstorage = 11560
--- Shaman ---
local Shamantext = "Zdobyles Shaman addons."
local Shamanlevel = 20000
local Shamanstorage = 11565
--- Norse ---
local Norsetext = "Zdobyles Norse addons."
local Norselevel = 21000
local Norsestorage = 11570
--- Nightmare ---
local Nightmaretext = "Zdobyles Nightmare addons."
local Nightmarelevel = 23000
local Nightmarestorage = 11575
--- Jester ---
local Jestertext = "Zdobyles Jester addons."
local Jesterlevel = 27000
local Jesterstorage = 11580
--- Brotherhood ---
local Brotherhoodtext = "Zdobyles Brotherhood addons."
local Brotherhoodlevel = 31000
local Brotherhoodstorage = 11585
--- Demonhunter ---
local Demonhuntertext = "Zdobyles Demonhunter addons."
local Demonhunterlevel = 42000
local Demonhunterstorage = 11590
--- Yalaharian ---
local Yalahariantext = "Zdobyles Yalaharian addons."
local Yalaharianlevel = 36000
local Yalaharianstorage = 11595
--- Warmaster ---
local Warmastertext = "Zdobyles Warmaster addons."
local Warmasterlevel = 35000
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

But when player play longer on my ots and befor i gived this script to my ots it dont give addons! Example i have logged with a player that have got lvl 8000 and he don't became any addon! and at that time he should have mage,citizen and more addons Please help!
 
Ok, I organized the script, if someone wants to fix it now, lol.
Lua:
function onAdvance(cid, skill, oldLevel, newLevel)
--- Other Config ---
local TextType = MESSAGE_STATUS_CONSOLE_ORANGE

local t = {
[11500] = {Citizen, 3000, 136, 128},
[11505] = {Hunter, 5000, 137, 129},
[11510] = {Mage, 7000, 138, 130},
[11515] = {Knight, 7500, 139, 131},
[11520] = {Noble, 1000, 140, 132},
[11525] = {summoner, 500, 141, 133},
[11530] = {Warrior, 6000, 142, 134},
[11605] = {Barbarian, 6000, 147, 143},
[11535] = {Druid, 7600, 148, 144},
[11540] = {Wizard, 15000, 149, 145},
[11545] = {Oriental, 3000, 150, 146},
[11550] = {Pirate, 15500, 155, 151},
[11555] = {Assassin, 16000, 156, 152},
[11560] = {Beggar, 17000, 157, 153},
[11565] = {Shaman, 20000, 158, 154},
[11570] = {Norse, 21000, 252, 251},
[11575] = {Nightmare, 23000, 269, 268},
[11580] = {Jester, 27000, 270, 273},
[11585] = {Brotherhood, 31000, 270, 273},
[11590] = {Demonhunter, 42000, 288, 289},
[11595] = {Yalaharian, 36000, 324, 325},
[11600] = {Warmaster,  35000, 336, 335}
}

for k, v in pairs(t) do
    if (skill == SKILL__LEVEL) then
       if (newlevel >= v[2]) then
          if getPlayerStorageValue(cid,k) == -1 then
             doPlayerAddOutfit(cid,v[3],3)
             doPlayerAddOutfit(cid,v[4],3)
             setPlayerStorageValue(cid,k,1)
             doPlayerSendTextMessage(cid, TextType, "Zdobyles " .. v[1] .. " addons.")
          end
       return true
    end
end
end
end
 
Back
Top