viewing paste npctalk2 | Diff

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
Index: src/map/script.c
===================================================================
--- src/map/script.c    (revision 16195)
+++ src/map/script.c    (working copy)
@@ -12229,6 +12229,21 @@
    return 0;
 }
 
+BUILDIN_FUNC(npctalk2)
+{
+   const char* str;
+
+   struct npc_data* nd = (struct npc_data *)map_id2bl(st->oid);
+   str = script_getstr(st,2);
+
+   if(nd)
+   {
+       clif_message(&nd->bl, str);
+   }
+
+   return 0;
+}
+
 // change npc walkspeed [Valaris]
 BUILDIN_FUNC(npcspeed)
 {
@@ -16518,6 +16533,7 @@
    BUILDIN_DEF(movenpc,"sii?"), // [MouseJstr]
    BUILDIN_DEF(message,"ss"), // [MouseJstr]
    BUILDIN_DEF(npctalk,"s"), // [Valaris]
+   BUILDIN_DEF(npctalk2,"s"),
    BUILDIN_DEF(mobcount,"ss"),
    BUILDIN_DEF(getlook,"i"),
    BUILDIN_DEF(getsavepoint,"i"),
Viewed 734 times, submitted by Guest.