dodowvogel Posted July 4, 2012 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 5 Reputation: 0 Joined: 07/03/12 Last Seen: January 23, 2019 Share Posted July 4, 2012 (edited) GM Query Command NPC This script is only for those who understand SQL commands and want to execute custom query's on their SQL server. Features: - You can easily request values by the SELECT command ingame. - You can easily update values by the UPDATE command ingame. - You can type your own SQL query; SELECT, UPDATE, DELETE and INSERT INTO are supported. - Password protection - GM level protection - Customize Protection, enable/disable password and minimal GM level - Easy setup Requirements: - Knowledge of SQL Query's - SQL Server Variables: You have to edit these variables to customize the npc (please leave the credits enabled): //edit variables below:set @passwordenable,1; //set to 0 if you don't wan't to use a password set @passwordmysql$,"sql"; //password to use the npc set @namenpcsql$," "; //name of the npcset @sqlcredits,1; //set to 0 if you don't want to see my creditsset @sqlgmlvl,90; //Minimum level of the GM allowed use this NPC, default is 90[b]Credits:[/b]I wrote this script a year ago while I was traveling home from school. So all credits go to me I suppose; Dodowvogel =)!.[b]Support:[/b]If you have any questions, suggestions or bugs, please post them over here so I can help you and/or improve the script.[b]Warning:Be sure you don't give all GM's access to this npc. They will be able to delete tables from your database so your server/database screws up bigtime! [/b][/font]sqlnpc.txt Edited July 4, 2012 by dodowvogel Quote Link to comment Share on other sites More sharing options...
EvilPuncker Posted July 5, 2012 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 713 Reputation: 71 Joined: 11/08/11 Last Seen: December 25, 2024 Share Posted July 5, 2012 some suggestions if you don't care: - use npc variables "." instead of temporary variable attached to the character "@" - set those variables under a OnInit label so it doesn't need to be set everytime a character talks with the NPC - I don't really like scripts that set the npc name under a variable since you can easily change it with search & replace, but if you really really want to, I sugest you to use strnpcinfo(1) instead - use escape_sql() to escape strings - put next; before any menu so you don't need to put next; after every label you call xD - change menus into switches - take a look at the new commands added to rA from toastofdoom string manipulation pack, I'm pretty sure that you can use some at your npc and improve it! All in all, good NPC, thanks for the share. Quote Link to comment Share on other sites More sharing options...
dodowvogel Posted July 5, 2012 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 5 Reputation: 0 Joined: 07/03/12 Last Seen: January 23, 2019 Author Share Posted July 5, 2012 Thanks for your useful feedback. I'll try to improve it in the near future =). ~Dodowvogel Quote Link to comment Share on other sites More sharing options...
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.