verb
Attack()
if(turn == usr.team && usr.move >= 2)
usr.move -= 2
var/list/att = list("cancel")
if(usr.typei == 1)
for(var/mob/m in oview(1))
att += m
var/bb = input(usr," Who will you attack?")in att
if(bb == "cancel")
return 0
else if(bb:killed != 1)
var/dmgd = rand(usr.str,usr.mstr)
bb:hp -= dmgd
world << "[usr] attacks [bb] for [dmgd] damage!"
death(bb,usr)
var/m = bb
bb:death(usr)
/*if(m:hp <= 0)
world << "[m] Was killed!"
usr.kills += 1
var/exptogive = 10
var/exptotake = usr.level
exptogive *=m:level
exptotake -= 1
usr.exp += exptogive
usr.exp -= exptotake
if(usr.exp >= usr.expneed)
world << "[usr] has leveled up!"
usr.level += 1
usr.str += 10
usr.mstr += 5
usr.hp += 10
usr.mhp += 10
usr.exp -= usr.expneed
m:killed = 1
var/list/rep
var/a = input(m, "What shall you be?")in list("same","Warrior team 1","Warrior team 2","Archer team 1","Archer team 2")
if(a == "Warrior team 1")
m:icon_state = "warrior"
m:hp = 100
m:mhp = 100
m:str = 30
m:mstr = 60
m:typei = 1
m:team = 1
m:level = 1
if(a == "Archer team 1")
m:icon_state = "archer"
m:hp = 90
m:mhp = 90
m:str = 10
m:mstr = 40
m:typei = 2
m:team = 1
m:level = 1
if(a == "Warrior team 2")
m:icon_state = "warrior2"
m:hp = 100
m:mhp = 100
m:str = 30
m:mstr = 60
m:typei = 1
m:team = 2
m:level = 1
if(a == "Archer team 2")
m:icon_state = "archer2"
m:hp = 90
m:mhp = 90
m:str = 10
m:mstr = 40
m:typei = 2
m:team = 2
m:level = 1
if(a == "same")
m:hp = m:mhp
if(m:team == 1)
for(var/mob/t1spawn/ar in world)
rep += ar
if(m:team == 2)
for(var/mob/t2spawn/ar in world)
rep += ar
var/wh = input(m,"where will you respawn?") in rep
m:loc = wh:loc
m:killed = 0
world << "[m] has respawned on team [m:team]"*/
if(usr.typei == 2)
for(var/mob/m in oview(4))
att += m
var/bb = input(usr," Who will you attack?")in att
if(bb == "cancel")
return 0
else if(bb:killed != 1)
var/dmgd = rand(usr.str,usr.mstr)
bb:hp -= dmgd
world << "[usr] attacks [bb] for [dmgd] damage!"
var/m = bb
bb:death(usr)
/*if(m:hp <= 0)
world << "[m] Was killed!"
usr.kills += 1
var/exptogive = 10
var/exptotake = usr.level
exptogive *=m:level
exptotake -= 1
usr.exp += exptogive
usr.exp -= exptotake
if(usr.exp >= usr.expneed)
world << "[usr] has leveled up!"
usr.level += 1
usr.str += 10
usr.mstr += 5
usr.hp += 10
usr.mhp += 10
usr.exp -= usr.expneed
m:killed = 1
var/list/rep
var/a = input(m, "What shall you be?")in list("same","Warrior team 1","Warrior team 2","Archer team 1","Archer team 2")
if(a == "Warrior team 1")
m:icon_state = "warrior"
m:hp = 100
m:mhp = 100
m:str = 30
m:mstr = 60
m:typei = 1
m:team = 1
m:level = 1
if(a == "Archer team 1")
m:icon_state = "archer"
m:hp = 90
m:mhp = 90
m:str = 10
m:mstr = 40
m:typei = 2
m:team = 1
m:level = 1
if(a == "Warrior team 2")
m:icon_state = "warrior2"
m:hp = 100
m:mhp = 100
m:str = 30
m:mstr = 60
m:typei = 1
m:team = 2
m:level = 1
if(a == "Archer team 2")
m:icon_state = "archer2"
m:hp = 90
m:mhp = 90
m:str = 10
m:mstr = 40
m:typei = 2
m:team = 2
m:level = 1
if(a == "same")
m:hp = m:mhp
if(m:team == 1)
for(var/mob/t1spawn/ar in world)
rep += ar
if(m:team == 2)
for(var/mob/t2spawn/ar in world)
rep += ar
var/wh = input(m,"where will you respawn?") in rep
m:loc = wh:loc
m:killed = 0
world << "[m] has respawned on team [m:team]"*/
Say(t as text)
world << "[usr]:||team:[usr.team]level:[usr.level]||:<b>[t]</b>"
//Save()
//usr << "You will be given a save code, it is used in the load verb to load your character. I am currently to busy(lazy) to make real saving and this also lets you go from server to server with your character"
//var/code = "[usr.type][usr.level][usr.kills][usr.team]"
proc
death()
var/mob/m = src
var/mob/ayt = usr
if(m.hp <= 0)
world << "[m] Was killed!"
ayt.kills += 1
var/exptogive = 10
var/exptotake = ayt.level
exptogive *=m.level
exptotake -= 1
ayt.exp += exptogive
ayt.exp -= exptotake
if(ayt.exp >= ayt.expneed)
world << "[ayt] has leveled up!"
ayt.level += 1
ayt.str += 10
ayt.mstr += 5
ayt.hp += 10
ayt.mhp += 10
ayt.exp -= ayt.expneed
m.killed = 1
var/list/rep
var/a = input(m, "What shall you be?")in list("same","Warrior team 1","Warrior team 2","Archer team 1","Archer team 2")
if(a == "Warrior team 1")
m.icon_state = "warrior"
m.hp = 100
m.mhp = 100
m.str = 30
m.mstr = 60
m.typei = 1
m.team = 1
m.level = 1
if(a == "Archer team 1")
m.icon_state = "archer"
m.hp = 90
m.mhp = 90
m.str = 10
m.mstr = 40
m.typei = 2
m.team = 1
m.level = 1
if(a == "Warrior team 2")
m.icon_state = "warrior2"
m.hp = 100
m.mhp = 100
m.str = 30
m.mstr = 60
m.typei = 1
m.team = 2
m.level = 1
if(a == "Archer team 2")
m.icon_state = "archer2"
m.hp = 90
m.mhp = 90
m.str = 10
m.mstr = 40
m.typei = 2
m.team = 2
m.level = 1
if(a == "same")
m.hp = m.mhp
if(m.team == 1)
for(var/mob/t1spawn/ar in world)
rep += ar
if(m.team == 2)
for(var/mob/t2spawn/ar in world)
rep += ar
var/wh = input(m,"where will you respawn?") in rep
m.loc = wh:loc
m.killed = 0
world << "[m] has respawned on team [m.team]"
Problem description:
runtime error: type mismatch
proc name: death (/mob/proc/death)
usr: Rky_nick (/mob/player)
src: Blakdragon77 (/mob/player)
call stack:
Blakdragon77 (/mob/player): death(Rky_nick (/mob/player))
Rky_nick (/mob/player): Attack()
problem is that before the dead get to choose where to respawn, the runtime happens. the proc ends. the dead cant be killed.
Aside from that- good god, the colon abuse! Use periods in places of colons, and another thing I noticed was that you added a text "cancel" option to an input menu list. This is bad design because the person may have to scroll down to cancel, as opposed to changing it to something such as as null|anything in att and having a cancel option right on the input menu.