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

Creature Level System

adrian104

New Member
Joined
May 7, 2009
Messages
36
Reaction score
0
Location
Poland
Can i create System Level on monster in *.lua.
I want something this think
You see Troll (level: 5)​
And this Troll have more hp and more attack, defence.
When monster have level 5
hp = hp * 0.05
attack = attack * 0.05
defence = defence * 0.05​
 
Last edited:
It is possible in Lua, but you might as well go Source to remove any possible errors/bugs.
 
It is possible in Lua, but you might as well go Source to remove any possible errors/bugs.
Yes, but i can edit something in cpp [monsters(Monsters::loadMonster) and game(Game::playerLookAt)], but in *.lua i thing must creat this function in sturtUp() in GlobalEvents.
 
The level system is easy to create although the attack/defence stuff can be done in lua (although all damage and defence have to be setup somewhere where you can retrieve it (that means every monster has to be reset to it's standard values) and then you mulitply it however you want) though best way is to do sources on this.
 
Not possible in pure lua, because you cannot get the monsters when spawning and set a random level to them.
 
Yup, it's not possible in Pure Lua, because there is no function onSpawn for the creatures, which would greatly allow you to create such a system, AFIAK there is no way to increase a creatures strength and defense without source edit.

The internal function that the server parses creatures( as how I see it):
Code:
XML(creature)
Converts Info into something that the server can interpret.
Outputs Creature(spawns it)
 
Back
Top