Open BlackYuzia opened 6 years ago
The commands for the mana system are:
wcs_set_max_mana <userid> <amount> wcs_set_mana <userid> <amount> wcs_get_max_mana <userid> <var> wcs_get_mana <userid> <var> wcs_give_max_mana <userid> <amount> wcs_give_mana <userid> <amount> wcs_take_max_mana <userid> <amount> wcs_take_mana <userid> <amount> wcs_set_mana_regeneration <userid> <amount> <speed>
An example how to use mana:
event player_spawn { es wcs_set_max_mana event_var(userid) 100 //this will set the maximum mana of the player to 50 es wcs_set_mana_regeneration event_var(userid) 3 0.1 //this will regenerate 3 Mana every 10th of a second }
This will activate mana for that race. Now you can use that mana in a skill, let's say on the player_hurt event
event player_hurt { es wcs_get_mana event_var(attacker) wcs_tmp if (server_var(wcs_tmp) >= 50) do { es wcs_take_mana event_var(attacker) 50 es wcs damage event_var(userid) event_var(attacker) 10 } }
The mana system is not something that is enabled for all races by default. You need to specifically add it to your race and incorporate it into your skills if you want to use it.
You can find the forum post for this here:
http://warcraft-source.com/board/index.php?topic=17185.msg121647#msg121647
hi @kamikazekuh , I have a question about Mana. I not see race(s) with Mana or the same. When I can find examples or find race(s) with mana?
Thx