Jump to content

Making Instances Persistent to @reloadscript


Ind

Recommended Posts


  • Group:  Members
  • Topic Count:  169
  • Topics Per Day:  0.04
  • Content Count:  1260
  • Reputation:   750
  • Joined:  11/19/11
  • Last Seen:  

This is an suggestion made through the bug tracker by saithis which I'm merely reposting.

In npc.c the instances get now destroyed after @reloadscript, and a line after that it tries to reinitialize them:

do_final_instance();
for( i = 0; i < ARRAYLENGTH(instance); ++i )
instance_init(instance[i].instance_id);

Also some scripts supported reinitialization after @reloadscript, this scripts are now broken.For example my ET script just restarted the last stage they were on.So wouldn't it be better to rewrite the instance scripts to support reinitialization instead of removing this feature for all scripts?


In my personal opinion perhaps we could make OnInstanceInit events be run through all npcs in a instance map as they're created and from there they keep going? -- random idea which hasn't been given much thought.


This topic is for discussion/designing the feature, make yourself comfortable to post what you think.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  224
  • Reputation:   22
  • Joined:  03/23/12
  • Last Seen:  

Well, in a few servers I played, scripts were reloaded like twice when we were doing ET and I can say it was damn annoying to be stuck inside and have to wait after to go in again.

So yeah, I think it's a good idea. /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  40
  • Reputation:   20
  • Joined:  12/31/11
  • Last Seen:  

In eAthena after many complains by me, they aplied a patch that changed the instance system to run OnInstanceInit on creation and when using @reloadscript, it copies the instance npcs again, but then only runs OnInit on them.

This way you could check the progress on OnInit and apply some reinitialisation magic(respawning of monsters, hiding/showing of the right npcs).

At ET this would mean, that some dead mobs of the current stage would spawn again, but at least it doesn't break.

Link to comment
Share on other sites

  • 9 months later...

  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

any update on this?

 

i create my own instance but when i reloadscript the instance will be destroy. how can i fix this?

Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  247
  • Reputation:   207
  • Joined:  10/23/12
  • Last Seen:  

Implemented in r17386.

  • Upvote 2
Link to comment
Share on other sites

×
×
  • Create New...