Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Lineage 2 Server Modifications ONLY! (https://postpacific.mmorpg-game.online/forumdisplay.php?f=28)
-   -   [SHARE] GM Petition client (https://postpacific.mmorpg-game.online/showthread.php?t=5632)

aralyon 03.09.2006 20:59

[SHARE] GM Petition client
 
So, this is the promised GM petition client. It should be working, but it's just beta version, so please be patient.
Some details about petitions can be found at https://postpacific.mmorpg-game.onli...6280#post66280
Other things are in guide.doc

Enjoy it, and report bugs and mistakes :)

IMPORTANT: It requires .NET Framework 2.0

UPDATE (4.9.2006): Actual version is 1.1.0

Download: http://aralyon.ratafak.net/peti/gmclient.rar

:wave:

Changes:
1.1.0
-chat window is now resizable, can remember its position (unless it is disabled), copy to clipboard is working, auto scrool is working
-you can hide log window
-added searching in petitions by many categories

kgptzac 03.09.2006 23:04

nice share :P now just need to get petitionD working

MuNLoK 03.09.2006 23:07

Thank you aralyon!, I go to test it :)

MuNLoK 04.09.2006 00:53

Ok, I'm testing your work and my opinion is that it's very nice and great work :) Is needed to fix many things, crashes for example, but it is a very good start.

I will go to report to you the errors and problems that I find. Many thanks for all your work aralyon! is great!

paul 04.09.2006 02:17

I have no problems so far liking it.

Only one feature i'd ask is can we get the ability to resize windows? As the petition chat runs off hehe.

paul 04.09.2006 02:37

oo another feature (sorry i'm just full of things hehe)

Auto scroll PLEASE FOR THE LOVE OF GOD! =p

mantrastic 04.09.2006 04:05

thanks! everyone on rampage here haha =D <3 ya

Anne 04.09.2006 04:12

can you guys post a few in game screenshots of it in action? :)

paul 04.09.2006 04:13

O o o o and and and the ability to recall other petitions by number! (if possible dunno about this one but hehe)

superkent 04.09.2006 07:05

my login and password server does not assume. what necessary data to introduce?

paul 04.09.2006 07:16

read the guide

aralyon 04.09.2006 08:20

Quote:

Originally Posted by paul (Post 66340)
O o o o and and and the ability to recall other petitions by number! (if possible dunno about this one but hehe)

What do you mean? You can select it from main form.

ShinHawk 04.09.2006 08:24

i think he means pull up the petition article by typing in the petition id number ....

i havent mess around with the petition system yet ....so if im completely wrong ...ohwell

aralyon 04.09.2006 08:45

Quote:

Originally Posted by ShinHawk (Post 66370)
i think he means pull up the petition article by typing in the petition id number ....

i havent mess around with the petition system yet ....so if im completely wrong ...ohwell

Well, you can click on column header, and then the list is sorted alphabetically

ShinHawk 04.09.2006 09:18

Quote:

Originally Posted by aralyon (Post 66373)
Well, you can click on column header, and then the list is sorted alphabetically

yeah, but say you want to pull up a specific petition ID with out scrolling, when you've got 1,000's of petitions as im sure alot of us know we will running our servers, it'd be nice to do something like Ctrl+F ## or username, or anything

aralyon 04.09.2006 10:53

Quote:

Originally Posted by ShinHawk (Post 66377)
yeah, but say you want to pull up a specific petition ID with out scrolling, when you've got 1,000's of petitions as im sure alot of us know we will running our servers, it'd be nice to do something like Ctrl+F ## or username, or anything

Ok,i wrote it do to-do list :)

paul 04.09.2006 14:28

actually maybe its just somethin i did but if i disconnect and reconnect they all go bye bye thats what i was talkin about ^^

paul 04.09.2006 14:30

neeevermind they show up now (who knows why i think my server likes to play with my head)

Cardon 04.09.2006 14:54

It seems to work just dandy. Other then the Ctrl+F feature mentioned above, the only thing I'd ask is that you allow the Petition Chat form to be resizable. Long messages are not fully displayed.

Other then that, I have no complaints. Great work!

aralyon 04.09.2006 19:13

I released new version, please be critic :)

paul 04.09.2006 19:45

*SCREAMS, kisses aralyon and runs to download*

paul 04.09.2006 20:00

Problem i'm having which isn't that major of a deal but i'd also like to be able to search even tickets that have been checked in and claimed as finished. Because once i shut down the gm petition program they're gone.

Is that at all possible?

darkkiss 04.09.2006 21:34

aralyon you are super :)
i'm glad i have sql 2005 :) i setup in 5 mins :)

MuNLoK 04.09.2006 21:35

deleted, summarized in my latest post.

MuNLoK 04.09.2006 21:50

deleted, summarized in my latest post.

MuNLoK 04.09.2006 22:06

Ok, here you can find my report :)


Problem 1:

When I CheckOut one petition, I see:

Unknown packtG_NOTIFY_UNASSIGN


==================

Problem 2:

1) One user send a petition in-game.
2) You see correctly the petition in the list with status "Submit".
3) If the user click on "Cancel" petition, the petition is canceled correctly, but you see the petition in the list with "Submit" status.
4) Now you (thinking that this petition is active) click on checkout, and get:

2006-09-05 00:01:42 E [GM: MuNLoK(3)] Exception: Exception of type 'NC.PetitionD.NonExistingPetitionIdException' was thrown.
2006-09-05 00:01:42 E at NC.PetitionD.PetitionList.GetPetition(Int32 petitionId) in d:\project\hades\tool.net\application\petition\pet itiond\petition.cs:line 291
at NC.PetitionD.BusinessLogic.OnGmPacket_CheckOutPeti tion(GmSession gmSession, Unpacker p) in d:\project\hades\tool.net\application\petition\pet itiond\businesslogic.cs:line 492
at NC.PetitionD.BusinessLogic.OnGmPacket(GmSession gmSession, PacketType type, Unpacker p) in d:\project\hades\tool.net\application\petition\pet itiond\businesslogic.cs:line 217
2006-09-05 00:01:42 I [GM: MuNLoK(3)] Disconnected From GM


Next the GMClient is "block", and crash.


========================


Problem 3:

1) Two GMClient opened (two GMs OnLine with different machines.).
2) GM1 checkout one petition. The GM2 see the correct status for the petition (CheckOut or InChat).
3) If GM1 click on Check In (finish) the petition, the GM2 continuous seeing the "EndChat" status, instead of "MessageCheckIn".. closed status. If GM2 tries to open chat with the "EndChat" petition (thinking that this petition is active), you get the same error that before, "NonExistingPetitionIdException".


========================


Feature Request:

- Buttom/Option to can clear/remove closed petition (Status: "MessageCheckIn") from the petition list without need to close and start the GMClient.
- I see one table in db named "template". This like to be a "Text Template" to can do quick replies to the petitions. Will be nice if this can be implemented in the GMClient.


========================


Question:

- Why the users in-game can not evaluate to the GM? They can't click on the "Evaluate" option. In retail server, the evaluate window is open automatically when the petition is finished (if I don't remember bad), I can confirm it later.

Perhaps the GMClient need to send a packet to PetitionD when the petition is closed in order to activate the Evaluate option?


==================


Thank you! and good work!

aralyon 05.09.2006 16:26

Quote:

Originally Posted by MuNLoK (Post 66460)
Ok, here you can find my report :)
.....

ad 1) I forgot to register hander for that notify packet :)
ad 2) I forgot to implement G_NOTIFY_FINISH packet
ad 3) The same problem, I forgot to implement another notify packet (probably), there are lot of notify packets, so don't be surprise. And there is another bug related to there packets - because the window with petition details doesnt refresh after somebody else changed the petition. (It's about addition just few lines, but it didn't occur to me)

features - deleting - ok
- templates - I know about them, I just wasn't sure what are they for, I was going to implement them later, as well as update_category and view_past_petitions (because those features aren't nessecary for petitions)

Ad evaluation - i really don't know, I know about it, but I can't find out how to do it.

Thank you for you report, it's very helpful for me :)

MuNLoK 06.09.2006 23:26

Any news or update aralyon? :)

Shawnmb 07.09.2006 01:24

Suggestion: Canned Responses (stored in DB as global for all gms to use and individual which can be customized per-gm)

<3 aralyon

MuNLoK 10.09.2006 19:45

aralyon, no more updates? :( Perhaps, if you don't have time, can you share the sources to can continue your work? I think this project is a very good start and I don't want that it died :(

Shawnmb 11.09.2006 06:10

I agree ^^

SlayeR 12.09.2006 22:01

First off, GREAT job, works nearly flawless in SQL2000. Few things I noticed, other then a few spelling mistakes (doesn't seem like you speak fluent english, but great job with translations!).
1. I keep getting disconnected after a certain period of inactivity, so you need to Disconnect then Reconnect the client to get new petitions. Really annoying when you are trying to monitor petitions for an extended period of time.
2. Cant seem to figure out the "Head GM" login_flag, maybe put that in the documentation? Keeps giving me errors trying to edit or read other petitions from other GM accounts. :P
3. Submitting a petition does not take away from your '4' petitions daily.
4. There are always 11-12 petitions open.

One question on my mind: Is this "Safe", Anti-SQL inject,etc.

Cant really think of anything more yet, great job though. Keep up the great work!

Cardon 12.09.2006 23:45

I believe it determines Head GM flag by the builder on your account, not by a login flag. Might be wrong though.

ag1584 13.09.2006 05:35

2006-09-13 10:29:58 E Exception: Once the socket has been disconnected, you can only reconnect again asynchronously, and only to a different EndPoint. BeginConnect must be called on a thread that won't exit until the operation has been completed.
2006-09-13 10:29:58 E at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at NC.PetitionD.AuthConn.CheckPassword(String account, String password, Int32& accountUid) in d:\project\hades\tool.net\application\petition\pet itiond\authconn.cs:line 63
2006-09-13 10:29:58 I Fail Log: NetworkFail

why ?

aralyon 14.09.2006 15:30

Quote:

Originally Posted by Cardon (Post 67234)
I believe it determines Head GM flag by the builder on your account, not by a login flag. Might be wrong though.

HeadGM flag is from world server .... login_flag is used only when you are authing with your name and password.


Quote:

Originally Posted by slayer
3. Submitting a petition does not take away from your '4' petitions daily.

Quotes is in list of things to do.

2 MuNLoK and others: I was away

And for shawnmb - check your private message folder :)

MuNLoK 02.10.2006 23:19

any news? :(

top-gear 03.10.2006 10:53

i think the crashes every few minutes is the main problem. it would be also good to have a mass delete option or delete without answer

Sauron 09.10.2006 01:39

Quote:

Originally Posted by SlayeR (Post 67222)
3. Submitting a petition does not take away from your '4' petitions daily.

this will do the trick

Code:

/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
CREATE TABLE dbo.UserPetitions
        (
        account_id int NULL,
        amount int NULL
        )  ON [PRIMARY]
GO
COMMIT

insert into UserPetitions values(0,20061008);

IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[up_Server_GetCurrentQuota]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
-- =============================================
-- Author:                <Sauron>
-- Create date: <10.8.2006>
-- Description:        <Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[up_Server_GetCurrentQuota]
        -- Add the parameters for the stored procedure here
@accountuid int
AS
BEGIN
        -- SET NOCOUNT ON added to prevent extra result sets from
        -- interfering with SELECT statements.
        SET NOCOUNT ON;

        declare @today int;
        set @today = (select (year(getdate()) * 100 + dbo.FormatNumber(month(getdate())))*100+dbo.FormatNumber(day(getdate())));

        if(SELECT amount FROM UserPetitions WHERE account_id=0) <> @today
        begin
                DELETE FROM UserPetitions WHERE account_id <> 0;
                UPDATE UserPetitions SET amount = @today WHERE account_id = 0;
                SELECT 0 as amount;
        end;
        else
                SELECT isnull( sum(amount) , 0) as amount FROM UserPetitions WHERE account_id = @accountuid;

END
'
END

IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[up_Server_UpdateQuota]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
-- =============================================
-- Author:                <Sauron>
-- Create date: <10.8.2006>
-- Description:        <Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[up_Server_UpdateQuota]
        -- Add the parameters for the stored procedure here
@accountuid int,
@amount int
AS
BEGIN
        -- SET NOCOUNT ON added to prevent extra result sets from
        -- interfering with SELECT statements.
        SET NOCOUNT ON;

        declare @today int;
        set @today = (select (year(getdate()) * 100 + dbo.FormatNumber(month(getdate())))*100+dbo.FormatNumber(day(getdate())));

        if(SELECT amount FROM UserPetitions WHERE account_id=0) <> @today
        begin
                DELETE FROM UserPetitions WHERE account_id <> 0;
                UPDATE UserPetitions SET amount = @today WHERE account_id = 0;
        end;
        else
        begin
                if exists(select * from UserPetitions where account_id = @accountuid)
                        UPDATE UserPetitions SET amount = amount + @amount WHERE account_id = @accountuid;
                else
                        INSERT INTO UserPetitions values(@accountuid,1);
        end;
END
'
END

Quote:

Originally Posted by SlayeR (Post 67222)
4. There are always 11-12 petitions open.

i saw the same problem on retail C5 server



any idea about evaluate? i saw it enable just ones and dunno why -_-

paul 09.10.2006 07:44

Msg 137, Level 15, State 2, Procedure up_Server_UpdateQuota, Line 28
Must declare the scalar variable "@amount"

Error i got in mssql 2k5

It could be me but meh who knows i'm a little tipsy.

Sauron 09.10.2006 20:34

Quote:

Originally Posted by paul (Post 69705)
Msg 137, Level 15, State 2, Procedure up_Server_UpdateQuota, Line 28
Must declare the scalar variable "@amount"

Error i got in mssql 2k5

It could be me but meh who knows i'm a little tipsy.

my mistake.. change @ammount int to @amount int


All times are GMT. The time now is 23:18.