ID:140720
 
Code:
Techniques //New Datum
var
name = "" //Technique Name
list/owner = list() //The Owner (Used in saving)
uses = 0 //How many times it's been used
level = 0 //The Technique level
cooldown = 0 //Cooldown between jutsus
Uchiha
proc
Sharingan()
set name = "Sharingan"
set category = "Techniques"
if(usr.slot == 1)
src.owner.Add ("[usr.key]1")
if(src.cooldown <= 0 && usr.cooldown <= 0)
view() << output("<font color = #DC143C>[usr.Name]: Sharingan!</font>","chat")
if(src.cooldown > 0)
usr << output("You cant use this technique for [src.cooldown/10] more seconds!","chat")
if(usr.cooldown > 0)
usr << output("You cant use another technique yet! ([usr.cooldown/10] Seconds","chat")


Problem description:
The technique just wont work. Period. Nothing happens, nada. Now my suspicion is that you cant make a mob use a proc from the technique datum. If I'm wrong, could you tell me how to make it work? If I'm right, is there a way to do my idea of having each technique have a uses, cooldown, lvl var independent from the mob var?

Don't use usr in procs.
In response to Megelic
Normally I wouldnt, but the src in this case is Techniques.
Yeah replace proc with verb and just add that to there verbs list instead.

This is how you add verbs of one type to another.

src.verbs+=typesof(/Techniques/Uchiha/verb)
In response to Chowder
Gotcha, thanks, any other things I should note?
In response to Lugia319
I didn't notice that you were trying to use that datum as more then just a place holder... Your going to need to change it into something like this
obj/Techniques //New obj
New(mob/own)
owner=own
var
owner //The Owner (Used in saving)
uses = 0 //How many times it's been used
level = 0 //The Technique level
cooldown = 0 //Cooldown between jutsus
Uchiha
verb
Sharingan()
set name = "Sharingan"
set category = "Techniques"
set src in usr
if(usr.slot)
if(src.cooldown <= 0 && usr.cooldown <= 0)
view(usr) << output("<font color = #DC143C>[usr.Name]: Sharingan!</font>","chat")
return
if(src.cooldown > 0)
usr << output("You cant use this technique for [src.cooldown/10] more seconds!","chat")
return
if(src.cooldown > 0)
usr << output("You cant use another technique yet! ([src.cooldown/10] Seconds","chat")
return

mob/var/list/Techniques
mob/verb/Getverb()
if(!Techniques) Techniques=new()
Techniques+=new /obj/Techniques/Uchiha/(src)
In response to Chowder
why does owner=own? I realize the mob/own is sorta making the owner = to the mob... but that's all. And what purpose does it serve?
In response to Lugia319
There are, strangely enough, more variables than just src and usr. In this case, you'd want to pass an argument for which mob is using it:

thingy/proc/stuff(var/mob/activator)
world << "[activator] has used [src]"

mob/verb/blah()
var/thingy/T = new()
T.stuff(src)
In response to Lugia319
obj/Techniques //New obj
New(mob/own)
owner=own
mob/verb/Getverb()
if(!Techniques) Techniques=new()
Techniques+=new /obj/Techniques/Uchiha/(src)

The (src) is passing the player to New.

I just made the owner var equal the owner I don't know why its there in your code.
In response to Chowder
Well the idea was to have the datum save the user's usages. I didnt want to make 21231559591 new vars just to keep track of it.