summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/manaserv_protocol.h1
-rw-r--r--src/scripting/lua.cpp13
2 files changed, 14 insertions, 0 deletions
diff --git a/src/common/manaserv_protocol.h b/src/common/manaserv_protocol.h
index 9feedfd9..4bac0837 100644
--- a/src/common/manaserv_protocol.h
+++ b/src/common/manaserv_protocol.h
@@ -185,6 +185,7 @@ enum {
GPMSG_BEINGS_DAMAGE = 0x0310, // { W being id, W amount }*
GPMSG_CREATE_EFFECT_POS = 0x0320, // W effect id, W*2 position
GPMSG_CREATE_EFFECT_BEING = 0x0321, // W effect id, W BeingID
+ GPMSG_CREATE_TEXT_PARTICLE = 0x0322, // S text
GPMSG_SHAKE = 0x0330, // W intensityX, W intensityY, [W decay_times_10000, [W duration]]
// Guild
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp
index a6b26e92..05845a36 100644
--- a/src/scripting/lua.cpp
+++ b/src/scripting/lua.cpp
@@ -1703,6 +1703,18 @@ static int chr_shake_screen(lua_State *s)
return 0;
}
+static int chr_create_text_particle(lua_State *s)
+{
+ Character *c = checkCharacter(s, 1);
+ const char *text = luaL_checkstring(s, 2);
+
+ MessageOut msg(GPMSG_CREATE_TEXT_PARTICLE);
+ msg.writeString(text);
+ c->getClient()->send(msg);
+
+ return 0;
+}
+
/**
* chr_get_exp(Character*, int skill): int
@@ -2478,6 +2490,7 @@ LuaScript::LuaScript():
{ "being_register", &being_register },
{ "effect_create", &effect_create },
{ "chr_shake_screen", &chr_shake_screen },
+ { "chr_create_text_particle", &chr_create_text_particle },
{ "test_tableget", &test_tableget },
{ "get_map_id", &get_map_id },
{ "get_map_property", &get_map_property },