[Release] World Conquer Source v2

07/31/2019 22:22 memo0077#136
Quote:
Originally Posted by pintinho12 View Post
You have two solutions which I'll not post the code for you.
1. You can enable the auto quote on table/column names, editing the Fluent Connection;
2. You can escpae the column name which is using a reserved name with "`" on the mapping.

Good luck.

Why do not you want help

All Problem
08/01/2019 00:41 pintinho12#137
But I helped. I just wont give you code.
It's 1 line of code which will fix those issues, and you better google or pray for somebody else to give you the code, because I aint doing.
Maybe I did fix it somewhere in the thread replies. But I'm also too lazy to search.
I gave you two solutions, just use less than 1% of your brain building a query on google.
08/01/2019 23:05 Spirited#138
He gave you the solutions... Change your configuration or change how the queries are created. If you have a question about the solutions he gave you, then say so. Don't say he isn't helping you though... so rude. And please remove the full stack trace or put it around a spoiler tag. That's annoyingly long...
09/14/2019 22:45 stormy547#139
Legitimate question out of curiosity here:

What is the point of using the cq_action table for handling events? (I use the term event for lack of better term, but it essentially looks like an event handler to me)

I assume this is to keep consistency with the format exposed by the bins, but is there any particular benefit/reason for using the action table rather than writing handlers in class files?

Other than consistency, the only other potential benefit I see is to prevent it from being hard-coded and requiring a full rebuild of the binary to change the values, however personally I find the action table format to be unnecessarily convoluted.
09/15/2019 11:27 KraHen#140
Quote:
Originally Posted by stormy547 View Post
Legitimate question out of curiosity here:

What is the point of using the cq_action table for handling events? (I use the term event for lack of better term, but it essentially looks like an event handler to me)

I assume this is to keep consistency with the format exposed by the bins, but is there any particular benefit/reason for using the action table rather than writing handlers in class files?

Other than consistency, the only other potential benefit I see is to prevent it from being hard-coded and requiring a full rebuild of the binary to change the values, however personally I find the action table format to be unnecessarily convoluted.
The values are from a leaked database from TQ itself, it basically more or less "guarantees" a correct emulation. Personally I was never a fan, I severely dislike TQs design - but I do admit it is really, really useful to have.
09/15/2019 18:34 stormy547#141
Quote:
Originally Posted by KraHen View Post
Personally I was never a fan, I severely dislike TQs design - but I do admit it is really, really useful to have.
I agree, I'm using this codebase as a base for my project (more or less just for fun at the moment), and I'm mildly tempted to rewrite how NPCs at the least are handled as I just don't like the action table, I find modifying database values in mass by hand to be a pain.

After giving it a bit of thought, the action table is actually a good thing for TQ since they have so many servers. Since all of their servers are identical, they can connect all of them to one action table to update and modify npcs, item functionality, whatever else goes into actions without recompiling & redistributing the binary to so many servers.

Though honestly, I'd be surprised if they don't have build scripts that automatically push updates to live for the next restart.

On a second note, it could also help them keep their code-base private to the dev team, allowing for non-developers to modify content in the action table. No clue how their team is set up, but I suppose this could be another reason.
09/16/2019 14:42 KraHen#142
You could always do some custom tooling to ease your workflow even with the current system in place, it's pretty manageable IMO.
09/16/2019 19:42 pintinho12#143
I like the cq_action design because it makes it easier to create events, remove them or update. I don't need to create tons of classes and C# code to create events, makes my executable smaller (which is not an advantage at all) and I can easily follow the code even inside of the server (since I can print it while it executes with a PM character).
You can always call /reloadaction to reaload the server, /reloadtasks or even /reloadnpcs, /reloadgenerators and others to update your server, tho, I still think that updates must be done while server is shutdown so you can backup data and do things safely.
It's okay, depending on how you handle things (like I do on this version of the server) it can be slower, but if you do the correct changes you can make it so fast you wont feel the actions executing.
I don't need to write the same piece of code or thousand of times for every event, If an error is thrown I just need to change it in one place (if it's a code problem) or in the action itself. If you have an manager (like me), you can easily see your events and track problems.
Maybe an scripting language like Lua would be better? Okay, but to be fair, this model doesn't hurt at all. I have all checks in one place and I don't even need to write on cq_actions the requirements for executing something. I can write it on cq_task and it will avoid 5-6 actions of checking if a character is enabled to execute something.
Optmizing the event system on this server actually just depends on how much you know about it.
Since most of the database is from TQ, most of the actions don't care about cq_task, but you can check for money, item, marriage and a lot of other things in 1 row instead of a lot.
09/16/2019 20:10 12tails#144
Quote:
Originally Posted by pintinho12 View Post
I like the cq_action design because it makes it easier to create events, remove them or update. I don't need to create tons of classes and C# code to create events, makes my executable smaller (which is not an advantage at all) and I can easily follow the code even inside of the server (since I can print it while it executes with a PM character).
You can always call /reloadaction to reaload the server, /reloadtasks or even /reloadnpcs, /reloadgenerators and others to update your server, tho, I still think that updates must be done while server is shutdown so you can backup data and do things safely.
It's okay, depending on how you handle things (like I do on this version of the server) it can be slower, but if you do the correct changes you can make it so fast you wont feel the actions executing.
I don't need to write the same piece of code or thousand of times for every event, If an error is thrown I just need to change it in one place (if it's a code problem) or in the action itself. If you have an manager (like me), you can easily see your events and track problems.
Maybe an scripting language like Lua would be better? Okay, but to be fair, this model doesn't hurt at all. I have all checks in one place and I don't even need to write on cq_actions the requirements for executing something. I can write it on cq_task and it will avoid 5-6 actions of checking if a character is enabled to execute something.
Optmizing the event system on this server actually just depends on how much you know about it.
Since most of the database is from TQ, most of the actions don't care about cq_task, but you can check for money, item, marriage and a lot of other things in 1 row instead of a lot.
Agreed with you, Ganoderma & Titan, Guild War, DisCity, everything easily controlled by the action table. Also, you have all default npcs just ready to be used.

You can create an event that enables or disables checking the time, setting up using the data 0 to 3 or datastr values. what would take 30 minutes to do by codes, you can do in some 2 or 5 minutes, also like he said above, you need to change just a few lines when you do some change or bug correction.
11/08/2019 16:17 Gii0#145
Guys I'am using this source rightnow and about the vip when i create new account it automatically becomes VIP 6 while in the DB is VIP 1..

BTW! nice release source!
11/08/2019 22:26 pintinho12#146
Quote:
Originally Posted by Gii0 View Post
Guys I'am using this source rightnow and about the vip when i create new account it automatically becomes VIP 6 while in the DB is VIP 1..

BTW! nice release source!
Take a look on packet 1052, it's setting manually the VIP level.
11/09/2019 04:30 Gii0#147
Quote:
Originally Posted by pintinho12 View Post
Take a look on packet 1052, it's setting manually the VIP level.
Thank you for the quick response sir and one last question sir! :) about this item stack sir it seems like its not working cause when i use 7Star Ointment the item stack number stay the same. no deduction happens also the speedarrows

I love your work sir thank you for this released source :)
11/12/2019 04:47 32212019#148
thank you for the source. i been using this for a month now. i learned alot of it. i fixed some bugs too. man im glad i used this instead of 5165 haha. thank you again
11/13/2019 18:59 pintinho12#149
Quote:
Originally Posted by Gii0 View Post
Thank you for the quick response sir and one last question sir! :) about this item stack sir it seems like its not working cause when i use 7Star Ointment the item stack number stay the same. no deduction happens also the speedarrows

I love your work sir thank you for this released source :)
You'll need to take a look on the equipment class, because the algorithm I created at that time really sucks, I had to do several changes when adaptating to my newest source.
11/15/2019 17:21 memomomo11#150
Does this source running on the latest client? 6968?

Off-Topic: Is this the latest release in this community ?