Advance Level Quest Function


SUBMITTED BY: tuaavolol

DATE: May 1, 2016, 7:14 p.m.

FORMAT: C++

SIZE: 353 Bytes

HITS: 20184

  1. int pc_advance_level(lua_State * L)
  2. {
  3. LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
  4. if (!lua_isnumber(L, 1))
  5. {
  6. sys_err("QUEST : pc_advance_level wrong argument");
  7. return 0;
  8. }
  9. int level = (int) lua_tonumber(L, 1);
  10. ch->ResetPoint(MINMAX(0, level, PLAYER_MAX_LEVEL_CONST));
  11. return 1;
  12. }

comments powered by Disqus