Tokei Posted January 24, 2017 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 696 Reputation: 721 Joined: 11/12/12 Last Seen: 12 hours ago 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 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM 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 Group: Development Manager Topic Count: 56 Topics Per Day: 0.01 Content Count: 732 Reputation: 525 Joined: 12/13/11 Last Seen: June 13, 2024 Share Posted January 26, 2017 Implemented in Git Hash: 9c2026d! 2 Link to comment Share on other sites More sharing options...
Recommended Posts