Jump to content

NPC Script Editor


Latheesan

Recommended Posts


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   53
  • Joined:  11/27/11
  • Last Seen:  

Hi,

 

Here's my latest public release after a very long time. An easy to use & feature packed NPC Script Editor for RO emulator(s).

 

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 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
What's New in Version v1.0.0.600
  • 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
 

nx3xCb7.png

 

Y0e4EXA.png
 

DZdmsmM.png

 

oaLur7E.png

 

veL5Rmb.png

 

Thanks for trying my editor.
Any comments and feedback would be much appreciated.

Edited by Latheesan
  • Upvote 8
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

This is awesome. Thank you for releasing this!

Here are some suggestions that would really make this perfect:

  • Basic functionality expansion:
    • CTRL+W to close a tab.
    • CTRL+number to switch to a different tab.
    • Save window resizing.
    • Shortcut for autocomplete (or is there one already?).
    • Allow dragging files into window to open them.
    • Saving new files should default to *.txt.
  • Allow users to use their own script_commands.txt file, since it's updated periodically; I know this may be hard to do, but it would be very useful.
  • The best features of Vince's eNPC:
    • A hotkey (F1) opens/closes the Script Commands Bible at the currently selected word.
    • Autocomplete script commands while typing.
  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   53
  • Joined:  11/27/11
  • Last Seen:  

Awesome, thanks for the tips. I will work on the updates tonight.

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  62
  • Reputation:   2
  • Joined:  10/17/12
  • Last Seen:  

Maybe good idea If you have Database item/mob inside ur script. If you dont know which ID of mobs/item. when you found mob/item then click Select send to like auto copy/paste number inside in ur script.

 

sorry my english isnt very well..

 

Dramosith.

Edited by Dramosith
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   53
  • Joined:  11/27/11
  • Last Seen:  

@Dramosith - Awesome idea, I will look into these two plugins soon~

 

@Euphy - Managed to do everything on your list except for the last one :(

 

New version released, currently awaiting approval.

 

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 by Latheesan
  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Woah. Thanks so much for your work, the update is fantastic!

A couple more things, if you have the time...

  • Bugs:
    • F1 and F2 do not check for docked tabs; they open a new tab even if one is docked.
    • The Script Commands Bible only checks for the first command in a list of grouped commands (i.e. sc_start will show, but not sc_start2, ..., sc_end).
    • F1 creates a lot of trailing line breaks in the Script Commands Bible if the content is longer than the window size.
    • F1 jumps to the bottom of an entry, whereas searching in the Script Commands Bible always starts at the top of an entry.
    • Hotkeys take global priority (e.g. hotkeys affect the program regardless of whether it's active or in the background).
  • Suggestions:
    • Allow F1 and F2 to work within words, without needing to highlight them.
    • Do not include an internal script_commands.txt; provide an external file by default (it becomes a waste of space).
    • (?) A setting that, when enabled, always opens autocomplete while typing.
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

Would be nice for a basic syntax error check (semi-colons, commas, etc.). Aside from that, this a sweet release!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   53
  • Joined:  11/27/11
  • Last Seen:  

@Via I am working with Yommy to come up with a Script Parser that works off the editor's content and it should help identify 99% of the errors. Hoping to have it ready for next release.

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

Awesome. I'll suggest too that the tabs would be much more efficient if they displayed the active file's name, and the directory in the title bar; Notepad++ is a good example

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   8
  • Joined:  12/27/11
  • Last Seen:  

I don't know if this is possible but I guess adding a feature like running your script in the editor to check errors is a great thing to have. Anyways, it is a good editor! Keep the good job and thanks for the release.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   53
  • Joined:  11/27/11
  • Last Seen:  

@arzzzae - see my reply above. We are working on a simple/primitive script parser which will help identify & fix "most" errors for the next release.

Link to comment
Share on other sites

  • 4 months later...

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  55
  • Reputation:   3
  • Joined:  04/02/12
  • Last Seen:  

@arzzzae - see my reply above. We are working on a simple/primitive script parser which will help identify & fix "most" errors for the next release.

I cant wait for this one.

 

The list of commands for auto complete seems to be missing some commands... How do I manually add more commands for auto complete?

Link to comment
Share on other sites

  • 5 months later...

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  61
  • Reputation:   6
  • Joined:  12/23/11
  • Last Seen:  

can you update the script bible for the new instance system please? :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   1
  • Joined:  03/24/13
  • Last Seen:  

awesome, very nice bro!

+like *-----*

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Firstly, thank you so much for the releases it's so nice and useful :D!
may i suggest, a button that will input a color on the selected text? this for announce and mes
for example, we have the next mes
mes "Here is your Gold Coin. Thank you and congratulations :)"
Highlightning Gold Coin and then hiting the button it will open a window with many colors to select from, and when selected the script editor will just do the script color for the highlighted part o: it would end like this:
mes "Here is your ^0000FFGold Coin^000000 Thank you and congratulations :)"
and on te server would look like this:
Here is your Gold Coin Thank you and congratulations :)

thanks again :D!

Edited by Kido
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   1
  • Joined:  03/24/13
  • Last Seen:  

@@Kido really!

 

may i suggest, a closed with syntax {},(),"" and others.

 

Examples:

 

if(getgroupid() > 50){

    mes "Hi, bye!";

}|

 

if(getgroupid() > 50)|{

    mes "Hi, bye!";

}

 

if(getgroupid()> 50){

    mes "Hi, bye!";

 

}

 

if(getgroupid() > 50){

    mes "Hi, bye!"|;

}

 

this is my suggestion.

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   53
  • Joined:  11/27/11
  • Last Seen:  

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

 

This special edition of map-server_sql.exe (compiled from Hercules emu) is now 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:

RlWBRIY.png

 

If you've fixed the error and pressed F6 again, it will highlight the next problem, etc...

 

lI0OAWe.png

 

Now you can work on NPC Scripts and not have to load it into the live/test server to see if any syntax/coding error are in there. Hopefully this will speed up everyone's NPC Scripting.

 

I am currently working on packaging this as a standalone installer and hope to have it released soon. This new build comes with new bug fixes and improvements also.

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

woa that's so cool, it works with rathena right? if not, can it be done somehow with rathena o: ?

thaaanks and welcome back!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   53
  • Joined:  11/27/11
  • Last Seen:  

Yea it definetly works with rAthena as well as eAthena.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Yea it definetly works with rAthena as well as eAthena.

 

cool where do i download it?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Now you can work on NPC Scripts and not have to load it into the live/test server to see if any syntax/coding error are in there. Hopefully this will speed up everyone's NPC Scripting.

Hopefully this won't be the only test that people run...

(Great job, though!)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

yup o: i'm totally waiting for ir !!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   1
  • Joined:  03/24/13
  • Last Seen:  

Amazing!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   53
  • Joined:  11/27/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

amazing o:!   thaaanks!

 

edit:

case sensitive? lol

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...