tr0n Posted February 27, 2012 Posted February 27, 2012 (edited) 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 request_npc_1.0.0.txt request_npc_1.1.0.txt request_npc_1.2.0.txt request_npc_1.2.1.txt request_npc_1.3.1.txt request_npc_1.4.1.txt 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 June 2, 2012 by tr0n 1 Quote
Emistry Posted February 27, 2012 Posted February 27, 2012 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. Quote
tr0n Posted February 27, 2012 Author Posted February 27, 2012 (edited) 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 February 29, 2012 by tr0n Quote
Syouji Posted February 29, 2012 Posted February 29, 2012 (edited) 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 February 29, 2012 by Syouji 1 Quote
tr0n Posted February 29, 2012 Author Posted February 29, 2012 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. Quote
tr0n Posted February 29, 2012 Author Posted February 29, 2012 (edited) Updated to 1.2.0 ! Thanks to: Syouji for his ideas. @Syouji, gm notification on login works well Edited February 29, 2012 by tr0n Quote
ngek202 Posted February 29, 2012 Posted February 29, 2012 @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 Quote
tr0n Posted February 29, 2012 Author Posted February 29, 2012 UPDATED TO 1.2.1 Thanks to: ngek202 for his idea. "1.2.1 Changed char_id into char_name" Quote
Syouji Posted March 2, 2012 Posted March 2, 2012 (edited) 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 March 2, 2012 by Syouji Quote
tr0n Posted March 2, 2012 Author Posted March 2, 2012 (edited) 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 March 2, 2012 by tr0n Quote
ngek202 Posted March 4, 2012 Posted March 4, 2012 @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 Quote
tr0n Posted March 4, 2012 Author Posted March 4, 2012 You need to drop the old table. After that restart server or @reloadscript. Should work correctly. Quote
Derceto Posted March 5, 2012 Posted March 5, 2012 (edited) I hope you know that any player can kill your server with this script. Edited March 5, 2012 by Derceto Quote
Yiyotop Posted March 7, 2012 Posted March 7, 2012 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) Quote
tr0n Posted March 8, 2012 Author Posted March 8, 2012 (edited) Do you use eAthena or rAthena ? and Did you activate it only with "loadnpc" ? Edited March 8, 2012 by tr0n Quote
Yiyotop Posted March 8, 2012 Posted March 8, 2012 Im Using rAthena, Ill try with @loadnpc and Putting in the Script_Custom And is the same :S Quote
Emistry Posted March 8, 2012 Posted March 8, 2012 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.... Quote
tr0n Posted March 8, 2012 Author Posted March 8, 2012 (edited) @loadnpc will not trigger OnInit Event. You need to reloadscript. EDIT: Emistry was faster, grr... Edited March 8, 2012 by tr0n Quote
Yiyotop Posted March 8, 2012 Posted March 8, 2012 Zomg! It Works XD! Thx Emistry & tr0n lov ya guys Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.