احصائياتى

الردود
5

المشاهدات
737
 
انت عمري
.:: عضو نشيط ::.

    غير متواجد

المشاركات
185

+التقييم
0.07

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

الاقامة
Egypt

نظام التشغيل
Windows 7 Ultimate

رقم العضوية
1525
2019-10-01, 11:31 AM
المشاركة 1
2019-10-01, 11:31 AM
المشاركة 1
افتراضي تمت الإجابة ثغرة في ارينا السي بي اس هتجنني
السلام عليكم


عندي مشكلة او ثغرة مش عارف بس المهم عايز حلها لو سمحت



المشكلة عبارة عن ايه

دلوقتي انا عندي ارينا سي بي اس
لو انا روحت وحطيت اني اللعب علي 100 الف سي بي اس

بتيجي رسالة للجميع وبيتاخد مني ال100 الف سي بي اس والدنيا حلوة
طيب دلوقتي لما الرسالة بتجيلي ان فلان حط في الارينة مبلغ كذا فبدوس علي موافق بيخصم مني زي الخصم ال100 الف وبنخش احنا الاتنين جوا الارينة
تمام كدة لحد دلوقتي

لما تيجي للخصم الرسالة ان فلان حط في الارينة مثلا 100 الف سي بي اس اكيد لو دوست موافق وانا مش معاية مش هقدر اخش واكيد لما بدوس موافق وانا معاية قد

المدفوع بنخش مع بعض

المشكلة بقي ان لو دوست لا علي رهان الخصم

وروحت حطيت رهان 500 سي بي اس ودخل نفس الخصم الى كان مراهن ب100 الف سي بي اس

المشكلة بقي ان لو كسب الخصم الى حط رهان 500 سي بي اس يجيلو 100.500 يعني المفرود يكسب 500 زي الى هو دخل بيهم
لا دة بياخد السي بي اس كلو





المطلوب بعد اذنكم

عايز لم احط في الارينة مثلا 100 الف سي بي اس وخصم حط في الارينة 50 الف

لو وافق الخصم الى دفع 100 الف سي بي اس علي مبلغ الي الخصم حطه في الارينة الي هو 50 الف
عايز يتخصم فقط الى الخصم حطه ويرجع الباقي ويبقي احنا الاتنين بنافس بعضينا في الارينة علي ال100 الف الخصم حط 50 الف وانا كنت حاطط 100 الف
فلما انا وافقت اني اخش مع الخصم علي ال50 الف الى حطهم يرجعولي باقي السي بي اس مش يتلعب عليهم كلهم

مش ال150 الف كلهم



ملحوظه انا شغال علي سورس msg تقريبا بتاعي اليكس


ارجوا اني اكون قدرت اوصل المشكلة

ولكم مني جزيل الشكر والتقدير



أفضل جواب - كتبه AbuMaryam
ممكن تعدل البرايز بحيث ان كل لاعب يكسب الرهان الى راهن علية مش الي الاعب التاني راهن علية

جرب الفويد بتاع End دة و قولي النتيجة


كود:
public void End(uint Winner, uint Loser)//ending match void  With Recall back
        
{
            if (
PlayerOne.UID == Winner && PlayerTwo.UID == Loser)
            {
                if (
PlayerOne.Client != null && PlayerTwo.Client != null)
                {
                    
PlayerOne.Client.Player.ConquerPoints += PlayerOne.Bet;
                    
PlayerOne.Client.Player.ConquerPoints += PlayerOne.Bet;
                    
PlayerOne.Client.SendSysMesage("You won Elite PVP Cps Arena.");
                    
PlayerTwo.Client.SendSysMesage("You lost Elite PVP Cps Arena.");
                    
PlayerOne.Client.Teleport(298, 232, 1002);
                    
PlayerTwo.Client.Teleport(298, 232, 1002);
                    
PlayerOne = null;
                    
PlayerTwo = null;
                    
Process = ProcesType.Dead;
                }
            }
            if (
PlayerTwo.UID == Winner && PlayerOne.UID == Loser)
            {
                if (
PlayerOne.Client != null && PlayerTwo.Client != null)
                {
                    
PlayerTwo.Client.Player.ConquerPoints += PlayerTwo.Bet;
                    
PlayerTwo.Client.Player.ConquerPoints += PlayerTwo.Bet;
                    
PlayerTwo.Client.SendSysMesage("You won Elite PVP Cps Arena.");
                    
PlayerOne.Client.SendSysMesage("You lost Elite PVP Cps Arena.");
                    
PlayerOne.Client.Teleport(298, 232, 1002);
                    
PlayerTwo.Client.Teleport(298, 232, 1002);
                    
PlayerOne = null;
                    
PlayerTwo = null;
                    
Process = ProcesType.Dead;
                }
            }
            
//giving Winner Cps
            //teleporting both outside
            //Ending war and stop invokation
            //turning Process to Dead
        
} 

قديم 2019-10-01, 04:56 PM
المشاركة 2
Hassan Emprator
.:: مشرف قسم المشاكل ::.
الإجابات المقدمة: 301
  • غير متواجد
افتراضي رد: ثغرة في ارينا السي بي اس هتجنني
وريني الكود الي في npc

قديم 2019-10-01, 05:44 PM
المشاركة 3
Rider
.:: نائب المدير ::.
الإجابات المقدمة: 989
  • غير متواجد
افتراضي رد: ثغرة في ارينا السي بي اس هتجنني
متابع

قديم 2019-10-01, 08:14 PM
المشاركة 4
AbuMaryam
.:: عضو نشيط ::.
الإجابات المقدمة: 29
  • غير متواجد
افتراضي رد: ثغرة في ارينا السي بي اس هتجنني
مظنش انة ينفع تحدد القيمة الى هوا حاطتها انة يكسبها

فكرة الاتشالنج مبنية على الرهان

بحيث ان الاعب الاول يراهن ب مبلغ 100 مثلا
و الاعب التاني يراهن ب مبلغ 50 مثلا

يبقي كدة هيبقي عندنا مدخلين

1 - رهان الاعب الاول = 100 سي بي
2 - رهان الاعب الثاني = 50 سي بي

و ايآ كان الرقم الى كل واحد هيحطة هوا حر

الفائز مثلا ف الاتشالنج دة كان الاعب الثاني .

يبقي كدة الان بي سي هيكلمة ب الصيغة دي عشان يديلة الجائزة بتاعتة

الاعب الثاني =+ رهان الاعب الثاني
الاعب الثاني =+ رهان الاعب الاول
الاعب الاول=- رهان الاعب الاول
الاعب الاول.رسالة(انت خسرت الاتشالنج ضد الاعب الثاني ......)
الاعب الثاني.رسالة(مبروك يا بطل كسبت الاتشالنج ضد الاعب الاول ......)

يبقي كدة مش هينفع يكسب القيمة الى هوا حاطتها بس

هوا كدة هيرجعله فلوس الرهان بتاعتة الى كان مراهن بيها + فلوس الرهان بتاعت الاعب الى خسر


انا شرحتلك فكرة الاتشالنج ب البلدي و ب اختصار عشان تفهم الدنيا ماشية ازاي

وشوف بردو باقي ردود الاعضاء

يمكن حد يكون عندة فكرة احسن و يقدر يعملها

قديم 2019-10-01, 09:58 PM
المشاركة 5
انت عمري
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: ثغرة في ارينا السي بي اس هتجنني
دة لم بتكلم الانبي سي

كود:
 case 200:
                    {
                        if (
client.Player.Level < 100)
                        {
                            
data.AddText("sorry, you need to be at keast level 100.")
                        .
AddOption("Holy~Shit.", 255).AddAvatar(63).FinalizeDialog();
                        }
                        else
                        {
                            
data.AddText("Welcome, please insert the amount of cps u want to bet on.")
                       .
AddInput("minimum 500 CPS", 201).AddOption("Passing~by.", 255).AddAvatar(63).FinalizeDialog();
                        }
                        break;
                    }
                case 
201:
                    {
                        
uint bet = uint.Parse(Input);
                        if (
bet < 500)
                        {
                            
client.Player.MessageBox("Minimum 500 CPs.", null, null);
                            break;
                        }
                        if (
Game.MsgTournaments.MsgSchedules.ArenaCpsBattle.Working)
                        {
                            
client.Player.MessageBox("Minimum 500 CPs.", null, null);
                            break;
                        }
                        foreach (var 
user in Database.Server.GamePoll.Values)
                        {
                            
user.Player.MessageBox("Cps Tournment War Started Bet " + bet + " Cps", p =>
                            {
                                if (
Game.MsgTournaments.MsgSchedules.ArenaCpsBattle.SignUp(p, bet) == false)
                                {
                                    
p.SendSysMesage("don't have requierments.", MsgMessage.ChatMode.Service, MsgMessage.MsgColor.yellow);
                                }
                            }, 
null, 15);
                        }
                        break;
                    } 








دة ملف MsgCpsArenaSingle.cs


كود:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 
Project_Terror_v2.Game.MsgTournaments
{
    public class 
MsgCpsArenaSingle
    
{
        public 
TournamentType Type = TournamentType.MsgCpsArenaSingle;
        public 
bool Working = false, Joined = false, Teleported = false;
        public const 
uint MapID = 1760;
        public const 
uint MinCurrentBet = 500;
        public 
CSAPlayer PlayerOne = null, PlayerTwo = null;
        public 
DateTime MatchStamp = new DateTime();
        public 
ProcesType Process { get; set; }
        public 
DateTime ScoreStamp = new DateTime();

        public 
void SendMapPacket(ServerSockets.Packet stream)
        {
            foreach (var 
user in MapPlayers())
                
user.Send(stream);
        }
        public 
Client.GameClient[] MapPlayers()
        {
            return 
Database.Server.ServerMaps[MapID].Values.Where(p => InTournament(p)).ToArray();
        }
        public 
bool InTournament(Client.GameClient user)
        {
            return 
user.Player.Map == MapID;
        }
        private 
void AnnounceScores(ServerSockets.Packet stream)
        {
            
ScoreStamp = DateTime.Now.AddSeconds(2);
        }
        public 
MsgCpsArenaSingle(ProcesType _process = ProcesType.Dead)
        {
            
Process = _process;
        }

        public 
bool SignUp(Client.GameClient _user, uint _bet)
        {
            if (
PlayerOne != null && PlayerTwo != null)
            {
                
_user.SendSysMesage("Tournment Completed.");
                return 
false;
            }
            if (
_bet < MinCurrentBet)
                return 
false;
            if (
Joined)
                return 
false;
            if ((
_bet < MinCurrentBet ? true : false) == true)
            {
                
_bet = MinCurrentBet;
            }
            if (
_user.Player.ConquerPoints < _bet)
            {
                return 
false;
            }
            if(
PlayerOne == null)
            {
                
PlayerOne = null;
                
PlayerOne = new CSAPlayer() { UID = _user.Player.UID, Bet = _bet, Teleported = false };
                
_user.Player.ConquerPoints -= _bet;
                return 
true;
            }
            else
//if player one selected already but player two is still null
            
{
                if (!
PlayerOne.Client.Socket.Alive)
                {
                    
PlayerOne = null;
                    
PlayerOne = new CSAPlayer() { UID = _user.Player.UID, Bet = _bet, Teleported = false };
                    
_user.Player.ConquerPoints -= _bet;
                    return 
true;
                }
                if (
PlayerTwo == null)
                {
                    
PlayerTwo = null;
                    
PlayerTwo = new CSAPlayer() { UID = _user.Player.UID, Bet = _bet, Teleported = false };
                    
_user.Player.ConquerPoints -= _bet;
                    
Process = ProcesType.Idle;
                    return 
true;
                }
                else
                {
                    
_user.Player.MessageBox("Sorry Only 2 Members Avaliable Count.", null, null);
                }
            }
            return 
false;
        }

        public 
void CheckUp()
        {
            if (
Process == ProcesType.Dead)
            {
                foreach (var 
p in MapPlayers())
                {
                    
p.Teleport(298, 232, 1002);
                }
                return;
            }
            if (
Process == ProcesType.Idle)
            {
                if (
PlayerOne != null && PlayerTwo != null)
                {
                    if (
PlayerOne.Client.Socket.Alive && PlayerTwo.Client.Socket.Alive)
                    {
                        
SendPVPInvitation(30, PlayerOne.Client);
                        
SendPVPInvitation(30, PlayerTwo.Client);
                    }
                }
                else
                    return;
            }
            if (
Process == ProcesType.Alive)
            {
                if (!
PlayerOne.Client.Socket.Alive && PlayerTwo.Client.Socket.Alive)
                {
                    
End(PlayerTwo.UID, PlayerOne.UID);
                }
                else if (
PlayerOne.Client.Socket.Alive && !PlayerTwo.Client.Socket.Alive)
                {
                    
End(PlayerOne.UID, PlayerTwo.UID);
                }
                else if (!
PlayerOne.Client.Socket.Alive && !PlayerTwo.Client.Socket.Alive)
                {
                    
Process = ProcesType.Dead;
                    
PlayerOne = null;
                    
PlayerTwo = null;
                }
                else
                { }
                if (
DateTime.Now >= ScoreStamp)
                {
                    
using (var rec = new ServerSockets.RecycledPacket())
                    {
                        var 
stream = rec.GetStream();
                        
AnnounceScores(stream);
                    }
                }
                if (
DateTime.Now >= MatchStamp)
                {
                    if (
PlayerOne.Score > PlayerTwo.Score)
                    {
                        
End(PlayerOne.UID, PlayerTwo.UID);
                    }
                    else if (
PlayerOne.Score < PlayerTwo.Score)
                    {
                        
End(PlayerTwo.UID, PlayerOne.UID);
                    }
                    else
                    {
                        
MatchStamp.AddSeconds(30);
                        
PlayerOne.Client.Player.MessageBox("Fight Still For 30 Seconds More.", null, null, 30);
                        
PlayerTwo.Client.Player.MessageBox("Fight Still For 30 Seconds More.", null, null, 30);
                    }
                }
            }
        }
        public 
void End(uint Winner, uint Loser)//ending match void  With Recall back
        
{
            if (
PlayerOne.UID == Winner && PlayerTwo.UID == Loser)
            {
                if (
PlayerOne.Client != null && PlayerTwo.Client != null)
                {
                    
PlayerOne.Client.Player.ConquerPoints += PlayerOne.Bet;
                    
PlayerOne.Client.Player.ConquerPoints += PlayerTwo.Bet;
                    
PlayerOne.Client.SendSysMesage("You won Elite PVP Cps Arena.");
                    
PlayerTwo.Client.SendSysMesage("You lost Elite PVP Cps Arena.");
                    
PlayerOne.Client.Teleport(299, 292, 1002);
                    
PlayerTwo.Client.Teleport(299, 292, 1002);
                    
PlayerOne = null;
                    
PlayerTwo = null;
                    
Process = ProcesType.Dead;
                }
            }
            if (
PlayerTwo.UID == Winner && PlayerOne.UID == Loser)
            {
                if (
PlayerOne.Client != null && PlayerTwo.Client != null)
                {
                    
PlayerTwo.Client.Player.ConquerPoints += PlayerOne.Bet;
                    
PlayerTwo.Client.Player.ConquerPoints += PlayerTwo.Bet;
                    
PlayerTwo.Client.SendSysMesage("You won Elite PVP Cps Arena.");
                    
PlayerOne.Client.SendSysMesage("You lost Elite PVP Cps Arena.");
                    
PlayerOne.Client.Teleport(299, 292, 1002);
                    
PlayerTwo.Client.Teleport(299, 292, 1002);
                    
PlayerOne = null;
                    
PlayerTwo = null;
                    
Process = ProcesType.Dead;
                }
            }
            
//giving Winner Cps
            //teleporting both outside
            //Ending war and stop invokation
            //turning Process to Dead
        
}
        public 
void Teleport(uint UID)
        {
            if (
PlayerOne == null || PlayerTwo == null)
                return;
            
ushort x = 0;
            
ushort y = 0;
            
Role.GameMap Map = Database.Server.ServerMaps[MapID];
            
Map.GetRandCoord(ref x, ref y);
            if (
PlayerOne.UID == UID && PlayerOne.Client.Socket.Alive)
            {
                
PlayerOne.Client.Teleport(x, y, MapID);
                
PlayerOne.Client.Player.MessageBox("StartFighting Still Working For 100 Seconds.", null, null, 100);
                
PlayerOne.Client.Player.SetPkMode(Role.Flags.PKMode.PK);
                if (
MapPlayers().Length == 2)
                {
                    
Process = ProcesType.Alive;
                    
MatchStamp = DateTime.Now.AddSeconds(90);
                }
            }
            else if (
PlayerTwo.UID == UID && PlayerTwo.Client.Socket.Alive)
            {
                
PlayerTwo.Client.Teleport(x, y, MapID);
                
PlayerOne.Client.Player.MessageBox("StartFighting Still Working For 100 Seconds.", null, null, 100);
                
PlayerTwo.Client.Player.SetPkMode(Role.Flags.PKMode.PK);
                if (
MapPlayers().Length == 2)
                {
                    
Process = ProcesType.Alive;
                    
MatchStamp = DateTime.Now.AddSeconds(100);
                }
            }
            else
            {
            }
        }
        public 
void GiveUp(uint UID)
        {
            if (
PlayerOne.UID == UID && PlayerOne.Client.Socket.Alive)
            {
                
End(PlayerTwo.UID, UID);
            }
            if (
PlayerTwo.UID == UID && PlayerTwo.Client.Socket.Alive)
            {
                
End(PlayerOne.UID, UID);
            }
        }
        public 
void ResondInteract(uint UID, uint Damage)
        {
            if (
PlayerTwo != null && PlayerOne != null)
            {
                if (
PlayerOne.Client.Socket.Alive && PlayerTwo.Client.Socket.Alive)
                {
                    if (
UID == PlayerOne.UID)
                    {
                        
PlayerOne.Score += Damage;
                    }
                    if (
UID == PlayerTwo.UID)
                    {
                        
PlayerTwo.Score += Damage;
                    }
                }
            }
        }
        
internal static bool SendPVPInvitation(int Secounds, Client.GameClient client, Game.MsgServer.MsgStaticMessage.Messages messaj = Game.MsgServer.MsgStaticMessage.Messages.None)
        {
#if Arabic
             
string Message = "Cps Arena Betting Battle Match Started Want To Accept Or Give UP?";
#else
            
string Message = "Cps Arena Betting Battle Match Started Want To Accept Or Give UP?";
#endif

            
using (var rec = new ServerSockets.RecycledPacket())
            {
                var 
stream = rec.GetStream();

                var 
packet = new Game.MsgServer.MsgMessage(Message, MsgServer.MsgMessage.MsgColor.yellow, MsgServer.MsgMessage.ChatMode.Center).GetArray(stream);
                    if (!
client.Player.OnMyOwnServer || client.IsConnectedInterServer())
                        return 
false;
                    
client.Send(packet);
                    
client.Player.MessageBox(Message, new Action<Client.GameClient>(user => MsgTournaments.MsgSchedules.ArenaCpsBattle.Teleport(user.Player.UID)), user => MsgTournaments.MsgSchedules.ArenaCpsBattle.GiveUp(user.Player.UID), Secounds, messaj);
                    return 
true;
            }
        }
    }
    public class 
CSAPlayer
    
{
        public 
uint UID;
        public 
uint Bet;
        public 
uint Score;
        public 
bool Teleported;
        public 
string Name { get { return Client.Player.Name; } }
        public 
Client.GameClient Client
        
{
            
get
            
{
                if (
this.UID == 0)
                    return 
null;
                if (
Database.Server.GamePoll.ContainsKey(this.UID))
                {
                    return 
Database.Server.GamePoll[this.UID];
                }
                return 
null;
            }
        }
    }
} 


قديم 2019-10-01, 11:47 PM
المشاركة 6
AbuMaryam
.:: عضو نشيط ::.
الإجابات المقدمة: 29
  • غير متواجد
افتراضي رد: ثغرة في ارينا السي بي اس هتجنني
ممكن تعدل البرايز بحيث ان كل لاعب يكسب الرهان الى راهن علية مش الي الاعب التاني راهن علية

جرب الفويد بتاع End دة و قولي النتيجة


كود:
public void End(uint Winner, uint Loser)//ending match void  With Recall back
        
{
            if (
PlayerOne.UID == Winner && PlayerTwo.UID == Loser)
            {
                if (
PlayerOne.Client != null && PlayerTwo.Client != null)
                {
                    
PlayerOne.Client.Player.ConquerPoints += PlayerOne.Bet;
                    
PlayerOne.Client.Player.ConquerPoints += PlayerOne.Bet;
                    
PlayerOne.Client.SendSysMesage("You won Elite PVP Cps Arena.");
                    
PlayerTwo.Client.SendSysMesage("You lost Elite PVP Cps Arena.");
                    
PlayerOne.Client.Teleport(298, 232, 1002);
                    
PlayerTwo.Client.Teleport(298, 232, 1002);
                    
PlayerOne = null;
                    
PlayerTwo = null;
                    
Process = ProcesType.Dead;
                }
            }
            if (
PlayerTwo.UID == Winner && PlayerOne.UID == Loser)
            {
                if (
PlayerOne.Client != null && PlayerTwo.Client != null)
                {
                    
PlayerTwo.Client.Player.ConquerPoints += PlayerTwo.Bet;
                    
PlayerTwo.Client.Player.ConquerPoints += PlayerTwo.Bet;
                    
PlayerTwo.Client.SendSysMesage("You won Elite PVP Cps Arena.");
                    
PlayerOne.Client.SendSysMesage("You lost Elite PVP Cps Arena.");
                    
PlayerOne.Client.Teleport(298, 232, 1002);
                    
PlayerTwo.Client.Teleport(298, 232, 1002);
                    
PlayerOne = null;
                    
PlayerTwo = null;
                    
Process = ProcesType.Dead;
                }
            }
            
//giving Winner Cps
            //teleporting both outside
            //Ending war and stop invokation
            //turning Process to Dead
        
} 



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



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

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

المواضيع المتشابهه للموضوع: ثغرة في ارينا السي بي اس هتجنني
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
ان بى سى الشى فى مره واحده Mr~Rayzo تطوير سيرفرات كونكر 3 2021-01-23 07:51 PM
ثغرة السيبس في سورس ماتركس مجدى مشكلات السيرفيرات كونكر الشخصيه 6 2020-01-24 06:40 PM
ثغرة السيبس في سورس ماتركس نزلتو والناس دخلت بتقول انهم عارفين الحل مجدى مشكلات السيرفيرات كونكر الشخصيه 2 2020-01-24 06:27 PM
حل ثغرة انك ممكن تصحا في الكوسته قبل الوقت Hazem تطوير سيرفرات كونكر 1 2019-09-26 10:25 PM
حل مشكلة ثغرة الصحوه قبل ال 5 ثواني Hazem تطوير سيرفرات كونكر 1 2019-05-25 06:48 AM


الساعة الآن 01:54 PM