I’m making 200 level with exp range within each level
But as I’m writing the code, it just doesn’t connect (I’m still learning here, sorry )
I tried 2 types
the first is looping with not leveling up and the other does not update the exp needed
My code looks like this:
1st code:
startup.txt
*create level 1
*create exp 0
*create exprange 1
*create expneed
*create totalexp 0
*create ammount 0
*create sp 0
readexp.txt
*comment here is the second choice of leveling code
*set totalexp +exp
*if ((level > 0) and (level < 10))
*set exprange 1
*gosub readexp
*return
*if ((level > 10) and (level < 20))
*set exprange 2
*gosub readexp
*label readexp
*set expneed (exp + exprange)
*if (exp >= expneed)
*set exp -expneed
*gosub pluslevel
*return
*else
*return
*comment here is the +1 level code
*label pluslevel
*set level +1
*set ammount +5
*set sp +5
*return
The first code just looping in plus the exp but not leveling up, so if the exp +1 the expneeded becomes 2 and if exp +1 again (makes the exp 2) then the expneeded also +1 which becomes 3 and so the level does not increase
*create exp 0
*create level 1
*label test
You have ${exp} exp and you are currently Level ${level}.
*choice
#Swing a sword.
*set exp +25
*gosub exp_check
*goto test
#Fire a bow.
*set exp +25
*gosub exp_check
*goto test
*label exp_check
*if exp >99
*set level +1
*set exp 0
*return
*else
*return
This is just a simple code but should work for a level up system.