newja 53 Posted March 29, 2015 Share Posted March 29, 2015 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) Introduction & Small explaination https://www.youtube.com/watch?v=RbhBA1Ko4x8 As you can see in the video, this function stores XP amount of the last killed mob. Variable is reseted every time you login into the game (including warps). ##### HowTo ##### Spoiler ######## Open char.h and paste this in public class ######## Spoiler int GivenExpData; int GetExpData() const {return GivenExpData;} ######## Open char.cpp and find ######## Spoiler void CHARACTER::Initialize() Somewhere inside add this GivenExpData = 0; ######## Open char_battle.cpp and find ######## Spoiler to->PointChange(POINT_EXP, iExp, true); make a new line and add to->GivenExpData = iExp; ######## Open questlua_pc.cpp and add this function ######## Spoiler int pc_get_exp_data(lua_State * L) { lua_pushnumber(L, CQuestManager::instance().GetCurrentCharacterPtr()->GetExpData()); return 1; } Somewhere at the end of RegisterPCFunctionTable paste {"get_exp_data", pc_get_exp_data}, ######## Test Quest ######## (notice that this version isn't the same as showed in the video) Spoiler quest exp begin state start begin when kill with !npc.is_pc() begin chat(pc.get_exp_data().." EXP "..mob_name(npc.get_race())) end end end Example of printed message (when you kill a mob) 999 EXP Wild Dog 1 9 Link to comment Share on other sites More sharing options...
Premium Galet 514 Posted March 29, 2015 Premium Share Posted March 29, 2015 Great !! Link to comment Share on other sites More sharing options...
Xynjo 3 Posted May 27, 2015 Share Posted May 27, 2015 nice bro thx for this i have question this system lag my usage cpu or ram ? Link to comment Share on other sites More sharing options...
Premium Galet 514 Posted May 27, 2015 Premium Share Posted May 27, 2015 nice bro thx for this i have question this system lag my usage cpu or ram ? I don't think so because it shows only the amount of xp that you receive. Link to comment Share on other sites More sharing options...
John456 50 Posted October 22, 2015 Share Posted October 22, 2015 How i can see total exp bonus in %? Thank you. Link to comment Share on other sites More sharing options...
Remix 45 Posted October 23, 2015 Share Posted October 23, 2015 ! for invertion doesn't exist in Lua Link to comment Share on other sites More sharing options...
Recommended Posts