SphereCommunity
Server Wipe and keep spawns? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Requests (/Forum-Script-Requests)
+--- Thread: Server Wipe and keep spawns? (/Thread-Server-Wipe-and-keep-spawns)



Server Wipe and keep spawns? - Xenon - 03-23-2014 08:10 PM

Hello everyone,
I use to own a fairly popular server around 5 years ago and was looking into the possibility of restarting it. I have tried a couple of methods how to "start over on it".

The first way I tried was to remove the account files from the server and let all the accounts remove them self. This worked but all items that were stored in houses were still saved in game floating objects. So this would not be practical for a new server.

http://forum.spherecommunity.net/Thread-Wipe-a-world?page=2&highlight=world+wipe

I tried this as well but this removed all my spawns and that's not what I wanted.

In simple I would like a script that would remove characters and items but avoid any spawns. Its been a long time since I played or scripted!

using the below script I think it just needs to be adjusted slightly

[FUNCTION ServerWipe]
FOROBJS 10000
IF (<ISITEM>)
IF (<TYPE> != t_spawn_char) || !(<ATTR> & attr_static)
REMOVE (I feel if I just change this value to ignore or just remove the whole if it might work)
ENDIF
ELIF (<ISCHAR>)
REMOVE 1
ENDIF
ENDFOR
FOR 0 <eval <SERV.ACCOUNTS>-1>
SERV.ACCOUNT.<LOCAL._FOR>.DELETE
ENDFOR


RE: Server Wipe and keep spawns? - XuN - 03-23-2014 08:53 PM

Change

IF (<TYPE> != t_spawn_char) || !(<ATTR> & attr_static)

to

IF !( ( <type> == t_spawn_char) || ( <attr> & attr_static))


RE: Server Wipe and keep spawns? - Xenon - 03-26-2014 02:18 AM

worked perfect thanks!