Jump to content
Sign in to follow this  
Zopokx

LoadNPCfile script command

Recommended Posts

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)
 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.