Action RPG Framework

by Forum_account
Action RPG Framework
A framework for developing action RPGs.
ID:835193
 
i would like to give an ability to a player that completes some sort of quest. therefore, i would like to add one ability from the following code to the completed quest code instead of that code in mobs.dm

        // give the player some attacks
abilities += new /Ability/MeleeAttack()
abilities += new /Ability/Cleave()
abilities += new /Ability/Poison()
abilities += new /Ability/Fireball()
abilities += new /Ability/ShootArrow()
// and a crafting ability
abilities += new /CraftingAbility/MakeSword()


the problem is that when i remove an ability code, i get a runtime error.

runtime error: list index out of bounds
proc name: new character (/mob/new_character)
source file: mobs.dm,108
usr: the temporary (/mob/temporary)
src: the test (/mob)
call stack:
the test (/mob): new character()
Kalster (/client): new character(3)
select(null)
key down("space", Kalster (/client))
Kalster (/client): KeyDown("space")
After those lines it binds abilities to keys. It references them by index in your abilities list:

bind_key("6", abilities[6])

If you only add five abilities there, abilities[6] will give you an error. You can remove those lines so there are no default key bindings or update the list indexes to be correct.