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!

Hi all :D My first scripts <-- Imbuing system

Dreamseeker

Sorceror
Found the mistake, cheers Rondelin.

It's a minor mistake on the Button Num info.. the Skill group 4 button points to case 10013: but the switch is labelled 100013:

*Updated .Rar file 05/06/2012*
 

Fixxxer

Sorceror
Does your update include the distro fixes as well? Just wondering so I don't mix the wrong files.
 

Dreamseeker

Sorceror
Yeah, I'm just updating the Main SFImbuing.rar instead of posting up individual scripts.. I've put a last updated date on the first post (where the .rar is)

Let me know if the serialization works in the distros if you can, I'll be over the moon if I've learned something this week :p
 

rondelin

Sorceror
I must delete all clothing on server restart. So I imagine its an issue with baseclothing.cs. Anyway around this?
 

Dreamseeker

Sorceror
Ah yes, exactly what I came across minutes after updating..

BaseClothing.cs - line 1060 (approx)

case 8:
{
m_TimesImbued = reader.ReadEncodedInt();
goto case 7;
}

The Red part needs to be changed to -

m_TimesImbued = reader.ReadInt();

Here's the .cs , I'll sort out the .rar sometime soon
 

Attachments

  • BaseClothing.cs
    43.3 KB · Views: 26

Nockar

Sorceror
Im getting load erros with clothing. I think all the other ones may be fine now. Not sure. Thanks for working on it!
 

Dreamseeker

Sorceror
* SFImbuing.rar Updated *
Sweet.. looks like everything is running nicely. Thx for all the quick feedback guys/gals :D
I dedicate this system to everyone who has worked hard making the UO servers and to the awesome community who (like me) after 14 years still LOVE Ultima with a passion!
My C# powers grow stronger everyday! Muhahahaha!! My next system is already ready, just gotta sort out all the needed scripts and distros..

"I can only see so far because I am standing on the shoulders of Giants" - Isaac Newton
 

Monoxide-

Traveler
I added all the scripts into my Server folder I changed all the Base items out the playermobile and the ItemID and I am still getting these errors the same errors for every base item if anyone could help it would be greatly appreciated!

Errors.png
 

Monoxide-

Traveler
I downloaded the rar file from the 1st page that says updated and I keep getting these errors... Idk what or where I did wrong
 
*shoots self*
Code:
RunUO - [www.runuo.com] Version 2.1, Build 4272.35047
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 4 64-bit processors
Scripts: Compiling C# scripts...failed (5 errors, 2 warnings)
Warnings:
 + ultimatum custom scripts/scripts ben made/untested scripts/imbuing/Imbuing.cs
:
    CS0105: Line 8: The using directive for 'Server.Mobiles' appeared previously
 in this namespace
 + ultimatum custom scripts/whores/Stripper.cs:
    CS0105: Line 11: The using directive for 'Server.Misc' appeared previously i
n this namespace
Errors:
 + ultimatum custom scripts/scripts ben made/untested scripts/imbuing/Distro fil
es/BaseWeapon.cs:
    CS0246: Line 25: The type or namespace name 'ISetItem' could not be found (a
re you missing a using directive or an assembly reference?)
    CS0246: Line 112: The type or namespace name 'SAAbsorptionAttributes' could
not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 260: The type or namespace name 'SAAbsorptionAttributes' could
not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 4199: The type or namespace name 'SetItem' could not be found (
are you missing a using directive or an assembly reference?)
 + ultimatum custom scripts/scripts ben made/untested scripts/imbuing/Distro fil
es/BaseClothing.cs:
    CS0246: Line 25: The type or namespace name 'ISetItem' could not be found (a
re you missing a using directive or an assembly reference?)
    CS0246: Line 1375: The type or namespace name 'SetItem' could not be found (
are you missing a using directive or an assembly reference?)
 + ultimatum custom scripts/scripts ben made/untested scripts/imbuing/Distro fil
es/BaseArmor.cs:
    CS0246: Line 14: The type or namespace name 'ISetItem' could not be found (a
re you missing a using directive or an assembly reference?)
    CS0246: Line 70: The type or namespace name 'SAAbsorptionAttributes' could n
ot be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 454: The type or namespace name 'SAAbsorptionAttributes' could
not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 2126: The type or namespace name 'SetItem' could not be found (
are you missing a using directive or an assembly reference?)
 + ultimatum custom scripts/scripts ben made/untested scripts/imbuing/Distro fil
es/BaseJewel.cs:
    CS0246: Line 23: The type or namespace name 'ISetItem' could not be found (a
re you missing a using directive or an assembly reference?)
    CS0246: Line 32: The type or namespace name 'SAAbsorptionAttributes' could n
ot be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 141: The type or namespace name 'SAAbsorptionAttributes' could
not be found (are you missing a using directive or an assembly reference?)
    CS0246: Line 745: The type or namespace name 'SetItem' could not be found (a
re you missing a using directive or an assembly reference?)
 + ultimatum custom scripts/scripts ben made/untested scripts/imbuing/Distro fil
es/PlayerMobile.cs:
    CS0234: Line 3092: The type or namespace name 'TamingBOBFilter' does not exi
st in the namespace 'Server.Engines.BulkOrders' (are you missing an assembly ref
erence?)
    CS0234: Line 3101: The type or namespace name 'TamingBOBFilter' does not exi
st in the namespace 'Server.Engines.BulkOrders' (are you missing an assembly ref
erence?)
    CS0246: Line 4052: The type or namespace name 'BaseQuest' could not be found
 (are you missing a using directive or an assembly reference?)
    CS0246: Line 4053: The type or namespace name 'QuestChain' could not be foun
d (are you missing a using directive or an assembly reference?)
    CS0246: Line 4053: The type or namespace name 'BaseChain' could not be found
 (are you missing a using directive or an assembly reference?)
    CS0246: Line 4055: The type or namespace name 'BaseQuest' could not be found
 (are you missing a using directive or an assembly reference?)
    CS0246: Line 4060: The type or namespace name 'QuestChain' could not be foun
d (are you missing a using directive or an assembly reference?)
    CS0246: Line 4060: The type or namespace name 'BaseChain' could not be found
 (are you missing a using directive or an assembly reference?)
    CS0246: Line 4086: The type or namespace name 'Collection' could not be foun
d (are you missing a using directive or an assembly reference?)
    CS0246: Line 4090: The type or namespace name 'Collection' could not be foun
d (are you missing a using directive or an assembly reference?)
    CS0246: Line 4100: The type or namespace name 'Collection' could not be foun
d (are you missing a using directive or an assembly reference?)
    CS0246: Line 4113: The type or namespace name 'Collection' could not be foun
d (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
 

KeEpIn

Sorceror
Looks like this Modification were made for a fork of Runuo.
Code:
  CS0246: Line 70: The type or namespace name 'SAAbsorptionAttributes' could n
ot be found (are you missing a using directive or an assembly reference?)
Looks like Orbsydia

Code:
CS0246: Line 2126: The type or namespace name 'SetItem' could not be found (
are you missing a using directive or an assembly reference?)
Malagis Modification of ML? Could be in Orbsydia fork as well

Code:
CS0234: Line 3101: The type or namespace name 'TamingBOBFilter' does not exi
st in the namespace 'Server.Engines.BulkOrders' (are you missing an assembly ref
erence?)
Daat99 Taming Bods?

But it really doesnt look like a standart SVN. Maybe Author could publish a Standard Version else there would be much work. But thank you for your work :)
 

KHzspeed

Sorceror
merge the files instead of dropping them into the scripts folder. the edits are not many, and will save you having problems.
 

KHzspeed

Sorceror
Here's the Mini SoulForge for those who want it.
no scripting wizardry here, just a simple update :)

drop the file in with the other SoulForge's, or where ever you choose :p
open Imbuing.cs, find public static void CheckSoulForge around line 40.
add the two edits highlighted in red.
....or replace your Imbuing.cs file with the one I've uploaded lol.

Code:
public static void CheckSoulForge(Mobile from, int range, out bool sforge)
        {
            sforge = false;
            PlayerMobile m = from as PlayerMobile;
 
            Map map = from.Map;
 
            if (map == null)
                return;
 
            IPooledEnumerable eable = map.GetItemsInRange(from.Location, 1);
 
            foreach (Item item in eable)
            {
                bool isTMSForge = (item.ItemID >= 17015 && item.ItemID <= 17030); // TerMur SoulForge (+5% bonus & easier unravels)
                bool isSForge = (item.ItemID >= 16995 && item.ItemID <= 17010); // Standard SoulForge
              [COLOR=#ff0000] bool isGSForge = (item.ItemID >= 17607 && item.ItemID <= 17610); // Gargoyle Mini SoulForge[/COLOR]
 
                if (isSForge || isTMSForge ||[COLOR=#ff0000] isGSForge[/COLOR])
                {
                    if ((from.Z + 16) < item.Z || (item.Z + 16) < from.Z || !from.InLOS(item))
                        continue;
 
                    sforge = true;
 
                    m.Imb_SFBonus = 0;
 
                    if (isTMSForge)
                    {
                        m.Imb_SFBonus = 5;
                    }
 
                    if (sforge)
                        break;
                }
            }
Simple stuff :)
 

Attachments

  • SoulForge - GargoyleMini.cs
    1.3 KB · Views: 25
  • Imbuing.cs
    73.6 KB · Views: 28

Dreamseeker

Sorceror
Hey Y'all :p

Been away from the net for a while.. never fear, I is here!

I'm guessing that the conflicts are from the RunUO / Orb differences. I'd recommend cutting & pasting the Imbuing edits only, instead of overwriting the whole .cs.
The PlayerMobile.cs has only a small edit, the TamingBulkOrders isn't needed at all.

The IsetItem == true; is a check for SetItems, I dunno what ref name it has for you.. find that and you can rename it to the correct name.
 

LdNS88i

Sorceror
I had a funny problem.
Lost inscription "Imbued" after restarting the server. All parameters are simply disappear inscription. As an example - I made two stats on the axe, then save and restart server. Stats have remained, and the inscription disappeared. Doing a stat on the ring - the inscription is preserved after the restart.

before restart:
Name
(imbued)
xxx
zzz
yyy

after restart:
Name
xxx
zzz
yyy

The inscription is removed. Parameters remain.
 

Dreamseeker

Sorceror
I had a funny problem.
Lost inscription "Imbued" after restarting the server.

I've found the error.. but I have no idea why it's not saving the m_TimesImbued prop :( I tried changing the serial no 0x9000000 to 0x8100000 but still no joy.

It's something to do with the reading of the Int.. but buggered if I know what the problem is. *sigh* Am having a look now ( Just noticed I changed the wrong .cs lol )

*EDIT* - SORTED, my version had this in the BaseWeapon.cs
SaveFlag flags = (SaveFlag)reader.ReadInt();
#region SF Imbuing
if ( GetSaveFlag( flags, SaveFlag.TimesImbued ) )
m_TimesImbued = reader.ReadInt();
#endregion

Change this bit so it's just -
#region SF Imbuing
m_TimesImbued = reader.ReadInt();
#endregion

And that'll fix the problem :D
 

Attachments

  • BaseWeapon.cs
    158.3 KB · Views: 23

LdNS88i

Sorceror
Thanks for the quick reply. My BaseWeapon.cs -

Before:
Code:
 public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
 
            int version = reader.ReadInt();
 
            switch (version)
            {
         
            case 14:
                    {
[B]#region SF Imbuing[/B]
[B][COLOR=#339966]m_TimesImbued = reader.ReadInt();[/COLOR][/B]
[B]#endregion[/B]
                        goto case 13;
                    }
         
                case 13:
                //personal bless deed
                case 12:
                    {
                        m_BlessedBy = reader.ReadMobile();
                        goto case 11;
                    }
                case 11:

after:
Code:
 public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
 
            int version = reader.ReadInt();
 
            switch (version)
            {
         
            case 14:
                    {
[B]SaveFlag flags = (SaveFlag)reader.ReadInt();[/B]
[B]#region SF Imbuing[/B]
[B]if ( GetSaveFlag( flags, SaveFlag.TimesImbued ) )[/B]
[B]m_TimesImbued = reader.ReadInt();[/B]
[B]#endregion[/B]
                        goto case 13;
                    }
         
                case 13:
                //personal bless deed
                case 12:
                    {
                        m_BlessedBy = reader.ReadMobile();
                        goto case 11;
                    }
                case 11:

If I did everything right, it does not work. Everything remains as before.
 

Dreamseeker

Sorceror
Ah.. no, otherway around. The SaveFlag bit needs taking out, guess it was the rightway round before.

It should of worked ok in that case, check your serial write bit.. should be writing version(14) with no saveflags (It sets one up but never uses it)
 
Top