قديم 2019-11-09, 07:59 PM
المشاركة #2  
Tefa
  • غير متواجد
افتراضي رد: بخصوص الواردروب
مشكله من ان بي سي نفسه غيره

قديم 2019-11-10, 01:08 AM
المشاركة #3  
AbuMaryam
  • غير متواجد
افتراضي رد: بخصوص الواردروب
المشكلة ف الان بي سي و تحديدآ النقاط بتاعت الوار دروب

لان الاجنحة و الالقاب بتشتغل ب بوينتات او نقاط

ف يعتبر الان بي سي بيعملهم اكتيف فيك

يعني تفعيل وهمي بدون نقاط

دة شرح ل اجابة حازم عشان تعرف العيب منين بظبط

قديم 2019-11-10, 05:31 AM
المشاركة #4  
zezonever
  • غير متواجد
افتراضي رد: بخصوص الواردروب
اسف ع حلول المنتدي بس مش من الابنسي انت مش عامل سيف الحل كالاتي يا صحبي

هنفتح ملف World.cs تمام هتنزل ع الكود ده


كود:
private void CharactersCallback(GameState clientint time

تحته هنضيف الكود ده وشكرا وتم المشكله


كود:
#region WardrobeTitles
            
if (Time32.Now >= client.Player.LastWardrobeStamp.AddMinutes(1)) { client.Player.LastWardrobeStamp Time32.Now; new TitleStorage().CheckTitles(client); }
            
#endregion 

اسف يا رايدر المشكله في الانبسي المشكله مش بيعمل سيف في الوارد نفسه وده حل للمشكله :]

قديم 2019-11-10, 08:04 AM
المشاركة #5  
Tefa
  • غير متواجد
افتراضي رد: بخصوص الواردروب
xAttack

رجاء المتابعه هل تم حل المشكله

قديم 2019-11-10, 10:52 AM
المشاركة #6  
xAttack
  • غير متواجد
افتراضي رد: بخصوص الواردروب
مشكله من ان بي سي نفسه غيره
غيرتو من كذا سورس لو عندك واحد شغال ابعتة اجرب

قديم 2019-11-10, 10:53 AM
المشاركة #7  
xAttack
  • غير متواجد
افتراضي رد: بخصوص الواردروب
اسف ع حلول المنتدي بس مش من الابنسي انت مش عامل سيف الحل كالاتي يا صحبي

هنفتح ملف World.cs تمام هتنزل ع الكود ده


كود:
private void CharactersCallback(GameState clientint time

تحته هنضيف الكود ده وشكرا وتم المشكله


كود:
#region WardrobeTitles
            
if (Time32.Now >= client.Player.LastWardrobeStamp.AddMinutes(1)) { client.Player.LastWardrobeStamp Time32.Now; new TitleStorage().CheckTitles(client); }
            
#endregion 

اسف يا رايدر المشكله في الانبسي المشكله مش بيعمل سيف في الوارد نفسه وده حل للمشكله :]
نفس المشكلة

قديم 2019-11-10, 06:55 PM
المشاركة #8  
Tefa
  • غير متواجد
افتراضي رد: بخصوص الواردروب
Wardrobe.cs



كود:
public void CheckTitles(Client.GameState client)
        {
            if (
client.Player.haveallTitles) { GetAll(client); return; }
            
#region Titles And Wings Equips
            #region Wings
            #region Union Emperor
            
if (client.Union != null)
                if (
client.Union.IsKingdom())
                    if (
client.Union.IsLeader(client.Player.UID))
                        new 
TitleStorage().AddTitle(client40011000false);
                    else
                        new 
TitleStorage().RemoveTitle(client40011000false);
                else
                    new 
TitleStorage().RemoveTitle(client40011000false);
            else
                new 
TitleStorage().RemoveTitle(client40011000false);
            
#endregion
            #region The Champion Of Elite Pk Tournament
            
if (client.Player.Titles.ContainsKey(TitlePacket.Titles.ElitePKChamption_High))
            {
                
DateTime date DateTime.Now;
                for (
int i DateTime.Now.Day31i++)
                {
                    
date = new DateTime(DateTime.Now.YearDateTime.Now.Monthi);
                    if (
date.DayOfWeek == DayOfWeek.Friday)
                    {
                        
date = new DateTime(DateTime.Now.YearDateTime.Now.Monthi19550);
                        break;
                    }
                }
                if (
date.Day == DateTime.Now.Day && date.Hour == DateTime.Now.Hour && date.Year == DateTime.Now.Year && date.Minute == date.Minute && DateTime.Now.DayOfWeek != DayOfWeek.Friday)
                {
                    for (
int i 131i++)
                    {
                        
date = new DateTime(DateTime.Now.YearDateTime.Now.Month 1i);
                        if (
date.DayOfWeek == DayOfWeek.Friday)
                        {
                            
date = new DateTime(DateTime.Now.YearDateTime.Now.Month 1i19550);
                            break;
                        }
                    }
                }
                
TimeSpan timespan date DateTime.Now;
                
int time = (int)(timespan.TotalSeconds);
                new 
TitleStorage().AddTitle(client600120falsetime);
            }
            else
                new 
TitleStorage().RemoveTitle(client600120false);
            
#endregion
            #region Own a 5-star garment
            
if (Database.WardrobeTable.AmountStarGarments(client5) >= 1)
            {
                new 
TitleStorage().AddTitle(client600322false);
            }
            else
                new 
TitleStorage().RemoveTitle(client600322false);
            
#endregion
            #region Own a 5-star Mount armor
            
if (Database.WardrobeTable.AmountStarMounts(client5) >= 1)
            {
                new 
TitleStorage().AddTitle(client600423false);
            }
            else
                new 
TitleStorage().RemoveTitle(client600423false);
            
#endregion
            #region Prestige Score reaches 600,000
            
if (client.Player.TotalPerfectionScore >= 600000)
            {
                new 
TitleStorage().AddTitle(client20262026false);
            }
            else
                new 
TitleStorage().RemoveTitle(client20262026false);
            
#endregion
            #region Stars Score reaches 324
            
if (client.Equipment.TotalStars >= 324)
            {
                new 
TitleStorage().AddTitle(client60076007false);
            }
            else
                new 
TitleStorage().RemoveTitle(client60076007false);
            
#endregion
            #region Stars Score reaches 216
            
if (client.Equipment.TotalStars >= 216)
            {
                new 
TitleStorage().AddTitle(client60086008false);
            }
            else
                new 
TitleStorage().RemoveTitle(client60086008false);
            
#endregion
            #endregion
            #region Titles
            #region Union Emperor
            
if (client.Union != null)
                if (
client.Union.IsKingdom())
                    if (
client.Union.IsLeader(client.Player.UID))
                        new 
TitleStorage().AddTitle(client11000false);
                    else
                        new 
TitleStorage().RemoveTitle(client11000false);
                else
                    new 
TitleStorage().RemoveTitle(client11000false);
            else
                new 
TitleStorage().RemoveTitle(client11000false);
            
#endregion
            #region VIP
            
if (client.Player.VIPLevel 0)
            {
                switch (
client.Player.VIPLevel)
                {
                    case 
1:
                    case 
2:
                    case 
3:
                    case 
4:
                        {
                            new 
TitleStorage().AddTitle(client20302030false);
                            break;
                        }
                    case 
5:
                    case 
6:
                        {
                            new 
TitleStorage().AddTitle(client20292029false);
                            break;
                        }
                    case 
7:
                        {
                            new 
TitleStorage().AddTitle(client20312031false);
                            break;
                        }
                }
            }
            else
            {
                new 
TitleStorage().RemoveTitle(client20302030false);
                new 
TitleStorage().RemoveTitle(client20292029false);
                new 
TitleStorage().RemoveTitle(client20312031false);
            }
            
#endregion
            #region CollectedRandMonkey
            
if (CollectedRandMonkey(client))
            {
                new 
TitleStorage().AddTitle(client201314false);
            }
            else
            {
                new 
TitleStorage().RemoveTitle(client201314false);
            }
            
#endregion
            #region Collect 8 kinds of permanent saint monkeys (can be activated via the Wardrobe after the event)
            
if (Collected8TypesMonkey(client))
            {
                new 
TitleStorage().AddTitle(client201617false);
            }
            else
            {
                new 
TitleStorage().RemoveTitle(client201617false);
            }
            
#endregion
            #region Collect a permanent Solar Monkey
            
if (CollectedMonkey(client200559))
            {
                new 
TitleStorage().AddTitle(client201415false);
            }
            else
            {
                new 
TitleStorage().RemoveTitle(client201415false);
            }
            
#endregion
            #region Collect a permanent Lunar Monkey
            
if (CollectedMonkey(client200560))
            {
                new 
TitleStorage().AddTitle(client201516false);
            }
            else
            {
                new 
TitleStorage().RemoveTitle(client201516false);
            }
            
#endregion
            #region Tulip
            
if (client.Player.MyFlowers != null && client.Player.MyFlowers.RankTuilps == 1)
            {
                new 
TitleStorage().AddTitle(client60056005false);
            }
            else
            {
                new 
TitleStorage().RemoveTitle(client60056005false);
            }
            
#endregion
            #region The Total Score of Chi Study Reaches 1.600 Points
            
if (client.ChiData.DragonPoints == 400 && client.ChiData.PhoenixPoints == 400 && client.ChiData.TigerPoints == 400 && client.ChiData.TurtlePoints == 400)
            {
                new 
TitleStorage().AddTitle(client20181false);
            }
            else
            {
                new 
TitleStorage().RemoveTitle(client20181false);
            }
            
#endregion
            #region Prestige Score reaches 400,000
            
if (client.Player.TotalPerfectionScore >= 400000)
            {
                new 
TitleStorage().AddTitle(client20272027false);
            }
            else
            {
                new 
TitleStorage().RemoveTitle(client20272027false);
            }
            
#endregion
            #region The Total Score Of Jiang hu training reaches 81,000 points(Title)
            
if (client.Player.MyJiang != null && client.Player.MyJiang.Inner_Strength >= 81000)
            {
                new 
TitleStorage().AddTitle(client20045false);
            }
            else
            {
                new 
TitleStorage().RemoveTitle(client20045false);
            }
            
#endregion
            #region Complete 320 Achievement
            
if (client.Player.MyAchievement.Count(client.Player.UID) >= 320)
            {
                new 
TitleStorage().AddTitle(client20012false);
            }
            else
            {
                new 
TitleStorage().RemoveTitle(client20012false);
            }
            
#endregion
            #region Own 5 garments of 4-star or 5-star
            
if (Database.WardrobeTable.AmountStarGarments(client4) >= 5)
            {
                new 
TitleStorage().AddTitle(client20056false);
            }
            else
            {
                new 
TitleStorage().RemoveTitle(client20056false);
            }
            
#endregion
            #region Own 5 Mount of 4-star or 5-star
            
if (Database.WardrobeTable.AmountStarMounts(client4) >= 5)
            {
                new 
TitleStorage().AddTitle(client20067false);
            }
            else
            {
                new 
TitleStorage().RemoveTitle(client20067false);
            }
            
#endregion
            #region CelestialFox(200595)
            
if (CollectedCelestialFox(client))
            {
                new 
TitleStorage().AddTitle(client20502050false);
            }
            else
            {
                new 
TitleStorage().RemoveTitle(client20502050false);
            }
            
#endregion
            #region CelestialFox(Fantasy)(200596)
            
if (CollectedCelestialFoxFantasy(client))
            {
                new 
TitleStorage().AddTitle(client20512051false);
            }
            else
            {
                new 
TitleStorage().RemoveTitle(client20512051false);
            }
            
#endregion
            #endregion
            #endregion
            #region GM
            /*if (client.Account.State == Database.AccountTable.AccountState.GameMaster)
            {
                foreach (var title in Database.WardrobeTable.Titles.Values)
                {
                    AddTitle(client, (short)title.Type, (short)title.ID);
                }
            }*/
            #endregion
        



كود:
 public void GetAll(Client.GameState client)
        {
            foreach (var 
title in Database.WardrobeTable.Titles.Values)
            {
                
AddTitle(client, (short)title.Type, (short)title.IDfalse);
            }
            
client.Player.haveallTitles true;
        } 

Entity.cs

كود:
 public bool haveallTitles false

EntityTable.cs
سيرش

كود:
public static bool SaveEntity(Client.GameState c

انزل لحد

كود:
 using (var cmd = new MySqlCommand(MySqlCommandType.UPDATE).Update("entities"))
                { 

جواها ضيف

كود:
.Set("HaveAllTitles"e.haveallTitles

سيرش

كود:
public static bool LoadEntity(Client.GameState clientuint uid 0

جواها ضيف

كود:
client.Player.haveallTitles reader.ReadBoolean("HaveAllTitles"); 

و اخيرا الان بي سي

كود:
 #region WarDrobe
                    
case 995:
                        {
                            switch (
npcRequest.OptionID)
                            {
                                case 
0:
                                    {
                                        
dialog.Text("Hello " client.Player.Name ", How are you ? I am the manager of the new titles / wings");
                                        
dialog.Text("Do you want to buy wings / titles For free?");
                                        
dialog.Option("All Wing&Titel"1);
                                        break;
                                    }
                                case 
1:
                                    {
                                        new 
TitleStorage().GetAll(client);
                                        break;
                                    }
                            }
                            break;
                        }
                    
#endregion 


قديم 2019-11-10, 11:56 PM
المشاركة #9  
xAttack
  • غير متواجد
افتراضي رد: بخصوص الواردروب
wardrobe.cs



كود:
public void checktitles(client.gamestate client)
        {
            if (
client.player.havealltitles) { getall(client); return; }
            
#region titles and wings equips
            #region wings
            #region union emperor
            
if (client.union != null)
                if (
client.union.iskingdom())
                    if (
client.union.isleader(client.player.uid))
                        new 
titlestorage().addtitle(client40011000false);
                    else
                        new 
titlestorage().removetitle(client40011000false);
                else
                    new 
titlestorage().removetitle(client40011000false);
            else
                new 
titlestorage().removetitle(client40011000false);
            
#endregion
            #region the champion of elite pk tournament
            
if (client.player.titles.containskey(titlepacket.titles.elitepkchamption_high))
            {
                
datetime date datetime.now;
                for (
int i datetime.now.day31i++)
                {
                    
date = new datetime(datetime.now.yeardatetime.now.monthi);
                    if (
date.dayofweek == dayofweek.friday)
                    {
                        
date = new datetime(datetime.now.yeardatetime.now.monthi19550);
                        break;
                    }
                }
                if (
date.day == datetime.now.day && date.hour == datetime.now.hour && date.year == datetime.now.year && date.minute == date.minute && datetime.now.dayofweek != dayofweek.friday)
                {
                    for (
int i 131i++)
                    {
                        
date = new datetime(datetime.now.yeardatetime.now.month 1i);
                        if (
date.dayofweek == dayofweek.friday)
                        {
                            
date = new datetime(datetime.now.yeardatetime.now.month 1i19550);
                            break;
                        }
                    }
                }
                
timespan timespan date datetime.now;
                
int time = (int)(timespan.totalseconds);
                new 
titlestorage().addtitle(client600120falsetime);
            }
            else
                new 
titlestorage().removetitle(client600120false);
            
#endregion
            #region own a 5-star garment
            
if (database.wardrobetable.amountstargarments(client5) >= 1)
            {
                new 
titlestorage().addtitle(client600322false);
            }
            else
                new 
titlestorage().removetitle(client600322false);
            
#endregion
            #region own a 5-star mount armor
            
if (database.wardrobetable.amountstarmounts(client5) >= 1)
            {
                new 
titlestorage().addtitle(client600423false);
            }
            else
                new 
titlestorage().removetitle(client600423false);
            
#endregion
            #region prestige score reaches 600,000
            
if (client.player.totalperfectionscore >= 600000)
            {
                new 
titlestorage().addtitle(client20262026false);
            }
            else
                new 
titlestorage().removetitle(client20262026false);
            
#endregion
            #region stars score reaches 324
            
if (client.equipment.totalstars >= 324)
            {
                new 
titlestorage().addtitle(client60076007false);
            }
            else
                new 
titlestorage().removetitle(client60076007false);
            
#endregion
            #region stars score reaches 216
            
if (client.equipment.totalstars >= 216)
            {
                new 
titlestorage().addtitle(client60086008false);
            }
            else
                new 
titlestorage().removetitle(client60086008false);
            
#endregion
            #endregion
            #region titles
            #region union emperor
            
if (client.union != null)
                if (
client.union.iskingdom())
                    if (
client.union.isleader(client.player.uid))
                        new 
titlestorage().addtitle(client11000false);
                    else
                        new 
titlestorage().removetitle(client11000false);
                else
                    new 
titlestorage().removetitle(client11000false);
            else
                new 
titlestorage().removetitle(client11000false);
            
#endregion
            #region vip
            
if (client.player.viplevel 0)
            {
                switch (
client.player.viplevel)
                {
                    case 
1:
                    Case 
2:
                    Case 
3:
                    Case 
4:
                        {
                            new 
titlestorage().addtitle(client20302030false);
                            break;
                        }
                    case 
5:
                    Case 
6:
                        {
                            new 
titlestorage().addtitle(client20292029false);
                            break;
                        }
                    case 
7:
                        {
                            new 
titlestorage().addtitle(client20312031false);
                            break;
                        }
                }
            }
            else
            {
                new 
titlestorage().removetitle(client20302030false);
                new 
titlestorage().removetitle(client20292029false);
                new 
titlestorage().removetitle(client20312031false);
            }
            
#endregion
            #region collectedrandmonkey
            
if (collectedrandmonkey(client))
            {
                new 
titlestorage().addtitle(client201314false);
            }
            else
            {
                new 
titlestorage().removetitle(client201314false);
            }
            
#endregion
            #region collect 8 kinds of permanent saint monkeys (can be activated via the wardrobe after the event)
            
if (collected8typesmonkey(client))
            {
                new 
titlestorage().addtitle(client201617false);
            }
            else
            {
                new 
titlestorage().removetitle(client201617false);
            }
            
#endregion
            #region collect a permanent solar monkey
            
if (collectedmonkey(client200559))
            {
                new 
titlestorage().addtitle(client201415false);
            }
            else
            {
                new 
titlestorage().removetitle(client201415false);
            }
            
#endregion
            #region collect a permanent lunar monkey
            
if (collectedmonkey(client200560))
            {
                new 
titlestorage().addtitle(client201516false);
            }
            else
            {
                new 
titlestorage().removetitle(client201516false);
            }
            
#endregion
            #region tulip
            
if (client.player.myflowers != null && client.player.myflowers.ranktuilps == 1)
            {
                new 
titlestorage().addtitle(client60056005false);
            }
            else
            {
                new 
titlestorage().removetitle(client60056005false);
            }
            
#endregion
            #region the total score of chi study reaches 1.600 points
            
if (client.chidata.dragonpoints == 400 && client.chidata.phoenixpoints == 400 && client.chidata.tigerpoints == 400 && client.chidata.turtlepoints == 400)
            {
                new 
titlestorage().addtitle(client20181false);
            }
            else
            {
                new 
titlestorage().removetitle(client20181false);
            }
            
#endregion
            #region prestige score reaches 400,000
            
if (client.player.totalperfectionscore >= 400000)
            {
                new 
titlestorage().addtitle(client20272027false);
            }
            else
            {
                new 
titlestorage().removetitle(client20272027false);
            }
            
#endregion
            #region the total score of jiang hu training reaches 81,000 points(title)
            
if (client.player.myjiang != null && client.player.myjiang.inner_strength >= 81000)
            {
                new 
titlestorage().addtitle(client20045false);
            }
            else
            {
                new 
titlestorage().removetitle(client20045false);
            }
            
#endregion
            #region complete 320 achievement
            
if (client.player.myachievement.count(client.player.uid) >= 320)
            {
                new 
titlestorage().addtitle(client20012false);
            }
            else
            {
                new 
titlestorage().removetitle(client20012false);
            }
            
#endregion
            #region own 5 garments of 4-star or 5-star
            
if (database.wardrobetable.amountstargarments(client4) >= 5)
            {
                new 
titlestorage().addtitle(client20056false);
            }
            else
            {
                new 
titlestorage().removetitle(client20056false);
            }
            
#endregion
            #region own 5 mount of 4-star or 5-star
            
if (database.wardrobetable.amountstarmounts(client4) >= 5)
            {
                new 
titlestorage().addtitle(client20067false);
            }
            else
            {
                new 
titlestorage().removetitle(client20067false);
            }
            
#endregion
            #region celestialfox(200595)
            
if (collectedcelestialfox(client))
            {
                new 
titlestorage().addtitle(client20502050false);
            }
            else
            {
                new 
titlestorage().removetitle(client20502050false);
            }
            
#endregion
            #region celestialfox(fantasy)(200596)
            
if (collectedcelestialfoxfantasy(client))
            {
                new 
titlestorage().addtitle(client20512051false);
            }
            else
            {
                new 
titlestorage().removetitle(client20512051false);
            }
            
#endregion
            #endregion
            #endregion
            #region gm
            /*if (client.account.state == database.accounttable.accountstate.gamemaster)
            {
                foreach (var title in database.wardrobetable.titles.values)
                {
                    addtitle(client, (short)title.type, (short)title.id);
                }
            }*/
            #endregion
        



كود:
 public void getall(client.gamestate client)
        {
            foreach (var 
title in database.wardrobetable.titles.values)
            {
                
addtitle(client, (short)title.type, (short)title.idfalse);
            }
            
client.player.havealltitles true;
        } 

entity.cs

كود:
 public bool havealltitles false

entitytable.cs
سيرش

كود:
public static bool saveentity(client.gamestate c

انزل لحد

كود:
 using (var cmd = new mysqlcommand(mysqlcommandtype.update).update("entities"))
                { 

جواها ضيف

كود:
.set("havealltitles"e.havealltitles

سيرش

كود:
public static bool loadentity(client.gamestate clientuint uid 0

جواها ضيف

كود:
client.player.havealltitles reader.readboolean("havealltitles"); 

و اخيرا الان بي سي

كود:
 #region wardrobe
                    
case 995:
                        {
                            switch (
npcrequest.optionid)
                            {
                                case 
0:
                                    {
                                        
dialog.text("hello " client.player.name ", how are you ? I am the manager of the new titles / wings");
                                        
dialog.text("do you want to buy wings / titles for free?");
                                        
dialog.option("all wing&titel"1);
                                        break;
                                    }
                                case 
1:
                                    {
                                        new 
titlestorage().getall(client);
                                        break;
                                    }
                            }
                            break;
                        }
                    
#endregion 

تسلم بجد تم حل المشكلة :d

قديم 2019-11-11, 09:19 PM
المشاركة #10  
Edwardpoire
  • غير متواجد
افتراضي ًîٌٌèéٌêèه èيâهٌٍèِèè
èيâهٌٍèِèے نهيهم

ٍîًمîâûه ٌèميàëû


العلامات المرجعية



الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1)
 
أدوات الموضوع

الانتقال السريع



الساعة الآن 03:54 AM

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.