[x] I am aware that this PR may be closed if the above-mentioned criteria are not fulfilled.
Changes Proposed
Added onSight event, this has to be enabled with NpcType:sight(x, y) unless that is not set the event wont fire. This event triggers whenever a creature (monsters/npcs/players) steps into the sight range, will only re trigger once you walk out of idle range and back in again.
fixed event callbacks, they're now moved into NpcCallbacks they can be set like: NpcType:callbacks().onSay/onSight/etc.
fixed a crash which could occur if you had a npc disabled then enabled him and /reload npcs, this is now fixed
fixed a crash that if a xml npc is invalid on server startup that it throws an error instead of crashing
made all the functions in the lib overloadable, only the table data is protected, you can now change functions and they will be correctly changed on /reload npcs
changed everything related to focus from seconds into ms
changed focus so it works for all creatures not only players
changed NpcTalkQueue it now works for creatures not only for players
changed the onCreatureSay event, it now triggers for all creatures not only for players
selfSay has a new parameter now called talkType which is optional and falls back to TALKTYPE_SAY
added onSpeechBubble event, with this we can set the speech bubble for each player individual.
example:
Npc has a quest for the player he only shows for this player the quest speech bubble, once the quest is finished the npc wont have a quest speech bubble anymore
Pull Request Prelude
Changes Proposed
onSight
event, this has to be enabled withNpcType:sight(x, y)
unless that is not set the event wont fire. This event triggers whenever a creature (monsters/npcs/players) steps into the sight range, will only re trigger once you walk out of idle range and back in again.NpcCallbacks
they can be set like:NpcType:callbacks().onSay/onSight/etc.
onSpeechBubble
event, with this we can set the speech bubble for each player individual. example: Npc has a quest for the player he only shows for this player the quest speech bubble, once the quest is finished the npc wont have a quest speech bubble anymoreIssues addressed: