//Macro code
client/command_text = ".alt "
macro
q
return "spikedjuice"
macro
w
return "cactusbash"
macro
e
return "transplant"
macro
r
return "absorb"
//Verbs I'm Trying to Macro
mob
machi
verb
Spiked_Juice()
set category = "Skills"
set name = "spikedjuice"
if(usr.qskill==0)
usr.qskill=1
var/obj/A=new/obj/skills/skillblock
usr.client.screen+=A
A.screen_loc=src.screen_loc
spawn(50)usr.qskill=0
spawn(50)del(A)
new/obj/spikedjuice(usr)
else
usr<<"<B>This skill is currently unavailable."
Cactus_Bash()
set category = "Skills"
set name = "cactusbash"
if(usr.wskill==0)
usr.wskill=1
var/obj/A=new/obj/skills/skillblock
usr.client.screen+=A
A.screen_loc=src.screen_loc
spawn(65)usr.wskill=0
spawn(65)del(A)
view()<<"<font color = red>[usr.name] swings their spikey fist, and..."
for(var/mob/O as mob in get_step(usr,usr.dir))
if(O.faction!=usr.faction)
if(usr.wlvl==1)
view()<<"<B><font color = red>[usr.name]'s spikey fist makes contact with [O.name]'s face, dealing 10 damage and stunning [O.name] for 0.5 seconds."
O.frozen=1
spawn(5)O.frozen=0
O.hp-=10
O.deathcheck()
if(usr.wlvl==2)
view()<<"<B><font color = red>[usr.name]'s spikey fist makes contact with [O.name]'s face, dealing 15 damage and stunning [O.name] for 0.5 seconds."
O.frozen=1
spawn(5)O.frozen=0
O.hp-=15
O.deathcheck()
if(usr.wlvl==3)
view()<<"<B><font color = red>[usr.name]'s spikey fist makes contact with [O.name]'s face, dealing 20 damage and stunning [O.name] for 0.5 seconds."
O.frozen=1
spawn(5)O.frozen=0
O.hp-=20
O.deathcheck()
if(usr.wlvl==4)
view()<<"<B><font color = red>[usr.name]'s spikey fist makes contact with [O.name]'s face, dealing 30 damage and stunning [O.name] for 0.5 seconds."
O.frozen=1
spawn(5)O.frozen=0
O.hp-=30
O.deathcheck()
if(usr.wlvl==5)
view()<<"<B><font color = red>[usr.name]'s spikey fist makes contact with [O.name]'s face, dealing 35 damage and stunning [O.name] for 0.5 seconds."
O.frozen=1
spawn(5)O.frozen=0
O.hp-=35
O.deathcheck()
if(usr.wlvl==6)
view()<<"<B><font color = red>[usr.name]'s spikey fist makes contact with [O.name]'s face, dealing 40 damage and stunning [O.name] for 1.5 seconds."
O.frozen=1
spawn(15)O.frozen=0
O.hp-=40
O.deathcheck()
if(usr.wlvl==7)
view()<<"<B><font color = red>[usr.name]'s spikey fist makes contact with [O.name]'s face, dealing 50 damage and stunning [O.name] for 1.5 seconds."
O.frozen=1
spawn(15)O.frozen=0
O.hp-=50
O.deathcheck()
if(usr.wlvl==8)
view()<<"<B><font color = red>[usr.name]'s spikey fist makes contact with [O.name]'s face, dealing 60 damage and stunning [O.name] for 1.5 seconds."
O.frozen=1
spawn(15)O.frozen=0
O.hp-=60
O.deathcheck()
if(usr.wlvl==9)
view()<<"<B><font color = red>[usr.name]'s spikey fist makes contact with [O.name]'s face, dealing 70 damage and stunning [O.name] for 1.5 seconds."
O.frozen=1
spawn(15)O.frozen=0
O.hp-=70
O.deathcheck()
if(usr.wlvl==10)
view()<<"<B><font color = red>[usr.name]'s spikey fist makes contact with [O.name]'s face, dealing 85 damage and stunning [O.name] for 2 seconds."
O.frozen=1
spawn(20)O.frozen=0
O.hp-=85
O.deathcheck()
else
usr<<"<B>They are in your faction!"
else
usr<<"<B>This skill is currently unavailable."
Transplant()
set category = "Skills"
set name = "transplant"
if(usr.eskill==0)
if(usr.cactus==0)
usr.eskill=1
usr.cactus=1
var/obj/A=new/obj/skills/skillblock
usr.client.screen+=A
A.screen_loc=src.screen_loc
usr.icon_state="cactus"
usr.name="Cactus"
usr.overlays=null
usr.frozen=1
usr<<"<B>You morph into a cactus! You may active this skill once the cooldown is done to change back, also spraying needles everywhere."
spawn(70)usr.eskill=0
spawn(70)del(A)
else
if(usr.cactus==1)
usr.eskill=1
usr.cactus=0
var/obj/A=new/obj/skills/skillblock
usr.client.screen+=A
A.screen_loc=src.screen_loc
usr.name=usr.key
usr.icon_state="machi"
usr.frozen=0
usr.overlays+=new/obj/screen/hpbar
usr.hpcheck()
usr<<"<B>You morph back."
view()<<"<B><font color = red>[usr.name] morphs back into their true form, spraying needles, damaging all opponents within 6 spaces of him!"
spawn(100)usr.eskill=0
spawn(100)del(A)
for(var/mob/O as mob in range(6))
if(O.faction!=usr.faction)
if(usr.elvl==1)
O<<"<B>You are hit by a needle for 5 damage."
O.hp-=5
O.deathcheck()
if(usr.elvl==2)
O<<"<B>You are hit by a needle for 10 damage."
O.hp-=10
O.deathcheck()
if(usr.elvl==3)
O<<"<B>You are hit by a needle for 20 damage."
O.hp-=20
O.deathcheck()
if(usr.elvl==4)
O<<"<B>You are hit by a needle for 25 damage."
O.hp-=25
O.deathcheck()
if(usr.elvl==5)
O<<"<B>You are hit by a needle for 30 damage."
O.hp-=30
O.deathcheck()
if(usr.elvl==6)
O<<"<B>You are hit by a needle for 40 damage."
O.hp-=40
O.deathcheck()
if(usr.elvl==7)
O<<"<B>You are hit by a needle for 45 damage."
O.hp-=45
O.deathcheck()
if(usr.elvl==8)
O<<"<B>You are hit by a needle for 50 damage."
O.hp-=50
O.deathcheck()
if(usr.elvl==9)
O<<"<B>You are hit by a needle for 60 damage."
O.hp-=60
O.deathcheck()
if(usr.elvl==10)
O<<"<B>You are hit by a needle for 75 damage."
O.hp-=75
O.deathcheck()
else
usr<<"<B>This skill is currently unavailable."
Absorb()
set category = "Skills"
set name = "absorb"
if(usr.rskill==0)
usr.rskill=1
var/obj/A=new/obj/skills/skillblock
usr.client.screen+=A
A.screen_loc=src.screen_loc
spawn(200)usr.rskill=0
spawn(200)del(A)
for(var/turf/O as turf in range(0))
if(usr.rlvl==1)
usr.hp+=15
usr.hpcheck()
view()<<"<B><font color = green>[usr.name] absorbs nutrients from the ground, getting healed for 15!"
if(usr.rlvl==2)
usr.hp+=25
usr.hpcheck()
view()<<"<B><font color = green>[usr.name] absorbs nutrients from the ground, getting healed for 25!"
if(usr.rlvl==3)
usr.hp+=30
usr.hpcheck()
view()<<"<B><font color = green>[usr.name] absorbs nutrients from the ground, getting healed for 30!"
if(usr.rlvl==4)
usr.hp+=40
usr.hpcheck()
view()<<"<B><font color = green>[usr.name] absorbs nutrients from the ground, getting healed for 40!"
if(usr.rlvl==5)
usr.hp+=45
usr.hpcheck()
view()<<"<B><font color = green>[usr.name] absorbs nutrients from the ground, getting healed for 45!"
if(usr.rlvl==6)
usr.hp+=60
usr.hpcheck()
view()<<"<B><font color = green>[usr.name] absorbs nutrients from the ground, getting healed for 60!"
if(usr.rlvl==7)
usr.hp+=70
usr.hpcheck()
view()<<"<B><font color = green>[usr.name] absorbs nutrients from the ground, getting healed for 70!"
if(usr.rlvl==8)
usr.hp+=75
usr.hpcheck()
view()<<"<B><font color = green>[usr.name] absorbs nutrients from the ground, getting healed for 75!"
if(usr.rlvl==9)
usr.hp+=85
usr.hpcheck()
view()<<"<B><font color = green>[usr.name] absorbs nutrients from the ground, getting healed for 85!"
if(usr.rlvl==10)
usr.hp+=100
usr.hpcheck()
view()<<"<B><font color = green>[usr.name] absorbs nutrients from the ground, getting healed for 100!"
Problem description: I'm trying to put macros into my game. There are little shortcuts on the screen for them, and now I made verbs for them so that I can macro them. However, I keep getting the errors "Macros.dm:4:error: return"spikedjuice": instruction not allowed here
Macros.dm:7:error: return"cactusbash": instruction not allowed here
Macros.dm:10:error: return"transplant": instruction not allowed here
Macros.dm:13:error: return"absorb": instruction not allowed here". Could anyone help me?