what the script currently does is get the variable, check to see if level2 is 'subhero' if it, then it makes level = levelold+1 and checks to see if level is bigger than 100.
If it is, it sets level2 to H and both ways sets level to be 1-100.
If level2 wasnt 'subhero' then it simply adds 1 to the level.
However, none of this is actually what you asked. So what are you really asking?
At which point when you hit level 101, you become a Hero and the level progression goes from 1 to 750
What this script does is allow me to have my current level set in my infobar script.
If my level is subhero, then it just adds one to the level and so on and so forth, untill I hit Hero level, then it deducts 100 from the the current level changes it to "H" variable, and tacks it on, so it displays: Level: H1, instead of Level: 101.
Now, even though you become hero levels, you still only use Level 100 equipment, whats nice about this mud is there are no levels for equipment, the level is really only for enchanting purposes. However, you still can not create items above your current level. Meaning, at level 85 I have to make level 85 equipment, even though I can use Level 100 gear.
This mud has quite an extensive Player made equipment system, the majority of the mud ends up using player made armor, mostly because of the difficulty of finding quality items on mobs.
Anyways, I have a script that allows me to make items in 1 command instead of the multiple commands that it takes.
make new helm
make type winged helm
make level 100
make size medium
make colour blue
make material furnace (This will use whatever is in the furnace to create the item.)
make proceed
Anyways, I've still got to make a script menu type thing that will let me include the make types of the items. But that's a side project.
What I'm doing right now is using an alias like this:
make (helm) 100 medium blue
This will make a generic helm at level 100, size medium, and colour it blue.
I also have a multiple make alias that will make many items by queing up the commands as many times as I set the variable for.
What I want to do is have this level-up script set the variable for my current make level, level. So instead of manually putting in the level, it does it with expanded variables.
The problem I am running into is I am not sure where I need to put the code in. Which isn't very complicated code to begin with.
Also, if there were a way to simplify this script I wouldn't also mind knowing that as well.
dim level
level = CInt(world.getvariable ("level")) + 1
if (world.getvariable ("level2") = "subhero") and _
(level > 100) then
world.setvariable "level2", "H"
level = (level - 100)
end if
world.setvariable "level", level
What you are doing is incrementing the level by one and then checking whether it is over 100. If yes then you "normalize" it by incrementing level2 and subtracting 100 from level. Finally you save the new level. The original version of the script wasn't very obvious about that.