mob
verb
LionsBarrage(M in oview(3,usr))
set category = "Battle"
set name = "Lions Barrage"
if(usr.chakra >=60)
usr<<"Not Enough Chakra!"
if(usr.resting)
usr<<"Not while resting"
return
if(usr.Frozen)
return
if(!usr.firing)
var/mob/E = usr
usr.chakra -= 60
usr.firing = 1
spawn(7)
usr.firing = 0
view()<<"<font size=1><font face=verdana><b><font color=White><font size = 1>[usr]<font color= white> says: Lions Barrage!!"
var/damage = round((((4*src.Str/target.def)*rand(50,100))/100)*4.5)
target.health -= damage
usr.loc = locate(E.x,E.y-1,E.z)
flick('BaseW.dmi',usr)
flick("LKLBKicking",usr)
usr.StrExp += rand(1,5)
usr.StrGain()
Problem description:
The problem is, is that it only moves you down one square, my friend told me it would move you in front of whoever you use it on. The other problem is, if i add the damage, calculations to it I get a runtime error:
runtime error: Cannot read 0.def
proc name: Lions Barrage (/mob/verb/LionsBarrage)
usr: Jutachi (/mob/usr)
src: Jutachi (/mob/usr)
call stack:
Jutachi (/mob/usr): Lions Barrage(the area (/area))
That error only appears when I add the damage.
Well, you've obviously at some point didn't set the player's "target" or set it to "0". So, before you try reading said variables from the "target" you need to make sure it's a /mob/ type. Which is quite simple.