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
kevin465
Journeyman
*

Posts: 67
Likes Given: 1
Likes Received: 4 in 4 posts
Joined: Feb 2014
Reputation: 0

UO Reborn

Post: #1
Wipe a world
ok i explain you what i want to do.... i wanna clean all my world... houses... character...account but i just want to keep my spawn of npc and monster....someone know how to do that... please
03-15-2014 01:23 AM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #2
RE: Wipe a world
Take a day off your work and re-do your spawns using db or one script file so you can have control under all spawns.

Or...

Code:
FORITEMS 10000
if (<type>!=t_spawn_char)
   remove
endif
ENDFOR

Don't forget to run in it in all maps.
(This post was last modified: 03-15-2014 02:41 AM by Alaric.)
03-15-2014 01:32 AM
Find all posts by this user Like Post Quote this message in a reply
kevin465
Journeyman
*

Posts: 67
Likes Given: 1
Likes Received: 4 in 4 posts
Joined: Feb 2014
Reputation: 0

UO Reborn

Post: #3
RE: Wipe a world
ah ok and you sure there is no way to wipe a world but keep npc and monster... and what is db ?
03-15-2014 01:35 AM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #4
RE: Wipe a world
db=database - mysql

Just use the foritems/forchars loops, make sure if statements are correct there and run it. It will remove those you don't want, then save the world.

Accounts and the rest can be removed manually. Watch save/account files and do whatever you want.
(This post was last modified: 03-15-2014 01:39 AM by Alaric.)
03-15-2014 01:38 AM
Find all posts by this user Like Post Quote this message in a reply
kevin465
Journeyman
*

Posts: 67
Likes Given: 1
Likes Received: 4 in 4 posts
Joined: Feb 2014
Reputation: 0

UO Reborn

Post: #5
RE: Wipe a world
ok but sorry im french .. your foritems method it is a function ? i make this command where...
03-15-2014 01:39 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #6
RE: Wipe a world
He told you the way, with this function you will remove every item that is not a char spawn, to remove the accounts use this one:

Code:
[function removeaccounts]
for 0 <eval <serv.accounts>-1>
    local.acc=<serv.account.<dlocal._for>.name>
    if (<serv.account.<local.acc>.plevel> < 2)
        serv.account <local.acc> delete
    endif
endfor
03-15-2014 01:41 AM
Find all posts by this user Like Post Quote this message in a reply
kevin465
Journeyman
*

Posts: 67
Likes Given: 1
Likes Received: 4 in 4 posts
Joined: Feb 2014
Reputation: 0

UO Reborn

Post: #7
RE: Wipe a world
i have tried your foritems method but sphere tell me i cant delete player like this...
03-15-2014 02:03 AM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #8
RE: Wipe a world
What exactely does it do and what did you do.
(This post was last modified: 03-15-2014 02:45 AM by Alaric.)
03-15-2014 02:39 AM
Find all posts by this user Like Post Quote this message in a reply
kevin465
Journeyman
*

Posts: 67
Likes Given: 1
Likes Received: 4 in 4 posts
Joined: Feb 2014
Reputation: 0

UO Reborn

Post: #9
Wipe a world
Ok but explain me more in detail... If i wanna clear deceit one time ... Or just make a command like you post me but for clean all the world ... You function work but i dont know how to do i have clean a house but i need to type the command like 30 times for clean a house...
03-15-2014 02:56 AM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #10
RE: Wipe a world
But you haven't said what you do. In one post you say that with foritems you aren't able to delete players (how could you even get this error when foritems loop through items in specific distance, NOT players).
Now you say that it works but you have to use the command like 30 times to remove all items in your house. Huh.

FORITEMS is a for-cycle. The "10000" is distance from you. I think the needed distance is 8000+ to cover all tiles in felucca when you stay on coors 1,1.

You wanted to wipe all items, so.. with this forcycle you loop through all items within distance 10000tiles => all items placed a current map.

If you have 5986 items in the map, it will run the forcycle for all of them while every item becomes uid.

Code:
foritems 10
    code
endfor
This provide specific code for all items within 10 tiles distance.

Your specific case
Code:
foritems 10000
    if <type> != t_spawn_char  //IF type of the current/scanned item ISN'T t_spawn_char
   remove //REMOVES current item
   endif
endfor
03-15-2014 03:25 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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