From e42c7a38a5934c4d1e671d87851f9d4abac25021 Mon Sep 17 00:00:00 2001 From: KimLS Date: Fri, 28 Jun 2013 16:43:57 -0700 Subject: [PATCH] eq.attack_npc(npc_id) and eq.attack_npc_type(npc_type) added. --- zone/lua_general.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index cdcea9748..57cb21783 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -973,6 +973,14 @@ void lua_attack(const char *client_name) { quest_manager.attack(client_name); } +void lua_attack_npc(int entity_id) { + quest_manager.attacknpc(entity_id); +} + +void lua_attack_npc_type(int npc_type) { + quest_manager.attacknpctype(npc_type); +} + luabind::scope lua_register_general() { return luabind::namespace_("eq") [ @@ -1122,7 +1130,9 @@ luabind::scope lua_register_general() { luabind::def("clear_areas", &lua_clear_areas), luabind::def("add_spawn_point", &lua_add_spawn_point), luabind::def("remove_spawn_point", &lua_remove_spawn_point), - luabind::def("attack", &lua_attack) + luabind::def("attack", &lua_attack), + luabind::def("attack_npc", &lua_attack_npc), + luabind::def("attack_npc_type", &lua_attack_npc_type) ]; }