Jump to content
  • 0

Script to load/unload a script


grampa

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   0
  • Joined:  11/06/14
  • Last Seen:  

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!

 

 

Link to comment
Share on other sites

11 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  281
  • Reputation:   14
  • Joined:  10/14/13
  • Last Seen:  

This?

@loadnpc <path>
@unloadnpc <npc name>
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

Enablenpc

Disablenpc

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   0
  • Joined:  11/06/14
  • Last Seen:  

 

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 ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

For unloading I suggest @unloadnpcfile this unloads the whole file.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  265
  • Reputation:   95
  • Joined:  09/30/14
  • Last Seen:  

Unloading an NPC does not disable permanent monster spawns. You would need to change those spawns to not be permanent mob spawns.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  77
  • Reputation:   0
  • Joined:  05/23/15
  • Last Seen:  

Is it possible to do an invasion simailair to how LoD spawn in niff and mod it to happen at set times?

I'll try testing that when I'm off work

Link to comment
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
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.

×
×
  • Create New...