Full Version : Quest problems
xmlspawner >>Scripting Support >>Quest problems
<< Prev | Next >>
BiO_ZeRg- 05-26-2006
Ok i have problem with this script

QUOTE
-Error: Scripts\Engines\Quests\Haochi´s Trials\Items\SamuraiTeleporter.cs: CS0246: <Line 7, column 35> The type or namespace name ´Teleporter´could not be found <are you missing a using directive or an assemblye refrernce?>

CODE
using System; using Server; using Server.Mobiles; namespace Server.Engines.Quests {
public class SamuraiTeleporter : Teleporter
{
public override int LabelNumber { get { return 1049382; } } // a magical teleporter
[Constructable]
public SamuraiTeleporter()
{
Hue = 0xFA;
}
public override bool GetDestination( PlayerMobile player, ref Point3D loc, ref Map map )
{
loc = new Point3D( 384, 733, 0 );
map = Map.Malas;
return true;
}
public SamuraiTeleporter( 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();
}
}
}

ArteGordon- 05-26-2006
The Teleporter class is defined in the Server.Items namespace, so add
using Server.Items;
to the beginning of the script.
BiO_ZeRg- 05-26-2006
aaa more problems with this quest can you keep helping me?
ArteGordon- 05-26-2006
I can try
BiO_ZeRg- 05-26-2006
OK this are the problems (i modify this are the problems
ArteGordon- 05-26-2006
those errors all indicate that the scripts that you are using are referring to modifed methods in a variety of classes. If you are trying to just drop in scripts that were designed for RunUO RE into a standard RunUO distribution, this is generally what will happen.
RunUO RE has many modifications to the standard classes and so scripts designed for it just wont work without those modifications.
BiO_ZeRg- 05-26-2006
Now the codes from the first problem script

QUOTE
those errors all indicate that the scripts that you are using are referring to modifed methods in a variety of classes. If you are trying to just drop in scripts that were designed for RunUO RE into a standard RunUO distribution, this is generally what will happen.
RunUO RE has many modifications to the standard classes and so scripts designed for it just wont work without those modifications.

BUT you can do that works right¿?

CODE
using System; using Server; using Server.Items; using Server.Mobiles; using Server.Engines.Quests;
namespace Server.Engines.Quests.SE
{
public class BlueTeleporter : Teleporter
{
[Constructable]
public BlueTeleporter()
{
Hue = 0x2;
}
public override bool GetDestination( PlayerMobile player, ref Point3D loc, ref Map map )
{
QuestSystem qs = player.Quest;
if ( qs is EminosUndertakingQuest )
{
QuestObjective obj = qs.FindObjective( typeof( TakeBlueTeleporterObjective ) );
if ( obj != null )
{
if ( X == 423 && Y == 805 && Z == -1 )
{
loc = new Point3D( 411, 1116, 0 );
}
if ( X == 411 && Y == 1117 && Z == 0 )
{
loc = new Point3D( 424, 807, 0 );
}
map = Map.Malas;
return true;
}
}
return false;
}
public BlueTeleporter( 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();
}
}
}

ArteGordon- 05-26-2006
the error indicates that the Teleporter class that BlueTeleporter is derived from does not contain a method that matches this override
public override bool GetDestination( PlayerMobile player, ref Point3D loc, ref Map map )
That means that the Teleporter class that this script is based on is different from the Teleporter class that is included in the standard RunUO distribution.
BiO_ZeRg- 05-26-2006
¿Can you help to works this script?
ArteGordon- 05-26-2006
the problem is not with this script, it is that this script relies on many other modified scripts. You basically need to have RunUO RE installed to have all of the needed modifications. You can try, but I am guessing that it isnt going to work.
BiO_ZeRg- 05-26-2006
but i dont want to use runuo re just i want that quest and skilss too there is anyway to make works with runuo with the runuo scripts am a little confuse :S
ArteGordon- 05-26-2006

QUOTE (BiO_ZeRg @ May 26, 2006 04:16 pm)
but i dont want to use runuo re just i want that quest and skilss too there is anyway to make works with runuo with the runuo scripts am a little confuse :S

as I mentioned before, scripts designed to work with RunUO RE are assuming that the modifications that are part of RunUO RE are available. Many of those modifications are to standard distribution scripts and to the server core itself.
If those modifications are not present, the scripts wont work. So your only option is to add the modifications that the scripts require. I dont know how extensive those would be.
BiO_ZeRg- 05-26-2006
if i send you the files you can help me? just check it and tell me if is too hard
BiO_ZeRg- 05-26-2006
this are the files just check it plz
ArteGordon- 05-26-2006

QUOTE (BiO_ZeRg @ May 26, 2006 04:21 pm)
if i send you the files you can help me? just check it and tell me if is too hard

I'm afraid I cant really look through all of those scripts. If you are really determined to try to make it work, you are just going to have to go through them one by one and try to deal with the errors as they come.