collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 987
  • stats Total Posts: 18348
  • stats Total Topics: 2494
  • stats Total Categories: 7
  • stats Total Boards: 33
  • stats Most Online: 500

Author Topic: Linked objects in chat  (Read 14344 times)

0 Members and 1 Guest are viewing this topic.

Offline MAGE

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Linked objects in chat
« on: September 30, 2022, 05:43:20 pm »
I see that it is possible to retrieve information from a linked object in the chat. But the information is not complete, it lacks in particular the description of the object as well as its statistics.

Is there a way to get them??

Offline MAGE

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Linked objects in chat
« Reply #1 on: September 30, 2022, 06:11:21 pm »
I don't see an edit button so I complete my post with an answer.

I know that there are already databases, but all are in English. But I would like to have it in French.

I recover many data of type ID, level, color, name and also "crc" data (which are all the same for a given object). I think what I'm looking for is in there...

Offline bitnykk

  • Administrator
  • ********
  • Posts: 67
  • Karma: +0/-0
Re: Linked objects in chat
« Reply #2 on: October 14, 2022, 10:29:22 pm »
Hi MAGE.

I don't understand what you need exactly.

Do you want to see details of an item posted by an AoC player ?
Or do you mean posted by a bot (be or any other kind) ?

Please explain an use case (action, expectation, wrong result, etc) so i understand better.

From there, i'll help you if i can ;)

PS : please note that i'm an AO player, i only log AoC in chat for bebot testings, but i may adress you to more skilled player if needed.
« Last Edit: October 14, 2022, 10:30:55 pm by bitnykk »

Offline MAGE

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Linked objects in chat
« Reply #3 on: October 29, 2022, 07:43:44 am »
Thank you for the answer, I must admit that I had no more hope :D.

I would like to create a French-speaking object base for AoC. The option to save an object's information is therefore, I think, a great opportunity for this.

Let me explain. When a player sends an object in the chat (by dragging and dropping), certain objects generate a call to a robot.

By reading the code of this part of the bot I understand that it can read and add the information of the object and if the object does not exist in its database it adds it, then thanks the player for his participation to the completion of the object database.

It also allows you to ask robots for information about an object via a command. (via the "!items <text>" command)

As I said a little higher, I wish to be able to create a French-speaking database of objects. and therefore create my own database to complete. By studying the PHP code a bit (I am a front-end developer in life and PHP is the language that introduced me to the web more than 10 years ago now), I was able to change the link of the 'API for my own API (it's only a very simple draft at the moment). The HTTP request looks like this:
Code: [Select]
DOMAIN_NAME/index.php?lowid=4603023&highid=4603023&lowlvl=0&highlvl=80&lowcrc=d384744f%3Ac950eef1%3A6e3a0f5b%3Ad105a20&midcrc=d384744f%3Ac950eef1%3A6e3a0f5b%3Ad105a20&highcrc=d384744f%3Ac950eef1%3A6e3a0f5b%3Ad105a20&color=6ea7&name=Javeline+en+bambon&server=Crom(some information has been deleted :) )

The different parameters are pretty clear to me.

  • lowid=4603023 (the small icon)
  • highid=4603023 (the big icon)
  • lowlvl=0 (the minimum level required)
  • highlvl=80 (item level)
  • color=6ea7 (the level/color of the object, common, superior, enchanted, rare or legendary)
  • name=Javeline+in+bamboo (the name of the object)

However, some parameters are unknown to me:

  • lowcrc=d384744f%3Ac950eef1%3A6e3a0f5b%3Ad105a20
  • midcrc=d384744f%3Ac950eef1%3A6e3a0f5b%3Ad105a20
  • highcrc=d384744f%3Ac950eef1%3A6e3a0f5b%3Ad105a20

I guess that's where the information is stored. I did a search through the game files (via notepad++ subfolder search, but couldn't find anything. So I'm stuck at this step.

My questions are therefore:
  • How to interpret the "lowcrc", "midcrc" and "highcrc" parameters to obtain the missing information which is the description of the object as well as the statistics of the object (the most important: D)?
  • Why don't ALL objects dropped in the chat generate an API call?

Offline bitnykk

  • Administrator
  • ********
  • Posts: 67
  • Karma: +0/-0
Re: Linked objects in chat
« Reply #4 on: November 02, 2022, 10:56:58 am »
Heya,

Yet again i'm no AoC regular player but i'll try to respond the best i can. Could do it in french but i'll go with english as this documents for other users too :)

First of all, for AoC items context, you'd have Bebot linked to MeatHook's by-default semi-opened database server for collecting and storing infos.
If i remember well, to search for items ingame you can do it right away by the command !items keyword(s)
But to submit new elements serverside, you'd have to ask player MeatHook first so he gives a unique passkey for your botname. He's very friendly to contact.

That said, if you prefer to make your own server collection/storage, you don't need to modify the Bebot PHP code at all ; better is to set the items parameters behind command : !settings items
Accurately, the one you'd want to modify is the CIDB as follow : !set items CIDB https://your.custom.server
Juste make sure you have a 24/7 working webservice listening at this URL first :)
Note we do not provide that part of software, it's totally up to you.
You may indeed dev it in PHP or any other frontend language, in coordination with your favorite DB (sql, mongo, whatever you like).

Now, let's come onto the questions you've asked :
1. the way i understand it, the CRC is some sort of checking hash, prolly just a guarantee for the server that the provided datas are genuine ; this is totally specific to AoC items, as we don't have it in AO
2. if bebot is in autosubmit mode (check !settings upper) any AoC game item formatted correctly and dropped in the orgchat you share with bot should generate an API call ; from there it depends of the listening webservice (e.g. if the item already exist, the service may ignore it, i guess)

To finish up, just a note for the usecase you mention :
I'm not 100% sure that providing the infos in french is really mandatory, but if you really want to go this way, i suggest you store the datas in english and create a separate translation table filled over time by a different runner, that may e.g. use google translate API or such. That way you can provide english by default OR offer french if it's available. For this custom items module, i suggest you create a copy of the existing into Bebot's Custom/Modules to avoid any update conflict in the future.

Hope i covered all you needed upper.

 

* Recent Posts
Linked objects in chat by bitnykk
[November 02, 2022, 10:56:58 am]


0.7.x updates for AO by bitnykk
[September 01, 2022, 03:25:38 pm]


0.7.x updates for AoC by bitnykk
[September 01, 2022, 03:25:22 pm]


Website back up and quick status update by bitnykk
[July 30, 2021, 04:56:19 pm]


AO Bots - discord server by bitnykk
[January 31, 2021, 03:50:48 am]

* Who's Online
  • Dot Guests: 43
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2022, SimplePortal