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

Skillup Effects Req

Exmortis

Member
Joined
Jun 27, 2008
Messages
189
Reaction score
5
I've seen alot of Skillup with effects around the forum and wanted to ask if there's a possibility to make one for 0.2.7?
So when you lvl up or skillup, there's a msg that says "Level up!" or "Sword up!" and some nice effect.
 
You must use onAdvance function written in LUA by niller:
http://otland.net/f163/release-onadvance-1607/
I can tell you I used this function on TFS 0.2.3 and it doesn't make high CPU use (some scripters think that any lua function can laaag server <_<) with 150 players online.

For test I ran globalevent that execute maximum number of lua functions [7 functions used - addHP, show magic effect, show distance effect, get random position of effect...] and my 2.33GHz CPU execute ~330.000 functions / second :thumbup:
 
You must use onAdvance function written in LUA by niller:
http://otland.net/f163/release-onadvance-1607/
I can tell you I used this function on TFS 0.2.3 and it doesn't make high CPU use (some scripters think that any lua function can laaag server <_<) with 150 players online.

For test I ran globalevent that execute maximum number of lua functions [7 functions used - addHP, show magic effect, show distance effect, get random position of effect...] and my 2.33GHz CPU execute ~330.000 functions / second :thumbup:

erroradvance.jpg
 
Maybe you didn't add this into your login.lua?
Lua:
	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)
 
Yes i did.
I added
Code:
	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)

At the top of the login.lua, but do i need some sort of "function onLogin(cid)" first? Then how do I do that?
And what how do install registerCreatureEvent(cid, "PlayerThink")?
I cant seem to get anything right..
 
Back
Top