ID:146447
 
Ive made this code up but i was wondering if it would be possible if i could use more than 1 attack template eg using spirit bomb or somthing like that how can i do that and also

mob
Custom
verb
custom_attack()
set hidden = 1 // iconsistent indentation
var/custom_name =input("What do you want to name this custom?","Custom Attack") as text
var/custom_say =input("What do you want to say when firing custom","Custom Attack") as text
if(usr.kame == 1)
usr << "<tt>You are currently using [custom_name]"
if(usr.kame == 0)
var/amount = usr.powerlevel/50
amount = usr.powerlevel/50

if(amount >= 1)
if(usr.stamina<=0)
usr.kame = 1

view(6) << "<font color = red>[usr]:<font color = white> <tt>[custom_say]!!"
sleep(30)
usr.overlays += /obj/renzuko
sleep(1)
usr.overlays -= /obj/renzuko
usr.powerlevel = 0
usr.kame = 0
usr.KO()
if(usr.stamina>0)
usr.kame = 1

view(6) << "<font color = red>[usr]:<font color = white> <tt>[custom_say]!!"
sleep(20)
usr.stamina-=35
if(M.z == usr.z)
usr.overlays -= /obj/renzuko
s_missile('kame7.dmi', usr, M)
sleep(5) //bad argument definition
s_missile('kame7.dmi', usr, M)
sleep(5)//bad argument definition
s_missile('kame7.dmi', usr, M)
sleep(5)//bad argument definition
s_missile('kame7.dmi', usr, M)
sleep(5)//bad argument definition
s_missile('kame7.dmi', usr, M)
sleep(5)//bad argument definition
s_missile('kame7.dmi', usr, M)
usr.kame = 0//bad argument definition
sleep(7)
usr.overlays -= /obj/renzuko

if(M.absorb == 0||M.absorb==1)
if(M.powerlevel >= usr.powerlevel)
M.random = rand(1,3)
if(M.random == 3)
view(6) << "[M] reflects [usr]'s [custom_name]!"
s_missile('kame7.dmi', M, usr)
usr.damage += (usr.powerlevel/M.powerlevel)*(amount*(rand(2,3)))//bad argument definition
usr.Die()
else

view(6) << "<font color = red>[usr] shoots [custom_name] at [M]!!!"
M.damage += (usr.powerlevel/M.powerlevel)*(amount*(rand(2,3)))
M.damage += (usr.powerlevel/M.powerlevel)*(amount*(rand(2,3)))
M.damage += (usr.powerlevel/M.powerlevel)*(amount*(rand(2,3)))
M.damage += (usr.powerlevel/M.powerlevel)*(amount*(rand(2,3)))
M.damage += (usr.powerlevel/M.powerlevel)*(amount*(rand(2,3)))
M.damage += (usr.powerlevel/M.powerlevel)*(amount*(rand(2,3)))
else
view(6) << "<font color = red>[usr] shoots [custom_name] at [M]!!!"
M.damage += (usr.powerlevel/M.powerlevel)*(amount*(rand(2,3)))
M.damage += (usr.powerlevel/M.powerlevel)*(amount*(rand(2,3)))
M.damage += (usr.powerlevel/M.powerlevel)*(amount*(rand(2,3)))
M.damage += (usr.powerlevel/M.powerlevel)*(amount*(rand(2,3)))
M.damage += (usr.powerlevel/M.powerlevel)*(amount*(rand(2,3)))
M.damage += (usr.powerlevel/M.powerlevel)*(amount*(rand(2,3)))
M.Die()
else
usr << "<b>You launch your [custom_name], but [M] is out of sight."
usr.overlays -= /obj/renzuko
usr.kame = 0


mob/verb/make_custom_attack(newname as text)
set category = "Fighting"
set name = "Create Move"
new /mob/Custom/verb/custom_attack(src,newname)

i get these errors for some reason

How can i fix this?

customattacks.dm:32:error:M.z:undefined var
customattacks.dm:34:error:M:undefined var
customattacks.dm:36:error:M:undefined var
customattacks.dm:38:error:M:undefined var
customattacks.dm:40:error:M:undefined var
customattacks.dm:42:error:M:undefined var
customattacks.dm:44:error:M:undefined var
customattacks.dm:49:error:M.absorb:undefined var
customattacks.dm:49:error:M.absorb:undefined var
customattacks.dm:50:error:M.powerlevel:undefined var
customattacks.dm:51:error:M.random:undefined var
customattacks.dm:52:error:M.random:undefined var
customattacks.dm:53:error:M:undefined var
customattacks.dm:54:error:M:undefined var
customattacks.dm:55:error:M.powerlevel:undefined var
customattacks.dm:59:error:M:undefined var
customattacks.dm:60:error:M.damage:undefined var
customattacks.dm:60:error:M.powerlevel:undefined var
customattacks.dm:61:error:M.damage:undefined var
customattacks.dm:61:error:M.powerlevel:undefined var
customattacks.dm:62:error:M.damage:undefined var
customattacks.dm:62:error:M.powerlevel:undefined var
customattacks.dm:63:error:M.damage:undefined var
customattacks.dm:63:error:M.powerlevel:undefined var
customattacks.dm:64:error:M.damage:undefined var
customattacks.dm:64:error:M.powerlevel:undefined var
customattacks.dm:65:error:M.damage:undefined var
customattacks.dm:65:error:M.powerlevel:undefined var
customattacks.dm:67:error:M:undefined var
customattacks.dm:68:error:M.damage:undefined var
customattacks.dm:68:error:M.powerlevel:undefined var
customattacks.dm:69:error:M.damage:undefined var
customattacks.dm:69:error:M.powerlevel:undefined var
customattacks.dm:70:error:M.damage:undefined var
customattacks.dm:70:error:M.powerlevel:undefined var
customattacks.dm:71:error:M.damage:undefined var
customattacks.dm:71:error:M.powerlevel:undefined var
customattacks.dm:72:error:M.damage:undefined var
customattacks.dm:72:error:M.powerlevel:undefined var
customattacks.dm:73:error:M.damage:undefined var
customattacks.dm:73:error:M.powerlevel:undefined var
customattacks.dm:74:error:M.Die:undefined var
customattacks.dm:76:error:M:undefined var
customattacks.dm:55:error:usr.damage:undefined var

DO NOT COPY+PASTE CODE THEN ASK WHY IT'S NOT WORKING.
In response to Crashed
k

but how can i fix those errors?
You need to define M in there somewhere and all those errors will go away. You're assuming BYOND knows M is a mob already, which is doesn't.
In response to Mystic Water Mouse
So how can i define M then like how can you help me please
In response to Govegtos
If you do not know how to so much as define a variable you really need to go back and look of some tutorials and/or the DM Guide.

The other thing, what people are saying to you is just going in one ear and right out the other...

"DO NOT COPY+PASTE CODE THEN ASK WHY IT'S NOT WORKING."
"k, but how can i fix those errors?"

It's more or less a slap in the face to the person who is giving you advice, albeit in a semi-hostile manner.

It's one thing to take a piece of code from somewhere and edit it to use when you know what your doing. Attempting to use copied code when you don't understand the basics of what the code is actually doing doesn't make your life any easier, it only makes it harder if you were to actually learn how to code and then try to do something with it.
In response to Nick231
k nick but still those tutorials dont answer my question
In response to Govegtos
These posts would help you...if you actually read them.
In response to Govegtos
All of the tutorials have sections on defining variables, the DM guide has an entire chapter on variables.

Like N1ght said, all of the questions have been answered, you just need to read the posts. And ironically enough, you did to my post one of the things my post was criticizing you about.
In response to Govegtos
Govegtos wrote:
k

but how can i fix those errors?

By defining M >.> .
people have been saying it to you several times now, and if you dont know how to define M. stop trying to make a game and read the DM guide or do a tutorital.

You should always start small, dont try to make a big game when your new, lots of people have made that msitake and quit BYOND.
so start making a small game, do more tutoritals, read the dm guide again if nececary.

O-matic
In response to O-matic
Now ive fixed them but when i go to run my game and click on create move nothing happens How can i fix this?
Govegtos wrote:
Ive made this code up but i was wondering if it would be possible if i could use more than 1 attack template eg using spirit bomb or somthing like that how can i do that and also...
--------------------
You didnt make any code, if i wasnt lazy i would search the forums for stuff 2 years ago and find that peice of code, you really need how to learn to code, I know you want to make a game really bad but you dont want to learn how to code. It doesent make sence. You really need to read te ZBT's, the blue book and, scan through demos's that's how i learned. You can't start a game with other peoples code, You need to start with the basics and keep working and learning more. Not rip dbz and copy paste stuff that was posted on the forum.
In response to Xx Dark Wizard xX
Thats not Helpful i need smothing that can help me solve my problem.
In response to Govegtos
Govegtos wrote:
i need smothing that can help me solve my problem.

Look to the left, and look under Resources. Every thing you need is there.
In response to N1ghtW1ng
Here it is i get no errors and this is my problem
when i go to the game and click on create move nothing happens

How is resources gonna help i dont know what i am doing wrong

Heres my latest post about it

http://developer.byond.com/forum/ index.cgi?action=message_read&id=373590&forum=3&view=0#37359 0
In response to Govegtos
You don't know what your doing wrong because you don't know how to code, *sigh*.
Look through the resources and read through this demo: Your First World
In response to DarkCampainger
he dosent want to learn, he wants us to make his game for him
In response to Cheetoz
I will not help you with stolen code, If you coded something from scratch then i will help you.
In response to Xx Dark Wizard xX
_> then I guess you can scratch him completely off your help list
In response to Cheetoz
How can i go about it when i click on it an Nothing happens?