[GUNNY] Cho hỏi cách thay tọa độ quái!!!
Hello & Welcome to our community. Is this your first visit? Đăng Ký
Follow us on
Follow us on Facebook Follow us on Twitter Linked In Flickr Watch us on YouTube My Space Blogger
 
Kết quả 1 đến 4 của 4
  1. #1
    Thành Viên
    Ngày tham gia
    Aug 2011
    Bài viết
    42
    Thanks
    70
    Thanked 1 Time in 1 Post

    [GUNNY] Cho hỏi cách thay tọa độ quái!!!

    Cho em hỏi cách thay tọa độ quái hiện ra trong gunny offine với
    Khách viếng thăm hãy cùng zznh0kkun xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  2. #2
    Thành Viên quancoi000's Avatar
    Ngày tham gia
    Sep 2011
    Bài viết
    572
    Thanks
    336
    Thanked 216 Times in 61 Posts

    Ðề: [GUNNY] Cho hỏi cách thay tọa độ quái!!!

    Trích dẫn Gửi bởi zznh0kkun [Only registered and activated users can see links. ]
    Cho em hỏi cách thay tọa độ quái hiện ra trong gunny offine với
    nhớ không nhầm thì thay trong script, chỗ redNPC với blueNPC, xem sau mỗi turn thì hiện ra ntn thì thay như thế!

    Code:
    using System;
    using System.Collections.Generic;
    using System.Text;
    using Game.Logic.AI;
    using Game.Logic.Phy.Object;
    using SqlDataProvider.Data;
    
    namespace GameServerScript.AI.Messions
    {
        public class ESM1001 : ExplorationMission
        {
            public override void OnPrepareNewSession()
            {
                // 加载文件
                Game.AddLoadingFile(1, "bombs/12.swf", "tank.resource.bombs.Bomb12");
                Game.AddLoadingFile(1, "bombs/41.swf", "tank.resource.bombs.Bomb41");
    
                // 远程 与 近身 NPC 编号列表
                remoteIds = new int[] { 101, 102 };
                livingIds = new int[] { 1001, 1002 };
    
                Game.LoadResources(livingIds);
                Game.LoadResources(remoteIds);
                Game.LoadNpcGameOverResources(livingIds);
                Game.LoadNpcGameOverResources(remoteIds);
    
                // 设置 关卡地图
                int[] mapIds = { 1093, 1092, 1108, 1089, 1099 };
                Game.SetMap(GetMapId(mapIds,1093));
    
                // 设置 刷怪规则
                npcCreateParamSimple = new NpcCreateParam(0, 8, 0, 4, 0, 15);
                npcCreateParamNormal = new NpcCreateParam(0, 12, 0, 4, 0, 15);
                npcCreateParamHard = new NpcCreateParam(0, 16, 0, 4, 0, 15);
                npcCreateParamTerror = new NpcCreateParam(0, 20, 0, 4, 0, 15);
    
                // 加载 远程NPC使用炸弹
                ballIds = new Dictionary<int, int>();
                ballIds.Add(101, 12);
                ballIds.Add(102, 41);
    
                base.OnPrepareNewSession();
            }
        }
    }
    xem cái đoạn new NPC CreatParam đó, các pb khác tương tự!
    Đến với nhau bằng tình cảm nhưng chia tay vì tình dục...
    [Only registered and activated users can see links. ]

  3. #3
    Thành Viên hoaloi's Avatar
    Ngày tham gia
    Jul 2012
    Bài viết
    46
    Thanks
    9
    Thanked 5 Times in 4 Posts

    Ðề: [GUNNY] Cho hỏi cách thay tọa độ quái!!!

    Trích dẫn Gửi bởi quancoi000 [Only registered and activated users can see links. ]
    nhớ không nhầm thì thay trong script, chỗ redNPC với blueNPC, xem sau mỗi turn thì hiện ra ntn thì thay như thế!

    Code:
    using System;
    using System.Collections.Generic;
    using System.Text;
    using Game.Logic.AI;
    using Game.Logic.Phy.Object;
    using SqlDataProvider.Data;
    
    namespace GameServerScript.AI.Messions
    {
        public class ESM1001 : ExplorationMission
        {
            public override void OnPrepareNewSession()
            {
                // 加载文件
                Game.AddLoadingFile(1, "bombs/12.swf", "tank.resource.bombs.Bomb12");
                Game.AddLoadingFile(1, "bombs/41.swf", "tank.resource.bombs.Bomb41");
    
                // 远程 与 近身 NPC 编号列表
                remoteIds = new int[] { 101, 102 };
                livingIds = new int[] { 1001, 1002 };
    
                Game.LoadResources(livingIds);
                Game.LoadResources(remoteIds);
                Game.LoadNpcGameOverResources(livingIds);
                Game.LoadNpcGameOverResources(remoteIds);
    
                // 设置 关卡地图
                int[] mapIds = { 1093, 1092, 1108, 1089, 1099 };
                Game.SetMap(GetMapId(mapIds,1093));
    
                // 设置 刷怪规则
                npcCreateParamSimple = new NpcCreateParam(0, 8, 0, 4, 0, 15);
                npcCreateParamNormal = new NpcCreateParam(0, 12, 0, 4, 0, 15);
                npcCreateParamHard = new NpcCreateParam(0, 16, 0, 4, 0, 15);
                npcCreateParamTerror = new NpcCreateParam(0, 20, 0, 4, 0, 15);
    
                // 加载 远程NPC使用炸弹
                ballIds = new Dictionary<int, int>();
                ballIds.Add(101, 12);
                ballIds.Add(102, 41);
    
                base.OnPrepareNewSession();
            }
        }
    }
    xem cái đoạn new NPC CreatParam đó, các pb khác tương tự!
    Quangcoi oi cai mission bạn đưa ví dụ không thể thêm vào phó bản nào chạy được.
    Khách viếng thăm hãy cùng hoaloi xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  4. #4
    Thành Viên quancoi000's Avatar
    Ngày tham gia
    Sep 2011
    Bài viết
    572
    Thanks
    336
    Thanked 216 Times in 61 Posts

    Ðề: [GUNNY] Cho hỏi cách thay tọa độ quái!!!

    Trích dẫn Gửi bởi hoaloi [Only registered and activated users can see links. ]
    Quangcoi oi cai mission bạn đưa ví dụ không thể thêm vào phó bản nào chạy được.
    tớ nhầm cái này k phải script của s.
    bạn xem chỗ này:

    Code:
               // 设置 关卡地图
                int[] mapIds = { 1093, 1092, 1108, 1089, 1099 };
                Game.SetMap(GetMapId(mapIds,1093));
    tức là mấy cái script 1092, 1093, 1089, 1099 là các S của phó bản này.
    lấy script 1092 thử xem.
    mình tìm chả thấy 1092, thấy cái 2103 nên đưa làm ví dụ luôn nhé!


    Code:
    using System;
    using System.Collections.Generic;
    using System.Text;
    using Game.Logic.AI;
    using Game.Logic.Phy.Object;
    using Game.Logic;
    
    namespace GameServerScript.AI.Messions
    {
        public class CSM2103 : AMissionControl
        {
            private List<SimpleNpc> redNpc = new List<SimpleNpc>();
    
            private List<SimpleNpc> blueNpc = new List<SimpleNpc>();
    
            private int redCount = 0;
    
            private int blueCount = 0;
    
            private int redTotalCount = 0;
    
            private int blueTotalCount = 0;
    
            private int dieRedCount = 0;
    
            private int dieBlueCount = 0;
        
            private int redNpcID = 3001;
    
            private int blueNpcID = 3004;
    
            public override int CalculateScoreGrade(int score)
            {
                base.CalculateScoreGrade(score);
                if (score > 930)
                {
                    return 3;
                }
                else if (score > 850)
                {
                    return 2;
                }
                else if (score > 775)
                {
                    return 1;
                }
                else
                {
                    return 0;
                }
            }
    
            public override void OnPrepareNewSession()
            {
                base.OnPrepareNewSession();
                int[] resources = {redNpcID, blueNpcID};
                Game.LoadResources(resources);
                Game.LoadNpcGameOverResources(resources);
                Game.SetMap(1122);
            }
    
            public override void OnStartGame()
            {
                base.OnStartGame();
    
                for (int i = 0; i < 4; i++)
                {
                     redTotalCount++;
    
                    if (i < 1)
                    {
                        redNpc.Add(Game.CreateNpc(redNpcID, 900 + (i + 1) * 100, 505, 1));
                    }
                    else if (i < 3)
                    {
                        redNpc.Add(Game.CreateNpc(redNpcID, 920 + (i + 1) * 100, 505, 1));
                    }
                    else
                    {
                        redNpc.Add(Game.CreateNpc(redNpcID, 1000 + (i + 1) * 100, 515, 1));
                    }
                }
    
                blueTotalCount++;
                blueNpc.Add(Game.CreateNpc(blueNpcID, 1467, 495, 1));
            }
    
            public override void OnNewTurnStarted()
            {
                redCount = redTotalCount - dieRedCount;
                blueCount = blueTotalCount - dieBlueCount;
    
                if (Game.GetLivedLivings().Count == 0)
                {
                    Game.PveGameDelay = 0;
                }
    
    
                if (Game.TurnIndex > 1 && Game.CurrentPlayer.Delay > Game.PveGameDelay)
                {
                    if (blueCount == 3 && redCount == 12)
                    {
                        return;
                    }
    
                    if (redTotalCount < 12 && blueTotalCount < 3)
                    {
                        for (int i = 0; i < 4; i++)
                        {
                            redTotalCount++;
    
                            if (i < 1)
                            {
                                redNpc.Add(Game.CreateNpc(redNpcID, 900 + (i + 1) * 100, 505, 1));
                            }
                            else if (i < 3)
                            {
                                redNpc.Add(Game.CreateNpc(redNpcID, 920 + (i + 1) * 100, 505, 1));
                            }
                            else
                            {
                                redNpc.Add(Game.CreateNpc(redNpcID, 1000 + (i + 1) * 100, 515, 1));
                            }
                        }
    
                        blueTotalCount++;
                        blueNpc.Add(Game.CreateNpc(blueNpcID, 1467, 495, 1));
                    }
                    else
                    {
                        if (redCount < 12)
                        {
                            if (12 - redCount >= 4)
                            {
                                for (int i = 0; i < 4; i++)
                                {
                                    if (redTotalCount < 20 && redCount != 12)
                                    {
                                        redTotalCount++;
    
                                        if (i < 1)
                                        {
                                            redNpc.Add(Game.CreateNpc(redNpcID, 900 + (i + 1) * 100, 505, 1));
                                        }
                                        else if (i < 3)
                                        {
                                            redNpc.Add(Game.CreateNpc(redNpcID, 920 + (i + 1) * 100, 505, 1));
                                        }
                                        else
                                        {
                                            redNpc.Add(Game.CreateNpc(redNpcID, 1000 + (i + 1) * 100, 515, 1));
                                        }
                                    }
                                }
                            }
                            else if (12 - redCount > 0)
                            {
                                for (int i = 0; i < (12 - redCount); i++)
                                {
                                    if (redTotalCount < 20 && redCount != 12)
                                    {
                                        redTotalCount++;
    
                                        if (i < 1)
                                        {
                                            redNpc.Add(Game.CreateNpc(redNpcID, 900 + (i + 1) * 100, 505, 1));
                                        }
                                        else if (i < 3)
                                        {
                                            redNpc.Add(Game.CreateNpc(redNpcID, 920 + (i + 1) * 100, 505, 1));
                                        }
                                        else
                                        {
                                            redNpc.Add(Game.CreateNpc(redNpcID, 1000 + (i + 1) * 100, 515, 1));
                                        }
                                    }
                                }
                            }
    
                            if (blueCount < 3 && blueTotalCount < 5)
                            {
                                blueTotalCount++;
                                blueNpc.Add(Game.CreateNpc(blueNpcID, 1467, 495, 1));
                            }
                        }
                    }
    
                }
            }
    
            public override void OnBeginNewTurn()
            {
                base.OnBeginNewTurn();
            }
    
            public override bool CanGameOver()
            {
                bool result = true;
                dieRedCount = 0;
                dieBlueCount = 0;
    
               
    
                foreach (SimpleNpc npc in redNpc)
                {
                    if (npc.IsLiving)
                    {
                        result = false;
                    }
                    else
                    {
                        dieRedCount++;
                    }
                }
    
                foreach (SimpleNpc blueNpcSingle in blueNpc)
                {
                    if (blueNpcSingle.IsLiving)
                    {
                        result = false;
                    }
                    else
                    {
                        dieBlueCount++;
                    }
                }
    
                if (result && redTotalCount == 20 && blueTotalCount == 5)
                {
                    Game.IsWin = true;
                    return true;
                }
            
                if (Game.TurnIndex > Game.MissionInfo.TotalTurn - 1)
                {
                    return true;
                }
    
                return false;
            }
    
            public override int UpdateUIData()
            {
                base.UpdateUIData();
                return Game.TotalKillCount;
            }
    
            public override void OnGameOver()
            {
                base.OnGameOver();
                if (Game.GetLivedLivings().Count == 0)
                {
                    Game.IsWin = true;
                }
                else
                {
                    Game.IsWin = false;
                }
                List<LoadingFileInfo> loadingFileInfos = new List<LoadingFileInfo>();
                loadingFileInfos.Add(new LoadingFileInfo(2, "image/map/3", ""));
                Game.SendLoadResource(loadingFileInfos);
            }
        }
    }

    chỗ mình bôi đỏ đó, mình sẽ thấy là redNPC sau mỗi turn đc tạo ra ở các tọa độ (900,505) (920,505) (1000,515) còn blueNPC là (1467,495)

    với 1 số phó bản mà map của nó không có chướng ngại vật (tức là không có chỗ ở trên không, như kiểu s2 gà lúc đánh với đội trưởng, chỗ thằng đội trưởng đứng và đại loại như thế thì được coi là chướng ngại vật) thì tọa độ y (tọa độ ở phía sau) thì bạn nên để 308 thì NPC sẽ ở trên mặt đất thử thì biết
    Đến với nhau bằng tình cảm nhưng chia tay vì tình dục...
    [Only registered and activated users can see links. ]

  5. Các thành viên gởi lời cảm ơn đến quancoi000 vì bài viết này !

    haidang115 (11-10-12)

 

 

Các Chủ đề tương tự

  1. [Gunny] Share bộ quản lý game Gunny (Gunny Private Webpage v1.0)
    Bởi trong0981 trong diễn đàn Releases
    Trả lời: 54
    Bài viết cuối: 11-02-13, 04:52 PM
  2. Ai bít cách thay id quái gunny trong phó bản
    Bởi Scofield9x trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 2
    Bài viết cuối: 19-11-12, 10:13 PM
  3. [Gunny] Ai pro chỉ thay chỗ đứng khi vào phó bản
    Bởi Scofield9x trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 1
    Bài viết cuối: 13-08-12, 12:06 PM
  4. [MU] Ai biết muốn thay đổi skin select characterthì phải thay đổi những file nào k?
    Bởi vuhaihoang trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 4
    Bài viết cuối: 17-04-12, 05:22 PM

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •  
Múi giờ GMT +7. Bây giờ là 09:27 PM.
vBulletin®, Copyright ©2000-2011, Jelsoft Enterprises Ltd.
CLBGamesVN không chịu trách nhiệm về Luật Bản Quyền của các tài liệu, bài viết v.v...được đăng tải trên diễn đàn này.
Diễn đàn phát triển dưới sự đóng góp của tất cả thành viên. BQT chỉ là những người thành lập ra sân chơi, quản lý và duy trì về mặt kỹ thuật, nội dung khi hợp lệ.