danielvasc
Member
- Joined
- Apr 19, 2014
- Messages
- 8
- Reaction score
- 6
I'm using Sarah's source (TFS 1.5): GitHub - MillhioreBT/forgottenserver-downgrade: TFS Downgrade 1.5+ is an engine based on nekiro downgrade but highly updated with current tfs code, it also has the lua modules divided and uses lua5.4 (https://github.com/MillhioreBT/forgottenserver-downgrade)
I want to implement the talking to NPC system in the version 8.0 standard, using the TALK method with a queue system, where the player needs to wait their turn to negotiate with the NPC.
Initially, I migrated the /data/npc files from this datapack: RealMap-Global-8.0-TFS-1.2/data/npc at main · Brunowots/RealMap-Global-8.0-TFS-1.2 (https://github.com/Brunowots/RealMap-Global-8.0-TFS-1.2/tree/main/data/npc)
Everything seems to work great, but I found two serious problems:
1. When I try to travel by boat, when I say "hi" to the NPC Captain Fearless (Venore boat), he responds:
16:34 Daniel [999]: hi
16:34 Captain Fearless: Welcome on board, Daniel. Where can I {sail} you today?
16:34 Captain Fearless: Passages to Thais, Carlin, Ab'Dendriel, Port Hope, Edron, Darashia, Liberty Bay, Svargrond and Ankrahmun.
When I type the city I want to travel to, for example "thais", the NPC doesn't say anything.
2. The other problem I noticed also occurs in the Brunowots source itself, which is the following:
When I say "hi" to an NPC called Digger, he responds to me "Digger: Oh, Daniel is that you? You look inconveniently healthy.". Then if I move away from him a few 4 square meters, he says "Good bye.". So far so good, this is the behavior I expect. However, if I buy something from him before moving 4 square meters away, for example I say "buy blank rune" and then "yes", he says "Here you are." and gives me the item that goes straight to my backpack. However, if I move 4 square meters away or say "bye", he responds "Good bye.", however, he does not end the dialogue with my character, that is, his focus remains on me. If I try to move away 4 square meters or more he keeps saying "Good bye" over and over again.
The only way I can say "bye" to the NPC is to log out, and when I log back in, the NPC keeps saying "Good bye", but now I can say "Hi" and then "bye" to him, and then he It takes the focus away from my character.
In console errors appear such as:
If anyone can give me guidance on the path I should take to correct it, I would greatly appreciate it.
I want to implement the talking to NPC system in the version 8.0 standard, using the TALK method with a queue system, where the player needs to wait their turn to negotiate with the NPC.
Initially, I migrated the /data/npc files from this datapack: RealMap-Global-8.0-TFS-1.2/data/npc at main · Brunowots/RealMap-Global-8.0-TFS-1.2 (https://github.com/Brunowots/RealMap-Global-8.0-TFS-1.2/tree/main/data/npc)
Everything seems to work great, but I found two serious problems:
1. When I try to travel by boat, when I say "hi" to the NPC Captain Fearless (Venore boat), he responds:
16:34 Daniel [999]: hi
16:34 Captain Fearless: Welcome on board, Daniel. Where can I {sail} you today?
16:34 Captain Fearless: Passages to Thais, Carlin, Ab'Dendriel, Port Hope, Edron, Darashia, Liberty Bay, Svargrond and Ankrahmun.
When I type the city I want to travel to, for example "thais", the NPC doesn't say anything.
2. The other problem I noticed also occurs in the Brunowots source itself, which is the following:
When I say "hi" to an NPC called Digger, he responds to me "Digger: Oh, Daniel is that you? You look inconveniently healthy.". Then if I move away from him a few 4 square meters, he says "Good bye.". So far so good, this is the behavior I expect. However, if I buy something from him before moving 4 square meters away, for example I say "buy blank rune" and then "yes", he says "Here you are." and gives me the item that goes straight to my backpack. However, if I move 4 square meters away or say "bye", he responds "Good bye.", however, he does not end the dialogue with my character, that is, his focus remains on me. If I try to move away 4 square meters or more he keeps saying "Good bye" over and over again.
The only way I can say "bye" to the NPC is to log out, and when I log back in, the NPC keeps saying "Good bye", but now I can say "Hi" and then "bye" to him, and then he It takes the focus away from my character.
In console errors appear such as:
Code:
Lua Script Error: [Npc interface]
data/npc/scripts/Digger.lua:onThink
data/npc/lib/npcsystem/npchandler.lua:173: bad argument #2 to 'remove' (position out of bounds)
stack traceback:
[C]: in ?
[C]: in function 'table.remove'
data/npc/lib/npcsystem/npchandler.lua:173: in method 'releaseFocus'
data/npc/lib/npcsystem/npchandler.lua:506: in method 'onWalkAway'
data/npc/lib/npcsystem/npchandler.lua:445: in method 'onThink'
data/npc/scripts/Digger.lua:8: in function <data/npc/scripts/Digger.lua:8>
Lua Script Error: [Npc interface]
data/npc/scripts/runes.lua:onCreatureSay
data/npc/lib/npcsystem/npchandler.lua:173: bad argument #2 to 'remove' (position out of bounds)
stack traceback:
[C]: in ?
[C]: in function 'table.remove'
data/npc/lib/npcsystem/npchandler.lua:173: in method 'releaseFocus'
data/npc/lib/npcsystem/npchandler.lua:315: in method 'unGreet'
data/npc/lib/npcsystem/npchandler.lua:481: in method 'onFarewell'
data/npc/lib/npcsystem/modules.lua:330: in field 'callback'
data/npc/lib/npcsystem/keywordhandler.lua:30: in method 'processMessage'
data/npc/lib/npcsystem/keywordhandler.lua:187: in method 'processNodeMessage'
data/npc/lib/npcsystem/keywordhandler.lua:161: in method 'processMessage'
data/npc/lib/npcsystem/npchandler.lua:381: in method 'onCreatureSay'
data/npc/scripts/runes.lua:8: in function <data/npc/scripts/runes.lua:8>
Lua Script Error: [Npc interface]
data/npc/scripts/Digger.lua:onCreatureDisappear
data/npc/lib/npcsystem/npchandler.lua:173: bad argument #2 to 'remove' (position out of bounds)
stack traceback:
[C]: in ?
[C]: in function 'table.remove'
data/npc/lib/npcsystem/npchandler.lua:173: in method 'releaseFocus'
data/npc/lib/npcsystem/npchandler.lua:315: in method 'unGreet'
data/npc/lib/npcsystem/npchandler.lua:363: in method 'onCreatureDisappear'
data/npc/scripts/Digger.lua:6: in function <data/npc/scripts/Digger.lua:6>
If anyone can give me guidance on the path I should take to correct it, I would greatly appreciate it.