احصائياتى

الردود
36

المشاهدات
1442
 
ElSaher
.:: مشرف اقسام كونكر ::.

المشاركات
3,131

+التقييم
1.16

تاريخ التسجيل
Jun 2019

الاقامة
الزقازيق

نظام التشغيل
ويندوز 0

رقم العضوية
279
2020-09-04, 06:38 PM
المشاركة 1
2020-09-04, 06:38 PM
المشاركة 1
افتراضي قنصل اتاك لتحكم في الاتاك بكل سهولا
قبل اي حاجا القنصل بتاع ميدو عزوز بتعديلي
اول حاجا حمل الملف دا
عفواً لايمكن عرض الرابط إلا بعد الرد على الموضوع
وحطو في السورس
وغير Tofan بي اسم البروجكت بتاعك
صورة من القنصل

نروح علي شغل السي شارب او البروجكت يعني
افتح كلاس Program او Server

كود:
void CommandsAI 

ضيف الشفرة

كود:
 case "@ControlSpell":
                    {
                        
TOFAN.MohamedAyman.Gui.spell Mido = new MohamedAyman.Gui.spell();
                        
Mido.ShowDialog();
                        break;
                    } 

اعمل كلاس جديد باسم IniFiles وضيف فيه دول

كود:
namespace TOFAN
{
    
using System;
    
using System.Collections.Generic;
    
using System.ComponentModel;
    
using System.Globalization;
    
using System.IO;
    
using System.Runtime.InteropServices;
    
using System.Security;
    
using System.Text;

    public class 
IniFiles
    
{
        public const 
int MaxSectionSize = 0x7fff;
        private 
string NetDragon3DIP;

        public 
IniFiles(string path)
        {
            
this.NetDragon3DIP = System.IO.Path.GetFullPath(path);
        }

        public 
void DeleteKey(string sectionName, string keyName)
        {
            if (
sectionName == null)
            {
                throw new 
ArgumentNullException("sectionName");
            }
            if (
keyName == null)
            {
                throw new 
ArgumentNullException("keyName");
            }
            
this.DnySlYqaLh(sectionName, keyName, null);
        }

        public 
void DeleteSection(string sectionName)
        {
            if (
sectionName == null)
            {
                throw new 
ArgumentNullException("sectionName");
            }
            
this.DnySlYqaLh(sectionName, null, null);
        }

        private 
void DnySlYqaLh(string string_1, string string_2, string string_3)
        {
            if (!
Class1.WritePrivateProfileString(string_1, string_2, string_3, this.NetDragon3DIP))
            {
                throw new 
Win32Exception();
            }
        }

        public 
double GetDouble(string sectionName, string keyName, double defaultValue)
        {
            
string str = this.GetString(sectionName, keyName, "");
            if ((
str == null) || (str.Length == 0))
            {
                return 
defaultValue;
            }
            return 
Convert.ToDouble(str, CultureInfo.InvariantCulture);
        }

        public 
int GetInt16(string sectionName, string keyName, short defaultValue)
        {
            return 
Convert.ToInt16(this.GetInt32(sectionName, keyName, defaultValue));
        }

        public 
int GetInt32(string sectionName, string keyName, int defaultValue)
        {
            if (
sectionName == null)
            {
                throw new 
ArgumentNullException("sectionName");
            }
            if (
keyName == null)
            {
                throw new 
ArgumentNullException("keyName");
            }
            return 
Class1.GetPrivateProfileInt(sectionName, keyName, defaultValue, this.NetDragon3DIP);
        }

        public 
string[] GetKeyNames(string sectionName)
        {
            
string[] strArray;
            if (
sectionName == null)
            {
                throw new 
ArgumentNullException("sectionName");
            }
            
IntPtr ptr = Marshal.AllocCoTaskMem(0x7fff);
            try
            {
                
int num = Class1.GetPrivateProfileString_2(sectionName, null, null, ptr, 0x7fff, this.NetDragon3DIP);
                
strArray = smethod_0(ptr, num);
            }
            finally
            {
                
Marshal.FreeCoTaskMem(ptr);
            }
            return 
strArray;
        }

        public 
string[] GetSectionNames()
        {
            
string[] strArray;
            
IntPtr ptr = Marshal.AllocCoTaskMem(0x7fff);
            try
            {
                
int num = Class1.GetPrivateProfileSectionNames(ptr, 0x7fff, this.NetDragon3DIP);
                
strArray = smethod_0(ptr, num);
            }
            finally
            {
                
Marshal.FreeCoTaskMem(ptr);
            }
            return 
strArray;
        }

        public 
Dictionary<string, string> GetSectionValues(string sectionName)
        {
            List<
KeyValuePair<string, string>> sectionValuesAsList = this.GetSectionValuesAsList(sectionName);
            
Dictionary<string, string> dictionary = new Dictionary<string, string>(sectionValuesAsList.Count);
            foreach (
KeyValuePair<string, string> pair in sectionValuesAsList)
            {
                if (!
dictionary.ContainsKey(pair.Key))
                {
                    
dictionary.Add(pair.Key, pair.Value);
                }
            }
            return 
dictionary;
        }

        public List<
KeyValuePair<string, string>> GetSectionValuesAsList(string sectionName)
        {
            
string[] strArray;
            if (
sectionName == null)
            {
                throw new 
ArgumentNullException("sectionName");
            }
            
IntPtr ptr = Marshal.AllocCoTaskMem(0x7fff);
            try
            {
                
int num2 = Class1.GetPrivateProfileSection(sectionName, ptr, 0x7fff, this.NetDragon3DIP);
                
strArray = smethod_0(ptr, num2);
            }
            finally
            {
                
Marshal.FreeCoTaskMem(ptr);
            }
            List<
KeyValuePair<string, string>> list = new List<KeyValuePair<string, string>>(strArray.Length);
            for (
int i = 0; i < strArray.Length; i++)
            {
                
int index = strArray[i].IndexOf('=');
                
string key = strArray[i].Substring(0, index);
                
string str2 = strArray[i].Substring(index + 1, (strArray[i].Length - index) - 1);
                list.
Add(new KeyValuePair<string, string>(key, str2));
            }
            return list;
        }

        public 
string GetString(string sectionName, string keyName, string defaultValue)
        {
            if (
sectionName == null)
            {
                throw new 
ArgumentNullException("sectionName");
            }
            if (
keyName == null)
            {
                throw new 
ArgumentNullException("keyName");
            }
            
StringBuilder builder = new StringBuilder(0x7fff);
            
Class1.GetPrivateProfileString(sectionName, keyName, defaultValue, builder, 0x7fff, this.NetDragon3DIP);
            return 
builder.ToString();
        }

        private static 
string[] smethod_0(IntPtr intptr_0, int int_0)
        {
            if (
int_0 == 0)
            {
                return new 
string[0];
            }
            return 
Marshal.PtrToStringAuto(intptr_0, int_0 - 1).Split(new char[1]);
        }

        public 
void WriteValue(string sectionName, string keyName, double value)
        {
            
this.WriteValue(sectionName, keyName, value.ToString(CultureInfo.InvariantCulture));
        }

        public 
void WriteValue(string sectionName, string keyName, short value)
        {
            
this.WriteValue(sectionName, keyName, (int)value);
        }

        public 
void WriteValue(string sectionName, string keyName, int value)
        {
            
this.WriteValue(sectionName, keyName, value.ToString(CultureInfo.InvariantCulture));
        }

        public 
void WriteValue(string sectionName, string keyName, float value)
        {
            
this.WriteValue(sectionName, keyName, value.ToString(CultureInfo.InvariantCulture));
        }

        public 
void WriteValue(string sectionName, string keyName, string value)
        {
            if (
sectionName == null)
            {
                throw new 
ArgumentNullException("sectionName");
            }
            if (
keyName == null)
            {
                throw new 
ArgumentNullException("keyName");
            }
            if (
value == null)
            {
                throw new 
ArgumentNullException("value");
            }
            
this.DnySlYqaLh(sectionName, keyName, value);
        }

        public 
string Path
        
{
            
get
            
{
                return 
this.NetDragon3DIP;
            }
        }

        [
SuppressUnmanagedCodeSecurity]
        private static class 
Class1
        
{
            [
DllImport("kernel32.dll", CharSet = CharSet.Auto)]
            public static 
extern int GetPrivateProfileInt(string NetDragon3DIP, string string_1, int int_0, string string_2);
            [
DllImport("kernel32.dll", CharSet = CharSet.Auto)]
            public static 
extern int GetPrivateProfileSection(string NetDragon3DIP, IntPtr intptr_0, uint uint_0, string string_1);
            [
DllImport("kernel32.dll", CharSet = CharSet.Auto)]
            public static 
extern int GetPrivateProfileSectionNames(IntPtr intptr_0, uint uint_0, string NetDragon3DIP);
            [
DllImport("kernel32.dll", CharSet = CharSet.Auto)]
            public static 
extern uint GetPrivateProfileString(string NetDragon3DIP, string string_1, string string_2, StringBuilder stringBuilder_0, int int_0, string string_3);
            [
DllImport("kernel32.dll", EntryPoint = "GetPrivateProfileString", CharSet = CharSet.Auto)]
            public static 
extern uint GetPrivateProfileString_1(string NetDragon3DIP, string string_1, string string_2, [In, Out] char[] char_0, int int_0, string string_3);
            [
DllImport("kernel32.dll", EntryPoint = "GetPrivateProfileString", CharSet = CharSet.Auto)]
            public static 
extern int GetPrivateProfileString_2(string NetDragon3DIP, string string_1, string string_2, IntPtr intptr_0, uint uint_0, string string_3);
            [
DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
            public static 
extern bool WritePrivateProfileString(string NetDragon3DIP, string string_1, string string_2, string string_3);
        }
    }
} 

بعد كدا روح علي bin\Debug\database
اعمل ملف جديد باسم Spell اعمل txt باسم Spells بس كدا
ضيفها تحت اي شفرة
طيب هتشغلها ازاي
هتفتح القنصل وتكتب فيها
@ElSaher
وهتتعمل باذن الله
اي استفسار اكتب في تعليق



التعديل الأخير تم بواسطة ElSaher ; 2020-09-04 الساعة 09:16 PM
قديم 2020-09-04, 06:47 PM
المشاركة 2
محمودمحمدسالم
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: قنصل اتاك لتحكم في الاتاك بكل سهولا
عاش

قديم 2020-09-04, 07:13 PM
المشاركة 3
ElSaher
.:: مشرف اقسام كونكر ::.
  • غير متواجد
افتراضي رد: قنصل اتاك لتحكم في الاتاك بكل سهولا
عفواً لايمكن عرض الرابط إلا بعد الرد على الموضوع
عاش
شكراء لك

قديم 2020-09-04, 07:16 PM
المشاركة 4
Shit
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: قنصل اتاك لتحكم في الاتاك بكل سهولا
عااااااااش

قديم 2020-09-04, 07:21 PM
المشاركة 5
ElSaher
.:: مشرف اقسام كونكر ::.
  • غير متواجد
افتراضي رد: قنصل اتاك لتحكم في الاتاك بكل سهولا
عفواً لايمكن عرض الرابط إلا بعد الرد على الموضوع
عااااااااش
شكراء لك

قديم 2020-09-04, 07:27 PM
المشاركة 6
Uchiha T3Alo
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: قنصل اتاك لتحكم في الاتاك بكل سهولا
انت متاكد ان ده اتاك ؟ انا كل الى شايفوا ان القونصل ده موجود من زمن الزمن + ان فكرته كلها معتمدة على دمج الاسكلة نفسها مش على دمج اى حاجه خالص وده فى حد ذاته غلط فكرنى بواحد اسمه العطار كان عملها فى سورس اليكس ولاغى الاتاك بتاع اليكس بدل ما يكمل عليه لا لغى الاتاك بتاعه واعتمد على دمج الاسكلة ياسطى اديك 5/10 على السيستم

قديم 2020-09-04, 08:47 PM
المشاركة 7
waelsoliman
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: قنصل اتاك لتحكم في الاتاك بكل سهولا
3a4

قديم 2020-09-04, 08:48 PM
المشاركة 8
ElSaher
.:: مشرف اقسام كونكر ::.
  • غير متواجد
افتراضي رد: قنصل اتاك لتحكم في الاتاك بكل سهولا
عفواً لايمكن عرض الرابط إلا بعد الرد على الموضوع
انت متاكد ان ده اتاك ؟ انا كل الى شايفوا ان القونصل ده موجود من زمن الزمن + ان فكرته كلها معتمدة على دمج الاسكلة نفسها مش على دمج اى حاجه خالص وده فى حد ذاته غلط فكرنى بواحد اسمه العطار كان عملها فى سورس اليكس ولاغى الاتاك بتاع اليكس بدل ما يكمل عليه لا لغى الاتاك بتاعه واعتمد على دمج الاسكلة ياسطى اديك 5/10 على السيستم
5/10 كويس بردو يا حودا انا منزلو بقي وخلاص

قديم 2020-09-04, 08:54 PM
المشاركة 9
waelsoliman
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: قنصل اتاك لتحكم في الاتاك بكل سهولا
في ايرور في spell.cs
IniFiles

قديم 2020-09-04, 09:14 PM
المشاركة 10
ElSaher
.:: مشرف اقسام كونكر ::.
  • غير متواجد
افتراضي رد: قنصل اتاك لتحكم في الاتاك بكل سهولا
عفواً لايمكن عرض الرابط إلا بعد الرد على الموضوع
في ايرور في spell.cs
inifiles
تم التعديل علي الموضوع


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



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

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

المواضيع المتشابهه للموضوع: قنصل اتاك لتحكم في الاتاك بكل سهولا
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
خلي حالة السيرفير في الصفحه بحالة قنصل السورس Hazem تطوير سيرفرات كونكر 4 2020-08-27 04:13 AM
حل مشكلة ايرور قنصل الي بيجيلك لما الاكونت بينزل ريبورن[Rayzov3] Rider تطوير سيرفرات كونكر 2 2019-11-22 05:45 PM
شرح التعديل علي الاتاك Mero تطوير سيرفرات كونكر 0 2019-04-23 11:51 PM


الساعة الآن 05:34 AM