ID:146353
 
I am wanting to know if i there was a way for me restric transformations for a certain race meaning only that race can be transformed

obj
kaitransform
verb
Transform()
set category = "Fighting"
set name = "Kai Transfomation"
switch(input("Which form do you wish to Transform/Revert?","Transform",text) in list("Super Kai","Form Three","Revert","None"))
if("Super Kai")
if(usr.state == "kai race normal.dmi")
if(usr.maxpowerlevel >= 45000000)
view(6) << "<font color = green>-[usr.name]<font color = white> begins to transform!-"
usr.icon = 'kairacesuper.dmi'
usr.powerlevel = usr.maxpowerlevel * 3
usr.state = "Super Kai"
else
usr << "<i>You still are too weak...."
else
usr << "<b>You must be in Normal."
if("Revert")
if(usr.state=="Normal")
usr << "You are reverted already."
else
view(6) << "<font color = green>-[usr.name]<font color = white> begins to revert from [usr.state]-"
flick("revert",usr)
usr.icon = 'kai race normal.dmi'
usr.state = "Normal"
if(usr.powerlevel >= usr.maxpowerlevel)
usr.powerlevel = usr.maxpowerlevel


How can i do that any pointers please

Govegtos wrote:
I am wanting to know if i there was a way for me restric transformations for a certain race meaning only that race can be transformed

> [Code was here]
>

How can i do that any pointers please


Your aiming to strict transformations how... as in only Saiyans can go Super saiyan and only Kai's can go Super Kai... etc etc?

also..

                        if(usr.state == "kai race normal.dmi")


is the icon state named .dmi ? if not thats going to generate errors.. for one of two reasons

1 - It may be your trying to refer to a Icon file, if thats the case you want usr.icon

2 - It may be your too used to typing .dmi or whatever and you need to take it off

It will provide no visible icon if that specified 'state' can be found, and also you've done it wrong...

                        if(usr.icon_state == "kai race normal.dmi")


make sure you do that for all other 'usr.state' you have

Also while we're on the subject, if this is Zeta coding, I will help you but in all honesty I'm going to turn around and simply say

D E L E T E I T!

we have enough DBzeta's on the hub, I'm not going to count but i bet we're already hitting the 1000's
In response to Bunnie
Bunnie wrote:
if this is Zeta coding, I will help you but in all honesty I'm going to turn around and simply say.

It is Zeta, ungh.. Govegtos everytime when you get here on the forums and ask for help with a code then the code is never yours. I just noticed when I went through al your posts. I strongly recommon you to learn to code so you can create your own code.

O-matic
In response to O-matic
O-matic wrote:
Bunnie wrote:
if this is Zeta coding, I will help you but in all honesty I'm going to turn around and simply say.

It is Zeta, ungh.. Govegtos everytime when you get here on the forums and ask for help with a code then the code is never yours. I just noticed when I went through al your posts. I strongly recommon you to learn to code so you can create your own code.

O-matic

I do not think you should post that here, this is a place to AID in coding or RECOMMEND aid, not to insult or put down someone, if your going to do that take it either to the byond pager or someplace else.

And i'm not starting anything im acting as a mediator.

*Continues to wait for Govegtos to either delete his Zeta coding or post more info about his problem*
In response to Bunnie
The Answer to your Question is

as in only Saiyans can go Super saiyan and only Kai's can go Super Kai... etc etc

Yes only kai's can transform into super kai how can i go about doing that
In response to Bunnie
well it was a little harsh on the way I said it.
Sorry govegtos if sounded a little harsh.
But I still recommon you not to use Zeta, its coding is poor done and it teaches you bad ways of doing things.

its your own choise.

O-matic
In response to O-matic
k thanks
In response to Govegtos
Govegtos wrote:
The Answer to your Question is

as in only Saiyans can go Super saiyan and only Kai's can go Super Kai... etc etc

Yes only kai's can transform into super kai how can i go about doing that

Well then I recommend a simply check at the beggining of the verb..

            Transform()
set category = "Fighting"
set name = "Transfomation"
if(src.race == "Super Saiyan")
/*Super Saiyen crap goes here*/
if(src.race == "Namek")
/*Namek crap goes here*/

Adjust to each of the possible races that can be accessed, for example metriod or whatever...

mob
var
race
Login()
src.race == "Saiyan"


If something similar to that is how they are determained as saiyans etc then you are fine, but if its something else like abc then you will need to alter it.

Just head my warning, you were warned to delete it.
In response to Bunnie
No, no, no, no, NO!

Please, Bunnie, learn what you're doing before trying to help. The code you've posted before made me think that usr abuse would turn up somewhere, and now it has. Use src in most cases. It's probably what you actually want. (an exception would be item-picking-up verbs).

Don't EVER use usr in procs. That's not good, because usr isn't what you think it is.

Your Login() proc should refer to src.race (you can just put race in. src is auto-assumed).
In response to Jp
Jp wrote:
No, no, no, no, NO!

Please, Bunnie, learn what you're doing before trying to help. The code you've posted before made me think that usr abuse would turn up somewhere, and now it has. Use src in most cases. It's probably what you actually want. (an exception would be item-picking-up verbs).

Don't EVER use usr in procs. That's not good, because usr isn't what you think it is.

Your Login() proc should refer to src.race (you can just put race in. src is auto-assumed).

Fine, fixed...
In response to Bunnie
I'm not sure if teh internet is communicating emotions as it should, but that sounds vaguely like "Why are people always all over me? It's good enough! It works for me!"

In which case, I'd like to point out that 2+2=5 is not good enough, and using usr instead of src is a similarly stupid mistake. They are not the same thing. Usr is unfriendly. Search the forums about it, you'll find a lot about it. It'll make you a better DM programmer.
In response to Jp
Jp wrote:
I'm not sure if teh internet is communicating emotions as it should, but that sounds vaguely like "Why are people always all over me? It's good enough! It works for me!"

In which case, I'd like to point out that 2+2=5 is not good enough, and using usr instead of src is a similarly stupid mistake. They are not the same thing. Usr is unfriendly. Search the forums about it, you'll find a lot about it. It'll make you a better DM programmer.

I'll let you in on a secret, *jabs him in the stomach*

I did that so that he would hopefully KNOW to fix it, if i give DM code with problems like that people should know how to fix it, and seeing as he's going to use Zeta im going to make it difficult for him.
In response to Bunnie
Newbiesare already confused enough about these problems. Looking at his code, he'll do it to himself. Don't help him hang himself and have some poor, innocent newbie stumble upon your deliberately broken code, and use it, thinking that it will work.

Incidentally, did you know that dictionary-makers and map-makers used to intentionally hide mistakes in works, so that they could figure out if people were copying them?
In response to Jp
Alright Alright I get the idea, sheesh...
In response to Bunnie
Heh. I know that people tend to crap on a lot about it, but using usr correctly is an important thing to do. It's part of programming. And usr abuse is a real problem amongst newbies. So we sort of jump on it. I do come across as being a real arrogant idiot in the last few posts, I'm well aware of that. Must be me shining through. :P
In response to Bunnie
So is somone gonna help me?
In response to Jp
Jp wrote:
Heh. I know that people tend to crap on a lot about it, but using usr correctly is an important thing to do. It's part of programming. And usr abuse is a real problem amongst newbies. So we sort of jump on it. I do come across as being a real arrogant idiot in the last few posts, I'm well aware of that. Must be me shining through. :P

......anyway this isn't getting the author anywhere so *finishes this posting off*
In response to Govegtos
Govegtos wrote:
So is somone gonna help me?

I have already replied a fix, here , please look next time.
In response to O-matic
Let's try not to be hypocrytical. You have a zeta rip also.
In response to N1ghtW1ng
N1ghtW1ng wrote:
Let's try not to be hypocrytical. You have a zeta rip also.

Do as he says, not as he does. :p
Page: 1 2