Exemplo n.º 1
0
        public LookGump( PlayerMobile from, BaseCreature bc, PlayerMobile self, Item item, int page)
            : base(0, 0)
        {
            string description = "";
            m_page = page;

            from.CloseGump( typeof( LookGump ) );
            this.Closable=false;
            this.Disposable=false;
            this.Dragable=true;
            this.Resizable=false;

            this.AddPage(0);
            this.AddBackground(54, 31, 400, 458, 9270);//Background
            this.AddBackground(121, 0, 264, 34, 9270);//Background Descript Title
            this.AddBackground(72, 257, 364, 202, 3500);//White Main Descript
            this.AddImage(4, 10, 10440); //Dragon Left
            this.AddImage(423, 10, 10441);//Dragon Right
            this.AddBackground(74, 47, 139, 203, 9270);//Avatar Background
            this.AddImage(86, 58, 30520, 2999);//Avatar Black Background
            this.AddLabel(202, 7, 148, @"Description Window");
            this.AddButton(365, 44, 12006, 12008, 0, GumpButtonType.Reply, 0); //Close

            bool myself = false;

            if( from == self )
            {
                myself = true;
                this.AddBackground(54, 487, 401, 66, 9270);//Background
                this.AddButton(303, 522, 12000, 12002, 1, GumpButtonType.Reply, 0); //Checkmark
                this.AddLabel(127, 498, 148, @"Avatar Chooser");
                this.AddLabel(287, 498, 148, @"Save Descriptions");
                this.AddImage(257, 30, 29);//Khaeros Button
                this.AddButton(135, 522, 12012, 12014, 666, GumpButtonType.Reply, 0); //Chooser
            }

            if( bc != null )
            {
                m_bc = bc;
                description = bc.Description;
                this.AddImage(257, 75, 29);//Khaeros Button
            }

            if( item != null )
            {
                m_item = item;
                description = item.Description;
                this.AddImage(257, 75, 29);//Khaeros Button
                this.AddButton(303, 462, 12000, 12002, 1, GumpButtonType.Reply, 0); //Checkmark
            }

            if( self != null )
            {
                this.AddButton(303, 460, 12009,12011, 102, GumpButtonType.Reply, 0);//page buttons
                this.AddButton(135, 460, 12015, 12017, 101, GumpButtonType.Reply, 0);
                this.AddImage(257, 30, 29);//Khaeros Button

                string beauty = "Appears average-looking";
                beauty = HealthAttachment.GetAppearance(from, self);

                //if( !myself && self.Disguise.Looks != null )
                //    beauty = self.Disguise.Looks;

                //else if( self.GetBackgroundLevel(BackgroundList.Attractive) > 0 )
                //    beauty = "Appears attractive";

                //else if( self.GetBackgroundLevel(BackgroundList.GoodLooking) > 0 )
                //    beauty = "Appears good-looking";

                //else if( self.GetBackgroundLevel(BackgroundList.Gorgeous) > 0 )
                //    beauty = "Appears gorgeous";

                //else if( self.GetBackgroundLevel(BackgroundList.Homely) > 0 )
                //    beauty = "Appears homely";

                //else if( self.GetBackgroundLevel(BackgroundList.Ugly) > 0 )
                //    beauty = "Appears ugly";

                //else if( self.GetBackgroundLevel(BackgroundList.Hideous) > 0 )
                //    beauty = "Appears disfigured";

                string age = "Looks to be a teenager";

                if( self.Disguise.Age != null )
                    age = self.Disguise.Age;

                else if( self.Age > 19 && self.Age < 26 )
                    age = "Is in their early twenties";

                else if( self.Age > 25 && self.Age < 30 )
                    age = "Is in their late twenties";

                else if( self.Age > 29 && self.Age < 36 )
                    age = "Is in their early thirties";

                else if( self.Age > 35 && self.Age < 40 )
                    age = "Is in their late thirties";

                else if( self.Age > 39 && self.Age < 60 )
                    age = "Looks to be middle-aged";

                else if( self.Age > 59 && self.Age < 80 )
                    age = "Looks to be elderly";

                else if( self.Age > 79 && self.Age < 100 )
                    age = "Looks extremely old";

                else if( self.Age > 99 )
                    age = "Looks to be ancient";

                else if( self.Age < 13 )
                    age = "Looks to be a child";

                string race = "Exhibits no racial qualities";

                //if( !myself && self.Disguise.Nation != null )
                    //race = "Appears to be of " + self.Disguise.Nation + " ancestory";

                race = "Exhibits " + self.GetDisguisedNation().ToString() + " qualities";

                //if (self.Nation == Nation.Vhalurian)
                //    race = "Exhibits Vhalurian qualities";

                //else if (self.Nation == Nation.Alyrian)
                //    race = "Exhibits Alyrian qualities";

                //else if (self.Nation == Nation.Azhuran)
                //    race = "Exhibits Azhuran qualities";

                //else if (self.Nation == Nation.Khemetar)
                //    race = "Exhibits Khemetar qualities";

                //else if (self.Nation == Nation.Mhordul)
                //    race = "Exhibits Mhordul qualities";

                //else if (self.Nation == Nation.Tyrean)
                //    race = "Exhibits Tyrean qualities";

                m_self = self;

                int rawweight = self.Weight;
                int rawheight = self.Height;
                int roundedweight = ExtensionMethods.RoundOff(rawweight);
                int roundedheight = ExtensionMethods.RoundOff(rawheight);

                string height = "Looks around " + roundedheight + " petrae tall";
                string weight = "Looks about " + roundedweight + " petrae heavy";

                    if (page == 1)
                    {
                        if (myself)
                            description = self.BaseDescription1;

                        else
                            description = self.Description;
                    }

                    else if (page == 2)
                    {
                        if (myself)
                            description = self.BaseDescription2;

                        else
                            description = self.Description2;
                    }

                    else if (page == 3)
                    {
                        if (myself)
                            description = self.BaseDescription3;

                        else
                            description = self.Description3;
                    }

                AddHtml( 225, 139, 200, 20, Color(race,"FF9912"), false, false);
                AddHtml( 225, 161, 200, 20, Color(age,"FF9912"), false, false);
                AddHtml( 225, 183, 200, 20, Color(beauty,"FF9912"), false, false);
                AddHtml( 225, 205, 200, 20, Color(height,"FF9912"), false, false);
                AddHtml( 225, 227, 200, 20, Color(weight,"FF9912"), false, false);
                //this.AddLabel(271, 180, 2010, @age );
                //this.AddLabel(271, 198, 2010, @beauty);
                //this.AddLabel(271, 216, 2010, @"Height: " + self.Height + " Petrae");
                //this.AddLabel(271, 235, 2010, @"Weight: " + self.Weight + " Petrae" );
                this.AddImage(86, 58, self.AvatarID);//Avatar Test

            }
            this.AddTextEntry( 92, 308, 324, 92, 0, 2, @"" + description);
        }
Exemplo n.º 2
0
        public static bool CanDoBusiness(GovernmentEntity g, PlayerMobile pm)
        {
            if (CustomGuildStone.IsGuildEconomic(pm, g))
                return true;

            foreach(string name in g.TradeInformation.NoBusinessList)
            {
                if(name.ToLower() == pm.Name.ToLower())
                    return false;
            }
            foreach(Nation n in g.TradeInformation.NoBusinessNations)
            {
                if(n == pm.GetDisguisedNation())
                    return false;
            }
            if(g.MilitaryPolicies.KillIndividualOnSight.Contains(pm.Name))
                return false;
            if(g.MilitaryPolicies.JailIndividualOnSight.Contains(pm.Name))
                return false;
            if(!g.MilitaryPolicies.Exceptions.Contains(pm.Name))
            {
                if(g.MilitaryPolicies.JailNationOnSight.Contains(pm.GetDisguisedNation()))
                    return false;
                if(g.MilitaryPolicies.KillNationOnSight.Contains(pm.GetDisguisedNation()))
                    return false;
            }
            foreach(CustomGuildStone enemy in g.EnemyGuilds)
            {
                if(CustomGuildStone.IsGuildMember(pm, enemy) && pm.CustomGuilds[enemy].ActiveTitle)
                    return false;
            }
            return true;
        }