The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wipe a world
Author Message
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #16
RE: Wipe a world
Code:
[FUNCTION ServerWipe] //This will wipe all items, npcs and accounts
FOROBJS 10000
  IF (<ISITEM>)
    IF (<TYPE> != t_spawn_char) || !(<ATTR> & attr_static)
      REMOVE
    ENDIF
  ELIF (<ISCHAR>)
    REMOVE 1
  ENDIF
ENDFOR
FOR 0 <eval <SERV.ACCOUNTS>-1>
  SERV.ACCOUNT.<LOCAL._FOR>.DELETE
ENDFOR

[FUNCTION RegionWipeChars] //This will clear all chars only on your region (if you want clear destard, go to destard and use this command)
FORCHARS 10000
  IF (<REGION.UID> == <SRC.REGION.UID>)
    REMOVE
  ENDIF
ENDFOR
I made this code on-the-fly, untested, but maybe it could help with something

attr_static check on items is just to prevent world items like doors/walls/etc get removed. It will only work if you set attr_static (08000) on these items. If these items doesn't have attr_static they will get removed too

all chars will be removed too, but you dont need to care about spawns, they will spawn again later
(This post was last modified: 03-20-2014 11:47 AM by Coruja.)
03-20-2014 11:39 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Wipe a world - kevin465 - 03-15-2014, 01:23 AM
RE: Wipe a world - Alaric - 03-15-2014, 01:32 AM
RE: Wipe a world - kevin465 - 03-15-2014, 01:35 AM
RE: Wipe a world - Alaric - 03-15-2014, 01:38 AM
RE: Wipe a world - kevin465 - 03-15-2014, 01:39 AM
RE: Wipe a world - XuN - 03-15-2014, 01:41 AM
RE: Wipe a world - kevin465 - 03-15-2014, 02:03 AM
RE: Wipe a world - Alaric - 03-15-2014, 02:39 AM
Wipe a world - kevin465 - 03-15-2014, 02:56 AM
RE: Wipe a world - Alaric - 03-15-2014, 03:25 AM
RE: Wipe a world - kevin465 - 03-15-2014, 03:31 AM
RE: Wipe a world - Alaric - 03-15-2014, 03:46 AM
Wipe a world - kevin465 - 03-15-2014, 04:15 AM
RE: Wipe a world - Shidhun - 03-15-2014, 08:04 AM
RE: Wipe a world - XuN - 03-15-2014, 08:20 AM
RE: Wipe a world - Coruja - 03-20-2014 11:39 AM
RE: Wipe a world - darksun84 - 03-20-2014, 08:03 PM
RE: Wipe a world - Abuelox - 06-18-2014, 01:17 AM

Forum Jump:


User(s) browsing this thread: 5 Guest(s)