Tokei Posted January 24, 2017 Share Posted January 24, 2017 Heya, I would like to suggest adding @reloadnpc as an official atcommand to reload scripts. Currently we have to use @unloadnpcfile followed by @loadnpc which is a bit awkward when you want to create a new script. With @reloadnpc, you'd be able to load and reload NPCs with the same command. ACMD_FUNC(reloadnpc) { if (!message || !*message) { clif_displaymessage(fd, "Usage: @reloadnpc <file name>"); return -1; } if (npc_unloadfile(message)) clif_displaymessage(fd, msg_txt(sd,1386)); // File unloaded. Be aware that mapflags and monsters spawned directly are not removed. if (!npc_addsrcfile(message) || !npc_parsesrcfile(message,true)) { clif_displaymessage(fd, msg_txt(sd,261)); return -1; } npc_read_event_script(); clif_displaymessage(fd, msg_txt(sd,262)); return 0; } 6 Link to comment Share on other sites More sharing options...
Emistry Posted January 25, 2017 Share Posted January 25, 2017 It would be nice to see this implemented. We've talk about it too ( Issue: 203 ) Link to comment Share on other sites More sharing options...
Aleos Posted January 26, 2017 Share Posted January 26, 2017 Implemented in Git Hash: 9c2026d! 2 Link to comment Share on other sites More sharing options...