الموضوع: التعديل ع portals
عرض مشاركة واحدة
قديم 2019-12-06, 12:40 AM
المشاركة 5
midoazoz
.:: عضو مميز ::.
  • غير متواجد
افتراضي رد: التعديل ع portals
كود:
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); //مابه سيرفير تاني
            
}
        } 
شايف يا عم حسن اهو ده الكلام تسلم يا ريدار ^_^