منتدي اكواد

منتدي اكواد (https://code.vpscairo.com/index.php)
-   مشكلات السيرفيرات كونكر الشخصيه (https://code.vpscairo.com/forumdisplay.php?f=12)
-   -   التعديل ع portals (https://code.vpscairo.com/showthread.php?t=3228)

midoazoz 2019-12-05 03:45 PM

التعديل ع portals
 
السلام عليكم ازاي اعدل ع ملف portals عشان انقل مكانها واخليها تودي فين وكده الي فاهم بس يشرح لو سمحت

Hassan Emprator 2019-12-05 08:04 PM

رد: التعديل ع portals
 
bin/debug/database/portals

midoazoz 2019-12-05 08:57 PM

رد: التعديل ع portals
 
اقتباس:

المشاركة الأصلية كتبت بواسطة hassan emprator (المشاركة 24234)
bin/debug/database/portals

انت اجاباتك بتبهرني منا عارف اعدل عليه ازاي واضيف واحده جديده ازاي وياريت تجربها قبل متقولي ياسطا معلش عشان انا حاولت وفيها ومظهرتش

Rider 2019-12-05 10:46 PM

رد: التعديل ع portals
 
كود PHP:

static void UsePortal(Data generalDataClient.GameState client)
        {
            
client.Entity.Action KhaledMohamed.Game.Enums.ConquerAction.None;
            
client.ReviveStamp Time32.Now;
            
client.Attackable false;
            
ushort portal_X = (ushort)(generalData.dwParam 0xFFFF);
            
ushort portal_Y = (ushort)(generalData.dwParam >> 16);
            

            
string portal_ID portal_X.ToString() + ":" portal_Y.ToString() + ":" client.Map.ID.ToString();
            if (
client.Account.State == Database.AccountTable.AccountState.ProjectManager)
                
client.Send(new Message("Portal ID: " portal_IDSystem.Drawing.Color.RedNetwork.GamePackets.Message.TopLeft));

            foreach (
Game.Portal portal in client.Map.Portals)
            {
                
int newmap portal.DestinationMapID 1000;
                if (
Kernel.GetDistance(portal.CurrentXportal.CurrentYclient.Entity.Xclient.Entity.Y) <= 4)
                {
                    if (
client.Player.Servernum == 1)
                    {
                        
client.Entity.Teleport(portal.DestinationMapIDportal.DestinationXportal.DestinationYfalse);
                        return;
                    }
                    else
                    {
                        if(
portal.DestinationMapID==1002)//
                            
client.Entity.Teleport(1004portal.DestinationXportal.DestinationYfalse);//  هتاخد سطر ده و الي فوقه كوبي  و باست عشان تضيف مابات تانيه
                        // 1002 مابه قديمه الي هتخرج فيها
                        //1004 مابه جديده الي هتخرج فيها طالما انته ف سيرفير تاني
                        
if (portal.DestinationMapID == 1002)
                            
client.Entity.Teleport(portal.DestinationMapIDportal.DestinationXportal.DestinationYfalse);
                        return;
                    }
                }
            }
            if (
client.Player.Servernum == 1)
            {
                
client.Entity.Teleport(1002300278);
            }
            else
            {
                
client.Entity.Teleport(1002300278); //مابه سيرفير تاني
            
}
        } 


midoazoz 2019-12-06 12:40 AM

رد: التعديل ع portals
 
اقتباس:

المشاركة الأصلية كتبت بواسطة rider (المشاركة 24255)
كود PHP:

static void useportal(data generaldataclient.gamestate client)
        {
            
client.entity.action khaledmohamed.game.enums.conqueraction.none;
            
client.revivestamp time32.now;
            
client.attackable false;
            
ushort portal_x = (ushort)(generaldata.dwparam 0xffff);
            
ushort portal_y = (ushort)(generaldata.dwparam >> 16);
            

            
string portal_id portal_x.tostring() + ":" portal_y.tostring() + ":" client.map.id.tostring();
            if (
client.account.state == database.accounttable.accountstate.projectmanager)
                
client.send(new message("portal id: " portal_idsystem.drawing.color.rednetwork.gamepackets.message.topleft));

            foreach (
game.portal portal in client.map.portals)
            {
                
int newmap portal.destinationmapid 1000;
                if (
kernel.getdistance(portal.currentxportal.currentyclient.entity.xclient.entity.y) <= 4)
                {
                    if (
client.player.servernum == 1)
                    {
                        
client.entity.teleport(portal.destinationmapidportal.destinationxportal.destinationyfalse);
                        return;
                    }
                    else
                    {
                        if(
portal.destinationmapid==1002)//
                            
client.entity.teleport(1004portal.destinationxportal.destinationyfalse);//  هتاخد سطر ده و الي فوقه كوبي  و باست عشان تضيف مابات تانيه
                        // 1002 مابه قديمه الي هتخرج فيها
                        //1004 مابه جديده الي هتخرج فيها طالما انته ف سيرفير تاني
                        
if (portal.destinationmapid == 1002)
                            
client.entity.teleport(portal.destinationmapidportal.destinationxportal.destinationyfalse);
                        return;
                    }
                }
            }
            if (
client.player.servernum == 1)
            {
                
client.entity.teleport(1002300278);
            }
            else
            {
                
client.entity.teleport(1002300278); //مابه سيرفير تاني
            
}
        } 


شايف يا عم حسن اهو ده الكلام تسلم يا ريدار ^_^

Hassan Emprator 2019-12-06 03:08 AM

رد: التعديل ع portals
 
اقتباس:

المشاركة الأصلية كتبت بواسطة midoazoz (المشاركة 24263)
شايف يا عم حسن اهو ده الكلام تسلم يا ريدار ^_^

هههههههه انا كنت بحسب المكان يحب


الساعة الآن 12:36 PM

مرحبا بكم في منتدي اكواد لتطوير الالعاب