RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

A_Li_N's Yard And Garden System

A_Li_N

Knight
Cyndrz said:
We have been having an issue where when a players account becomes inactive or if a piece of yard is left behind ect. and a diffrent player comes along and tries to double click the piece of yard the server crashes. Anyway to make it so if the house goes the yard goes also or to stop the crashes from happening. Thank You
Updated the rars...

This thread will stay for 1 more month and I'll probably take it down. It's old and pretty crappy coding and the concept will be part of my future systems. If anyone has questions about it, I'll still answer them of course.
 

Cyndrz

Wanderer
Thank you very much I will redownload and update. I love all your work and use most of it that I know of and the yard wand system has been alot of fun.
 

Cyndrz

Wanderer
We got a crash agian on the yard system with players that are removed from the server with left over yard parts and I was working with the fixed version on the tester server to see the diffrent sizes we could get out of it but I lost a ton of files in a comp issue I had so I no long have the fix so if someone could post it agian or send it to me please and thank you. I can be reached threw PMs here.
 
Alien

Please include this system with the Completely Custom release. I really like this system and would hate to see it go. Thanks :)
 

A_Li_N

Knight
Lucid Nagual said:
Please include this system with the Completely Custom release. I really like this system and would hate to see it go. Thanks :)
I plan on doing something with this system someday :)
 

Arcanagirl

Wanderer
oh I came across this topic while looking for places to post and totally thought I should post my lovely findings on how to fix that issue. I had help from David the forum mod or admin. He helped me fix the script out. If you want the code used I can post that or if you like Alien I can give you what I have, and you can take the parts of it you need to fix the crash when players inactive or removed acocunts. Cause I had that fixed for a shard I work for. I hate having crashed and glitches so I tend to go the distance to get things fixed. If it helps any I will post the one script I modded to prevent any crashes, all that was modded was that piece that crashed when players click a yard to a player thats account is no longer alive. Instead it makes that yard taken by who ever clicks it and they can claim it as theirs and get gold for it or use it if house was placed on yard of other accounts deleted.

This is the YardItem.cs script that was moded, for shards crashed for players accidently dclicking yards of player accounts no longer on server. This is the script change you should replace all, atleast until Alien finishs his work to get to updates. This should keep your crashing rates at bay till then.
using System;
using System.Collections;
using Server.Network;
using Server.Items;
using Server.Multis;

namespace Server.Items
{
public class YardItem : Item
{
public Mobile m_Placer;
public int m_Value = 0;

[CommandProperty( AccessLevel.GameMaster )]
public Mobile Placer
{
get{ return m_Placer; }
set{ m_Placer = value; }
}
[Constructable]
public YardItem( Mobile from, int id, Point3D loc, int price)
{
m_Value = price;
Movable = false;
MoveToWorld( loc, from.Map );
m_Placer = from;
Name = from.Name + "'s Yard";
ItemID = id;
Light = LightType.Circle150;
}

public YardItem( Serial serial ) : base( serial )
{
}

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( m_Placer );
writer.Write( m_Value );
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Placer = reader.ReadMobile();
m_Value = reader.ReadInt();
}

public override void OnDoubleClick( Mobile from )
{

if( m_Placer == null || m_Placer.Deleted )
m_Placer = from;

if( from.InRange( this.GetWorldLocation(), 10 ) )
{
if( m_Placer == null || from == m_Placer || from.AccessLevel >= AccessLevel.GameMaster )
{
Container c = m_Placer.Backpack;
Gold t = new Gold( m_Value );
if( c.TryDropItem( m_Placer, t, true ) )
{
this.Delete();
m_Placer.SendMessage( "The item disolves and gives you a refund" );
}
else
{
t.Delete();
m_Placer.SendMessage("For some reason, the refund didn't work! Please page a GM");
}
}
else
{
from.SendMessage( "Stay out of my yard!" );
}
}
else
{
from.SendMessage( "The item is too far away" );
}
}
}
}

Thanx to David for this!
 

Darkages

Wanderer
i would like to know how to fix the crash about player that leave the shard without deleting their yard, then other player click it and it crash. if someone could spare me the file or the code i would appreciate it.

thank
 

Jeff

Lord
Darkages said:
i would like to know how to fix the crash about player that leave the shard without deleting their yard, then other player click it and it crash. if someone could spare me the file or the code i would appreciate it.

thank
since the code is no longer available that information will be hard to get i think, unless A_Li_N tells you himself
 

Greystar

Wanderer
Darkages said:
i would like to know how to fix the crash about player that leave the shard without deleting their yard, then other player click it and it crash. if someone could spare me the file or the code i would appreciate it.

thank

its cause of the Owner variable becomming null and you get a null ref error... I cant get the code right now but if I remember later I'll post my fix.
 

milva

Sorceror
we stopped selling these on the shard a while back, due to if you remove the garden sign when player leaves shard and does not remove the garden you get a server crash. So I now have 4 garden signs in my bank :p
 

Greystar

Wanderer
milva said:
we stopped selling these on the shard a while back, due to if you remove the garden sign when player leaves shard and does not remove the garden you get a server crash. So I now have 4 garden signs in my bank :p

Garden signs? This has no garden signs...
 
Greystar

its cause of the Owner variable becomming null and you get a null ref error... I cant get the code right now but if I remember later I'll post my fix.
Could that be added to the Deserialization part of the item scripts?
---------------------------------------------------------------
BTW I have posted the updated version of the yard system in my Farmer's Market post. My Farmer's Market is dependent on this system. If anyone has problems with the system they can post the errors there and we can try to work them out.
 

nickomash

Wanderer
This is truly an amazing system and I would love to see it have life again. A_Li_N's inque scripts are incredibly useful as addons and veteran/bonus features to any shard. I can not do much, but would be happy to playtest any system you release.
 
Top