ID:1767431
 
Code:
b32
name="Cassindra's Chorus of Clarity";icon_state="clarity";lvl=32;target="Party";skill="Singing";castingtime=3;duration=0;manaup=5/*1 per 6 lvls max 7*/;pdesc="Your mind begins to clear."


Problem description:

So it really isn't a problem, more of a refresher( sorry I haven't scripted in DM for years, trying to get back into it). If I call a proc() where a spell definition is going to be used, for example above being used, is it ok to define the spell in this case under /obj and the numbers etc will be read correctly throug the proc()?

You could pass the spell to the proc, or make the proc belong to the object itself, being called where needed.

obj
proc/GetValues()
return list("variable1"="value1","variable2"="value2")

mob
verb/Check(obj/O as obj in world)
if(O)
var/list/values = O.GetValues()
for(var/V in values)
src << "[V] = [values[V]]"


Or
mob/proc/CheckObj(obj/O)
src << O.variable1

mob/verb/Check(obj/O as obj in world)
CheckObj(O)


You can of course directly access O in the 'Check' verb here too, if you want.

You can also do:

mob/verb/Check()
var/obj/myobj/found = locate() in view(src)
if(found)
src << found.variable1
else
src << "No myobjs found!"


Plenty of options.
Well i have a huge spell list so using the spell inside the proc itself is not going to work, as for your first example. The spell definition is one of 1000s i will have, so for example if i have it under /obj/spells/bard/b3, then call it under /mob/procs, the definitions of the /obj/spells will read in the /mob/procs is what my main question is. Basically will a pric read my /obj definitions which you sor of answered within the first example yet you placed it directly in the proc itself.
There's inheritance you can use with DM.

obj
myobj
var
blah = 10
bleh = 20

childone
blah = 50
bleh = 10

childtwo
blah = 75
bleh = 200

proc/GetInfo(mob/player)
if(!player) return
player << "[src.name]'s blah is [src.blah] and its bleh is [src.bleh]"


Now all children of /obj/myobj share the GetInfo() proc, which will output the value of their blah and bleh variables, which are unique across them. So if you have say a 'childone' in your inventory and you do:

var/obj/myobj/childone/found = locate() in src
if(found)
found.GetInfo(src)


It would output 50 and 10 respectively, and 75 and 200 if you called it on a 'childtwo' type.

This means, you can have all of your spells defines as their own types with a set of generic procs you can use to pull the information from them.
Ahh i see so the procs are added within the definition. Thank you for being patient with me, baby steps are being taken considering it has been 5 yrs. Much appreciated Nadrew.