I am have a Server running RunUO V2.1 and I am trying to make a NPC who will trade SOS scrolls for Fishing Nets but I have run into a problem in the Gump being used for the trade.
After hours of trying variations on this . . my scripting ability is simply not up to the task.
Can anyone see a way to solve this?
Here are the errors on my latest attempt:
and . . Here is the offending section of the Gump script that generated the above errors:
Help is greatly appreciated - Many Thanks
After hours of trying variations on this . . my scripting ability is simply not up to the task.
Can anyone see a way to solve this?
Here are the errors on my latest attempt:
Code:
Errors:
+ Customs/Fish Net Trader/FishNetTraderGump01.cs:
CS0118: Line 77: 'Server.Items.SOS' is a 'type' but is used like a 'variable'
CS0246: Line 80: The type or namespace name 'fs' could not be found (are you missing a using directive or an assembly reference?)
CS0118: Line 94: 'Server.Items.SOS' is a 'type' but is used like a 'variable'
CS0246: Line 97: The type or namespace name 'fs' could not be found (are you missing a using directive or an assembly reference?)
and . . Here is the offending section of the Gump script that generated the above errors:
Code:
public override void OnResponse( NetState state, RelayInfo info )
{
Mobile from = state.Mobile;
if (info.ButtonID == 0)
{
//Special Nets:
if (from.Backpack.ConsumeTotal (typeof (SpecialFishingNet), 9))
{
SOS fs = SOS as Item; //LINE # 77
fs.Level = 2;
from.AddToBackpack(new fs()); //LINE # 80
from.SendMessage( "Thank you. Here is your SOS scroll." );
}
else
{
from.SendMessage( "Hmm . . Seems you do not have enough Special Nets to trade." );
}
}
if (info.ButtonID == 1)
{
//Fabled Nets:
if (from.Backpack.ConsumeTotal (typeof (FabledFishingNet), 1))
{
SOS fs = SOS as Item; //LINE # 94
fs.Level = 5;
from.AddToBackpack(new fs()); //LINE # 97
from.SendMessage( "Thank you. Here is your Ancient SOS scroll." );
}
else
{
from.SendMessage( "Hmm . . Seems you do not have enough Fabled Nets to trade." );
}
}
if (info.ButtonID == 2)
{
from.SendMessage("Well if you change you mind you know where to find me.");
}
}
Help is greatly appreciated - Many Thanks