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

CreatureEvent OnAdvanced Sistem For All Server Available

Nightss

Normal People
Joined
May 18, 2013
Messages
55
Reaction score
12
Location
Mexicali
Hello Otland-World
Strack And Me, Create This Script For Best Sistem On Advanced Level, This Script Contain;

Recover Health And Mana With SkillUP Or LevelUP
Message With SKILL OR LEVEL UP
Character Save With Skill Or Level Up!
Cute Magic And Distance Effects
Made From a certain level To Let Me Take All That

Alright Lets Go,
Creaturescripts;
PHP:
local save =true
local levelrqd =1

local skillxmsg ={
[0]={'FistUp!'},-- SKILL_FIST = 0
[1]={'ClubUp!'},-- SKILL_CLUB = 1
[2]={'SwordUp!'},-- SKILL_SWORD = 2
[3]={'AxeUp!'},-- SKILL_AXE = 3
[4]={'DistanceUp!'},-- SKILL_DISTANCE = 4
[5]={'ShieldUp!'},-- SKILL_SHIELD = 5
[6]={'FishUp!'},-- SKILL_FISHING = 6
[7]={'MagicUp!'},-- SKILL__MAGLEVEL = 7
[8]={'LevelUp!'}-- SKILL__LEVEL = 8
}

function onAdvance(cid, skill, oldlevel, newlevel)
local cidpos = getCreaturePosition(cid)
local pos ={x=cidpos.x+1,y=cidpos.y-1,z=cidpos.z}

       if getPlayerLevel(cid)>= levelrqd then
       doCreatureSay(cid, skillxmsg[skill], TALKTYPE_MONSTER)
         doCreatureAddHealth(cid, getCreatureMaxHealth(cid)- getCreatureHealth(cid))
          doCreatureAddMana(cid, getCreatureMaxMana(cid)- getCreatureMana(cid))
           doPlayerSave(cid, save)
          doSendMagicEffect(cidpos, CONST_ME_FIREWORK_BLUE)
       doSendDistanceShoot(pos, cidpos, CONST_ANY_ENERGYBALL)
      end
     return true and(skill ==  SKILL__LEVEL and doCreatureSay(cid, skillxmsg[skill].." "..newlevel) or doCreatureSay(cid, skillxmsg[skill]))
end
Login.lua;
PHP:
registerCreatureEvent(cid,'onAdvanced')

Creaturescrips.xml;
PHP:
<event type="advance" name="onAdvance" event="script" value="onAdvanced.lua"/>

Thanks For Watch!
 
Last edited:
Code:
 returntrueand
what the heck is this??
it should be
Code:
 return (skill == SKILL__LEVEL and doCreatureSay(cid, skillxmsg[skill].." "..newlevel) or doCreatureSay(cid, skillxmsg[skill]))
 
I Knew that but i was lazy to edit -_- since i am working on a new c++ code

a better code

Code:
local skillxmsg ={
[0]={'FistUp!'},-- SKILL_FIST = 0
[1]={'ClubUp!'},-- SKILL_CLUB = 1
[2]={'SwordUp!'},-- SKILL_SWORD = 2
[3]={'AxeUp!'},-- SKILL_AXE = 3
[4]={'DistanceUp!'},-- SKILL_DISTANCE = 4
[5]={'ShieldUp!'},-- SKILL_SHIELD = 5
[6]={'FishUp!'},-- SKILL_FISHING = 6
[7]={'MagicUp!'},-- SKILL__MAGLEVEL = 7
[8]={'LevelUp!'}-- SKILL__LEVEL = 8
}

function onAdvance(cid, skill, oldlevel, newlevel)
local cidpos = getCreaturePosition(cid)
local pos ={x=cidpos.x+1,y=cidpos.y-1,z=cidpos.z}

      doCreatureSay(cid, skillxmsg[skill], TALKTYPE_MONSTER)
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
          doCreatureAddMana(cid, getCreatureMaxMana(cid))
          doPlayerSave(cid, true)
          doSendMagicEffect(cidpos, CONST_ME_FIREWORK_BLUE)
      doSendDistanceShoot(pos, cidpos, CONST_ANY_ENERGYBALL)
    return true and(skill ==  SKILL__LEVEL and doCreatureSay(cid, skillxmsg[skill].." "..newlevel) or doCreatureSay(cid, skillxmsg[skill]))
end

You Don't Need if.
 
Back
Top