1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Client Crash

Discussion in 'Script Support' started by Omni, Dec 30, 2013.

  1. Omni
    Offline

    Omni Member

    Joined:
    Dec 22, 2013
    Messages:
    165
    Likes Received:
    24
    Publish Number:
    54
    founnd a old script that i was going to update into a new custom system .

    The script itself complies just find the only problem im having is it crashes the client but the servuo core remains active..

    Crash
    Code (C#):
    1. ---------------------------
    2. Error
    3. ---------------------------
    4. The UO game client has crashed.  To report this crash, hit Control-C and paste the contents of your clipboard
    5.  
    6. into an email addressed to [email protected].com with a description of what you were doing when it crashed.
    7.  
    8.  
    9.  
    10. Version: 7.0.3.0
    11.  
    12. Exception Id: 3221225477
    13.  
    14. Module: client.exe
    15.  
    16. Checksum: 1551725400
    17.  
    18.  
    19.  
    20.  
    21. ---------------------------
    22. OK  
    23. ---------------------------
    24.  
    Script

    Code (C#):
    1. using System;
    2. using System.Collections;
    3. using Server.Items;
    4. using Server.ContextMenus;
    5. using Server.Misc;
    6. using Server.Network;
    7.  
    8. namespace Server.Mobiles
    9. {
    10.     public class Goku : BaseCreature
    11.     {
    12.         private static readonly double[] m_Offsets = new double[]
    13.         {
    14.             Math.Cos(000.0 / 180.0 * Math.PI), Math.Sin(000.0 / 180.0 * Math.PI),
    15.             Math.Cos(040.0 / 180.0 * Math.PI), Math.Sin(040.0 / 180.0 * Math.PI),
    16.             Math.Cos(080.0 / 180.0 * Math.PI), Math.Sin(080.0 / 180.0 * Math.PI),
    17.             Math.Cos(120.0 / 180.0 * Math.PI), Math.Sin(120.0 / 180.0 * Math.PI),
    18.             Math.Cos(160.0 / 180.0 * Math.PI), Math.Sin(160.0 / 180.0 * Math.PI),
    19.             Math.Cos(200.0 / 180.0 * Math.PI), Math.Sin(200.0 / 180.0 * Math.PI),
    20.             Math.Cos(240.0 / 180.0 * Math.PI), Math.Sin(240.0 / 180.0 * Math.PI),
    21.             Math.Cos(280.0 / 180.0 * Math.PI), Math.Sin(280.0 / 180.0 * Math.PI),
    22.             Math.Cos(320.0 / 180.0 * Math.PI), Math.Sin(320.0 / 180.0 * Math.PI),
    23.         };
    24.         private bool m_TrueForm;
    25.        
    26.        
    27.  
    28.         [Constructable]
    29.         public Goku()
    30.             : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
    31.         {
    32.             SpeechHue = Utility.RandomDyedHue();
    33.             Hue = 33770;
    34.  
    35.             {
    36.                 Body = 0x190;
    37.                 Name = "Goku";
    38.             }
    39.  
    40.             SetStr(250, 255);
    41.             SetDex(100, 125);
    42.             SetInt(61, 75);
    43.  
    44.             SetDamage(15, 23);
    45.  
    46.             SetHits(2500, 3500);
    47.  
    48.             SetSkill(SkillName.Fencing, 88.8, 97.5);
    49.             SetSkill(SkillName.Macing, 99.9, 110.0);
    50.             SetSkill(SkillName.MagicResist, 25.0, 47.5);
    51.             SetSkill(SkillName.Swords, 65.0, 87.5);
    52.             SetSkill(SkillName.Tactics, 99.9, 110.0);
    53.             SetSkill(SkillName.Wrestling, 15.0, 37.5);
    54.  
    55.             Fame = 10000;
    56.             Karma = -10000;
    57.                                
    58.  
    59.             AddItem(new ShortHair(1));
    60.         }
    61.  
    62.  
    63.         [CommandProperty(AccessLevel.GameMaster)]
    64.         public override int HitsMax
    65.         {
    66.             get
    67.             {
    68.                 return this.m_TrueForm ? 65000 : 30000;
    69.             }
    70.         }
    71.         [CommandProperty(AccessLevel.GameMaster)]
    72.         public override int ManaMax
    73.         {
    74.             get
    75.             {
    76.                 return 5000;
    77.             }
    78.         }
    79.        
    80.            
    81.         public void Morph()
    82.         {
    83.             if (this.m_TrueForm)
    84.                 return;
    85.  
    86.             this.m_TrueForm = true;
    87.  
    88.             Name = "Super Saiyan Goku";
    89.             BodyValue = 0x190;
    90.             Hue = 33770;
    91.             AddItem(new ShortHair(1174));
    92.  
    93.             this.Hits = this.HitsMax;
    94.             this.Stam = this.StamMax;
    95.             this.Mana = this.ManaMax;
    96.  
    97.             this.ProcessDelta();
    98.  
    99.             this.Say(1049499); // Behold my true form!
    100.  
    101.            
    102.  
    103.             Map map = this.Map;
    104.  
    105.             if (map != null)
    106.             {
    107.                 for (int i = 0; i < m_Offsets.Length; i += 2)
    108.                 {
    109.                     double rx = m_Offsets[i];
    110.                     double ry = m_Offsets[i + 1];
    111.  
    112.                     int dist = 0;
    113.                     bool ok = false;
    114.                     int x = 0, y = 0, z = 0;
    115.  
    116.                     while (!ok && dist < 10)
    117.                     {
    118.                         int rdist = 10 + dist;
    119.  
    120.                         x = this.X + (int)(rx * rdist);
    121.                         y = this.Y + (int)(ry * rdist);
    122.                         z = map.GetAverageZ(x, y);
    123.  
    124.                         if (!(ok = map.CanFit(x, y, this.Z, 16, false, false)))
    125.                             ok = map.CanFit(x, y, z, 16, false, false);
    126.  
    127.                         if (dist >= 0)
    128.                             dist = -(dist + 1);
    129.                         else
    130.                             dist = -(dist - 1);
    131.                         if (!ok)
    132.                             continue;
    133.  
    134.                     }
    135.                 }
    136.             }
    137.         }
    138.  
    139.         public override void GenerateLoot()
    140.         {
    141.             AddLoot(LootPack.SuperBoss);
    142.         }
    143.  
    144.         public override bool AlwaysMurderer { get { return true; } }
    145.  
    146.         public Goku(Serial serial)
    147.             : base(serial)
    148.         {
    149.         }
    150.  
    151.         public override void Serialize(GenericWriter writer)
    152.         {
    153.             base.Serialize(writer);
    154.  
    155.             writer.Write((int)0); // version
    156.  
    157.             writer.Write(this.m_TrueForm);
    158.         }
    159.  
    160.         public override void Deserialize(GenericReader reader)
    161.         {
    162.             base.Deserialize(reader);
    163.  
    164.             int version = reader.ReadInt();
    165.  
    166.             switch (version)
    167.             {
    168.                 case 0:
    169.                     {
    170.                         this.m_TrueForm = reader.ReadBool();
    171.                         break;
    172.                     }
    173.             }
    174.         }
    175.     }
    176. }
    I am looking at creating a group of mobiles like super Sayajins that transform and create special effects around the map..
     
  2. m309
    Offline

    Admin Moderator ServUO Developer

    Joined:
    Mar 3, 2013
    Messages:
    1,243
    Likes Received:
    130
    I'm not seeing Morph called anywhere, is that something from your BaseCreature?

    Regardless, the only thing that looks maybe off to me is that when Morph might be called you're adding hair on top of already existing hair...

    In Constructable:
    In Morph:
     
  3. Omni
    Offline

    Omni Member

    Joined:
    Dec 22, 2013
    Messages:
    165
    Likes Received:
    24
    Morph is simullar to Harrower and actually taken from that.. Harrower and true form harrower.

    Ill check the hair but it seems weird it crashes the client and not the server :S
     
Similar Threads: Client Crash
Forum Title Date
Script Support Client crashes when using IsEnemy Jul 23, 2016
Archived Bug Reports Client 5.x.x.x crashing bugs Apr 11, 2016
Script Support RatMan camp make 3d client crash? Sep 17, 2015
General Discussion UO Client Crashing Mar 25, 2015
General Discussion Tracking down client crashes. Oct 8, 2014
Archived Bug Reports 3D Client Stairs Problem Sep 22, 2017
Script Support UO Architect can't find client Sep 22, 2017