Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x=room_width/2;
- ytext=240;
- color=make_colour_rgb(197,202,233);
- //load text from language file
- text_multi = load_text("gameover","difmulti","Difficult multiplier: ")
- text_nextlv = load_text("gameover","untilnextlv","Until next LV")
- //exp
- ini_open("data.ini");
- ID = global.charID
- exp_gain = global.Score
- exp_multi = (1+global.startdif/40)
- str_multi = text_multi+string(exp_multi); //string for display
- str_expgain = string(exp_gain) +"x"+ string(exp_multi) +"=" +string(exp_gain * exp_multi) + " EXP"
- global.charEXP[ID] += exp_gain * exp_multi //exp gained
- show_debug_message(global.charEXP[ID]);
- ini_write_real("player",global.charname[ID]+"EXP",global.charEXP[ID]) //save data
- global.islevelup = false;
- if global.charLV[ID] < 20 { //if not max level
- exp_left = exp_require(global.charLV[ID]+1) - global.charEXP[ID]
- str_expleft = text_nextlv+": "+ string(exp_left) //string for display
- while exp_left <= 0 { //level up
- global.islevelup = true;
- global.charLV[ID] += 1;
- exp_left = exp_require(global.charLV[ID]+1) - global.charEXP[ID]
- ini_write_real("player",global.charname[ID]+"LV",global.charLV[ID]) //save data
- }
- }
- ini_close();
Advertisement
Add Comment
Please, Sign In to add comment