SphereCommunity
Wipe a world - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Wipe a world (/Thread-Wipe-a-world)

Pages: 1 2


RE: Wipe a world - kevin465 - 03-15-2014 03:31 AM

ok but if I want to delete all map deceit should I go on a specific coordinate?


RE: Wipe a world - Alaric - 03-15-2014 03:46 AM

I don't know map deceit. If you mean removing all items in the underground deceit, then... There was something like

Code:
[function f_deceit_clear]
region.(uid of the deceit region or some idetificator).foritems f_lol

[function f_lol]
if <region.name> == deceit
   remove
endif


I'm not sure with this way but I think it worked.
Code:
region.foritems
should loop through all sectors the region is in => you have to check whether it is in the region DECEIT.

The code is crap, just theory because I don't remember the right form, syntax by heart.


e:I'm passing the baton, try it somebody, I'm confused again. I really don't know what kevin wants to achieve.


Wipe a world - kevin465 - 03-15-2014 04:15 AM

Ok its work dont tell how i have do it but all its wiped !! But know if you can help me for how wipe all c_player_vendor off all char after i have finish to ask you help Smile


RE: Wipe a world - Shidhun - 03-15-2014 08:04 AM

[function whatever]
forinstances c_player_vendor
remove
endfor


RE: Wipe a world - XuN - 03-15-2014 08:20 AM

This is the best help anyone can give you for this: http://wiki.sphere.torfo.org/index.php/Chapter_7


RE: Wipe a world - Coruja - 03-20-2014 11:39 AM

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


RE: Wipe a world - darksun84 - 03-20-2014 08:03 PM

You can use this also for world wiping

PHP Code:
[FUNCTION startWorldWipe]
go 1,1,//this is the  super global region for map0 that contains all the other regions  of the map 
region.allchars wipeChars
region
.allcharsidle wipeChars //for characters belonging to a disconnected client
region.allitems wipeItems
return 

[FUNCTION 
wipeChars]

if (<
isplayer>)
    if <
account.plevel> < // this will avoid to remove the administrator characters.
        //serv.log removing player character <name>
        
remove 1
        
return 
    endif
else
    
//serv.log removing npc character <name>
    
remove 
endif 
return 

[FUNCTION 
wipeItems]
if (<
type> != t_spawn_char ) && ( <type> != t_spawn_item )
    
//serv.log removing item <name>
    
remove
endif
return 



RE: Wipe a world - Abuelox - 06-18-2014 01:17 AM

Sorry to open an old topic, but as would be done to clear the multis, ie homes that put the players.