if (!PriceReady)
{
m.SendMessage("The setup for this house is not yet complete.");
return;
}
int price = c_Price + (sellitems ? c_ItemsPrice : 0);
if (c_Free)
price = 0;
if (m.AccessLevel == AccessLevel.Player && !Server.Mobiles.Banker.Withdraw(m, price))
{
m.SendMessage("You cannot afford this house.");
return;
}
if (m.AccessLevel == AccessLevel.Player)
m.SendLocalizedMessage(1060398, price.ToString()); // ~1_AMOUNT~ Tokens has been withdrawn from your bank box.
I solved this Problem creating a little Workaround:Thessalia;814282 said:except:
force public/ force private doesn't work
its silly if ppl living underground below a forest can set this forest on private
if ( house.Public )
{
AddButtonLabeled( 10, 310, GetButtonID( 3, 8 ), 1011260 ); // View Ban List
AddButtonLabeled( 10, 330, GetButtonID( 3, 9 ), 1060698 ); // Clear Ban List
[COLOR="Red"]AddButtonLabeled( 210, 130, GetButtonID( 3, 12 ), 1060695, isOwner ); // Change to Private
AddHtmlLocalized( 245, 150, 240, 20, 1060694, SelectedColor, false, false ); // Change to Public[/COLOR]
}
else
{
AddButtonLabeled( 10, 310, GetButtonID( 3, 10 ), 1060699 ); // View Access List
AddButtonLabeled( 10, 330, GetButtonID( 3, 11 ), 1060700 ); // Clear Access List
[COLOR="Red"]AddHtmlLocalized( 245, 130, 240, 20, 1060695, SelectedColor, false, false ); // Change to Private
AddButtonLabeled( 210, 150, GetButtonID( 3, 13 ), 1060694, isOwner ); // Change to Public[/COLOR]
}
break;
It already works under 2.0 Final, I have it running there.Ice19999;832636 said:Does this come in 2.0 Final?
Server Crash Report
===================
RunUO Version 2.0, Build 3567.2838
Operating System: Microsoft Windows NT 6.0.6001 Service Pack 1
.NET Framework: 2.0.50727.1434
Time: 17.04.2010 16:34:14
Mobiles: 18685
Items: 172724
Exception:
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei Knives.TownHouses.TownHouseSign.PackUpItems()
bei Knives.TownHouses.TownHouseSign.ClearHouse()
bei Knives.TownHouses.TownHouse.OnDelete()
bei Server.Item.Delete()
bei Server.Timer.Slice()
bei Server.Core.Main(String[] args)
Clients:
- Count: 1
Nevyn Silberhand;832698 said:It already works under 2.0 Final, I have it running there.
[COLOR="Red"]Errors:
+ Town Houses v2.01/Misc/GumpResponse.cs:
CS0266: Line 28: Cannot implicitly convert type 'System.Collections.Generic.
IEnumerable<Server.Gumps.Gump>' to 'System.Collections.Generic.List<Server.Gumps
.Gump>'. An explicit conversion exists (are you missing a cast?)[/COLOR]
public override void OnPublicMessage( Mobile from, string text )
{
if ( text.Length > 128 || (text = text.Trim()).Length == 0 )
return;
Party p = Party.Get( from );
if (p != null)
{
p.SendPublicMessage(from, text);
foreach (Data data in Data.Datas.Values)
[COLOR="Red"] if (data.GlobalW && !p.Members.Contains(data.Mobile))[/COLOR]
data.Mobile.SendMessage(data.GlobalWC, "(Global) <World->Party> {0}: {1}", from.Name, text);
}
else
from.SendLocalizedMessage(3000211); // You are not in a party.
}
public override void OnSetCanLoot( Mobile from, bool canLoot )
{
Party p = Party.Get( from );
if ( p == null )
{
from.SendLocalizedMessage( 3000211 ); // You are not in a party.
}
else
{
PartyMemberInfo mi = p[from];
if ( mi != null )
{
mi.CanLoot = canLoot;
if ( canLoot )
from.SendLocalizedMessage( 1005447 ); // You have chosen to allow your party to loot your corpse.
else
from.SendLocalizedMessage( 1005448 ); // You have chosen to prevent your party from looting your corpse.
}
}
}
Lady_askarii;840776 said:Is anyone running this on 2.0 FINAL?? I have seen a few 2.0 svn but not sure how much modifying it wold require to work on the Final version.
Thanks
Lady_askarii;840908 said:ok thanks i will download and try did you modify anything to get it to work with svn? thanks for your help
I get this error when i place script in my custom folder
RunUO - [www.runuo.com] Version 2.0, Build 3567.2838
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 64-bit processors
Scripts: Compiling C# scripts...ScriptCompiler: CS0266: Cannot implicitly conver
t type 'System.Collections.Generic.IEnumerable<Server.Gumps.Gump>' to 'System.Co
llections.Generic.List<Server.Gumps.Gump>'. An explicit conversion exists (are y
ou missing a cast?)
done (0 errors, 0 warnings)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
Server Crash Report
===================
RunUO Version 2.0, Build 3567.2838
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.1433
Time: 6/9/2010 2:21:05 PM
Mobiles: 37178
Items: 229575
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Knives.TownHouses.TownHouseSign.PackUpItems()
at Knives.TownHouses.TownHouseSign.ClearHouse()
at Knives.TownHouses.TownHouse.OnDelete()
at Server.Item.Delete()
at Server.Timer.DelayCallTimer.OnTick()
at Server.Timer.Slice()
at Server.Core.Main(String[] args)
Clients:
- Count: 0[/COUNT]
It might be related to the weekly recurring rent, not 100% sure.
Errors:
+ Town Houses v2.01/Misc/GumpResponse.cs:
CS0266: Line 28: Cannot implicitly convert type 'System.Collections.Generic.
IEnumerable<Server.Gumps.Gump>' to 'System.Collections.Generic.List<Server.Gumps
.Gump>'. An explicit conversion exists (are you missing a cast?)
Errors:
+ Town Houses v2.01/Misc/GumpResponse.cs:
CS0101: Line 10: The namespace 'Knives.TownHouses' already contains a defini
tion for 'GumpResponse'
clyde_m;844857 said:Hello, I've been using townhouses for a short while. Its a great system but I am having some problems with the rental contracts.
Some people have created rental contracts, this creates new house zones that cannot seem to be removed. How do you remove a rental area in an existing townhouse?
As mentioned above, [removing the sign will simply crash the shard.
Also on the same topic, is to possible to delete a regular townhouse zone. I see no option for this in the [townhouses menu.
Thanks in advance.
Teagan;842607 said:Script works great, I had no trouble making a few existing buildings into townhouses. Problem I ran into was I was unable to delete certain things from these townhouses. Like beds/tables/etc. How would I go about safely emptying out the properties for when someone does buy a townhouse?