ID:154923
 
I need a verb to let people train (like self train but slightly different)
I have tried to make one but I can't seem to get it to work with fatigue and exp. I don't want a self train verb, I want a verb that is similar.
That's the beauty of programming and what makes it fun for me. You can create whatever you want!

Also what you are asking for is incredibly vague!
In response to Speedro
I am new to Byond programming.
I tried making a train verb and I could not get one to work
I am asking for help making a " self train verb "
Ok
mob
verb
Train()// And you have to create the varibles!
if(src.exp>=expmax)
src.expmax*=5
src.str+=4
src.def+=4
src.health+=4
src.str+=4
src.level++
src<<""
src.stamina_max+=5
else
if(src.exp<=expmax)
var/expchance=rand(1,4)
if(expchance == 1)
src.exp+=5
if(expchance == 2)
src.exp+=10
if(expchance == 3)
src.exp+=15
src.stamina+=5
if(expchance == 4)
src.exp+=20
src.stamina+=20
var/str_gain=src.str/5
var/def_gain=src.def/5
var/health_gain=src.health/5
var/statchance=rand(1,3)
if(statchance == 1)
src.str+=str_gain
if(statchance == 2)
src.def+=def_gain
if(statchance == 3)
src.health+=health_gain
if(src.stamina>=src.stamina_max)
src<<"You are to exhuasted!"
mob/var/level=1
mob/var/stamina=0
mob/var/stamina_max=20

This is UNTESTED so there may be bugs :/ and for the other 2 rands of the expchance just make how much stamina would be lost also u have to repeadtly click this if u want it that u dont have too do that just ask.
In response to King-okal
I am not a big fan of the repeated clicking
In response to Ashs999
I'll give you some training verb unrepeatable tommorow ! bye
In response to Ashs999
Ashs999 wrote:
I am not a big fan of the repeated clicking

Then guess what you shouldn't be putting in your game? If you responded "self train verb," you would be correct.
In response to King-okal
Does that seriously increase exp requirements by 5x each time around?

Damn. That's hardcore.
In response to King-okal
Thanks
In response to King-okal
King-okal wrote:
Ok
> mob
> verb
> Train()// And you have to create the varibles!
> if(src.exp>=expmax)
> src.expmax*=5
> src.str+=4
> src.def+=4
> src.health+=4
> src.str+=4
> src.level++
> src<<""
> src.stamina_max+=5
> else
> if(src.exp<=expmax)
> var/expchance=rand(1,4)
> if(expchance == 1)
> src.exp+=5
> if(expchance == 2)
> src.exp+=10
> if(expchance == 3)
> src.exp+=15
> src.stamina+=5
> if(expchance == 4)
> src.exp+=20
> src.stamina+=20
> var/str_gain=src.str/5
> var/def_gain=src.def/5
> var/health_gain=src.health/5
> var/statchance=rand(1,3)
> if(statchance == 1)
> src.str+=str_gain
> if(statchance == 2)
> src.def+=def_gain
> if(statchance == 3)
> src.health+=health_gain
> if(src.stamina>=src.stamina_max)
> src<<"You are to exhuasted!"
> mob/var/level=1
> mob/var/stamina=0
> mob/var/stamina_max=20
>

This is UNTESTED so there may be bugs :/ and for the other 2 rands of the expchance just make how much stamina would be lost also u have to repeadtly click this if u want it that u dont have too do that just ask.




i get 19 errors about tthe src."insert the ar here" being undefined.... Help?