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

blackgriffin

Wanderer
Price change?

We want the yards to be money sinks, so we want to change the price of each piece from 100, to say 1000. I've searched the code, and can't find where it would be changed. Help?
 

A_Li_N

Knight
Unfortunately, there is no one spot to change prices. Each item has a price on it that is located in the individual pages. (Located in the Pages folder) The prices are down in the OnResponse method...you'll see something like this :
Code:
case (int)Buttons.LavaEast1:	{from.SendGump(new Lava1(m_Wand,from,4846,100));break;}
The price is the 100 there.
 

A_Li_N

Knight
Figured out how? Yes, I think I have...
Implemented the code? No, I havn't... :)

I'm working on something bigger and better, but it'll be a while before it's done. However, in the mean time, I have decided to stop 'improving' this system so I can concentrate on the other thing. I'll give you some ideas on where to look/start though, and I'll provide support in the support forum (or here) of any errors you encounter.

Placing items uses the YardTarget. The ValidatePlacement method is where you want to edit things most likely. You could throw in another check to see if the target is inside another person's house, and fail if it is. As for the stopping placement in other people's 'yards', that will require a bit more power. You would have to search around your target within X spaces (X is the distance the Yards reach, so 10 by default). If you find a house within X spaces of your target, and the house is someone elses, the target could be concidered to be 'inside their yard'.
I didn't do this because I wanted people to be able to join their houses like in a guild and whatnot. But Inside other people's houses should be a relatively easy fix. If you need examples of code for that, might look at BaseAddon.cs and see how they target inside houses, and check if you are the owner.
 

keelin

Wanderer
animations

is there a way to take the animations off of the wand? My players are filling up my shard with houses full of animations and its causing alot of lag in those areas... i really love this script and would hate to have to take it out... could you just point me in the right direction to take them out myself. I've looked and looked at the code and i'm not that good to figure it out. I know it will take some time to do but this would be a great help to me. Thank you for such a wonderful script btw :p
 

A_Li_N

Knight
keelin said:
is there a way to take the animations off of the wand? My players are filling up my shard with houses full of animations and its causing alot of lag in those areas... i really love this script and would hate to have to take it out... could you just point me in the right direction to take them out myself. I've looked and looked at the code and i'm not that good to figure it out. I know it will take some time to do but this would be a great help to me. Thank you for such a wonderful script btw :p
I don't believe animations would cause lag. The animations are simply a certain ItemID that the client reads as a series. There is no more data sent across the lines than a non-animated ID. The lag is probably produced by the excessive amount of items in one spot, their slow computers, or slow connections trying to send so many items. (Unless, of course, I'm wrong about this :))

If you wanted to 'take the animations out', you would have to change each of the ItemID's that were animated to ones that aren't part of sequences.
 

Greystar

Wanderer
keelin said:
is there a way to take the animations off of the wand? My players are filling up my shard with houses full of animations and its causing alot of lag in those areas... i really love this script and would hate to have to take it out... could you just point me in the right direction to take them out myself. I've looked and looked at the code and i'm not that good to figure it out. I know it will take some time to do but this would be a great help to me. Thank you for such a wonderful script btw :p


Its the items... since each item they create with the wand is an actuall item not static...
 

A_Li_N

Knight
Greystar said:
Its the items... since each item they create with the wand is an actuall item not static...
*Clarifies*
It wouldn't matter if it were item or static. Static is base Item as well. Only thing that matters is the ItemID. Some ItemID's are part of a sequence, and the client reads that itemID and does the sequence.
 

keelin

Wanderer
Yes I understand that part that i would have to change each item one by one. And i'm fully prepared to do that. I just found the code to change so thanks. I am now endevoring to remove them. :D
 

A_Li_N

Knight
keelin said:
Yes I understand that part that i would have to change each item one by one. And i'm fully prepared to do that. I just found the code to change so thanks. I am now endevoring to remove them. :D
ItemID's are selected in the files in Pages folder, in the OnResponse method.

Each response is like this :
Code:
case (int)Buttons.LavafallEast1:			{from.SendGump(new Lava2(m_Wand,from,6681,100));break;}
In this example, 6681 is the ItemID.
 

Greystar

Wanderer
A_Li_N said:
*Clarifies*
It wouldn't matter if it were item or static. Static is base Item as well. Only thing that matters is the ItemID. Some ItemID's are part of a sequence, and the client reads that itemID and does the sequence.


Sorry I should have clarified as well I ment Frozen.
 

Greystar

Wanderer
Hlal said:
Anyone fix this where if a player removes house the yard deletes as well?


No cause A_Li_N is not supporting the script anymore and is working on a new system. all a player would have to do is refund the items from the yard
 

Hlal

Wanderer
Greystar said:
No cause A_Li_N is not supporting the script anymore and is working on a new system. all a player would have to do is refund the items from the yard


Yes I realized that but what if a player moves and doesn't refund the stuff, I could see alot of things left around a shard after awhile adding to the item counts which we all know can cause problems.
 

Mekaylah

Wanderer
I realize this script really isn't being supported anymore. I just have one simple question. I have been using the token yard wand and I want to replace it with the gold yard wand. Will the yard decoration the players have placed with the token system stay? Or will they have to do it all over again? I know it seems to stay when a house is dropped but wasn't sure if I completely remove the token system and replace with the gold.
 

Greystar

Wanderer
Mekaylah said:
I realize this script really isn't being supported anymore. I just have one simple question. I have been using the token yard wand and I want to replace it with the gold yard wand. Will the yard decoration the players have placed with the token system stay? Or will they have to do it all over again? I know it seems to stay when a house is dropped but wasn't sure if I completely remove the token system and replace with the gold.


I would think if you remove the WHOLE system it will take the items too, but I think you only have to replace a couple files or look for all references in those files that Referr to tokens and replace it with gold so you wont have to remove the system.
 

A_Li_N

Knight
At a quick glance, it LOOKS like it could be replaced with the other system. Best way to find out is to make a backup save, shut server down, replace the scripts and boot the server up. I believe the only changes are in the methods, no variables changed, so it should work. I could be wrong though, but that's why you have the backup :D
 

Mekaylah

Wanderer
I just went in and replaced it all since it seemed so much easier. All of their yard decorations stayed and they kept their yard wand. The yard wand automatically changed from using tokens to using gold so I didn't have to give those out again either. :)

Thanks again for this script A_Li_N. I think this is my player's favorite and mine too. My players surprise me time and time again of how creative they are with this tool.
 
Top