ID:263416
 
Code:
obj
proc
SpinSlash()
if(usr.sexy==0)
if(usr.MP>=20)
for(var/turf/T in range(3))
usr.sexy=0
for(var/mob/M in orange(3))
var/damage = rand(usr.Strmin,usr.Strmax)+10
M.HP-=damage
usr.sexy=0
usr.MonsterDcheck()
usr.Lvlcheck(usr)
usr.skilllearn(usr)
usr.MP-=20
spawn(600*2)
if(usr.MP<=20)
usr<<"Not enough MP! (Need 20)"
else
usr<<"test"

mob
var
sexy=0


Problem description: spin.dm:13:error:usr.Lvlcheck:undefined proc
spin.dm:17:error::invalid expression


No put usr in proc. Ungh.

Lummox JR
In response to Lummox JR
nope just game more errors
In response to Max Omega
It's an obj proc, so the usr isn't the player, nor should usr even be in there. Lemme clean that up for you, kinda like I tried to that one time when Sora/Roy sent me the code.

mob
var/sexy = 0
proc
SpinSlash()
if(!src.sexy)
if(src.MP<=20)
src<<"Not enough MP! (Need 20)"
return
for(var/turf/T in range(3))
src.sexy=0
for(var/mob/M in orange(3))
var/damage = rand(src.Strmin,src.Strmax)+10
M.HP-=damage
src.sexy=0
M.MonsterDcheck()
src.Lvlcheck(src)
src.skilllearn(src)
src.MP-=20
spawn(600*2)


I made it a mob proc because, considering what you're doing here, that seemed like that's what it should be. Why was it an obj proc anyway?


In response to Pyro_dragons
i was gonna use the as obj because i made it so when you have the obj in your statpanel, say skills with the obj picture, it will run this proc
In response to Max Omega
It's still will. When you use the verb attached to the objs, just call this proc on the player.

obj
Leet_itam
icon = 'leet.dmi'
icon_state = "itam"
Click()
if(src.loc == usr)
usr.Become_Leet()
else
src.loc = usr

mob
proc
Become_Leet()
usr << "You are leet!"


You could also call it using a verb. Usr is allowed safely in both verbs and Click(), since only a player can click or use a verb, and since usr is the player, you call the proc on a player, which is a mob. Hence the reason it needs to be a mob proc, besides other obvious reasons.