[LazyRelease] Log python npc scripts from TQ!

03/29/2011 21:32 _Emme_#16
How is the location etc exportet, .sql? In that case, why release a tool when you can release them at all once telling the user to simply change the table name, and convert the python scripts manually if he wish.
03/29/2011 21:52 Korvacs#17
Quote:
Originally Posted by EmmeTheCoder View Post
How is the location etc exportet, .sql? In that case, why release a tool when you can release them at all once telling the user to simply change the table name, and convert the python scripts manually if he wish.
I would imagine because this method involves some amount of effort from the user, unlike your spoon-feeding approach.
03/29/2011 21:57 pro4never#18
Quote:
Originally Posted by Korvacs View Post
I would imagine because this method involves some amount of effort from the user, unlike your spoon-feeding approach.
Also because it allows people to update themselves in time.

EG: 6 months from now when tq adds 100 more npcs (seriously, every time I log in there's like 10 new ones) you can take 10-20 minutes to jump around the server and log them all again and get a fresh database unlike the recycled ones that have been being used in just about every public source out there for the past year or two.

But yah, that + I like at least leaving the possibility for a bit of work/thought for the end user that might help them think of similar concepts that would make their life a bit easier.
03/30/2011 01:43 .Kinshi#19
Its really simple to log multiple pages of dialog.

For my proxy I do:

Server Packets:
Code:
                case 2031:
                case 2032:
                    {
                        NpcTalkPacket packet = new NpcTalkPacket(Data);
                        StreamWriter sw = new StreamWriter("Dialogs/" + Client.Hero.CurrentNpc + ".txt", true);

                        switch (packet.LinkType)
                        {
                            case 1:
                                sw.WriteLine("\nNpc {0}", Client.Hero.CurrentNpc);
                                sw.WriteLine("Dialog {0}\nText:\"{1}\"", packet.LinkCount, packet.Text);
                                break;
                            case 2:
                                sw.WriteLine("Option {0}:\"{1}\"", packet.LinkID, packet.Text);
                                break;
                            case 3:
                                sw.WriteLine("Input {0}:\"{1}\" Length: {2}", packet.LinkID, packet.Text, packet.wParam);
                                break;
                            case 4:
                                sw.WriteLine("Avatar {0}", packet.wParam);
                                break;
                        }

                        sw.Flush();
                        sw.Close();
                        break;
                    }
Client Packet:
Code:
                case 2031:
                    {
                        NpcTalkPacket packet = new NpcTalkPacket(Data);
                        Client.Hero.CurrentNpc = packet.Identifier;
                        break;
                    }

It logs all the pages of the dialog and says which dialogs are for which offset.

It's just a quick mash up, but it works well.
03/30/2011 02:28 pro4never#20
The reason I'm not logging multiple pages is tq numbers their options like a tree... EG: option 1 is always the first option regardless of which page you are on.

Obviously I could write a more advanced system to keep track of which page you're on and structure the script accordingly but the way the script system currently works simply doesn't allow for that to be done easily.


EG:

Linkback 0:
"Chose an option"
"Option 1" 1
"Option 2" 2
"Exit" -1

Linkback 1:
"Chose another option"
"Option 3" 1
"Option 4" 2
"Exit" -1

If you log from tq you'd end up with something like this (the numbers after the quote are the linkback number tq would use)
03/30/2011 03:05 _tao4229_#21
Most npcs act differently according to conditions as well, so you'll never get the full dialog.
04/01/2011 20:03 BioHazarxPaul#22
[Only registered and activated users can see links. Click Here To Register...]

Im working on a C#Python Npc GUI, well I'm not the best coder so ideas and some help would be useful if anyone is interested in giving me a hand.. could turn this into something really good with remote connect and stuff, but I really have no idea on that type of stuff.. I'm just bored and I thought something to help make coding them a little bit faster to be a +
06/27/2011 23:46 Mangtesu#23
Hello,
i cannot seem to get this working properly, i hope someone can help me.
its giving me errors like these:

Could not find file: AlchemyProxy\bin\Debug\map\map\smap\1720.smap

and do i have to change the settings in program.cs ? i mean password/host/gameip etc

Edit~
i have just read that its alright to have those missing maps in on of the other guides.
however my client is unable to connect after these changes.

the only thing im unsure of is what information i should place in program.cs
do i leave it as it is or do i have to fill my settings in.
i have disabled windows firewall, this should not be an issue
06/28/2011 00:08 BioHazarxPaul#24
yah you will need to put ur setting in, can use a hamachi ip or router ip, will also need to provide ur database information..
06/28/2011 07:06 Mangtesu#25
Quote:
Originally Posted by BioHazarxPaul View Post
yah you will need to put ur setting in, can use a hamachi ip or router ip, will also need to provide ur database information..
alright im doing this but still i cannot get it to work.
im guessing im messing up some settings

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]


Edit~~
didnt have the correct loader IP.
this was the problem!


Edit2 ~~
is it possible to make it log like more than just the first dialog ?
06/28/2011 07:54 pro4never#26
Nope. You can only log the first page because of how tq handles their npcs. It would take more work then it's worth to even attempt to make a 'full' npc logger. It's simply not feasible.
06/28/2011 10:16 Spirited42#27
I kinda do something like this too, but I don't trust TQ's grammar. I've actually corrected every single NPC that I've read from TQ's server. It's really bad (taking that this is supposed to be an American game).
06/28/2011 11:31 Mangtesu#28
Quote:
Originally Posted by pro4never View Post
Nope. You can only log the first page because of how tq handles their npcs. It would take more work then it's worth to even attempt to make a 'full' npc logger. It's simply not feasible.
Alright, well first page only is awesome aswell, will save me alot of typ work.
Thnx!
07/04/2011 17:23 { Angelius }#29
i just started with the npcs coding today and i figured that yes you can record all pages . and if you are serious about it you can code it to give you a ready to use (Copy/paste) output

and pro thanks for releasing that proxy ,its a very useful tool .
07/09/2014 02:42 C# Coder#30
stuck at the "logging into account server" when trying to log!

Edit: I think it's a port problem, game IP port prob cause the auth account server show the message then stops then it's waiting for the game server!