ExX
Member
I am fairly new to c# and have been working on a quest for new players. I have everything working well except for the following part. I want the player to only be able to turn in the quest item one time so that they dont keep getting the reward on the same character. I can't find any examples of this working to guide me so I turn to you for assistance. Any help is appreciated. This is what I have so far.
However I am getting this error.
I assume I am not using the mobile.gettag and mobile.settag properly. Any advice? Sorry I am new and trying hard.
Code:
public override bool OnDragDrop( Mobile from, Item dropped )
{
Mobile m = from;
PlayerMobile mobile = m as PlayerMobile;
if ( mobile != null)
{
if( dropped is ZeldaNote )
{
if (mobile.GetTag("ZeldaComplete") == "True")
{
SayTo( from, "You have already shown my this note and been rewarded,.." );
}
else
{
dropped.Delete();
mobile.AddToBackpack( new AdjustableSkillBall (25) );
mobile.AddToBackpack( new Daat99Tokens( 100 ) );
mobile.SendGump( new LinkQuestCompleteGump(m) );
mobile.SetTag("ZeldaComplete", "True");
return true;
}
}
else
{
SayTo( from, "How is this proof of the Princess's freedom? This is no time for games." );
}
}
return false;
}
However I am getting this error.
Code:
Errors:
+ Customs/Mobiles/Zelda Quest/Zelda Quest Mobiles/Link.cs:
CS1061: Line 194: 'Server.Mobiles.PlayerMobile' does not contain a definitio
n for 'GetTag' and no extension method 'GetTag' accepting a first argument of ty
pe 'Server.Mobiles.PlayerMobile' could be found (are you missing a using directi
ve or an assembly reference?)
CS1061: Line 204: 'Server.Mobiles.PlayerMobile' does not contain a definitio
n for 'SetTag' and no extension method 'SetTag' accepting a first argument of ty
pe 'Server.Mobiles.PlayerMobile' could be found (are you missing a using directi
ve or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
I assume I am not using the mobile.gettag and mobile.settag properly. Any advice? Sorry I am new and trying hard.