Zopokx 7 Posted June 19, 2013 The title is self-explanatory. Could be possible to have a script command that let the user to load another file (just as @loadnpc command do) Quote Share this post Link to post Share on other sites
jaBote 438 Posted June 19, 2013 I made that script command some months ago for my rA test server (before discovering Hercules), which is very easy because it's just taking loadnpc atcommand and changing some lines to make it a script command. Maybe I can remake them for Hercules, but you should be aware you can also use atcommand "@loadnpc blahblahblah". Quote Share this post Link to post Share on other sites
Zopokx 7 Posted June 19, 2013 I know, but the script command would be wonderful for script events (you need to do something to activate a new quest, for example) It would be nice for role servers or for custom chained events. Quote Share this post Link to post Share on other sites
jaBote 438 Posted June 20, 2013 I meant you can use a script run the 'atcommand' script command which may do this, but I agree with you I'd prefer some more consistent script command for accomplishing this task. If nobody else does this, maybe I can re-adapt them this friday (tomorrow will be impossible for me) and commit it if any of the devs also agrees on this. Quote Share this post Link to post Share on other sites
Mumbles 193 Posted June 22, 2013 Wouldn't enablenpc serve the same purpose? I mean, it literally triggers an existing NPC. You could disable the NPC by default by using disablenpc under an OnInit label and re-enable it once a certain condition has been met. I'd recommend adding an extra check for the quest's variable(s) so as to avoid exploitation, but enablenpc will do just what you need. Quote Share this post Link to post Share on other sites
jaBote 438 Posted June 23, 2013 enablenpc/disablenpc don't do that. It just makes the target NPC (already loaded) visible or invisible to users so that they can trigger it. It doesn't load or unload an NPC to/from memory. The @loadnpc command (and the loadnpc script command if made) takes a route to a script file and loads all its mapflags, mob spawns, warps and/or NPCs. I'll try to make those commands as plugins whenever I have time for that. Quote Share this post Link to post Share on other sites
Emistry 145 Posted June 23, 2013 I know, but the script command would be wonderful for script events (you need to do something to activate a new quest, for example) It would be nice for role servers or for custom chained events. i dont think so ... if you are refering to something like this...Player A talk with NPC....and trigger the command to load the NPC B ...what happen IF player B straight skip the NPC A since Player A have triggered the NPC B..and Player B able to access to NPC B without need to talk with NPC A.... and to solve this...you still have to do some variable trick to fix it....so at the end...you still end up using variable to solve your problem .. so this is useless ... same thing can be achieve by using the disablenpc / enablenpc .... there is no point to add this ... Quote Share this post Link to post Share on other sites