Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   /reset npc NAME (https://forums.graalonline.com/forums/showthread.php?t=134260734)

Cubical 10-07-2010 06:22 AM

Quote:

Originally Posted by MrOmega (Post 1604707)
O_o I have to try this tomorrow, never heard of it.

It only works in the Control-NPC
PHP Code:

function onRCChat(cmd){
  switch(
cmd){
    case 
"reset":
      
sendtorc("/reset" SPC params[1]);
      break;
    default:
      
sendtorc("Commands")
      
sendtorc("/npc reset account - resets player ");
      break;
  }



MrOmega 10-07-2010 03:12 PM

I need the NPC itself to reset itself, not it to reset a player.

fowlplay4 10-07-2010 03:38 PM

Quote:

Originally Posted by MrOmega (Post 1604762)
I need the NPC itself to reset itself, not it to reset a player.

It's example usage of the event/function, not copy-pasta for your specific situation.

MrOmega 11-02-2010 06:41 PM

bump

Skyld 11-02-2010 08:41 PM

I still do not believe this is necessary. Like it was said earlier in the thread, if you are needing to reset an NPC routinely then you are doing something wrong.

Deas_Voice 11-02-2010 09:07 PM

Quote:

Originally Posted by Skyld (Post 1609787)
I still do not believe this is necessary. Like it was said earlier in the thread, if you are needing to reset an NPC routinely then you are doing something wrong.

what about clientside scripting? you have to reset the DBNPC for it to call "onCreated" on clientside :\

MrOmega 11-02-2010 10:53 PM

Quote:

Originally Posted by Skyld (Post 1609787)
I still do not believe this is necessary. Like it was said earlier in the thread, if you are needing to reset an NPC routinely then you are doing something wrong.

Not that I am doing something wrong but this would be very convient and you must reset an NPC for clientside onCreated() to be called 'again'
Dang it, Deas beat me to it!

fowlplay4 11-02-2010 11:25 PM

You can silently update a level (server-side) using:

fileupdate("level.nw");

Perhaps that would satisfy your wants.

Deas_Voice 11-03-2010 12:27 AM

Quote:

Originally Posted by fowlplay4 (Post 1609826)
You can silently update a level (server-side) using:

fileupdate("level.nw");

Perhaps that would satisfy your wants.

that doesn't even work like "update level" :oo:

fowlplay4 11-03-2010 12:48 AM

Quote:

Originally Posted by Deas_Voice (Post 1609833)
that doesn't even work like "update level" :oo:

Work's like uploading a level, probably need a path/to/level.nw

Deas_Voice 11-03-2010 05:40 PM

Quote:

Originally Posted by fowlplay4 (Post 1609840)
Work's like uploading a level, probably need a path/to/level.nw

Quote:

Originally Posted by Script help for 'fileupdate'
fileupdate(str) - returns boolean - requests the download or reloading of a file
Clientside:
fileupdate(str) - returns boolean

uh, clientside?
so how are your little idea supposed to work to prevent having to do "reset" on the dbnpc to call clientsided "onCreated"? i've confused myself :cool:

fowlplay4 11-03-2010 07:36 PM

The only way you're going be able to "reset" an npc is with sendtorc("/npc reset dbname") on the server-side, if you update the level, you'll update the client-side scripts as well.

I personally believe you should probably be doing something differently if you have to reset the NPC to get it working properly.

Deas_Voice 11-03-2010 08:53 PM

Quote:

Originally Posted by fowlplay4 (Post 1609968)
I personally believe you should probably be doing something differently if you have to reset the NPC to get it working properly.

such as using it as a testnpc for a levelnpc? x)
i often use it when i do levelnpc instead of having to alter the level before ive made the script.. and then i put it in a class when im done.. is that different enuf for you? ;)

fowlplay4 11-03-2010 09:43 PM

Quote:

Originally Posted by Deas_Voice (Post 1609988)
such as using it as a testnpc for a levelnpc? x)
i often use it when i do levelnpc instead of having to alter the level before ive made the script.. and then i put it in a class when im done.. is that different enuf for you? ;)

I just put it in a class script to begin with and create, update and destroy instances of it as I please.


All times are GMT +2. The time now is 01:40 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.