Hello im using the clone character on log out, it doesnt let me add the CharacterClone snipet into notoriety.cs here are the errros
I added to the top of notoriety.cs this;

C#:
using Felladrin.Automations;

this is what i added to notoriety.cs inside public static int MobileNotoriety( Mobile source, Mobile target ) method

C#:
 if (source is PlayerMobile && target is CharacterClone)

this is the top of the Characterclone script:

C#:
using Server.Network;

namespace Felladrin.Automations
{

and this is the ''constructable'' (?)


C#:
 public class CharacterClone : BaseCreature
        {
            [CommandProperty(AccessLevel.GameMaster)]
            public Mobile Original { get; set; }


            public CharacterClone(Mobile original) : base(Config.CanWander ? AIType.AI_Vendor : AIType.AI_Use_Default, FightMode.None, 10, 1, 0.2, 0.2)
            {
                Original = original;

Errors:

Errors:
+ Misc/Notoriety.cs:
CS0246: Line 570: The type or namespace name 'CharacterClone' could not be f
ound (are you missing a using directive or an assembly reference?)

Post automatically merged:

Post automatically merged:

I noticed the xmlspawner quests are not registering the kill whenever i setup a KILLNAMED quest, so those character clones are not truly basecreature types?
 

Attachments

  • CloneCharacterOnLogout.cs
    7.6 KB · Views: 5
Last edited:
You may get it to work by referring to it like this:
Code:
if (source is PlayerMobile && target is Felladrin.Automations.CharacterClone)

I'm not 100% certain but it would be my first go-to!
 
You may get it to work by referring to it like this:
Code:
if (source is PlayerMobile && target is Felladrin.Automations.CharacterClone)

I'm not 100% certain but it would be my first go-to!

Thanks, it didnt work, got same errors
 
Hello im using the clone character on log out, it doesnt let me add the CharacterClone snipet into notoriety.cs here are the errros
I added to the top of notoriety.cs this;

C#:
using Felladrin.Automations;

this is what i added to notoriety.cs inside public static int MobileNotoriety( Mobile source, Mobile target ) method

C#:
 if (source is PlayerMobile && target is CharacterClone)

this is the top of the Characterclone script:

C#:
using Server.Network;

namespace Felladrin.Automations
{

and this is the ''constructable'' (?)


C#:
 public class CharacterClone : BaseCreature
        {
            [CommandProperty(AccessLevel.GameMaster)]
            public Mobile Original { get; set; }


            public CharacterClone(Mobile original) : base(Config.CanWander ? AIType.AI_Vendor : AIType.AI_Use_Default, FightMode.None, 10, 1, 0.2, 0.2)
            {
                Original = original;

Errors:

Errors:
+ Misc/Notoriety.cs:
CS0246: Line 570: The type or namespace name 'CharacterClone' could not be f
ound (are you missing a using directive or an assembly reference?)

Post automatically merged:

Post automatically merged:

I noticed the xmlspawner quests are not registering the kill whenever i setup a KILLNAMED quest, so those character clones are not truly basecreature types?

It doesn't find the CharacterClone type because it's a nested type and you are trying to access it like a non nested type, if you want to access it purely by
C#:
using Felladrin.Automations;
you would have to move your CharacterClone class outside of the CloneCharacterOnLogout class


3 ways how you could access your (nested) CharacterClone type:
C#:
//Accessing via namespace + class name + nested class name
Felladrin.Automations.CloneCharacterOnLogout.CharacterClone clone;

//Accessing via setting an alias for CharacterClone (you can name the alias however you want)
//using CharacterCloneAlias = Felladrin.Automations.CloneCharacterOnLogout.CharacterClone;
CharacterCloneAlias clone2;

//Accessing via class name + nested class name
//using Felladrin.Automations;
CloneCharacterOnLogout.CharacterClone clone3;

See this for more info about nested types: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/nested-types
 
It doesn't find the CharacterClone type because it's a nested type and you are trying to access it like a non nested type, if you want to access it purely by
C#:
using Felladrin.Automations;
you would have to move your CharacterClone class outside of the CloneCharacterOnLogout class


3 ways how you could access your (nested) CharacterClone type:
C#:
//Accessing via namespace + class name + nested class name
Felladrin.Automations.CloneCharacterOnLogout.CharacterClone clone;

//Accessing via setting an alias for CharacterClone (you can name the alias however you want)
//using CharacterCloneAlias = Felladrin.Automations.CloneCharacterOnLogout.CharacterClone;
CharacterCloneAlias clone2;

//Accessing via class name + nested class name
//using Felladrin.Automations;
CloneCharacterOnLogout.CharacterClone clone3;

See this for more info about nested types: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/nested-types
Hello thanks for your help, however im not sure if i can accomplish that

I added
C#:
using CharacterCloneAlias = Felladrin.Automations.CloneCharacterOnLogout.CharacterClone;
to the top

Then added this to mobilenotoriety:

C#:
CharacterCloneAlias clone2;
             if (source is PlayerMobile && target is clone2)
            {
                PlayerMobile src = source as PlayerMobile;
                 BaseCreature trg = target as BaseCreature;
                if (src is PlayerMobile && trg is BaseCreature && trg is clone2 && ((clone2)Original).Kills <= 4)
                    return Notoriety.Innocent;
               if (src is PlayerMobile && trg is BaseCreature && trg is clone2 && ((clone2)Original).Kills >= 5)
                    return Notoriety.Murderer;                   
            }


+ Misc/Notoriety.cs:
CS0246: Line 575: The type or namespace name 'clone2' could not be found (ar
e you missing a using directive or an assembly reference?)
CS0246: Line 579: The type or namespace name 'clone2' could not be found (ar
e you missing a using directive or an assembly reference?)
CS0246: Line 579: The type or namespace name 'clone2' could not be found (ar
e you missing a using directive or an assembly reference?)
CS0103: Line 579: The name 'Original' does not exist in the current context
CS0246: Line 581: The type or namespace name 'clone2' could not be found (ar
e you missing a using directive or an assembly reference?)
CS0246: Line 581: The type or namespace name 'clone2' could not be found (ar
e you missing a using directive or an assembly reference?)
CS0103: Line 581: The name 'Original' does not exist in the current context
 
Back