Jump to content

Request NPC [1.4.1]


tr0n

Recommended Posts


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

Request NPC

With this script every player can send a request or report to server.

This script could replace @request.

Please give me suggestions to help me improving my script.

Files

Changelogs

  • 1.0.0 Release
  • 1.1.0 Added GM Panel (Requests)
  • 1.1.0 Added Feature (delete request)
  • 1.2.0 Added Column (read)
  • 1.2.0 Added Feature (mark request as read)
  • 1.2.0 Added GM Notification for unread requests
  • 1.2.0 Removed unnecessary text
  • 1.2.1 Changed char_id into char_name
  • 1.3.1 Added Feature: Search (request_id) and (char_name)
  • 1.3.1 Minor Bug Fixes
  • 1.4.1 Added Answer feature for GMs
  • 1.4.1 Added "My Requests" for player

Features

  • Saves all requests into SQL database
  • Saves request_id, account_id, char_name, time, read, type and message
  • You can set delay (standard = 10min)
  • GM Panel where you can see all requests
  • Delete solved requests
  • mark requests as read
  • GM Notification for unread requests
  • Search Requests by request_id or char_name
  • You can answer to requests and player can see them in 'my requests'

How can you help me ?

  • Give me feedback
  • Report bugs
  • Tell me if you like it

tr0n

Edited by tr0n
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

maybe you can add this also ?

  • When GM Login or whatever...notify GM that there is Unread / New Report.
  • Allow GM to Remove / Delete the Question if solved.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

If I "allow GM to Remove / Delete the Question if solved." then I need to implement a feature that allows gm to see all requests/reports ingame.

I will work on that

EDIT: UPDATED TO 1.1.0 ! Thanks to: Emistry for his Ideas.

EDIT2: Thinking about how to implement "unread message" any ideas ?

Edited by tr0n
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  70
  • Topics Per Day:  0.02
  • Content Count:  1245
  • Reputation:   392
  • Joined:  11/19/11
  • Last Seen:  

This is just an idea of mine..

1.) GM talks to request NPC and chooses several options

2.) NPC allows the GM to choose the additional following options:

- Mark Request Read (You input request IDs to mark read and the NPC will query that specific ID and then insert a new variable for that request such as 'read' = 1 otherwise its 0)

- Mark Request Read Range (You input a start point request ID and an end point Request ID and it will mark all of those read in b/w the start and end including the start and end point request IDs.)

- Show List of Requests (shows 1st 100 requests with a next button to allow the GM to continue query through the next 100 requests until the end)

- Show Range of Requests (Input a range of requests you wish to read)

3.) When a GM logs in, the NPC will do a query across all the requests and state how many requests have been Read and Unread by seeing what requests have 'read' = 1 and 0. It will sum up all requests with 'read' equal to 1 and then take the difference of all of the requests minus those with read = 1 to give requests that aren't read. This can be output as a dispbottom stating "X requests have been read, X requests are unread/new".

Note: New requests submitted must have this new variable 'read' inserted.

I don't know how well this will work as this is just an idea.

Edited by Syouji
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

Well, very good idea! I will work on that.

First I work on:

- read/unread column

- Mark Requests as read/unread

- unread messages notification

- maybe 100 request list with next button

Thank you for your ideas, helps me a lot.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  70
  • Topics Per Day:  0.02
  • Content Count:  1245
  • Reputation:   392
  • Joined:  11/19/11
  • Last Seen:  

Thanks. Happy to help =)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

Updated to 1.2.0 ! Thanks to: Syouji for his ideas.

@Syouji, gm notification on login works well /sob

Edited by tr0n
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

@tr0n Sir is it possible to display the one who sent the Request his/her Character Name instead of char_id? this is for Low Level GM's

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

UPDATED TO 1.2.1 Thanks to: ngek202 for his idea.

"1.2.1 Changed char_id into char_name"

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  277
  • Reputation:   76
  • Joined:  11/23/11
  • Last Seen:  

Dang!!! Really nice! *votes*

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  70
  • Topics Per Day:  0.02
  • Content Count:  1245
  • Reputation:   392
  • Joined:  11/19/11
  • Last Seen:  

Can you add some search options so you don't have to cycle through all of the requests to find something ;o. For example, the the moment the GM speaks to the NPC there can be an additional option to click called 'Search Request' and after you select that another menu will pop up with a variety of search method choices such as 'Search by Request ID Range, Search by Request ID, Search by Reporter Name" to locate and find something more quickly. =)

Edited by Syouji
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

I don't know atm how to realize "ID Range Search" but I'm testing right now Search Request by Request_ID and Char_Name.

Updated to: 1.3.1 Thanks to: Syouji for his ideas.

Edited by tr0n
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  70
  • Topics Per Day:  0.02
  • Content Count:  1245
  • Reputation:   392
  • Joined:  11/19/11
  • Last Seen:  

nice work man =)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

Thank you /ok

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

@tr0n got some Errors with SQL

[sql]: DB error - Unknown column 'char_name' in 'field list'
[Debug]: at c:usersAMDdesktopr15654srcmapscript.c:13537 - INSERT INTO `re
quest` (`account_id`, `char_name`, `time`, `type`, `message`) VALUES (2000002, '
Red Skull', '2012-03-04 13:08:55', 'Ingame Question', 'Freebies?')
[Debug]: Source (NPC): Request  at prontera (182,214)

char_id wasn't replaced with char_name

from the old version

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

You need to drop the old table. After that restart server or @reloadscript.

Should work correctly.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

yup fixed it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  43
  • Reputation:   2
  • Joined:  01/17/12
  • Last Seen:  

I hope you know that any player can kill your server with this script.

Edited by Derceto
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   1
  • Joined:  02/28/12
  • Last Seen:  

Why The Npc Always Said "Master how can i help you?" even if im not a GM? Its de "Group thing" in the Emu? Can you Fix it Please? or tell me how to install it Correctly

Sorry For my Bad English(Im Mexican)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

Do you use eAthena or rAthena ?

and

Did you activate it only with "loadnpc" ?

Edited by tr0n
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   1
  • Joined:  02/28/12
  • Last Seen:  

Im Using rAthena, Ill try with @loadnpc and Putting in the Script_Custom And is the same :S

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

Im Using rAthena, Ill try with @loadnpc and Putting in the Script_Custom And is the same :S

this script contain OnInit label....

using @loadnpc wont be able to trigger that event label..

so you have to use @reloadscript or restart server....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

@loadnpc will not trigger OnInit Event. You need to reloadscript.

EDIT: Emistry was faster, grr...

Edited by tr0n
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   1
  • Joined:  02/28/12
  • Last Seen:  

Zomg! It Works XD! Thx Emistry & tr0n lov ya guys :)

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  128
  • Reputation:   1
  • Joined:  03/19/12
  • Last Seen:  

Very nice and useful! :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...