Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Release Archive

Custom Script Release Archive This is a pre-script database archive of what our users had released.

 
 
Thread Tools Display Modes
Old 05-20-2005, 10:28 PM   #1 (permalink)
 
Join Date: Mar 2003
Posts: 304
Default Items Management System

What is this?
This is what I called Groups Handler, a powerful items management system for RunUO. It has been used (and is still in use) in UODreams for more than a year, by admins, GMs and especially questers, and it's now tracking near 100.000 items in about 50 different groups.

Have you ever had the need to keep track of some items, or to prevent decorations to be accidentally deleted by staff members, or to execute commands on a group of items without the risks of committing bad mistakes (ie: global delete where...), or to mass move a group of decoration items, or to search for items without the pain of loading a save locally because you don't even remember their serial? Also, questers will like the ability to track, move and remove temporary decorations and special items with a few mouse clicks. This script can help you doing all this, and more.

You no longer write serials on pieces of paper, you see them in a handy gump.
You no longer need to remember what items (and decorations) you added and where, you just know they are there.

Note 1: this script supports both Italian and English languages.
Note 2: this script supports, without bad consequences, concurrent gump use by more than one GM at a time.
Note 3: this script fully supports RunUO 1.0.0 and RunUO 1.0.1 pre-releases.
New: version 2 supports RunUO 2.0 RC1.
Note 4: all commands done through the gump are logged.

Click Here to see a few images and hints to use the gump.

Italian gump use description here (actually it's a page specifically written for UODreams staff).
You can also download the script here and here (version 2).

What are the main features?
  • Items categorization into different user defined groups
  • Support for secure groups
  • Search for items by type, serial and itemid
  • Easy and graphical property summary panel
  • Options for basic GMs interact with items, like Interface command (move, delete, props, bring...)
  • Ability to perform commands on selected items, including conditions
  • Support for multiple "Contained" commands implementor (ie: to perform a "contained" command for a large amount of containers with just a click)
  • Mass move command (ie: to move many items at a time to a different location, by keeping their relative position
  • World decorations finder
Note: all the operations provided by the gump can be performed regarding the items belong to a group or not (ie: you do not need to categorize a group of items to mass move them).

What does this tool do and how can I use it?
Groups Handler is a tool built up with a series of commands and a gump for groups management and items classification. This way, specifically created items (which perhaps need to be deleted or moved in a near future) can be found with no effort at all. You don't even need to remember which items they were, where you placed them or whom you gave them to. This system also grants very easy decorations management.
Each item can be assigned to a group, and groups can all be easily seen and searched for in the main gump.

Let's talk about the gump. Admins will see a few orange groups: these are intended as protected groups. If you installed scripts correctly, these items will not be visible from the gump to non-Admins. Also, commands like delete, move, set, wipe (this one for Admins too), etcetera, will be prohibited. This ensures a GM or Seer can decorate an area without paying attention for already existing items (ie: default decoration items): a wipe command will not erase these ones (as long as they are categorized into an orange group).

Yellow groups, on the contrary, are public: items here categorized can be viewd by all Councelors and upper (but Counselors cannot edit them nor use advanced gump options).

Admins can, also, change the security level of a group, making it yellow or orange respectively, with the only exception of default groups.

GMs and upper can create new groups, by specifying name and description. If a group name already exists, it won't be added again (only description will be changed). An item can be assinged to one group only, but a group can contain all items you want.

Here the commands list:
  • SetGroup <group name>: adds an item to the specified group (unless the item already belongs to another group). This commands supports implementors Single and Multi.
  • ToggleGroup: opens the main gump listing the item(s) targeted and showing if they belongs to a groups or not. From the gump, you can add items to a group, move them to another group, remove them from their own group, showing properties, etcetera. If you need to find an item with a specific serial, you can type ToggleGroup <serial>. Councelors can only view items list and groups, but cannot perform other actions. The "add/remove" button, adds uncategorized items to the group "(default)" or the one imposed by current filter, or remove items from their own groups if they have one. In this case, the item is only removed from GroupsHandler gump, but NOT deleted. This command supports implementors Single, Contained, Area, Global. It also has an alias: TG.
  • HandleGroups: opens the main gump (like TG), showing all categorized items. This commands has an alias: HG.
  • FindDecorations: this commands find all non movable, not in a house, not in green acres, etc, items in the word, and adds them to the group "orphans". Useful if your staff forgets temporary decorations throughout the world and you wish to find them.
How can I install these scripts?
Unzip the file in your desktop, then copy the "Custom" folder inside your RunUO "Scripts" folder. Those are the main engine files for GroupsHandler.
Then, compare other files with those already present in your RunUO folder, and merge changes. Or, if you did not edit default RunUO scripts, just overwrite them all.
On first run, you will be warned about no groups list found: just ignore the message and press enter key. This is a security feature to prevent accidentally groups list removing while reverting from a previous save. BTW: groups list is saved into RunUO "Saves" folder.

My scripts are heavily customized and I can't overwrite them with your version, and/or I have no time to compare them all. Can you please tell me how and where to apply all changes?
Here they are, all distro scripts changes (at least those I could remember, hope they are all).

- Commands\Decorate.cs, ~line 967 (~986 for version 2), add red line:
Code:
                    if ( FindItem( loc.X, loc.Y, loc.Z, maps[j], item ) )
                    {
                    }
                    else
                    {
                        item.MoveToWorld( loc, maps[j] );
                   GroupsHandler.DecorationGroup.AddItem( item, true );
                        ++count;
 
                        if ( item is BaseDoor )
                        {
- Commands\GenTeleporter, CreateTeleporter method, add red lines:
Code:
using Server.Scripts.Commands; // ignore this line for version 2
...
            public void CreateTeleporter( Point3D pointLocation, Point3D pointDestination, Map mapLocation, Map mapDestination, bool back )
            {
                if ( !FindTeleporter( mapLocation, pointLocation ) )
                {
                    m_Count++;
 
                    Teleporter tel = new Teleporter( pointDestination, mapDestination );
 
                    tel.MoveToWorld( pointLocation, mapLocation );
               GroupsHandler.TelGenGroup.AddItem( tel, true );
                }
 
                if ( back && !FindTeleporter( mapDestination, pointDestination ) )
                {
                    m_Count++;
 
                    Teleporter telBack = new Teleporter( pointLocation, mapLocation );
 
                    telBack.MoveToWorld( pointDestination, mapDestination );
               GroupsHandler.TelGenGroup.AddItem( telBack, true );
                }
            }
- Commands\SignParser.cs, ~line 137, add red line:
Code:
            sign.MoveToWorld( location, map );
       GroupsHandler.SignGenGroup.AddItem( sign, true );
- Commands\Wipe.cs, ~line 92, edit line as shown in red:
Code:
            foreach ( object obj in eable )
            {
                if ( items && (obj is Item) && !((obj is BaseMulti) || (obj is HouseSign)) && !GroupsHandler.InSecureGroup( obj as Item ) )
                    toDelete.Add( obj );
- Misc\DoorGenerator.cs, ~line 480 (~485 for version 2), add red lines:
Code:
using Server.Scripts.Commands; // ignore this line for version 2
...
            BaseDoor door = new DarkWoodDoor( facing );
            door.MoveToWorld( new Point3D( x, y, z ), m_Map );
       GroupsHandler.DoorGenGroup.AddItem( door, true );
 
            ++m_Count;
- Misc\uoamVendors.cs, ~line 341, add red lines:
Code:
using Server.Scripts.Commands; // ignore this line for version 2
...
                sp.MoveToWorld( new Point3D( x, y, z ), map );
           GroupsHandler.UOAMVendorsGroup.AddItem( sp, true );
- Items\Misc\PublicMoongate.cs, ~line 128 (~146 for version 2), add red lines:
Code:
using Server.Scripts.Commands; // ignore this line for version 2
...
                Item item = new PublicMoongate();
 
                item.MoveToWorld( entry.Location, list.Map );
           GroupsHandler.MoonGenGroup.AddItem( item, true );
Add similar lines to other decorationg scripts, if you wish decorating items to be automatically categorized (i.e.: factions generator, gauntlet generator, khaldun generator, solen hives teleporters, etc.).
If you wish to add items to a new custom group, be sure to create the group first in scripts: see notes above for this.

Note: for all the following paths, change "Abstracted" with "Generic" for version 2.

- Commands\Abstracted\Commands\BaseCommand.cs, edit method IsAccessible, and add red lines as follows:
Code:
        public virtual bool UseGroupsSecurity{ get{ return false; } }
 
        public static bool IsAccessible( Mobile from, object obj )
   {
            return IsAccessible( from, obj, false );
        }
 
        public static bool IsAccessible( Mobile from, object obj, BaseCommand command )
        {
            return IsAccessible( from, obj, command != null && command.UseGroupsSecurity );
        }
 
        public static bool IsAccessible( Mobile from, object obj, bool checkSecurity )
        {
            if ( from.AccessLevel >= AccessLevel.Administrator || obj == null )
                return true;
 
            Mobile mob;
 
            if ( obj is Mobile )
                mob = (Mobile)obj;
            else if ( obj is Item )
                mob = ((Item)obj).RootParent as Mobile;
            else
                mob = null;
 
       if ( checkSecurity && obj is Item && !GroupsHandler.IsAccessible( from, obj as Item ) )
                return false;
 
            if ( mob == null || mob == from || from.AccessLevel > mob.AccessLevel )
                return true;
 
            return false;
        }
- Commands\Abstracted\Commands\Commands.cs, add red lines:
Code:
// line 55 (59 for version 2)
       Register( new GroupsHandler.SetGroupCommand() );
            Register( new GroupsHandler.ToggleGroupCommand() );
 
// BringToPackCommand, line 112 (120 for version 2)
   public override bool UseGroupsSecurity{ get{ return true; } }
 
// IncreaseCommand, line 261 (271 for version 2)
   public override bool UseGroupsSecurity{ get{ return true; } }
 
// AliasedSetCommand, line 643 (665 for version 2)
   public override bool UseGroupsSecurity{ get{ return true; } }
 
// SetCommand, line 676 (690 for version 2)
   public override bool UseGroupsSecurity{ get{ return true; } }
 
// DeleteCommand, line 709 (725 for version 2)
   public override bool UseGroupsSecurity{ get{ return true; } }
Add similar lines to all other command you wish to protect.

- Commands\Abstracted\Commands\Interface.cs, add or edit lines in red as follows:
Code:
// line 12 (15 for version 2)
    public class InterfaceCommand : BaseCommand
    {
   public override bool UseGroupsSecurity{ get{ return true; } }
 
// line 128 (229 for version 2)
                        if ( !BaseCommand.IsAccessible( m_From, obj, true ) )
 
// line 209 (318 for version 2)
            else if ( !BaseCommand.IsAccessible( m_From, m_Item, true ) )
 
// line 231 (341 for version 2)
               if ( GroupsHandler.IsAccessible( m_From, m_Item ) )
                    {
                        CommandLogging.WriteLine( m_From, "{0} {1} deleting {2}", m_From.AccessLevel, CommandLogging.Format( m_From ), CommandLogging.Format( m_Item ) );
                        m_Item.Delete();
               }
 
// line 260 (373 for version 2)
                        m_From.SendMessage( "You can not get what you can not see." );
                    }
               else if ( !GroupsHandler.IsAccessible( m_From, m_Item ) )
                    {
                        m_From.SendMessage( "You can not get what you can not access." );
                    }
- Commands\Abstracted\Implementors\AreaCommandImplem entor.cs, line 57, edit as follows:
Code:
                    if ( !BaseCommand.IsAccessible( from, obj, command ) )
- Commands\Abstracted\Implementors\BaseCommandImplem entor.cs, line 41 (43 for version 2), add line:
Code:
            Register( GroupsHandler.CommandImplementor );
- Commands\Abstracted\Implementors\ContainedCommandI mplementor.cs, edit OnTarget method as follows:
Code:
        public void OnTarget( Mobile from, object targeted, object state )
        {
 
       object[] states = (object[])state;
            BaseCommand command = (BaseCommand)states[0];
            string[] args = (string[])states[1];
 
            if ( !BaseCommand.IsAccessible( from, targeted, command ) )
            {
                from.SendMessage( "That is not accessible." );
                return;
            }
 
            if ( command.ObjectTypes == ObjectTypes.Mobiles )
                return; // sanity check
- Commands\Abstracted\Implementors\GlobalCommandImpl ementor.cs, edit lines 36 and 45 as follows:
Code:
                        if ( cond.CheckCondition( item ) && BaseCommand.IsAccessible( from, item, command ) )
...
                        if ( cond.CheckCondition( mob ) && BaseCommand.IsAccessible( from, mob, command ) )
- Commands\Abstracted\Implementors\MultiCommandImple mentor.cs, edit line 31 as follows:
Code:
            if ( !BaseCommand.IsAccessible( from, targeted, command ) )
- Commands\Abstracted\Implementors\SingleCommandImpl ementor.cs, edit OnTarget method as follows:
Code:
        public void OnTarget( Mobile from, object targeted, object state )
        {
       object[] states = (object[])state;
            BaseCommand command = (BaseCommand)states[0];
            string[] args = (string[])states[1];
 
            if ( !BaseCommand.IsAccessible( from, targeted, command ) )
            {
                from.SendMessage( "That is not accessible." );
                return;
            }
 
            switch ( command.ObjectTypes )
            {
For version 2 only:
- Commands\Generic\Implementors\SerialCommandImpleme ntor.cs, line 44:
Code:
     else if ( e.Mobile.AccessLevel < command.AccessLevel )
     {
      e.Mobile.SendMessage( "You do not have access to that command." );
     }
     else if ( !BaseCommand.IsAccessible( e.Mobile, obj, command ) )
     {
      e.Mobile.SendMessage( "That is not accessible." );
     }
    else


I have a custom script which generates items. How can I make my script to automatically add those items to a group, so that I can easily track them in game?
Pretty simple. Locate the line where your script creates the item, then add these lines just after that:
Code:
ItemsGroup g = GroupsHandler.AddGroup( "mygroup", "This is a description", false );
g.AddItem( item, true );
The first line will create the group only if it does not exist. Otherwise, it simply returns the group instance.
The parameters of AddGroup methods are: group name (case unsensitive), group description (case sensitive) and secure flag (true = orange group; false = yellow group).
The parameters of AddItem are: the item just created and the ability to add it in a secure group (keep this always true if the item is added by a script).
That's all ;)

I selected all decorations, then clicked the button "delete marked", but it seems the operation is very slow. Why?
If you delete items that way, each single delete is logged, thus the slowness and the high times required to perform all the deletes. Instead of deleting large amounts of items that way, click on the "Execute commands" button, type "delete" on the command text box, then press the apply button. The log will only show how many items you deleted instead of a full list of all them.

I don't want counselors to be able to see grouped items, even if they cannot edit nothing. How can I do this?
Just change the required accesslevel for HandleGroups command from Counselor to GM.

I don't need all security features, accidental delete prevention for non-admins, etcetera. How can I ignore them?
Just copy only the engine and the gump (folder "Custom\GroupsHandler" into my zip) to the RunUO scripts folder, and ignore all other scripts.
Attached Files
File Type: zip Scripts.zip (58.8 KB, 281 views)
File Type: zip Scripts (version 2).zip (61.6 KB, 77 views)

Last edited by uburz; 06-16-2006 at 02:09 PM.
uburz is offline  
Old 05-21-2005, 05:30 AM   #2 (permalink)
Forum Expert
 
Greystar's Avatar
 
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
Default

This looks extremely complicated but also very usefull. I might take the time to add this after I get all the other things done that are on my todo list (which seems to get longer every day)

*Adds this to todo list*
__________________
Quote:
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Killable Guards (GS Version)
Just a Simple Staff Tool
You can leave me messages.
Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else."
Greystar is offline  
Old 05-21-2005, 08:04 AM   #3 (permalink)
Forum Expert
 
Vorspire's Avatar
 
Join Date: Jan 2005
Location: Newcastle, United Kingdom
Age: 22
Posts: 2,301
Send a message via ICQ to Vorspire Send a message via MSN to Vorspire Send a message via Skype™ to Vorspire
Default

This script looks awesome, but i must know if it is possible for it to automatically add EVERY item on the server, into respectable groups. Would i have to edit BaseItem so that when an item is created, it is added to the database? Please tell me how i could do that.

Awesome script by the looks of it, good job ^^
Vorspire is offline  
Old 05-21-2005, 08:15 PM   #4 (permalink)
 
Join Date: Mar 2003
Posts: 304
Default

Quote:
Originally Posted by Admin Vorspire
This script looks awesome, but i must know if it is possible for it to automatically add EVERY item on the server, into respectable groups. Would i have to edit BaseItem so that when an item is created, it is added to the database? Please tell me how i could do that.
Yes, it's possible to do. Perhaps you need to edit the Item() constructor for this. Look at the example in my post above («I have a custom script which generates items. How can I make my script to automatically add those items to a group, so that I can easily track them in game?»).

However, I don't suggest doing this, it would overload your server with useless operations (many items added are just temporary, and/or most of them do not actually need a categorization). If you want, perhaps, to show all katana in the world, you can just type this command: [global tg where katana. This will open a Groups Handler gump showing all katana in the world. Using the Global command is recommended in these situations, rather than categorizing all the items in the world. I personally used a lot of times «global tg where ...»-like commands, as the result is more significative than «global interface where...».

However, if you need to automatically categorize all GM-added items, you can do it by only editing scripts for add/tile/dupe commands.
uburz is offline  
Old 05-21-2005, 11:39 PM   #5 (permalink)
Forum Expert
 
Vorspire's Avatar
 
Join Date: Jan 2005
Location: Newcastle, United Kingdom
Age: 22
Posts: 2,301
Send a message via ICQ to Vorspire Send a message via MSN to Vorspire Send a message via Skype™ to Vorspire
Default

Is there a possible way you could remake a version of this into a staff security system. So we know where the items go, that the staff of the shard create. Which will make it easier to spot sly staff :> always a good precaution when running a busy shard
Vorspire is offline  
Old 05-22-2005, 09:14 AM   #6 (permalink)
 
Join Date: Mar 2003
Posts: 304
Default

Quote:
Originally Posted by Admin Vorspire
Is there a possible way you could remake a version of this into a staff security system. So we know where the items go, that the staff of the shard create. Which will make it easier to spot sly staff :> always a good precaution when running a busy shard
This is already possible (without changing the scripts I provided) the way I told you before, but it's not the purpose of this system. If you automatically add every item created by staff into groups (perhaps secure groups, so only admins can remove the categorization), how can your staff members create custom groups (for temporary decorations, for instance)?

Imho, considering all items created by staff are logged, I think in this case an offline log analyzer application would be more adequate. However, I currently have no plans to write it.
uburz is offline  
Old 06-04-2005, 12:59 AM   #7 (permalink)
 
Join Date: Nov 2003
Location: Noblesville, Indiana
Age: 34
Posts: 56
Send a message via ICQ to Saint666
Default here one for ya

ok the the question i have is does it work well with different types of spawner systems like the XML system if not would be great to see it work well with them as well.

looks good though and a nice idea you have.
Saint666 is offline  
Old 06-23-2005, 12:59 PM   #8 (permalink)
Forum Expert
 
Join Date: Mar 2005
Location: Berlin, Germany
Age: 27
Posts: 1,136
Send a message via ICQ to Sotho Tal Ker Send a message via MSN to Sotho Tal Ker
Default

I like your system and i even think i know how to work with it

But i have some questions:

And what happens if i add this autogroup add thing to the script. Will the server complain about wrong serials and stuff and will it try to delete those items? Or will those items just remain what they are now, means the are not in groups, but nothing else happens to them.

Edit 2: just found out how to add all items of one kind to a group. But new items created of the same type won't be added to the group automatically, right? i would have to add it to the scripts to make it like this, i suppose.
Sotho Tal Ker is offline  
Old 06-25-2005, 08:15 PM   #9 (permalink)
Forum Expert
 
Join Date: Jan 2003
Posts: 564
Default

i followed all your instructions... added some itens to a group and set id secure...
then i tried Wipe and remove on thous items and i found that i can still removing then.
__________________
UO Central: O Mistério do Oculto
(Free Shard Brasileiro)

brodock is offline  
Old 06-25-2005, 08:38 PM   #10 (permalink)
 
Join Date: Mar 2003
Posts: 304
Default

Quote:
Originally Posted by brodockbr
i followed all your instructions... added some itens to a group and set id secure...
then i tried Wipe and remove on thous items and i found that i can still removing then.
This kind of error may happen only by your fault. You probably forgot this:
Quote:
Originally Posted by uburz
- Commands\Wipe.cs, ~line 92, edit line as shown in red:
Code:
foreach ( object obj in eable )
{
	if ( items && (obj is Item) && !((obj is BaseMulti) || (obj is HouseSign)) && !GroupsHandler.InSecureGroup( obj as Item ) )
		toDelete.Add( obj );
Then, make sure you correctly added those items into a secure group (serials must be green and group should be orange colored).

Edit: please note that admins will still be able to manually delete or move secured items, but wipe command is blocked for all accesslevels.
uburz is offline  
Old 06-25-2005, 08:53 PM   #11 (permalink)
 
Join Date: Mar 2003
Posts: 304
Default

Quote:
Originally Posted by Saint666
ok the the question i have is does it work well with different types of spawner systems like the XML system if not would be great to see it work well with them as well.

looks good though and a nice idea you have.
I'm not sure of what you asked for. Did you mean how to automatically group xmlspawners when importing them, like for normal spawners and uoamVendors?

If so, you can edit your xmlspawner script to make it happen. First, add this line to your xmlspawner.cs (or whatever the script file containing command routines for «xmlspawnerload» is called):
Code:
using Server.Scripts.Commands;
Then, locate the method performing load from xml (for instance public static void Load_OnCommand( CommandEventArgs e )) and add this just before the cicling of DataRows:
Code:
	 // Create a new ItemsGroup for XmlSpawners, or return existing one
	 ItemsGroup xmlGroup = GroupsHandler.AddGroup( "xmlspawner", "Spawners of creatures/items in the world", true );
Change the true into false if you don't want the group to be secure. Then, immediately after each xmlspawner is generated and moved in the world, add the following code (TheSpawn being the just generated xmlspawner gem):
Code:
		 // Add the spawner to ItemsGroup "xmlspawners"
		 xmlGroup.AddItem( TheSpawn, true );
That's all. You can do the same with all other scripts you wish, by just changing group name and description.
uburz is offline  
Old 06-25-2005, 09:04 PM   #12 (permalink)
 
Join Date: Mar 2003
Posts: 304
Default

Quote:
Originally Posted by Sotho Tal Ker
And what happens if i add this autogroup add thing to the script. Will the server complain about wrong serials and stuff and will it try to delete those items? Or will those items just remain what they are now, means the are not in groups, but nothing else happens to them.
Groups are virtual, by so meaning that they don't alter anyway the items' structure. You can add and remove this script whenever you want, and the items will stay there, just not belonging to a group anymore. Also, you can delete, edit, export the GroupsHandler bin file to another RunUO Saves directory or create a new one with random bits without any consequence for the items (of course the groups table will change accordingly to your edits).

Quote:
Originally Posted by Sotho Tal Ker
Edit 2: just found out how to add all items of one kind to a group. But new items created of the same type won't be added to the group automatically, right? i would have to add it to the scripts to make it like this, i suppose.
You have to edit the script that creates those items, by adding lines for groups handling (see the bottom of my first message, or the other message of mine in reply to Saint666 for xmlspawners).
uburz is offline  
Old 06-26-2005, 01:23 AM   #13 (permalink)
Forum Expert
 
Join Date: Mar 2005
Location: Berlin, Germany
Age: 27
Posts: 1,136
Send a message via ICQ to Sotho Tal Ker Send a message via MSN to Sotho Tal Ker
Default

Will it slow down the server much, if i add all items into their categories automagically by adding your changes to the custructable section?
Sotho Tal Ker is offline  
Old 06-26-2005, 01:07 PM   #14 (permalink)
 
Join Date: Mar 2003
Posts: 304
Default

Quote:
Originally Posted by Sotho Tal Ker
Will it slow down the server much, if i add all items into their categories automagically by adding your changes to the custructable section?
It all depends on how many items you wish to group that way. Items are categorized into hashtables, so adding them to a group is usually fast (unless you create a too large amount of different groups), but memory consumption may become a problem if you categorize too many items (ie: over some millions). Also, opening the HG gump handling millions of items may require a few seconds (lagging the server for that amount of time). In addition, such extremely large amount of items into the tables may slow down your saves a little.
uburz is offline  
Old 06-26-2005, 02:47 PM   #15 (permalink)
Forum Expert
 
Join Date: Mar 2005
Location: Berlin, Germany
Age: 27
Posts: 1,136
Send a message via ICQ to Sotho Tal Ker Send a message via MSN to Sotho Tal Ker
Default

I guess with 180000 items it should not make a big difference then

Would such a script also be possible for mobiles?
Sotho Tal Ker is offline  
Old 06-26-2005, 03:34 PM   #16 (permalink)
 
Join Date: Mar 2003
Posts: 304
Default

180000 items are still few, but your shard may grow up in the future. Anyway, as I previously stated, I don't suggest categorizing all item types, because many of them are just temporary and don't need a categorization (effectitems are just an example). If you want to implement that, try including only the most important items, and use commands like global tg where ... to search for all the others.

About mobiles, it would be possible to create a script for them with some changes. You need to create new commands, new groups and tables for mobiles only, a new gump (partially copied from the existing one) with new options and buttons appropriate for mobiles. There are many things you need to change to make a mobile grouping system to work, but the main concept is still suitable. Or, alternatively, you can merge the two systems while using the same gump and create a hybrid one for items and mobiles.
uburz is offline  
Old 06-26-2005, 04:44 PM   #17 (permalink)
 
hudel's Avatar
 
Join Date: Oct 2003
Location: Germany
Age: 38
Posts: 508
Send a message via ICQ to hudel
Default

It seems to be a very usefull tool for all admins. Thanks for sharing it with us. I give it a try.
hudel is offline  
Old 10-14-2005, 04:36 PM   #18 (permalink)
Forum Expert
 
Join Date: Jan 2003
Posts: 564
Default

Quote:
Originally Posted by uburz
This kind of error may happen only by your fault. You probably forgot this:
Then, make sure you correctly added those items into a secure group (serials must be green and group should be orange colored).

Edit: please note that admins will still be able to manually delete or move secured items, but wipe command is blocked for all accesslevels.
sorry but i didn't follow your code...
Code:
foreach ( object obj in eable )
{
	if ( items && (obj is Item) && !((obj is BaseMulti) || (obj is HouseSign)) && !GroupsHandler.InSecureGroup( obj as Item ) )
		toDelete.Add( obj );
you say that with this you prevent admin from doing a wipe...
but as far as i understood, this should prevent admins to wipe and object that is a HouseSign and it's not in a secure group...
__________________
UO Central: O Mistério do Oculto
(Free Shard Brasileiro)

brodock is offline  
Old 10-14-2005, 10:53 PM   #19 (permalink)
 
Join Date: Oct 2002
Age: 23
Posts: 4,689
Default

That code says

If its an item, and its not a multi and not a house sign and its not in a secure group, then add it to the list of items which will be removed.

To me this sounds pretty good


Also I don't know how I missed this script... I think at the time, I was away from the internet (remodeling)... but this script is an EXTREMELY good idea. I will give out a rare peice of +karma for this. And its only because I may actually use it. If I do use it, you can bet that I will be picking it for optimizations, and if I find any I will get back to you
XxSP1DERxX is offline  
Old 10-15-2005, 12:12 AM   #20 (permalink)
Forum Expert
 
Join Date: Jan 2003
Posts: 564
Default

Quote:
Originally Posted by XxSP1DERxX
That code says

If its an item, and its not a multi and not a house sign and its not in a secure group, then add it to the list of items which will be removed.

To me this sounds pretty good


Also I don't know how I missed this script... I think at the time, I was away from the internet (remodeling)... but this script is an EXTREMELY good idea. I will give out a rare peice of +karma for this. And its only because I may actually use it. If I do use it, you can bet that I will be picking it for optimizations, and if I find any I will get back to you
if ( items && (obj is Item) && !((obj is BaseMulti) || (obj is HouseSign)) && !GroupsHandler.InSecureGroup( obj as Item ) )
toDelete.Add( obj );

it's not that...

the conditions are:
If it's and item and it's not a multi OR if it's a HouseSign and it's not in seguregroup..

but you shoul be able to remove any item that satisfy the first condition... cause it doesn't check if it's in a secure group.
__________________
UO Central: O Mistério do Oculto
(Free Shard Brasileiro)

brodock is offline  
Old 10-15-2005, 03:18 AM   #21 (permalink)
 
Join Date: Oct 2002
Age: 23
Posts: 4,689
Default

no you are reading the parenthesis wrong... you should go back and take a look at it again

First off I dunno what the variable 'items' is, so I will ignore that.

If obj is an item AND its not the case that Obj is a multi or Obj is a house sign AND its not the case that obj is a part of the secure group
Then this is true.

The problem you were having was here

!( (obj is BaseMulti) || (obj is HouseSign) )

Notice that the not is outside of the parenthesis? This alone says
If not ( condition1 or condition2 )

I think it would be easier to see, if the whole statement was written like this

if ( items && (obj is Item) && !(obj is BaseMulti) && !(obj is HouseSign) && !GroupsHandler.InSecureGroup( obj as Item ) )
toDelete.Add( obj );
XxSP1DERxX is offline  
Old 10-15-2005, 03:24 AM   #22 (