ID:163809
 
hello id like to make a training system by hitting logs



i have defined the vars as follows
Def
Str
Endurance
Hp


I would like if i had a training system which u attack a log and then it raises +1 str per every 5 str per every 10 attacks and for def +2 per every 5 attack and for endurance +1 for every hit and for hp +5 for every 5 hits


iv been trying for so long to get it right but its not working so if someone can plz help me out here il be very gratfull
please someone help me im really in need
can you be more specific, like make a list going down...

example:

+1 str per whatever
+2 agility per whatever...
ect.

i know what you want i just need to know specifically what stats you want up... ill be happy to help :)
In response to Jman9901
ok heres the list thx for help mate

+2 Str for everytime u hit the log 5 times
+4 Def for everytime u hit the log 5 times
+3 maxhp for everytime u hit the log 5 times
+5 Endurance for everytime u hit the log 5 times


Str,Def,maxHp,Endurance are they vars i coded in so the training wil be exactly how i want it.


and jman can u also if u have time plz make a rest verb for me so i can recovre my hp like if i have 1/100 hp it iwll heal me backto 100

also i have the thing for resting as Hp and Maxhp max hp is ur total health and hp is wha ur health is now so if u dont mind can u plz help me out with a resting verb thanks
In response to Agrey123
im on it already, i got most everything done, but you want me to make the stats too?


P.S. this is off topic but i can help you code if you want... im sorta new too but im like a sponge :)
In response to Jman9901
sure make the stats also add my il be on msn



[email protected]
In response to Agrey123
k, mine's:

[email protected]

i wont be on it today probably but ill most likely be on tomorrow, and i just finished the code. here you are...

var/Str = 1
var/Def = 1
var/maxhp = 100
var/Endurance = 1
var/Hit_Log = 0

turf/Log
icon = 'turf.dmi'
icon_state = "Log"
density = 1

turf/Log/verb/Hit_Log(mob/M in oview(1))
if(Hit_Log == 5)
Str += 2
Def += 4
maxhp += 3
Endurance += 5
usr << "\yellow Congradulations! You gain:"
usr << " "
usr << "\yellow 2 Strength levels : \red Strength = [Str]"
usr << "\yellow 4 Defense levels : \red Defense = [Def]"
usr << "\yellow +3 Max HP : \red Max HP = [maxhp]"
usr << "\yellow 5 Endurance levels : \red Endurance = [Endurance]"

mob
Stat()
statpanel("Stats")
stat("Strength =","[Str]")
stat("Defense =","[Def]")
stat("Max HP =","[maxhp]")
stat("Endurance =","[Endurance]")
In response to Jman9901
Jman9901 wrote:
k, mine's:

[email protected]

i wont be on it today probably but ill most likely be on tomorrow, and i just finished the code. here you are...

var/Str = 1
> var/Def = 1
> var/maxhp = 100
> var/Endurance = 1
> var/Hit_Log = 0
>
> turf/Log
> icon = 'turf.dmi'
> icon_state = "Log"
> density = 1
>
> turf/Log/verb/Hit_Log(mob/M in oview(1))
> if(Hit_Log == 5)
> Str += 2
> Def += 4
> maxhp += 3
> Endurance += 5
> usr << "\yellow Congradulations! You gain:"
> usr << " "
> usr << "\yellow 2 Strength levels : \red Strength = [Str]"
> usr << "\yellow 4 Defense levels : \red Defense = [Def]"
> usr << "\yellow +3 Max HP : \red Max HP = [maxhp]"
> usr << "\yellow 5 Endurance levels : \red Endurance = [Endurance]"
>
> mob
> Stat()
> statpanel("Stats")
> stat("Strength =","[Str]")
> stat("Defense =","[Def]")
> stat("Max HP =","[maxhp]")
> stat("Endurance =","[Endurance]")



yo it aint working
In response to Agrey123
do you have a statpanel named stats already?
In response to Jman9901
it doesnt work as if like hwenu goto the log and click log train or w.e it doesnt bring up ur stats i tried clikcin like 100 times nun happening i even usedur stats but the stil never worked
In response to Agrey123
i think i know the problem, give me a sec, k?
In response to Jman9901
ok
In response to Agrey123
i fixed it! i tested it and it works, sorry it took so long...
welp, here you go!

var/Str = 1
var/Def = 1
var/maxhp = 100
var/Endurance = 1
var/Hit_Log = 0

turf/Log
icon = 'turf.dmi'
icon_state = "Log"

turf/Log/verb/Hit_Log()
Hit_Log += 1
usr << "You hit the log 1 time."
if(Hit_Log == 10)
Str += 2
Def += 4
maxhp += 3
Endurance += 5
usr << "\yellow Congradulations! You gain:"
usr << " "
usr << "\yellow 2 Strength levels : \red Strength = [Str]"
usr << "\yellow 4 Defense levels : \red Defense = [Def]"
usr << "\yellow 3 Max HP : \red Max HP = [maxhp]"
usr << "\yellow 5 Endurance levels : \red Endurance = [Endurance]"

mob
stat
stat("Strength =","[Str]")
stat("Defense =","[Def]")
stat("Max HP =","[maxhp]")
stat("Endurance =","[Endurance]")
In response to Agrey123
you said u needed a rest system here is what i use

mob
var
resting = 0


mob/verb/rest()
if(!resting)
resting = 1 // makes resting set to 1
while(resting)
hp++
sleep(10) // code will sleep for one second
if(hp == mhp)
resting = 0 // stops resting and alows the usr to move again
return
else continue // continues the resting loop
else
usr << "you are already resting!!!"