Skip to content

Saying hi to NPC on left click #1149

@alfuveam

Description

@alfuveam

With this feature, is possible say hi on left click.

alt text

index fa9d4799..77ab43c2 100644
--- a/modules/game_interface/gameinterface.lua
+++ b/modules/game_interface/gameinterface.lua
@@ -714,6 +714,12 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
     end
   end
 
+  if creatureThing then
+    if creatureThing:isNpc() then
+      g_game.talk("hi")
+      return true
+    end
+  end
 
   local player = g_game.getLocalPlayer()
   player:stopAutoWalk()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions