Hey everyone!

So I have added a time to a custom script for my Fate Of Fortunes Talisman, we have it set for the item to decay within the 1 hr timer. Once the timer is up, I believe it is what keeps causing my Talismans to crash my server. Can anyone shed some light on this, did I mess up the script or is it just not compatible with it?

Thanks,
Nyght_Hex
 

Attachments

  • Greater Fate Of Fortunes.cs
    3.8 KB · Views: 11
  • Lesser Fate Of Fortunes.cs
    3.8 KB · Views: 6
  • Minor Fate Of Fortunes.cs
    3.8 KB · Views: 3
  • Error it throws when server crashes.PNG
    Error it throws when server crashes.PNG
    13.6 KB · Views: 6
On the Expire() method, who is m? Meaning if its not equipped, m would be null which would cause a crash. Instead of m, I would use this:

Code:
Mobile parent = RootParentEntity as Mobile;

if(parent != null)
	parent.SendMessage( "The talisman turns to dust" );
 
Hiya, how would one set this so it lasts longer than 1 hour? I've tried changed the minutes from 60 to 120 for example, I've also changed the FromMinutes to FromSeconds and tried 7200 and 10800 but it keeps showing the time remaining as 1 hour (59 minutes) and it decays in 1 hour aswell, I can't really find where or how to change this.. any tips? Thanks!
 
If you have xmlspawner already installed in your repo,you can just add:
C#:
XmlAttach.AttachTo(this, new TemporaryQuestObject("Kryss", 60)); //60 = minutes."

So your code go as this:
Add this in top of your script:
C#:
using Server.Engines.XmlSpawner2;

C#:
public LesserFateOfFortunes() : base()
        {
            Name = "Lesser Fate Of Fortunes";
            Hue = 1758;
            Attributes.Luck = 500;   // Lesser Fate Of Fortunes
            XmlAttach.AttachTo(this, new TemporaryQuestObject("Kryss", 60));
        }
 
If you have xmlspawner already installed in your repo,you can just add:
C#:
XmlAttach.AttachTo(this, new TemporaryQuestObject("Kryss", 60)); //60 = minutes."

So your code go as this:
Add this in top of your script:
C#:
using Server.Engines.XmlSpawner2;

C#:
public LesserFateOfFortunes() : base()
        {
            Name = "Lesser Fate Of Fortunes";
            Hue = 1758;
            Attributes.Luck = 500;   // Lesser Fate Of Fortunes
            XmlAttach.AttachTo(this, new TemporaryQuestObject("Kryss", 60));
        }
Nice, that works, thank you so much!
Is there a way to display this countdown aswell? I'm using this for training weapons. But I'd like to be able to see the countdown, I might have future plans :D

Also I just found out the countdown begins when it's being spawned, is it possible to have it begin the countdown on pickup?

Basically, I'd want the countdown as in these talismans but longer than 1 hour :D

Thanks!
 
Last edited:
I can give you an example of self-deleting item,in this case is a lrc robe for starting players im using,change desired time as you want and try it.
Sorry,i can mod it,here your talisman.
 

Attachments

  • Robe lrc one week.cs
    4.4 KB · Views: 9
  • Your own talisman.cs
    4.5 KB · Views: 10
Last edited:
I can give you an example of self-deleting item,in this case is a lrc robe for starting players im using,change desired time as you want and try it.
Sorry,i can mod it,here your talisman.
This is awesome, I can work with this, thank you so much :D
 
Back