andre miles
I don't remember my first Dragon.
This probably was asked before, but upon searching, I couldn't find any solution.
I just want an NPC that does that, separated trades upon 'keywords', so I can use it as a reference.
By the way, runes.lua on TFS 1.4 returns an error while trying to buy backpacks of items. It's likely that it still doesn't work on current TFS version, since runes.lua was barely changed. I will include it here just for reference, since I am not sure that it doesn't work on current versions to actually open an Issue on Github.
Seconds after opening this post, I found Xikini's amazing example on how to do an NPC like this.
Sorry for being dumb, can close this thread.
I just want an NPC that does that, separated trades upon 'keywords', so I can use it as a reference.
By the way, runes.lua on TFS 1.4 returns an error while trying to buy backpacks of items. It's likely that it still doesn't work on current TFS version, since runes.lua was barely changed. I will include it here just for reference, since I am not sure that it doesn't work on current versions to actually open an Issue on Github.
Lua Script Error: [Npc interface]
data/npc/scripts/runes.luanCreatureSay
data/npc/scripts/runes.lua:108: table index is nil
stack traceback:
[C]: in function '__newindex'
data/npc/scripts/runes_new.lua:108: in function 'callback'
data/npc/lib/npcsystem/npchandler.lua:411: in function 'onCreatureSay'
data/npc/scripts/runes_new.lua:7: in function <data/npc/scripts/runes.lua:7>
04:24 GM Miles [1]: buy bp uhp
04:24 Test Shop: Do you want to buy 1 backpack of ultimate health potions for 6200 gold coins?
04:24 GM Miles [1]: yes
04:24 Test Shop: Here you are.
But it gives me a backpack with 20 pieces of the asked item only instead.
Post automatically merged:
Seconds after opening this post, I found Xikini's amazing example on how to do an NPC like this.
Sorry for being dumb, can close this thread.
Last edited: