Is it possible to make the mob learn the same skills I have created for players?
For example i have created a spell named "slam" for warriors. It can be learned from level 1 and does some ammount of damage (with some boosting from player's attributes, mana % and move%).
I would like to add this spell to a warrior npc mob. I m using the "area editor" program but it doesnt support custom spells. (i think)
So i have to make it with code.
Any instructions please?
My first thought is to declare it in mud.h but then what?
Thanks in advance
You can use mpecho(at/around if you want different messages for the victim and other chars in the room) to send messages with the attacks
While your solution does cause damage to the target, it doesn't actually solve the problem of the skill you were trying to use not damaging players when used by a mob.
Eh ok i know. But still does the job.
I get skill text, i get a specific damage and ok.
Actually this is more cosmetic.
I used mpecho, with colors too ehehe
But still i want the message to appear when the mob succeeds to hit the player.
I i use fight_prog with 100 possibility it will appear the message i want every line even if the mod fails to hit the player. I read the docs and info from the internet, but i couldnt find anything. Not a prog nor an if statement.
The drawback to using mpdamage rather than actually fixing the skill so it works properly for mobs is that:
1) mpdamage never misses
2) mpecho is meant to be cosmetic
3) you didn't actually fix the problem
4) a 100% fight_prog is going off every round and is expected to execute any valid command it contains
As an added bonus, without being able to see either your custom skill code or your mprog we can't help you actually fix either of them to do what you're actually trying to do. That said, the simplest fix for your "slam" skill is probably to add an if check for pcs and an 'else' damage calculation that doesn't rely on pc attributes.