Good morning!
As it will look obvious, I am new to XML Spawner

So, my item once double clicked opens a gump with a list of options.
I want each option to place a temporary attachment on the user of the item.
Example:
QUOTE |
public override void OnResponse(NetState state, RelayInfo info) {
Mobile from = state.Mobile; from.CloseGump(typeof(ItemGump));
switch( info.ButtonID ) { case 1: { from.SendMessage( "Option 1" ); break; } case 2: { from.SendMessage( "Option 2" ); break; } }
|
I want for example the Option 1 to be the same as if I write in game "[addatt xmlmessage Welcome!" and place it on the guy clicking the item. (Also with a timer of 2 minutes)
And the Option 2 could be for example "[addatt xmlstr 30 2", where the 30 would be blessing the guy that clicked the item with 30 strenght for 2 minutes duration.
The reason I want to use XML is so I don't have to serialize every option I will add on those gumps and create timers for each as well.
So XML will be very usefull on this one for me

Teorically I would want this:
QUOTE |
public override void OnResponse(NetState state, RelayInfo info) {
Mobile from = state.Mobile; from.CloseGump(typeof(ItemGump));
switch( info.ButtonID ) { case 1: { from.SendMessage( "Option 1" ); //from.AttachTheWelcomeMessageXMLFor2Minutes break; } case 2: { from.SendMessage( "Option 2" ); //from.AttachStrenghtXMLOf30For2Minutes break; } }
|
Think someone could give me a hand with this?
Thanks in advanced,
Pedro