UOGamers 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!

  • To obtain new Razor updates, please reinstall Razor from our new website.

[COMPLETE] Plant Bowl only need 20 Fertile Dirt

Status
Not open for further replies.

LadyCrimson

Wanderer
[COMPLETE] Plant Bowl only need 20 Fertile Dirt

Fix: Currently, plant bowls require 40 fertile dirt to fill. OSI changed it from 40 to 20.

Change Documentation:
http://update.uo.com/design_512.html

Problem with code below is the cliloc message for if I fill with dirt less than 20. Not sure what's up with that considering its copied from the old code. Help?

Needs tested for preML.

Code: See Nikki's second fix below :) (not the first one with LC fix lol)
 

LadyCrimson

Wanderer
Re: Plant Bowl only need 20 Fertile Dirt

For me it said something about needing to get fresh dirt. It should say something like "you ain't got enough, bish"
 

psz

Administrator
Re: Plant Bowl only need 20 Fertile Dirt

ClilocEditor/Viewer is your friend ;->

else if ( dirt.Amount < 40 )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061896 ); // You need more dirt to fill a plant bowl!
@@ -104,7 +136,8 @@


Shouldn't that be 20?
 

LadyCrimson

Wanderer
Re: Plant Bowl only need 20 Fertile Dirt

didn't know :) introduce me to my new friend....

I just don't know why it didn't work - literally, the entire statement is copied from the preML part....
 

Nikki_Demise

Bug Hunter
Re: Plant Bowl only need 20 Fertile Dirt

LadyCrimson;559556 said:
For me it said something about needing to get fresh dirt. It should say something like "you ain't got enough, bish"

fixed

Code:
Index: Engines/Plants/PlantBowl.cs
===================================================================
--- Engines/Plants/PlantBowl.cs (revision 319)
+++ Engines/Plants/PlantBowl.cs (working copy)
@@ -53,13 +53,45 @@
     }
 
     if ( targeted is FertileDirt )
-    {
+    if (Core.ML)
+                {
      FertileDirt dirt = (FertileDirt)targeted;
 
      if ( !dirt.IsChildOf( from.Backpack ) )
      {
       from.SendLocalizedMessage( 1042664 ); // You must have the object in your backpack to use it.
      }
+     else if ( dirt.Amount < 20 )
+     {
+      if(from.Name == "Lady Crimson")
+       from.SendMessage( "you ain't got enough, bish" );
+      else
+       from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061896 ); // You need more dirt to fill a plant bowl!
+     }
+     else
+     {
+      PlantItem fullBowl = new PlantItem( true );
+
+      if ( from.PlaceInBackpack( fullBowl ) )
+      {
+       dirt.Consume( 20 );
+       m_PlantBowl.Delete();
+
+       from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061895 ); // You fill the bowl with fresh dirt.
+      }
+      else
+      {
+       fullBowl.Delete();
+
+       from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061894 ); // There is no room in your backpack for a bowl full of dirt!
+      }
+     }
+    }
+                    else
+                {
+     FertileDirt dirt = (FertileDirt)targeted;
+
+     if ( !dirt.IsChildOf( from.Backpack ) )
+     {
+      from.SendLocalizedMessage( 1042664 ); // You must have the object in your backpack to use it.
+     }
      else if ( dirt.Amount < 40 )
      {
       from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061896 ); // You need more dirt to fill a plant bowl!
@@ -104,7 +136,8 @@
     {
      from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061893 ); // You'll want to gather fresh dirt in order to raise a healthy plant!
     }
-   }
+   
+            }
 
    protected override void OnTargetOutOfRange( Mobile from, object targeted )
    {
 

Kiluad

Sorceror
yeah nm again, ML / AOS isn;t set right, it just keep going to where the AOS part is suppose to run/start and you're out of dirt so it asks for some.

tries to consume 40, but you have no dirt left so it says it needs some.


I haven't done many ML/AOS stuff, but you could add (core.ML &&) to all the ML if statements. there might be a better way.
 

Nikki_Demise

Bug Hunter
Re: Plant Bowl only need 20 Fertile Dirt

It's not the LC friendly version but this version works correctly with and without ML.

--- /Engines/Plants/PlantBowl.cs Wed May 13 15:37:21 2009
+++ /Engines/Plants/PlantBowl.cs Fri May 29 23:06:58 2009
@@ -54,13 +54,14 @@

if ( targeted is FertileDirt )
{
+ int DirtNeeded = Core.ML ? 20 : 40;
FertileDirt dirt = (FertileDirt)targeted;

if ( !dirt.IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 1042664 ); // You must have the object in your backpack to use it.
}
- else if ( dirt.Amount < 40 )
+ else if ( dirt.Amount < DirtNeeded )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061896 ); // You need more dirt to fill a plant bowl!
}
@@ -70,7 +71,7 @@

if ( from.PlaceInBackpack( fullBowl ) )
{
- dirt.Consume( 40 );
+ dirt.Consume( DirtNeeded );
m_PlantBowl.Delete();

from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061895 ); // You fill the bowl with fresh dirt.
 

Kiluad

Sorceror
Re: Plant Bowl only need 20 Fertile Dirt

Nikki_Demise;559577 said:
Code:
DirtNeeded = Core.ML ? 20 : 40

how do those work exactly?

cause i've seen them like this too

Code:
headbonus = (head == magichat) ? 3124 : 1234
i thought in this case it was giving values to both of them, depending on what the person had on their head.


but with the Core.ML it only has one circumstance.... so.... now im thinking, if layer is magichat, then head bonus = 3124 instead of 1234... right? i convinced myself this is true while writing it... is it?
 
Re: Plant Bowl only need 20 Fertile Dirt

psz;559590 said:
http://www.uodreams.com/ClilocEditor/ClilocEditor2.zip

This is the Cliloc Editor.

It will allow to view any CLILOC in the client (Number and what it writes out).

For custom shards, it also lets you edit the clilocs (Doing so breaks patching with OSI, and will also prevent you from connecting to Demise)

It returns many errors to me :(

If you are encountering same errors, I can suggest you UOFiddler as alternative (http://uofiddler.polserver.com/)
It's my new friend... an InsideUO with CliLoc editor integrated ;)
 

psz

Administrator
Re: Plant Bowl only need 20 Fertile Dirt

Cliloc Editor (like SpyUO) requires .net 1.1 and 2.0 to be installed.


It will not work with any OS other than Win2K and WinXP.

I use Windows 7's XP Mode to use both apps, and under Vista I use a WinXP Virtual Machine.

I like it because it's very fast due to having just ONE purpose.
 
Status
Not open for further replies.
Top