NPC like 7.6 to 8.6 (Buy and sell talks) - SOLVED

tiago cysneiros

New Member
Joined
Apr 23, 2017
Messages
23
Best answers
0
Reaction score
2
Guys! I need a NPC for 8.6 that works like in Tibia 7.6, which buys and sells items as 7.6, having to talk "buy" and "sell", not how it works today that says "Trade" and there is a list on the side. Here is an example of how I need to:



Conversation between player and NPC:

Player: Hi

NPC: Hello, player, what do you want for me? I'm selling and buying some items ...

Player: Buy 50 Mana Potion

NPC: Do you want to buy 50 Mana Potion per 1000 Gold Coins?

Player: yes

NPC: Here it is ...

Player: Sell 100 Bottles

NPC: You want to sell 100 bottles for 200 gold coins?

Player: yes

NPC: Here it is ...



Basically this ... As it was before. with love.
 

CipsoftStinks

www.relicaria.com
Joined
Oct 1, 2016
Messages
906
Best answers
3
Reaction score
113
Location
Chile
Guys! I need a NPC for 8.6 that works like in Tibia 7.6, which buys and sells items as 7.6, having to talk "buy" and "sell", not how it works today that says "Trade" and there is a list on the side. Here is an example of how I need to:



Conversation between player and NPC:

Player: Hi

NPC: Hello, player, what do you want for me? I'm selling and buying some items ...

Player: Buy 50 Mana Potion

NPC: Do you want to buy 50 Mana Potion per 1000 Gold Coins?

Player: yes

NPC: Here it is ...

Player: Sell 100 Bottles

NPC: You want to sell 100 bottles for 200 gold coins?

Player: yes

NPC: Here it is ...



Basically this ... As it was before. with love.
Pm me
 

emil92b

Active Member
Joined
Aug 21, 2013
Messages
170
Best answers
4
Reaction score
27
in npchandler.lua
Code:
NPCHANDLER_CONVBEHAVIOR = CONVERSATION_DEFAULT
 
OP
tiago cysneiros

tiago cysneiros

New Member
Joined
Apr 23, 2017
Messages
23
Best answers
0
Reaction score
2
in npchandler.lua
Code:
NPCHANDLER_CONVBEHAVIOR = CONVERSATION_DEFAULT

I've to add this code or change this to 1 in my npchandler.lua?
CONVERSATION_DEFAULT = 0

In NPC.xml, at script=".lua", I change to:
script="data/npc/script/npchandle.lua"?

Can you send one npc.xml and script.lua configured? So I can edit and study it.
 
OP
tiago cysneiros

tiago cysneiros

New Member
Joined
Apr 23, 2017
Messages
23
Best answers
0
Reaction score
2
Thanks for this NPC, man, but he don't sell itens, like potions or weapons to I understand how works the amount, exemple: "Sell 5 vials" where I put the Vial ID? Where I put the Coin ID?. Sorry, but u have another exemple?

Other thing, the code in npchandler.lua, I've to change this:
CONVERSATION_DEFAULT = 0
or add this?
NPCHANDLER_CONVBEHAVIOR = CONVERSATION_DEFAUL


Sorry, newbie here.
 
Top