RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Help with backpack remove pad please!!

Help with backpack remove pad please!!

Hi everyone!
Im pretty much a newb scripter and i haven't been doing too bad with some stuff up to now but i am stuck on this!
I would like this so that wen the person walks on to the pad and triggers the trap it removes their backpack! Please can you help me!

Thanks
Shango

Script Below:
--------------------------------------------------------------------------------------

using System;

namespace Server.Items
{
public class BackpackRemovePad : BaseTrap
{

[Constructable]
public BackpackRemovePad() : base( 0x49C )
{
Hue = 0x44a;
Name = "Backpack Remove Pad";
}

public override bool PassivelyTriggered{ get{ return false; } }
public override TimeSpan PassiveTriggerDelay{ get{ return TimeSpan.FromSeconds( 2.0 ); } }
public override int PassiveTriggerRange{ get{ return 0; } }
public override TimeSpan ResetDelay{ get{ return TimeSpan.FromSeconds( 0.5 ); } }

public override void OnTrigger( Mobile from )
{
from.Layer (Remove(21));
}

public BackpackRemovePad( Serial serial ) : base( serial )
{
}

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );

writer.Write( (int) 0 ); // version
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );

int version = reader.ReadInt();
}
}
}
 

mebane2

Wanderer
Do you mean the drop it on the ground or delete it and everything in it? If you delete it, you would prob want to add a new empty one. Or better yet, loop though the current pack and just delete everything in it recursivly.
 
Delete the backpack

I just want it so that when the person walks on to the pad it just deletes their backpack and it is replaced with a new empty one but i am unsure how to do that! please can you help!
 

ultek

Wanderer
hm... not so good idea. when you delete this pack - player will also lose his runebooks, spellbook, etc.
 

psz

Administrator
Better to delete the contents, not the pack... RunUO expects a backpack to be there. Having it removed (Even for a second) may cause problems.
 
It is the idea

I want to use it for after events and things so that if people have been playing CTF or whatever then they walk on to the pad and it will remove their backpack and then add an empty one! but i still cant figure out how to do it so can you please help me!
 

Kamron

Knight
Better to delete the contents, not the pack... RunUO expects a backpack to be there. Having it removed (Even for a second) may cause problems.

But ryan and zippy have told me on many occasions that in RunUO (at least distro, not considering custom scripts), when using a backpack, they always first checked for one, then added one if it didnt existed.

So theoretically from distro, that isnt true.. but with custom scripts, you may be right.
 
hmm...

Well i would like it so that it removes ur pack or removes all the items in the pack! I don't want it to go to their bank because thats getting rid of the point of the pad! The pad is there so that all of their items in their pack, or the pack itself is deleted completely! if Runuo doesnt like packs not being there...
How could i make it so that all of your equipped items goes into your pack and then all of your pack items are transferred into a bag and then removed because that would get rid of the problem of deleting your pack! Pleas help me :D
 

tdlguys

Wanderer
i'd like to know this too

i've tried doing this as well, and can't seem to figure it out, any help from someone who does know would be awesome
 

roadmaster

Sorceror
So do i understand right, that what you want to do is, if someone walks over the pad you want all of the contents of thier backpack to be deleted including all of thier equiped items?

so when someone walks over this pad they will walk away from the pad barebutt naked with nothing in thier backpack! right?


roadmaster
 

Cmonkey123

Wanderer
roadmaster said:
So do i understand right, that what you want to do is, if someone walks over the pad you want all of the contents of thier backpack to be deleted including all of thier equiped items?

so when someone walks over this pad they will walk away from the pad barebutt naked with nothing in thier backpack! right?


roadmaster

I think he's said yes to this enough times.
 

roadmaster

Sorceror
I was asking for Clarification pertaining to this quote from the original poster:

How could i make it so that all of your equipped items goes into your pack and then all of your pack items are transferred into a bag and then removed because that would get rid of the problem of deleting your pack! Pleas help me


I was attempting to simply Clarify whether he wanted to Delete all items or just remove the items, if he wanted to remove the items what is his intent to do with the items, are they to be held for a later event? or are they to be Deleted? All of this is pertinent to helping him! if we dont know what his intent is then how can we help him correctly? I would rather ask an extra question at the beginning so that i fully understand what he wants, then to help and find out later that he was trying to do something else.

do the players start the quest or event with nothing on them?

Im just asking for Clarification... ;)


roadmaster :)
 
Exactly

roadmaster said:
So do i understand right, that what you want to do is, if someone walks over the pad you want all of the contents of thier backpack to be deleted including all of thier equiped items?

so when someone walks over this pad they will walk away from the pad barebutt naked with nothing in thier backpack! right?


roadmaster

That is exactly what i would like but i cant do it lol
Thankyou for your interest and i hope you can help me!
 

roadmaster

Sorceror
I liked your idea so I went ahead and created the script for you.

You can find the script here in script submissions, you may modify if you like:

http://www.runuo.com/submissions/index.php?cat=2


roadmaster

there is one drawback to the way ive scripted it, and that is that you also lose your body hair, that of course can be changed. if you cant figure out how then let me know and ill send you a modified version.
 
Thanks

That is awesome just what i wanted :) ! Thankyou very much roadmaster that is great i really appreciate it! Also like to say thx to all people who have posted and shown an interest!
Keep up the great work guys!
 
Top