ID:178663
 
how would you make the spells var, a list? =)
var/spells[0]

BAM! its a list
In response to Winbiko
WHEEFUN! I knew that! Uhmm..Yeah! I wuz testing ya! Yeah thats it....
mob
var
XYZ
proc
LevelUp()
if(src.exp >= src.mexp)
alert("Level up!")
src.level += 1
src.exp = 0
src.mexp += 10
src.SpellCheck()
SpellCheck()
if(src.level == 3)
alert("You learned Water1!")
usr.spells += "Water1"
Battcheck()
var/battle = rand(1,100)
if(battle <= 50)
return
else if(battle == 50)
return
else if(battle >= 50)
src.War()
War()
usr.XYZ = usr.loc
usr.enemie = new/mob/Skeleton(locate(2,6,2))
usr.enemie:name = "Skeleton"
usr.middleray = locate(5,10,2)
usr.abovenemie = locate(2,10,2)
usr.loc = locate(8,6,2)
var/Ehp = 10
begin
if(usr.health <= 0)
world<<"[usr] died!"
usr.health = usr.max_health
del(usr.enemie)
usr.loc = locate(1,1,1)
else if(Ehp <= 0)
alert("You defeated [usr.enemie]!")
alert("Gained 2 Exp and 3 gold!")
usr.exp += 2
usr.gold += 3
usr.LevelUp()
del(usr.enemie)
usr.loc = usr.XYZ
else if(usr.health >= 0 && Ehp >= 0)
switch(input("Pick a command!")in list("Attack","Spell"))
if("Attack")
alert("You attacked [usr.enemie]!")
var/num = rand(1,3)
s_damage(usr.enemie, num, "#FFCCCC")
Ehp -= num
alert("[usr.enemie] attacks you!")
num = rand(1,5)
s_damage(usr, num, "#FFCCCC")
usr.health -= num
goto begin
if("Spell")
switch(input("Pick a spell!")in usr.spells)
if("Water1")
var/num = 3
alert("You cast Water1 on [usr.enemie]!")
s_damage(usr.enemie, num, "#00ffff")
Ehp -= num
alert("[usr.enemie] attacks you!")
num = rand(1,5)
s_damage(usr, num, "#FFCCCC")
usr.health -= num
goto begin
else if("Back")
goto begin


area
battleplayable
Entered(mob/M)
M.Battcheck()
That isnt working either It always cast Water1..always!
In response to FireEmblem
Two things:

// begin
What the heck is that? begin... er what?

// if("Spell")

else if("Spell")

Try that, and see if it works.
In response to Nova2000
Nova.... Begin is a label, he's using the goto command with it, you'd generate compiler errors if you simply commented it out...