Jump to content
  • 0

Script to load/unload a script


Question

Posted

Hi All,

 

I just want to ask if it is possible to have a script to load/unload certain script in a certain time?

 

Like for example, I want to disable the permanent monster spawn in prt_maze OnClock0100 and the resume enable it OnClock0200?

 

Any advise is greatly appreciated!

 

 

11 answers to this question

Recommended Posts

Posted

 

This?

@loadnpc <path>
@unloadnpc <npc name>

 

I'm looking for something like a script that can do these commands...

 

 

Enablenpc

Disablenpc

Does this works with the permanent monster spawn? like @loadnpc npc/pre-re/mobs/dungeons/abbey.txt ?

Posted

This?

@loadnpc <path>
@unloadnpc <npc name>

I'm looking for something like a script that can do these commands...

Enablenpc

Disablenpc

Does this works with the permanent monster spawn? like @loadnpc npc/pre-re/mobs/dungeons/abbey.txt ?

Mmmm. No.. maybr you can request for a src mod for this and ask for a script command to do this.

Posted

like i mentioned:

OnClock0100:
atcommand "@unloadnpcfile <path>";
end;

OnClock0200:
atcommand "@loadnpc <path>";
end;
Note: Look @unloadnpcfile up in doc/atcommands.txt first, if you have it.

Regards,

Chris

Posted

like i mentioned:

OnClock0100:
atcommand "@unloadnpcfile <path>";
end;

OnClock0200:
atcommand "@loadnpc <path>";
end;
Note: Look @unloadnpcfile up in doc/atcommands.txt first, if you have it.

Regards,

Chris

 

The problem with this is that it has a high probability of failing after the first unloading.

I resulted to using enablenpc/disablenpc because of this problem.

Posted

like i mentioned:

OnClock0100:
atcommand "@unloadnpcfile <path>";
end;

OnClock0200:
atcommand "@loadnpc <path>";
end;
Note: Look @unloadnpcfile up in doc/atcommands.txt first, if you have it.

Regards,

Chris

The problem with this is that it has a high probability of failing after the first unloading.

I resulted to using enablenpc/disablenpc because of this problem.

What kind of failure?

Regards,

Chris

Posted (edited)

like i mentioned:

OnClock0100:
atcommand "@unloadnpcfile <path>";
end;

OnClock0200:
atcommand "@loadnpc <path>";
end;
Note: Look @unloadnpcfile up in doc/atcommands.txt first, if you have it.

Regards,

Chris

The problem with this is that it has a high probability of failing after the first unloading.

I resulted to using enablenpc/disablenpc because of this problem.

What kind of failure?

Regards,

Chris

Ingame failure sayin somethin like 'failed to load npc'

//edit

I'm not sure if it'll work for monster spawn though.

Edited by jezznar

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...