latheesan 15 Posted March 3, 2013 (edited) Hi, NPC Script Editor is an easy to use & feature packed NPC Script Editor for ROemulator(s). Download Latest Version NPC Script Editor r600 Features NPC Script Syntax Highlighting Standard functionalities you'd expect of a editor (file, open, print etc...) Fully implemented Find & Replace (Ctrl + F / Ctrl + H) with Go To (Ctrl + G) functions Quick Find & Highlight Tabbed Editor Tab Docking Open-Source & Easy To Use Plugin System - sample "Hello World" project in "Plugins" folder (VS2012 C# .NET) Auto-Suggest/Complete Code Folding Markers / Bookmarks NPC Script Commands Bible - Free Plugin Text Translator - Free Plugin Snippets - coming soon Hotkeys Ctrl + W = Close Current TabCtrl + Tab = Next Tab (Cycle Forward)Ctrl + Shift + Tab = Prev Tab (Cycle Back)Ctrl + N (1 ~ 9) = Opens Nth Opened Tab (e.g. Ctrl + 2 will open 2nd open tab)Ctrl + Space = Show auto-suggest/complete for the script command you are typingF1 = Select text in editor and press F1 to open NPC Script Command Bible pluginF2 = Select text in editor and press F2 to open Text Translator plugin What's New in Version v1.0.0.600 [*]Fixed bug with plugin service which initialized the plugin twice (slowed the app launch, now it's much better) [*]Updated plugin interface - the Initialize() method must take a string parameter (SelectionQuery) [*]Sample "Hello World" sample plugin (VS2012 C# .NET) now comes shipped with each new release - check "Plugins" folder [*]The NSE will now remember your last window position, size and monitor number (Resets with each new release) [*]Now you can open npc script file by dragging & dropping them into editor [*]NPC Script Command Bible Plugin will load custom"script_commands.txt" file (if it's found in "Plugins" dir) - otherwiseit defaults to built-in resource file on the DLL. [*]Ctrl + W = Close Current Tab [*]Ctrl + Tab = Next Tab (Cycle Forward) [*]Ctrl + Shift + Tab = Prev Tab (Cycle Back) [*]Ctrl + N (1 ~ 9) = Opens Nth Opened Tab (e.g. Ctrl + 2 will open 2nd open tab) [*]Ctrl + Space = Show auto-suggest/complete for the script command you are typing [*]F1 = Select text in editor and press F1 to open NPC Script Command Bible plugin [*]F2 = Select text in editor and press F2 to open Text Translator plugin [*]Implemented F6 Hotkey = Parse Current NPC Script To Output Window and shows any syntax / coding errors [*]OutputWindow cannot be closed, and it starts hidden now [*]Improved OutputWindow handling code [*]OutputWindow now launches in hidden mode, and reveals itself on F6 keypress (if hidden) [*]Fixed Tab Order/Stop in Core Plugins [*]NPCScriptCommandsBible Plugin no longer uses internal script_commands.txt [*]script_commands.txt is converted to Windows EOL automatically before parsing - no need to manually convert it now [*]Re-Written NPCScriptCommandsBible Plugin's script_commands.txt Parser [*]Plugin Code Optimized [*]Fixed unnecessary trailing space with command info parsing - NPCScriptCommandsBible [*]Enabled word wrap and forced vertical scroll bar - NPCScriptCommandsBible [*]F1 hotkey now guesses the word at caret position (if a selection wasn't there) [*]New script file(s) that are opened now automatically converted to CRLF (EOL) [*]Fixed minor bug with F1 Guess Word At Caret function [*]Fully Implemented "Open Recent" (History) Feature [*]U.I Improvement - If the same file is already opened, that tab window is shown instead of opening the same file twice (or more) [*]Enabled brace matching [*]Fixed Minor Bug With Start-Up Sequence [*]Fixed crash bug with opening files with the editor [*]Removed Global Hotkey and replaced with application level hotkey feature Demo Thanks for trying my editor.Any comments and feedback would be much appreciated. NPC Script Editor r314.zip Edited February 26, 2014 by latheesan 5 Slowpoker, JulioCF, KaitoKid and 2 others reacted to this Quote Share this post Link to post Share on other sites
Mystery 594 Posted March 3, 2013 That looks very interesting o_o. Too bad I can't try it out since it's only for PCs :< Quote Share this post Link to post Share on other sites
Senos 54 Posted March 3, 2013 Congratz, interesting and cool, reput! Quote Share this post Link to post Share on other sites
latheesan 15 Posted March 5, 2013 (edited) Thanks guys. A new version was just released - first post updated. What's New in Version v1.0.0.314 Fixed bug with plugin service which initialized the plugin twice (slowed the app launch, now it's much better) Updated plugin interface - the Initialize() method must take a string parameter (SelectionQuery) Sample "Hello World" plugin (VS2012 C# .NET) now comes shipped with each new release - check "Plugins" folder The NSE will now remember your last window position, size and monitor number (Resets with each new release) Now you can open npc script file by dragging & dropping them into editor NPC Script Command Bible Plugin will load custom "script_commands.txt" file (if it's found in "Plugins" dir) - otherwise it defaults to built-in resource file on the DLL. Saving new files now default to *.txt Ctrl + W = Close Current Tab Ctrl + Tab = Next Tab (Cycle Forward) Ctrl + Shift + Tab = Prev Tab (Cycle Back) Ctrl + N (1 ~ 9) = Opens Nth Opened Tab (e.g. Ctrl + 2 will open 2nd open tab) Ctrl + Space = Show auto-suggest/complete for the script command you are typing F1 = Select text in editor and press F1 to open NPC Script Command Bible plugin F2 = Select text in editor and press F2 to open Text Translator plugin Edited March 5, 2013 by latheesan Quote Share this post Link to post Share on other sites
Luyten 143-23 0 Posted March 7, 2013 Why not provide the code on github? It'll be easier if someone wants help in codes. Optimizations in the code or add new functions.Congrats. Cool. Quote Share this post Link to post Share on other sites
malufett 247 Posted March 7, 2013 wow very nice tool almost complete... I wish it has a capability of a compiler(where it checks the validity of the script) and a simulator where you can test the script like in-game interaction Quote Share this post Link to post Share on other sites
Jedzkie 58 Posted March 7, 2013 wow very nice tool almost complete... I wish it has a capability of a compiler(where it checks the validity of the script) and a simulator where you can test the script like in-game interaction +1 Quote Share this post Link to post Share on other sites
latheesan 15 Posted March 8, 2013 wow very nice tool almost complete... I wish it has a capability of a compiler(where it checks the validity of the script) and a simulator where you can test the script like in-game interaction Yea... I have been trying to do this since forever T_T Unfortunetly I code in .NET C# so I don't quite understand how to take the src for rAthena/Hercules written in C++ and make a utility/function out of it. Ideally, i want to take the content of the editor tab and pass it a function which utilizes the script parser and give me validation responses. If someone help me figure that out, i can implement this into NSE in a heart beat Quote Share this post Link to post Share on other sites
malufett 247 Posted March 8, 2013 Unfortunetly I code in .NET C# so I don't quite understand how to take the src for rAthena/Hercules written in C++ and make a utility/function out of it. just take the basic functionality like mes,next,close and etc..and disregard some commands where its not feasible in the current setup.... Quote Share this post Link to post Share on other sites
JayPee 17 Posted March 10, 2013 Wow, your the man Quote Share this post Link to post Share on other sites
latheesan 15 Posted March 11, 2013 just take the basic functionality like mes,next,close and etc..and disregard some commands where its not feasible in the current setup.... Me and Yommy is comming up with a way to do just this. We hope to have a basic working script parser built into the NSE for the next release. Quote Share this post Link to post Share on other sites
latheesan 15 Posted February 21, 2014 Hi everyone, I am back from my long break. I have now completed the script parsing / checking functionality within NPC Script Editor. I got in touch with Ind from Hercules emu few months ago to discuss the posibility of using the script parsing functionality that is already inside map-server as a stand alone feature and one of the developer came up with this: https://github.com/HerculesWS/Hercules/pull/217 Thisspecial edition of map-server_sql.exe (compiled from Hercules emu) isnow integrated with NPC Script Editor. Here is how it looks like: When you are editing a script, press F6 to parse and synctax check the script you are working with. Any errors are reported like this: If you've fixed the error and pressed F6 again, it will highlight the next problem, etc... Nowyou can work on NPC Scripts and not have to load it into the live/testserver to see if any syntax/coding error are in there. Hopefully thiswill speed up everyone's NPC Scripting. I amcurrently working on packaging this as a standalone installer and hopeto have it released soon. This new build comes with new bug fixes andimprovements also. 4 Ind, jaBote, Mystery and 1 other reacted to this Quote Share this post Link to post Share on other sites
nostafuz 0 Posted February 21, 2014 helpful for make a script NPC Quote Share this post Link to post Share on other sites
latheesan 15 Posted February 26, 2014 (edited) New version released : http://herc.ws/board/files/file/108-npc-script-editor/ Edited February 26, 2014 by latheesan Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted March 1, 2014 New version released : http://herc.ws/board/files/file/108-npc-script-editor/ Possible to have a list of npc/mob/item constants with ID? Quote Share this post Link to post Share on other sites
latheesan 15 Posted March 3, 2014 Are these defined in the db/*.txt files? Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted March 3, 2014 Mob and item are directly parsed from respective db. The aegis names are the mob/item constants. Npc constants are parsed from db/const.txt Quote Share this post Link to post Share on other sites
Ehwaz 8 Posted April 4, 2014 I got error: "Setup Error! -f" .. Quote Share this post Link to post Share on other sites
neil413 0 Posted March 6, 2015 wow very nice tool almost complete... I wish it has a capability of a compiler(where it checks the validity of the script) and a simulator where you can test the script like in-game interaction +1 hello Friend Jedzkie 1 question are you using this one? can you teach me how to used this? its really nice work from latheesan Quote Share this post Link to post Share on other sites
Jedzkie 58 Posted March 7, 2015 wow very nice tool almost complete... I wish it has a capability of a compiler(where it checks the validity of the script) and a simulator where you can test the script like in-game interaction +1 hello Friend Jedzkie 1 question are you using this one? can you teach me how to used this? its really nice work from latheesan Nope. and FYI, we are not friends. Quote Share this post Link to post Share on other sites
neil413 0 Posted March 7, 2015 wow very nice tool almost complete... I wish it has a capability of a compiler(where it checks the validity of the script) and a simulator where you can test the script like in-game interaction +1 hello Friend Jedzkie 1 question are you using this one? can you teach me how to used this? its really nice work from latheesan Nope. and FYI, we are not friends. Quote Share this post Link to post Share on other sites
Tokeiburu 229 Posted March 7, 2015 (edited) Heya, Would it possible to add these features? Adding "To lowercase" and "To UPPERCASE" in the context menu when right-clicking some text would be more practical than using the menus! Adding "Add text color" in the context menu when right-clicking on some text, this would simply add "^000000" at the beginning and end of the selected text. Turn on whole word highlighting (when the caret is on a whole word, it is very useful to highlight all other whole word matches). Volatil searches. When a word is highlighted (from the whole word highlighting), being able to jump to the next or the previous element is very useful. The shortcut in Notepad++ is Ctrl-F3 for the next element and Ctrl-Shift-F3 for the previous element. In VS, the shortcut is Ctrl-Shift-Up and Ctrl-Shift-Down. Be able to leave autocomplete always turned on and activates as you type. Other useful shortcuts to have : Alt-Up / Alt-Down, moves the selected lines up or down. If no text is seleted, it moves the current line. Shift-Delete, deletes the current line and copy it to the clipboard (or Ctrl-L in Notepad++). Ctrl-C with no text selected, copies the current line to the clipboard. Ctrl-X with no text selected, copies the current line to the clipbard and removes it. Ctrl-K, comment the selected lines. Ctrl-Shift-K, uncomment the selected lines. F3, while a search is active, goes to next element. (This is conflicting with Scintilla's default find and replace dialog though, not really important I guess). Shift-F3, while a search is active, goes to previous element. Ctrl-U, change the selected text to lower case. Shortcut already exists, never mind. Ctrl-Shift-U, change the selected text to upper case. Add/replace code snippets : f => for ($.@i$ = $0$; $.@i$ < $max$; $.@i$++) { $selected$$end$} w => while ($1$) { $selected$$end$} sc / script => $map$,$x$,$y$,$direction$ script $name$ $SPRITE$,{ $selected$$end$} func => function script $name$ { $selected$$end$} hid (could probably use another name I guess) => - script $NAME$ -1,{ $selected$$end$} menu => switch(select("$menu$")) { case 1: $selected$$end$ break;} dup => $map$,$x$,$y$,$direction$ duplicate($name$) $name$#$tag$ $SPRITE$$selected$$end$ Could probably add more snippets, but these are the only ones that come to mind at the moment xD! It would be even better if we could make our own, they're really a time saver. If you're not familiar with snippets, they are used by typing the first letters (func for example) and then pressing tab. It will autocomplete the rest. There is already one for "f" but it's obviously meant for C++ autocompletion code. And also, when you press Enter, it would be nice if it could use the previous indent (or use indent + 1 if the line ends with { ) to start the new line instead of starting back at the beginning. This is probably the most important feature in all of this, it is somewhat annoying to add the tabs everytime you add a new line. Thank you for this amazing tool btw ;]! Edited March 7, 2015 by Tokeiburu 3 evilpuncker, Ridley and Kusoo reacted to this Quote Share this post Link to post Share on other sites