1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Removing everything from a player as they enter a teleport

Discussion in 'General Discussion' started by Lagatha, Dec 23, 2017.

  1. Lagatha
    Offline

    Lagatha New Member

    Joined:
    Aug 28, 2016
    Messages:
    27
    Likes Received:
    4
    I'm wondering if there is away to strip a player of everything on them and put it in there bank using a teleport? Was thinking of making an event and giving the players what they need on entering and making sure nothing is on them when they start. Thank you for reading and any suggestions would be awesome.
     
    • Two Thumbs Up Two Thumbs Up x 1
  2. gametec
    Offline

    gametec Active Member

    Joined:
    Feb 5, 2014
    Messages:
    271
    Likes Received:
    38
    Maybe by removing items by layer rather than item name?!

    I will figure this out if you don’t and will share my results with you. I wanted to do this for a crime and punishment script. Where if a player was suspended their bodies would be put onto a crucifix and their belongings into a box beneath them where they could retrieve their items when the suspension was done. I have the graphics for this but not the code as of yet; just an idea and a bunch of references to pull from when I decide to get it done. Lol
     
  3. Lagatha
    Offline

    Lagatha New Member

    Joined:
    Aug 28, 2016
    Messages:
    27
    Likes Received:
    4
    I'm looking at the jail scripts now for this. Was thinking when they get sent to jail everything goes in bank so that is where I'm heading now. But thank you for responding to me. I will post also if I find anything

    lol I'm going to try something like this:
    // Move all items to a bag and move that to the bank
    Container backpack = player.Backpack;
    Backpack bag = new Backpack(); bag.Hue = JailConfig.RobeHue;
    ArrayList equipedItems = new ArrayList( player.Items );

    foreach ( Item item in equipedItems )
    {
    if ( item.Layer == Layer.Bank || item.Layer == Layer.Backpack || item.Layer == Layer.Hair || item.Layer == Layer.FacialHair || item is DeathShroud )
    continue;
    bag.DropItem( item );
    }
     
    #3 Lagatha, Dec 31, 2017
    Last edited: Dec 31, 2017
    • Like Like x 1
Similar Threads: Removing everything
Forum Title Date
Script Support Removing resist on weapon crafting causing crash when crafts. Nov 21, 2017
Script Support Removing Visible Weight from One Item Jun 4, 2017
General Discussion Removing Trees Nov 24, 2016
Script Support Pre AOS - Removing the need for SHOW REAL Jul 19, 2016
Script Support Removing Region Based Loot May 27, 2016
ServUO Discussion Removing Purple Ability Book Icon Apr 10, 2016
General Discussion Removing house customization validity check? Nov 8, 2014