This is the DM File:
/*
* Macros: A quick little demo from Deadron.
#
* To have single-character macros in BYOND, the key is to make an entry in the Macros.dms
* file for any key you want to support. The macro causes a verb to be called.
*
* We provide a client verb for each possible command, which calls the client.Input() proc
* letting it know what letter the player pressed. client.Input() either processes it
* or passes the input to the selected object's Input() proc.
*
* In this demo, each verb calls a client.Input() proc, which either processes the command
* or passes it to the selected object's Input() proc to process.
*
*/
client
command_text = ".alt " // macro mode
proc/Input(letter)
// If it's a global command, handle it.
// Otherwise pass it to the selected object to handle.
switch(letter)
if ("a") A()
if ("w") W()
if ("s") S()
if ("d") D()
if("space")Space()
// These are the verbs that get called by the macros.
verb/a()
set hidden = 1
Input("a")
verb/b()
set hidden = 1
Input("b")
verb/c()
set hidden = 1
Input("c")
verb/d()
set hidden = 1
Input("d")
verb/e()
set hidden = 1
Input("e")
verb/f()
set hidden = 1
Input("f")
verb/g()
set hidden = 1
Input("g")
verb/h()
set hidden = 1
Input("h")
verb/i()
set hidden = 1
Input("i")
verb/j()
set hidden = 1
Input("j")
verb/k()
set hidden = 1
Input("k")
verb/l()
set hidden = 1
Input("l")
verb/m()
set hidden = 1
Input("m")
verb/n()
set hidden = 1
Input("n")
verb/o()
set hidden = 1
Input("o")
verb/p()
set hidden = 1
Input("p")
verb/q()
set hidden = 1
Input("q")
verb/r()
set hidden = 1
Input("r")
verb/s()
set hidden = 1
Input("s")
verb/t()
set hidden = 1
Input("t")
verb/u()
set hidden = 1
Input("u")
verb/v()
set hidden = 1
Input("v")
verb/w()
set hidden = 1
Input("w")
verb/x()
set hidden = 1
Input("x")
verb/y()
set hidden = 1
Input("y")
verb/z()
set hidden = 1
Input("z")
verb/space()
set hidden = 1
Input("space")
proc/W()
if(!usr.quiditch)return
for(var/obj/o as obj in usr.contents)
if(istype(o,/obj/Items/Quiditch/Quaffle))
o.loc=usr.loc
usr.quaffle=0
walk_to(o,locate(usr.x,usr.y+5,usr.z),5,2)
proc/A()
if(!usr.quiditch)return
for(var/obj/o as obj in usr.contents)
if(istype(o,/obj/Items/Quiditch/Quaffle))
o.loc=usr.loc
usr.quaffle=0
spawn()
walk_to(o,locate(usr.x-5,usr.y,usr.z),,2)
proc/S()
if(!usr.quiditch)return
for(var/obj/o as obj in usr.contents)
if(istype(o,/obj/Items/Quiditch/Quaffle))
o.loc=usr.loc
usr.quaffle=0
walk_to(o,locate(usr.x,usr.y-5,usr.z),,2)
proc/D()
if(!usr.quiditch)return
for(var/obj/o as obj in usr.contents)
if(istype(o,/obj/Items/Quiditch/Quaffle))
o.loc=usr.loc
usr.quaffle=0
walk_to(o,locate(usr.x+5,usr.y,usr.z),5,2)
proc/Space()
if(!usr.quiditch||usr.quaffle)return
for(var/obj/o as obj in oview(1))
if(istype(o,/obj/Items/Quiditch/Quaffle))
o.loc=usr
usr.quaffle=1
return
for(var/mob/m as mob in oview(1))
for(var/obj/o as obj in m.contents)
if(istype(o,/obj/Items/Quiditch/Quaffle))
var/chance=rand(1,round(max(m.overalllev-usr.overalllev,2)/2))
if(chance==1)
var/chance2=rand(1,max(1,round(usr.overalllev/8)))
if(chance2==1)
o.loc=m.loc
m.quaffle=0
else
o.loc=usr
m.quaffle=0
usr.quaffle=1
This is the dms file:
/*
* Macros: A quick little demo from Deadron.
#
* To have single-character macros in BYOND, the key is to make an entry in the Macros.dms
* file for any key you want to support. The macro causes a verb to be called.
*
* We provide a client verb for each possible command, which calls the client.Input() proc
* letting it know what letter the player pressed. client.Input() either processes it
* or passes the input to the selected object's Input() proc.
*
* In this demo, each verb calls a client.Input() proc, which either processes the command
* or passes it to the selected object's Input() proc to process.
*
*/
client
command_text = ".alt " // macro mode
proc/Input(letter)
// If it's a global command, handle it.
// Otherwise pass it to the selected object to handle.
switch(letter)
if ("a") A()
if ("w") W()
if ("s") S()
if ("d") D()
if("space")Space()
// These are the verbs that get called by the macros.
verb/a()
set hidden = 1
Input("a")
verb/b()
set hidden = 1
Input("b")
verb/c()
set hidden = 1
Input("c")
verb/d()
set hidden = 1
Input("d")
verb/e()
set hidden = 1
Input("e")
verb/f()
set hidden = 1
Input("f")
verb/g()
set hidden = 1
Input("g")
verb/h()
set hidden = 1
Input("h")
verb/i()
set hidden = 1
Input("i")
verb/j()
set hidden = 1
Input("j")
verb/k()
set hidden = 1
Input("k")
verb/l()
set hidden = 1
Input("l")
verb/m()
set hidden = 1
Input("m")
verb/n()
set hidden = 1
Input("n")
verb/o()
set hidden = 1
Input("o")
verb/p()
set hidden = 1
Input("p")
verb/q()
set hidden = 1
Input("q")
verb/r()
set hidden = 1
Input("r")
verb/s()
set hidden = 1
Input("s")
verb/t()
set hidden = 1
Input("t")
verb/u()
set hidden = 1
Input("u")
verb/v()
set hidden = 1
Input("v")
verb/w()
set hidden = 1
Input("w")
verb/x()
set hidden = 1
Input("x")
verb/y()
set hidden = 1
Input("y")
verb/z()
set hidden = 1
Input("z")
verb/space()
set hidden = 1
Input("space")
proc/W()
if(!usr.quiditch)return
for(var/obj/o as obj in usr.contents)
if(istype(o,/obj/Items/Quiditch/Quaffle))
o.loc=usr.loc
usr.quaffle=0
walk_to(o,locate(usr.x,usr.y+5,usr.z),5,2)
proc/A()
if(!usr.quiditch)return
for(var/obj/o as obj in usr.contents)
if(istype(o,/obj/Items/Quiditch/Quaffle))
o.loc=usr.loc
usr.quaffle=0
spawn()
walk_to(o,locate(usr.x-5,usr.y,usr.z),,2)
proc/S()
if(!usr.quiditch)return
for(var/obj/o as obj in usr.contents)
if(istype(o,/obj/Items/Quiditch/Quaffle))
o.loc=usr.loc
usr.quaffle=0
walk_to(o,locate(usr.x,usr.y-5,usr.z),,2)
proc/D()
if(!usr.quiditch)return
for(var/obj/o as obj in usr.contents)
if(istype(o,/obj/Items/Quiditch/Quaffle))
o.loc=usr.loc
usr.quaffle=0
walk_to(o,locate(usr.x+5,usr.y,usr.z),5,2)
proc/Space()
if(!usr.quiditch||usr.quaffle)return
for(var/obj/o as obj in oview(1))
if(istype(o,/obj/Items/Quiditch/Quaffle))
o.loc=usr
usr.quaffle=1
return
for(var/mob/m as mob in oview(1))
for(var/obj/o as obj in m.contents)
if(istype(o,/obj/Items/Quiditch/Quaffle))
var/chance=rand(1,round(max(m.overalllev-usr.overalllev,2)/2))
if(chance==1)
var/chance2=rand(1,max(1,round(usr.overalllev/8)))
if(chance2==1)
o.loc=m.loc
m.quaffle=0
else
o.loc=usr
m.quaffle=0
usr.quaffle=1
Problem description:
Well this worked before, when I had on the other computer. But I transfered it onto this one and I was using an external dms file so I lost it. When I downloaded the macro demo again and used the same dms file in there it didnt work. Mabey its my code but does anyone know how to fix this?