-
Posts
52 -
Joined
-
Last visited
-
Days Won
2 -
Feedback
0%
Community Answers
-
newja's post in I can't compile this quest. was marked as the answer
say("test ã") Won't work.
say("test ã ") Will work.
Do you understand now?
-
newja's post in Change permissions of rank? was marked as the answer
You mean commands, right?
Cmd.cpp
-
newja's post in Quest Event - Upgrade was marked as the answer
If you want to trigger this event while upgrading with scroll you need to do following: Open char_item.cpp and search for this. Now add: quest::CQuestManager::instance().upgrade(GetPlayerID(), item); ######################################################## If you want to get data from actual item such as vnum, bonuses, sockets or slot number (e.g. Upgraded sword from +0 to +1, now you get ID 10 instead of new ID 11, continue reading to change that) you have to change all this: quest::CQuestManager::instance().upgrade(GetPlayerID(), item); with this quest::CQuestManager::instance().upgrade(GetPlayerID(), pkNewItem); Forgot to mention but this event is called only when upgrade is succesfull. Regards, newja -
newja's post in C++ get Hp from a mob/npc, is possible? was marked as the answer
int npc_get_hp_by_vid(lua_State* L) { lua_Number vid = lua_tonumber(L, 1); LPCHARACTER npc = CHARACTER_MANAGER::instance().Find(vid); if(npc) { lua_pushnumber(L, npc->GetHP()); } else { lua_pushnumber(L, 0); } return 1; } int npc_get_max_hp_by_vid(lua_State* L) { lua_Number vid = lua_tonumber(L, 1); LPCHARACTER npc = CHARACTER_MANAGER::instance().Find(vid); if(npc) { lua_pushnumber(L, npc->GetMaxHP()); } else { lua_pushnumber(L, 0); } return 1; }
Regards,
newja