• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OpenTibia Small NPC Tool v2

Can ya fix teh sell/buy thing and could ya get a small tracker init so you get the spawns of the npcs?
 
Can ya fix teh sell/buy thing and could ya get a small tracker init so you get the spawns of the npcs?

I will when I get home. I'm kind of stranded at my girlfriend's house until she gets her truck back (she's getting stuff put on it and the windows tinted).

Jo3
 
k i rly hope you fix teh spawn thing 2, tracked 180 npcs~ and had to set spawns manual -.-
 
Update!
  • Fixed closing parameters and npc if make shop npc wasn't checked.
  • Added message_sendtrade.
  • Fixed problem if NPC looks like an item.
  • Added Spawn section that catches the NPCs coordinates that you can quickly add to your spawn file.
  • Fixed sellable and buyable being reversed.
  • Fixed problem with cutting some replies off.
  • The only thing I couldn't fix was trade not catching runes. This is a problem with TibiaAPI, and over the past couple of days the packet structure has been remodeled tremendously and it'll take me a while to rewrite my functions to match the new functions. Since this is the case I probably won't release any more updates for v2 unless they're small bug fixes, and just redo everything for v3.

Jo3
 
Thanks! What about tracker? :D
And also I have strange bug, I can login on my all characters expect one of them.

@edit
It was because, character was getting battle sign on login or monsters on screen..

@edit2
Still there is not message_sendtrade.
 
Last edited:
Thanks! What about tracker? :D
And also I have strange bug, I can login on my all characters expect one of them.

@edit
It was because, character was getting battle sign on login or monsters on screen..

@edit2
Still there is not message_sendtrade.

Updated, forgot to add the trade message when converting. The login problem may have to do with the problems the proxy was having because there's nothing in the code that would do that. I'll release the tracker soon just need to finish a few things.

Jo3
 
This is completly fucked up
Code:
        <parameter key="keywords" value="name;job;tibia;ankrahmun;offer;spells;" />
        <parameter key="keyword_reply1" value="Ashari |PLAYERNAME|. If you're a distance fighter, you might want to have a look at my wares and spells.I am Dario of Ab'Dendriel." />
        <parameter key="keyword_reply2" value="Ashari |PLAYERNAME|. If you're a distance fighter, you might want to have a look at my wares and spells.I am Dario of Ab'Dendriel.I am the master archer of the arena. I train distance fighters and sell them equipment." />
        <parameter key="keyword_reply3" value="Ashari |PLAYERNAME|. If you're a distance fighter, you might want to have a look at my wares and spells.I am Dario of Ab'Dendriel.I am the master archer of the arena. I train distance fighters and sell them equipment.I travel a lot to see everything. For now I settle here for some time." />
        <parameter key="keyword_reply4" value="Ashari |PLAYERNAME|. If you're a distance fighter, you might want to have a look at my wares and spells.I am Dario of Ab'Dendriel.I am the master archer of the arena. I train distance fighters and sell them equipment.I travel a lot to see everything. For now I settle here for some time.Ankrahmun is unlike any other city I've seen. Sometimes it gives me shivers ... on the other hand it makes me stay on guard and feel alive, despite the undeath cult." />
        <parameter key="keyword_reply5" value="Ashari |PLAYERNAME|. If you're a distance fighter, you might want to have a look at my wares and spells.I am Dario of Ab'Dendriel.I am the master archer of the arena. I train distance fighters and sell them equipment.I travel a lot to see everything. For now I settle here for some time.Ankrahmun is unlike any other city I've seen. Sometimes it gives me shivers ... on the other hand it makes me stay on guard and feel alive, despite the undeath cult.My offers are bows, crossbows and ammunition. If you'd like to see my offers, ask me for a {trade}. I also teach paladin {spells}." />
        <parameter key="keyword_reply6" value="Of course, just browse through my wares.Sorry, I don't teach spells for your vocation." />
 
Offer is not considered as trade message.

eg.
Message: offer
Answer: My inventory of general goods and is large, ask me for a {trade} to take a look.

So please let offer back as it was.
 
Offer is not considered as trade message.

eg.
Message: offer
Answer: My inventory of general goods and is large, ask me for a {trade} to take a look.

So please let offer back as it was.

The NPC system with TFS considers offer a trade message, but I'll change it. Did that fix the reply problem though?

*EDIT* - Updated.

Jo3
 
Yes, fixed. Thank you very much.

Here is another example of message offer:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Rodney" script="data/npc/scripts/Rodney.lua" walkinterval="1000" floorchange="0">
    <health now="100" max="100"/>
    <look type="128" head="95" body="100" legs="116" feet="76" addons="0"/>
    <parameters>
        <parameter key="message_greet" value="Greetings, |PLAYERNAME|. If you're looking for {fruits}, you've come to the right place."/>
        <parameter key="message_farewell" value="Good bye, |PLAYERNAME|."/>
        <parameter key="message_sendtrade" value="Of course, just browse through my wares."/>
        <parameter key="module_keywords" value="1" />
        <parameter key="keywords" value="name;job;fruits;food;" />
        <parameter key="keyword_reply1" value="My name is Rodney." />
        <parameter key="keyword_reply2" value="I sell some local fruits." />
        <parameter key="keyword_reply3" value="I have apples, cherries, grapes, plums, raspberries and pears. Ask me for a {trade} if you're interested." />
        <parameter key="keyword_reply4" value="I have apples, cherries, grapes, plums, raspberries and pears. Ask me for a {trade} if you're interested." />

        <parameter key="module_shop" value="1"/>
        <parameter key="shop_buyable" value="cherry,2679,1;grapes,2681,3;pear,2673,4;plum,8839,3;raspberry,8840,1;red apple,2674,3;" />
        <parameter key="shop_sellable" value="" />
    </parameters>
</npc>

Edit
Grrrr seems like it ignored 'offer'
06:12 Player [111]: offer
06:12 Rodney: I have apples, cherries, grapes, plums, raspberries and pears. Ask me for a trade if you're interested.
 
Last edited:
There's nothing in the code that would make it ignore 'offer'. Try redownloading the program incase my FTP client was slow uploading.

Jo3
 
If you need to greet with npc by calling his name like: Hello Maryza then tool is confused.

eg.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Maryza" script="data/npc/scripts/Maryza.lua" walkinterval="1000" floorchange="0">
    <health now="100" max="100"/>
    <look type="160" head="60" body="110" legs="58" feet="76" addons="0"/>
    <parameters>
        
        <parameter key="message_farewell" value="Yeah, bye."/>
        <parameter key="message_sendtrade" value="Sure, have a look at my food. Remember, touching means buying it."/>
        <parameter key="module_keywords" value="1" />
        <parameter key="keywords" value="hello Maryza;name;job;food;offer;" />
        <parameter key="keyword_reply1" value="Welcome to the Jolly Axeman, |PLAYERNAME|. Have a good time and eat some {food}!" />
        <parameter key="keyword_reply2" value="I'm Maryza Firehand, daughter of Earth from the Molten Rock." />
        <parameter key="keyword_reply3" value="I'm the cook of the Jolly Axeman." />
        <parameter key="keyword_reply4" value="I sell normal and brown bread, meat, ham, cookies, rolls, and cheese made of mushrooms. If you'd like to see my offers, ask me for a {trade}." />
        <parameter key="keyword_reply5" value="I sell normal and brown bread, meat, ham, cookies, rolls, and cheese made of mushrooms. If you'd like to see my offers, ask me for a {trade}." />

        <parameter key="module_shop" value="1"/>
        <parameter key="shop_buyable" value="bread,2689,4;brown bread,2691,3;cheese,8368,6;cookie,8111,2;ham,2671,8;meat,2666,5;roll,2690,2;" />
        <parameter key="shop_sellable" value="" />
    </parameters>
</npc>
 
If you need to greet with npc by calling his name like: Hello Maryza then tool is confused.

Updated, changed [if msg = "hi" or msg = "hello"] to [if msg.contains("hi ") or msg.contains("hello ") or msg.contains("hail ")]. I don't think you'll be saying anything to an NPC that'll include those words. (The spaces are so it doesn't catch those words if they're part of another word, and 'hail' is for kings/queens.)

Jo3
 
Last edited:
Now it's wrong.
Code:
<parameter key="keywords" value="[B][COLOR="Red"]hi[/COLOR][/B];name;job;xed;offer;ammunition;wares;" />

<parameter key="keyword_reply1" value="Greetings, |PLAYERNAME|. Welcome to the distance fighting booth of the Ironhouse where you can buy bows, crossbows and ammunition." />
 
Now it's wrong.
Code:
<parameter key="keywords" value="[B][COLOR="Red"]hi[/COLOR][/B];name;job;xed;offer;ammunition;wares;" />

<parameter key="keyword_reply1" value="Greetings, |PLAYERNAME|. Welcome to the distance fighting booth of the Ironhouse where you can buy bows, crossbows and ammunition." />

You'll have to say 'hi ' with a space after it for now. I have to run out for a couple of hours and when I get back I'll figure out a fix for it.

Jo3
 
Then you should change it to
Code:
if msg.contains("hi")
And it will works good. Because if you say 'hi noob' it still contains hi.
 
Back
Top