MagicHereos
Magic.org.pl
- Joined
- Nov 6, 2008
- Messages
- 60
- Reaction score
- 0
@UP
Dont work
Dont work
Last edited:
--onAdvance system by 4220niller
--Script by Rizz
function onAdvance(cid, oldlevel, newlevel)
if newlevel == 100 then
playerName = getCreatureName(cid)
broadcastMessage(playerName .. ' reached level 100!', MESSAGE_STATUS_WARNING)
end
end
Then you need to make a new directory in data/creaturescritps/scripts/ and name it advances.
then in data/creaturescripts/scripts/advances/ add the following files: axe.lua, club.lua, distance.lua, fishing.lua, fist.lua, level.lua, maglevel.lua, shield.lua, sword.lua.
Code:<event type="login" name="PlayerLogin" script="login.lua"/> <event type="logout" name="PlayerLogout" script="logout.lua"/> <event type="death" name="PlayerDeath" script="playerdeath.lua"/> <event type="think" name="PlayerThink" script="think.lua"/>
If you have another PlayerLogin/PlayerThink event then add the above things in that/those file(s)
dofile("./data/creaturescripts/scripts/onAdvance.lua")
function onThink(cid, interval)
onAdvanceController(cid)
return TRUE
end
<event type="think" name="PlayerThink" script="think.lua"/>
registerCreatureEvent(cid, "PlayerThink")
OLD_LEVELS[cid] = getPlayerLevel(cid)
OLD_MAGLEVELS[cid] = getPlayerMagLevel(cid)
OLD_FIST[cid] = getPlayerSkill(cid,SKILL_FIST)
OLD_CLUB[cid] = getPlayerSkill(cid,SKILL_CLUB)
OLD_AXE[cid] = getPlayerSkill(cid,SKILL_AXE)
OLD_SWORD[cid] = getPlayerSkill(cid,SKILL_SWORD)
OLD_DISTANCE[cid] = getPlayerSkill(cid,SKILL_DISTANCE)
OLD_SHIELD[cid] = getPlayerSkill(cid,SKILL_SHIELD)
OLD_FISHING[cid] = getPlayerSkill(cid,SKILL_FISHING