EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   MQWarp/MQZone/MQGate Detector (Code Name: The VZTZ Hammer!) (https://www.eqemulator.org/forums/showthread.php?t=24761)

trevius 06-04-2008 01:35 AM

Here is the best diff I can get for changing from the old code to the new code. I think I have everything here, but there could definitely be a mistake or 2. I think it should at least be a place to start. I had to add in vague line numbers because I don't have the exact lines where they should be in the 1110 code.

Code:

Index: zone/client.h
@@ Somewhere near Line 155 @@
        WarpDetected,                        // Lieka:  Return client to pre-warp location

@@ Somewhere near Line 190 @@
<        bool        WarpDetection(bool CTimer, float Distance);
        bool        WarpDetection(bool CTimer, float Distance, int32 last_ppu_timer);

Index: zone/client_packet.cpp
@@ Somewhere near Line 771 @@
< bool Client::WarpDetection(bool CTimer, float distance)
< {       
<        float last_distance;
<        if (threshold_timer.GetRemainingTime() < 1 && ((RuleR(Zone, MQWarpThresholdTimer)) != -1)) {  //Null:  If the timer is done, reset threshold, then reset timer //Lieka:  Integrated into Rules System.
<                warp_threshold = (RuleR(Zone, MQWarpLagThreshold));  //Lieka:  Integrated warp_threshold value into Rules System.  Original Value was 140.
<                threshold_timer.Start((RuleR(Zone, MQWarpThresholdTimer)), false); //Lieka:  Integrated timer duration value into the Rules System.  Original Value was 90000 (90 seconds).
<        }
<        if ((CTimer))
<                return false;
<        else
<        {
<                //Null Edit:  made warp detector fire only when the sum of all the warps in a period of time are greater than a threshold
<                //this makes the warp detector more lax on small warps, but still drops the hammer on the big ones.
<                if (distance>140.0f) {
<                        last_distance = (distance-140.0f);
<                        warp_threshold -= last_distance;
<                        last_warp_distance = last_distance;
<                }
<            return (warp_threshold < 0); //Null:  If the threshold is met, hit them with the hammer
<        }
< }
< void Client::CheatDetected(CheatTypes CheatType)
< { //[Paddy] ToDo: Break warp down for special zones. Some zones have special teleportation pads or bad .map files which can trigger the detector without a legit zone request.
<        switch (CheatType)
<        {
<                case MQWarp://Some zones have serious issues, turning off warp flags for these zones.
<                        if(!((zone->GetZoneID()==2)/*qeynos2*/ || (zone->GetZoneID()==9)/*freportw*/|| (zone->GetZoneID()==10)/*freporte*/ || (zone->GetZoneID()==34)/*nro*/ || (zone->GetZoneID()==24)/*erudin*/ || (zone->GetZoneID()==75)/*Paineel*/ || (zone->GetZoneID()==62)/*Felwitheb*/) && (RuleB(Zone, EnableMQWarpDetector) && ((this->Admin() < RuleI(Zone, MQWarpExemptStatus) || (RuleI(Zone, MQWarpExemptStatus)) == -1)))) //Lieka:  Exempt these zones from the MQWarp detector (This may be depricated now, but these zones were problems in the past)
<                        {
<                                Message(13, "Your account has been reported for hacking.");
<                                database.SetMQDetectionFlag(this->account_name,this->name, "/MQWarp", zone->GetShortName());
<                                SetMana(0);  //Lieka:  Remove all mana from player.
<                                SetHP(5);  //Lieka:  Set player's hitpoints to 5.
<                                BuffFadeAll();  //Lieka:  Wipe all of player's buffs.
<                                SpellFinished((RuleI(Zone, MQWarpDetectionSpellID)), this);  //Lieka:  Integrated into Rules System.  Spell to cast on players Default:  757 (Resurrection Effects).
<                                worldserver.SendEmoteMessage(0,0,0,13,"<MQWarp Detector>.  %s was just caught warping in %s.  Come get your free kill!",this->GetName(),zone->GetLongName());
<                                warp_threshold = 1;  //Null:  bringing the detector back up to one to avoid chain detections.
<                        }
<                        break;
<                case MQZone:
<                        if(!( (zone->GetZoneID()==31)/*sola*/ || (zone->GetZoneID()==32)/*solb*/ || (zone->GetZoneID()==25)/*nek*/ || (zone->GetZoneID()==27)/*lava*/ ) && (RuleB(Zone, EnableMQZoneDetector))&& ((this->Admin() < RuleI(Zone, MQZoneExemptStatus) || (RuleI(Zone, MQZoneExemptStatus)) == -1))) //Lieka:  Exempt these zones from the MQZone detector (This may be depricated now, but were problems in the past)
<                        {
<                                Message(13, "Your account has been reported for hacking.");
<                                database.SetMQDetectionFlag(this->account_name,this->name, "/MQZone", zone->GetShortName());
<                                SetMana(0);  //Lieka:  Remove all mana from player.
<                                SetHP(5);  //Lieka:  Set player's hitpoints to 5.
<                                BuffFadeAll();  //Lieka:  Wipe all of player's buffs.
<                                AddBuff(this,(RuleI(Zone, MQZoneDetectionSpellID)),30);  //Lieka:  Integrated into Rules System.  Add (de)buff on player for 30 ticks.  Default:  757 (Resurrection Effects).
<                                worldserver.SendEmoteMessage(0,0,0,13,"<MQZone Detector>.  %s as just caught using Macroquest to /Zone to %s.  Come get your free kill!",this->GetName(),zone->GetLongName()); //Lieka:  Broadcast to the server that the MQZone detector has caught a cheater.
<                        }
<                        break;
<                case MQGate:
<                        if (RuleB(Zone, EnableMQGateDetector)&& ((this->Admin() < RuleI(Zone, MQGateExemptStatus) || (RuleI(Zone, MQGateExemptStatus)) == -1))) {
<                                Message(13, "Your account has been reported for hacking.");
<                                database.SetMQDetectionFlag(this->account_name,this->name, "/MQGate", zone->GetShortName());
<                                this->SetZone(this->GetZoneID()); //Lieka:  Prevent the player from zoning, place him back in the zone where he tried to originally /gate.
<                                SetMana(0);  //Lieka:  Remove all mana from player.
<                                SetHP(5);  //Lieka:  Set player's hitpoints to 5.
<                                BuffFadeAll();  //Lieka:  Wipe all of player's buffs.
<                                AddBuff(this,(RuleI(Zone, MQGateDetectionSpellID)),30);  //Lieka:  Integrated into Rules System.  Add (de)buff on player for 30 ticks.  Default:  757 (Resurrection Effects).
<                                worldserver.SendEmoteMessage(0,0,0,13,"<MQGate Detector>.  %s was just caught using Macroquest to /Gate to %s.  Come get your free kill!",this->GetName(),zone->GetLongName()); //Lieka:  Broadcast to the server that the MQGate Detector has caught a cheater.
<                        }
<                        break;
<                case MQGhost: //Lieka:  Not currently implemented, but the framework is in place - just needs detection scenarios identified
<                        if (RuleB(Zone, EnableMQGhostDetector) && ((this->Admin() < RuleI(Zone, MQGhostExemptStatus) || (RuleI(Zone, MQGhostExemptStatus)) == -1))) {
<                                Message(13, "Your account has been reported for hacking.");
<                                database.SetMQDetectionFlag(this->account_name,this->name, "/MQGhost", zone->GetShortName());
<                                SetMana(0);  //Lieka:  Remove all mana from player.
<                                SetHP(5);  //Lieka:  Set player's hitpoints to 5.
<                                BuffFadeAll();  //Lieka:  Wipe all of player's buffs.
<                                SpellFinished((RuleI(Zone, MQGhostDetectionSpellID)), this);  //Lieka:  Integrated into Rules System.  Spell to cast on players Default:  757 (Resurrection Effects).
<                                worldserver.SendEmoteMessage(0,0,0,13,"<MQGhost Detector>.  %s was just caught using Macroquest to /Ghost to %s.  Come get your free kill!",this->GetName(),zone->GetLongName()); //Lieka:  Broadcast to the server that the MQGate Detector has caught a cheater.       
<                        }
<                        break;
<        }
< }

bool Client::WarpDetection(bool CTimer, float distance, int32 last_ppu_timer) //Lieka:  Completely reworked this function.  Rather than basing warp detection on large movement diffs, we now base it on the player's speed (update distance / update time)
{       
        if (CTimer)
                return false;
        else
        {
        movement_speed = distance / (last_ppu_timer/100);
        if (movement_speed > highest_movement_speed) {
                highest_movement_speed = movement_speed;
        }
        return (movement_speed > RuleR(Zone, MQWarpSpeedLimit)); //Lieka:  If the player breaks the speed limit, bring down the hammer.
        }
}

void Client::CheatDetected(CheatTypes CheatType)
{ //[Paddy] ToDo: Break warp down for special zones. Some zones have special teleportation pads or bad .map files which can trigger the detector without a legit zone request.
        switch (CheatType)
        {
                case MQWarp://Some zones have serious issues, turning off warp flags for these zones.
                        if(!((zone->GetZoneID()==2)/*qeynos2*/ || (zone->GetZoneID()==9)/*freportw*/|| (zone->GetZoneID()==10)/*freporte*/ || (zone->GetZoneID()==34)/*nro*/ || (zone->GetZoneID()==24)/*erudin*/ || (zone->GetZoneID()==75)/*Paineel*/ || (zone->GetZoneID()==62)/*Felwitheb*/) && (RuleB(Zone, EnableMQWarpDetector) && ((this->Admin() < RuleI(Zone, MQWarpExemptStatus) || (RuleI(Zone, MQWarpExemptStatus)) == -1)))) //Lieka:  Exempt these zones from the MQWarp detector (This may be depricated now, but these zones were problems in the past)
                        {
                                if (!RuleB(Zone, MQDetectorDisableSQLLogging)){
                                Message(13, "Your account has been reported for hacking.");
                                database.SetMQDetectionFlag(this->account_name, this->name, "/MQWarp", zone->GetShortName());
                                }
                                if(!RuleB(Zone, MQDetectorDisablePenalties)){ //Lieka:  Toggle Negative effects based on rule value
                                SetMana(0);  //Lieka:  Remove all mana from player.
                                SetHP(5);  //Lieka:  Set player's hitpoints to 5.
                                BuffFadeAll();  //Lieka:  Wipe all of player's buffs.
                                SpellFinished((RuleI(Zone, MQWarpDetectionSpellID)), this);  //Lieka:  Integrated into Rules System.  Spell to cast on players Default:  757 (Resurrection Effects).
                                }
                                if(!RuleB(Zone, MQDetectorDisableBroadcast)) //Lieka:  Toggle broadcast based on rule value
                                        worldserver.SendEmoteMessage(0,0,0,13,"<MQWarp Detector>.  %s was just caught warping in %s.  Come get your free kill!",this->GetName(),zone->GetLongName());
                        }
                        break;
                case MQZone:
                        if(!( (zone->GetZoneID()==31)/*sola*/ || (zone->GetZoneID()==32)/*solb*/ || (zone->GetZoneID()==25)/*nek*/ || (zone->GetZoneID()==27)/*lava*/ ) && (RuleB(Zone, EnableMQZoneDetector))&& ((this->Admin() < RuleI(Zone, MQZoneExemptStatus) || (RuleI(Zone, MQZoneExemptStatus)) == -1))) //Lieka:  Exempt these zones from the MQZone detector (This may be depricated now, but were problems in the past)
                        {
                                if (!RuleB(Zone, MQDetectorDisableSQLLogging)){
                                Message(13, "Your account has been reported for hacking.");
                                database.SetMQDetectionFlag(this->account_name, this->name, "/MQZone", zone->GetShortName());
                                }
                                if(!RuleB(Zone, MQDetectorDisablePenalties)){ //Lieka:  Toggle Negative effects based on rule value
                                SetMana(0);  //Lieka:  Remove all mana from player.
                                SetHP(5);  //Lieka:  Set player's hitpoints to 5.
                                BuffFadeAll();  //Lieka:  Wipe all of player's buffs.
                                AddBuff(this,(RuleI(Zone, MQZoneDetectionSpellID)),30);  //Lieka:  Integrated into Rules System.  Add (de)buff on player for 30 ticks.  Default:  757 (Resurrection Effects).
                                }
                                if(!RuleB(Zone, MQDetectorDisableBroadcast)) //Lieka:  Toggle broadcast based on rule value
                                        worldserver.SendEmoteMessage(0,0,0,13,"<MQZone Detector>.  %s as just caught using Macroquest to /Zone to %s.  Come get your free kill!",this->GetName(),zone->GetLongName()); //Lieka:  Broadcast to the server that the MQZone detector has caught a cheater.
                        }
                        break;
                case MQGate:
                        if (RuleB(Zone, EnableMQGateDetector)&& ((this->Admin() < RuleI(Zone, MQGateExemptStatus) || (RuleI(Zone, MQGateExemptStatus)) == -1))) {
                                if (!RuleB(Zone, MQDetectorDisableSQLLogging)){
                                Message(13, "Your account has been reported for hacking.");
                                database.SetMQDetectionFlag(this->account_name, this->name, "/MQGate", zone->GetShortName());
                                }
                                this->SetZone(this->GetZoneID()); //Lieka:  Prevent the player from zoning, place him back in the zone where he tried to originally /gate.
                                if(!RuleB(Zone, MQDetectorDisablePenalties)){ //Lieka:  Toggle Negative effects based on rule value
                                SetMana(0);  //Lieka:  Remove all mana from player.
                                SetHP(5);  //Lieka:  Set player's hitpoints to 5.
                                BuffFadeAll();  //Lieka:  Wipe all of player's buffs.
                                AddBuff(this,(RuleI(Zone, MQGateDetectionSpellID)),30);  //Lieka:  Integrated into Rules System.  Add (de)buff on player for 30 ticks.  Default:  757 (Resurrection Effects).
                                }
                                if(!RuleB(Zone, MQDetectorDisableBroadcast)) //Lieka:  Toggle broadcast based on rule value
                                        worldserver.SendEmoteMessage(0,0,0,13,"<MQGate Detector>.  %s was just caught using Macroquest to /Gate to %s.  Come get your free kill!",this->GetName(),zone->GetLongName()); //Lieka:  Broadcast to the server that the MQGate Detector has caught a cheater.
                        }
                        break;
                case MQGhost: //Lieka:  Not currently implemented, but the framework is in place - just needs detection scenarios identified
                        if (RuleB(Zone, EnableMQGhostDetector) && ((this->Admin() < RuleI(Zone, MQGhostExemptStatus) || (RuleI(Zone, MQGhostExemptStatus)) == -1))) {
                                if (!RuleB(Zone, MQDetectorDisableSQLLogging)){
                                Message(13, "Your account has been reported for hacking.");
                                database.SetMQDetectionFlag(this->account_name, this->name, "/MQGhost", zone->GetShortName());
                                }
                                if(!RuleB(Zone, MQDetectorDisablePenalties)){ //Lieka:  Toggle Negative effects based on rule value
                                SetMana(0);  //Lieka:  Remove all mana from player.
                                SetHP(5);  //Lieka:  Set player's hitpoints to 5.
                                BuffFadeAll();  //Lieka:  Wipe all of player's buffs.
                                SpellFinished((RuleI(Zone, MQGhostDetectionSpellID)), this);  //Lieka:  Integrated into Rules System.  Spell to cast on players Default:  757 (Resurrection Effects).
                                }
                                if(!RuleB(Zone, MQDetectorDisableBroadcast)) //Lieka:  Toggle broadcast based on rule value
                                        worldserver.SendEmoteMessage(0,0,0,13,"<MQGhost Detector>.  %s was just caught using Macroquest to /Ghost to %s.  Come get your free kill!",this->GetName(),zone->GetLongName()); //Lieka:  Broadcast to the server that the MQGate Detector has caught a cheater.                       
                        }
                        break;
        }
}

@@ Somewhere near Line 890 @@

        //Lieka:  Track duration between Player Position Updates to determine lag (for warp detection).
        if (ppu_timer.Enabled()) {
                last_ppu_timer = 40000 - ppu_timer.GetRemainingTime();
                if(last_ppu_timer > longest_ppu_timer) {
                        longest_ppu_timer = last_ppu_timer;
                }
        } else {
                last_ppu_timer = 1;
        }
        ppu_timer.Start(40000, true);

@@ Somewhere near Line 910 @@
<        if ((this->cheat_timer.GetRemainingTime())>1 && (this->cheat_timer.Enabled())) //Lieka:  Check to see if the cheat (exemption) timer is active - this is for debugging
<        {
<                //Spell timer is currently active
<                //worldserver.SendEmoteMessage(0,0,0,13,"Timer is Active.  %d True: %s",this->cheat_timer.GetRemainingTime(), (this->cheat_timer.GetRemainingTime()>1)? "true" : "false"); //Leika Edit:  Enable this to get debug messages.
<        }
<        else //Timer has elapsed or hasn't started, let's do a Warp Check
<        {
<                if ((WarpDetection(false, dist)) && ((admin <= RuleI(Zone, MQWarpExemptStatus)) || (RuleI(Zone, MQWarpExemptStatus) == -1))) //Exempt from warp detection if admin level is >  Rule:Zone:MQWarpExemptStatus
<                {
<                        printf("Warping Detected by %S Acct: %s Distance: %f.", GetName(), AccountName(), GetLWDistance());
<                        CheatDetected(MQWarp); //Lieka:  Execute MQWarp function on offending player
<                }

        if (((this->cheat_timer.GetRemainingTime())>1 && (this->cheat_timer.Enabled())) || longest_ppu_timer < 2) //Lieka:  Check to see if the cheat (exemption) timer is active - this is for debugging
        {
                //Spell timer is currently active
                //worldserver.SendEmoteMessage(0,0,0,13,"Timer is Active.  %d True: %s",this->cheat_timer.GetRemainingTime(), (this->cheat_timer.GetRemainingTime()>1)? "true" : "false"); //Leika Edit:  Enable this to get debug messages.
        }
        else //Timer has elapsed or hasn't started, let's do a Warp Check
        {
                if ((WarpDetection(false, dist, last_ppu_timer)) && ((RuleB(Zone,EnableMQGateDetector) && (admin <= RuleI(Zone, MQWarpExemptStatus)) || (RuleI(Zone, MQWarpExemptStatus) == -1)))) //Exempt from warp detection if admin level is >  Rule:Zone:MQWarpExemptStatus
                {
                        printf("Warping Detected by %s Distance: %f.", GetName(), dist);
                        this->CastToClient()->MovePC(zone->GetZoneID(), x_pos, y_pos, z_pos, heading, 2, WarpDetected); //Lieka Edit:  Move player back to pre-warp location
                        CheatDetected(MQWarp); //Lieka:  Execute MQWarp function on offending player
                        return;
                        }

Index: zone/mob.cpp
@@ Somewhere near Line 100 @@
<                threshold_timer(0), //Lieka:  Timer to allow exemptions MQWarp related to lag

@@ Somewhere near Line 105 @@
                ppu_timer(0), //Lieka:  Timer to track time between Player Update Packets (to detect lag) for MQWarp detection

@@ Somewhere near Line 125 @@
<        warp_threshold = 140;            //Null:  set the threshold on creation of mob instance
<        last_warp_distance = 0;                        //Null: set this one to zero also just because.

        longest_ppu_timer = 0;                        //Lieka:  reset longest player packet update timer record on creation of mob instance
        last_ppu_timer = 0;                                //Lieka:  reset last player packet update timer record on creation of mob instance
        movement_speed = 0;                                //Lieka:  reset player movement speed record on creation of mob instance
        highest_movement_speed = 0;                //Lieka:  reset highest recorded player movement speed on creation of mob instance

@@ Somewhere near Line 875 @@
<        client->Message(0, "  Last Warp Distance: %f Threshold Remaining: %f", GetLWDistance(), GetWarpThreshold());  //Null:  added this to check players last warp distance for debuging.

        client->Message(0, "  Last Player Position Update Timer: %i  Longest Player Position Update Timer: %i", GetLastPPUTimer(), GetLongestPPUTimer()); //Lieka:  added this to monitor player lag for MQWarp detection.
        client->Message(0, "  Current Movement Speed: %i  Highest Movement Speed: %i", GetMovementSpeed(), GetHighestMovementSpeed()); //Lieka:  added this to monitor player's movement speed (based on last PPU update / PPU time.








Index: zone/mob.h
@@ Somewhere near Line 455 @@
<        float GetLWDistance()                                        { return last_warp_distance; }    //Null:  these are used to return the values to #showstats
<        float GetWarpThreshold()                                { return warp_threshold; }                  //this one too       

        int32 GetLastPPUTimer()                                        { return last_ppu_timer; }  //Lieka:  Used in #showstats mainly for debugging and monitoring players
        int32 GetLongestPPUTimer()                                { return longest_ppu_timer; }  //Lieka:  Used in #showstats mainly for debugging and monitoring players
        int32 GetMovementSpeed()                                { return movement_speed; }        //Lieka:  Used in #showstats mainly for debugging and monitoring players
        int32 GetHighestMovementSpeed()                        { return highest_movement_speed; } //Lieka: Used in #showstats mainly for debugging and monitorint players       


@@ Somewhere near Line 785 @@
<        Timer threshold_timer;  //Null:  threshold timer
<        float warp_threshold;  //Null:  threshold for warp detector
<        float last_warp_distance;  //Null:  last distance logged as a warp, used for logs and #showstats

        Timer ppu_timer; //Lieka:  Timer used to track amount of time between Player Position Updates.
        int32 last_ppu_timer;  //Lieka:  Indicates last amount of time between the player's PPUs.
        int32 longest_ppu_timer; //Lieka:  indicates longest time that the player gone without a PPU (while in the current zone).
        float movement_speed;  //Lieka:  Calculated movement speed in units / second.
        float highest_movement_speed; //Lieka:  Highest movement speed reached.

Index: zone/spell_effects.cpp
@@ Somewhere near Line 1680 @@
                                        Message(15, "You have been summoned!");

Index: zone/zoning.cpp
@@ Somewhere near Line 430 @@
                case WarpDetected:
                        Message(15, "Returning to pre-warp location.");
                        ZonePC(zoneID, x, y, z, heading, ignorerestrictions, zm);
                        break;

@@ Somewhere near Line 450 @@
                case WarpDetected:
                        this->cheat_timer.Disable();
                        zonesummon_x = x_pos = x;
                        zonesummon_y = y_pos = y;
                        zonesummon_z = z_pos = z;
                        heading = heading;
                        break;


Index: common/ruletypes.h
@@ Somewhere near Line 75 @@
<  RULE_REAL ( Zone, MQWarpDetectorDistance, 30 ) //Lieka:  Distance a player must travel between client to server location updates before a warp is registered.  30 allows for beyond GM speed without lag.
<  RULE_REAL ( Zone, MQWarpLagThreshold, 140 ) //Lieka:  Distance beyond the Zone:MQWarpDetectorDistance that a player must travel within the MQWarpThresholdTimer amount of time before tripping the MQWarp detector.  Set to 0 to disable this feature.
<  RULE_REAL ( Zone, MQWarpThresholdTimer, 90000 ) //Lieka:  Amount of time before the warp_threshold resets to the Zone:MQWarpLagThreshold value.  Default: 90000 (900 seconds/15 minutes).  Set to -1 to disable this feature.

RULE_REAL ( Zone, MQWarpSpeedLimit, 30 ) //Lieka:  Units / second that a player is allowed to travel before a warp is registered. At level 50 SoW = 4, GM Speed = 7 Default value: 10
RULE_BOOL ( Zone, MQDetectorDisablePenalties, false ) //Lieka:  Disable penalties (including spell IDs in other MQ rules above when a player triggers a detector.  Default value: false
RULE_BOOL ( Zone, MQDetectorDisableBroadcast, false ) //Lieka:  Disable the broadcast message when the use of MQ is detected.  Default Value:  false
RULE_BOOL ( Zone, MQDetectorDisableSQLLogging, false ) //Lieka:  Disable logging of MQDetector events into SQL.  Default Value:  false



Index: zone/client.cpp
@@ Somewhere near Line 2300 @@
<        return result>(RuleR(Zone, MQWarpDetectorDistance)); //Lieka:  Integrated into Rules System; default value is 30, this allows for beyond GM speed without lag.


spider661 06-28-2008 02:04 PM

Quote:

case MQGhost: //Lieka: Not currently implemented, but the framework is in place - just needs detection scenarios identified
is this working now or no and if not has anyone found a way around it? i have seen a problem with it on my server as of late and would be nice to get told about it when im not online.

even if its just a simple check is pc close to a npc and what is the npc faction if its hostile there cheating i would be happy with that most the custom zones i use i just set all the npcs to the default hostile faction that npc loot editor sets it to. faction is 14329

KingMort 06-30-2008 03:13 PM

On behalf of Raid Addicts, I want to thank you for this fix. I am sure it will help a ton to stop cheaters on my server.. And I am sure it will also help my stress level. :)

Your a God send thanks, and keep up the good work !


King Mortenson
www.raidaddicts.org

KingMort 07-10-2008 08:28 PM

Seems that I am having zone looping issues in certain zones. Any Ideas why?

trevius 07-10-2008 09:50 PM

Your zone_points table isn't fully updated. Personally, I disabled the mqzone detection on my server so that I don't have to mess with it until either I or someone else gets all of the zone points added in and updated. The rest of it works fine. To disable mqzone detection, look at the rules posted for it.

KingMort 07-12-2008 04:04 PM

Yeah it is disabled but still in some zones people are going into loops, zoning in and out over and over or something... Only started happening after the code went in..

TheLieka 07-12-2008 07:58 PM

Never heard of this one. Is it only certain zones? If so, what zones?

Dax

cavedude 07-12-2008 08:00 PM

I had this looping problem with original code on the forums, however TGC has never had this issue with the altered version KLS put into the official code base. It was the incorrect zone_points in the DB causing it of course (putting in valid coords for both x,y,z, and target_x,y,z corrects this), and I believe KLS removed the zone check in the core code.

Angelox 07-12-2008 10:00 PM

Quote:

Originally Posted by cavedude (Post 152501)
I had this looping problem with original code on the forums, however TGC has never had this issue with the altered version KLS put into the official code base. It was the incorrect zone_points in the DB causing it of course (putting in valid coords for both x,y,z, and target_x,y,z corrects this), and I believe KLS removed the zone check in the core code.

What? I hope not! I've been all week fixing the zones - TheLieka already said what the problem was and what to do (disable in rule_values). This just needs to get all the zone_points fixed and in place; just a little work and I'll have it done in a while. I was planning on posting the fixes(when ready), but if it' out of the source, then it's pointless.

KLS 07-12-2008 10:11 PM

In the official source I still have the check but I took out the forced zone cancel which was what was causing the loop. The detection remained in place.

I'll be up for adding it back in if we can get the zone points completely updated.

KingMort 07-12-2008 10:12 PM

Hehe sorry if I caused a stir , perhaps someone could help me out.. Is our code out of date? Our good friend Ndnet is my prime coder atm so maybe you could help us fix this. Seems there are many zones where this is happening.. Players are getting frustrated.

Angelox 07-12-2008 10:39 PM

Quote:

Originally Posted by KLS (Post 152509)
In the official source I still have the check but I took out the forced zone cancel which was what was causing the loop. The detection remained in place.

I'll be up for adding it back in if we can get the zone points completely updated.

Did you quote it out or removed it? I need it to 'loop' so I can test after fixed (make sure it quit looping) - I don't want to post anything that's not tested.
What I'm doing is a slow process - already I thought i was testing for loops, so I guess I need to start over again.

Angelox 07-13-2008 08:37 AM

Quote:

Originally Posted by KingMort (Post 152510)
Hehe sorry if I caused a stir , perhaps someone could help me out.. Is our code out of date? Our good friend Ndnet is my prime coder atm so maybe you could help us fix this. Seems there are many zones where this is happening.. Players are getting frustrated.

What version EqEmu are you running?

KLS 07-13-2008 08:52 AM

Basically there's a block of code in zone.cpp that looks kinda like:

Code:

        if(closest_dist>(40000.0f) && closest_dist<max_distance2)
        {
                if(client)
                        client->CheatDetected(MQZone); //[Paddy] Someone is trying to use /zone
                LogFile->write(EQEMuLog::Status, "WARNING: Closest zone point for zone id %d is %f, you might need to update your zone_points table if you dont arrive at the right spot.",to,closest_dist);
                LogFile->write(EQEMuLog::Status, "<Real Zone Points>.  %f x %f y %fz ",x,y,z);
        }

if you add the line:
Code:

closest_zp = NULL;
Right before the closing bracket it will attempt to cancel the zone request. I took it out so it just logs the invalid zone since if it cancels a zone at a zone point it will dump the player right back there and they'll attempt to zone again; thus an endless loop. Ideally it should probably send a cancel zone request and send you to the safe point in the zone like with other cancel zone requests, wouldn't fix a bad zone table but players wouldn't loop endlessly.

Angelox 07-13-2008 10:41 AM

Thanks - Hopefully, when this is all done, The only players getting looped will be the cheaters.
I'm also making sure the player lands in a proper position after zone (for example, not facing the zone he just came from).

For anyone who has time to help;
If any one is doing this or wants to help, please post here. I started with Kunark (maybe you can work another expansion).
It's a simple process , once you understand what you are doing (I hope I understood!).

I use 'MySql Query Browser'
Here's an example;
The line
Code:

SELECT zone,y,x,z,heading,target_y,target_x,target_z,target_heading,target_zone_id FROM zone_points where zone ='firiona' and target_zone_id ='85'or zone= 'lakeofillomen'and target_zone_id ='84';
will produce this (open in a new window , I can't post HTML here I guess);
http://www.nahunta.org/~angelox/zonetest.html
what you see is the 'fixed' version of zone_points between FV and IllOmen. before fix, both sets of x, y, z were set to '0'.
Since I isolated the two occasions of zoning between mentioned zones , it's now much easier to change the right coords, and you can see which settings you need, for example;
x,y,z is where you should be in firiona and is the same as target_x, target_y, target_z in lakeofillomen, because that's where you were sent from. Same deal for lakeofillomens zone_points.
After the first query, you can re use the same one, just change 'zone' and 'target_zone_id' for the new query (Keep everything windowed, so you can switch from client to MySql Browser).

Since Kunark has so many zones, I went to EqAtlas, and printed the Zone Connection Map for Kunark, I then wrote in the zone number by each zone name there for reference. Now that I have a chart of all the zones with the connecting zonelines, I can find what I need for the query. Once that zone line is done, I go over the line with a red pen ( so I know it's done).
MySql Query Browser has 'on the fly' edit feature, so you can change the coords you are looking at.
#reloadzps doesn't always work right - so, if you think you got it right, and it still doesn't work, then you need to log out and restart the server.

I just thought I'd post in case anyone wants to help, we can get it done faster, if not I'll get it done, just will take a while.

trevius 07-13-2008 05:59 PM

Is there any way to add an IP Address column to the Hackers Table and have it log the IP that is being used to cheat from? This would be useful for the players who try to lie their way out of it. I am all about giving a second chance if I think one is warranted, but I hate being lied to.

As long as someone confesses and promises not to do it again, I am ok with that. But, if they lie about it and make up a story about someone else doing it on their account, I would prefer to just ban them outright if I can prove that they are lying.

Angelox 07-13-2008 06:41 PM

This should exempt any zones that are not ready;
Code:

UPDATE zone_points set x='999999',y='999999', z='999999' where x='0' and y='0' and z='0';
Since the query looks for only the ones that have x,y, and z with 0's, it will only fill in the ones that are not fixed. So far, it looks to be working.
For anyone just tuning in to this thread , Leika has already posted pre-Kunark fixes in the first part of this thread.

Angelox 07-13-2008 06:52 PM

Also (my edit time ran out);
I did notice some zones still will act funny, "closest_zp = NULL;" or not, until I did the 999999 fill with the query.
Here's more that I noticed; if you do a #goto in GM mode, when you zone, that's where you will land when you get to the other zone (same coords you #goto'd before) - I just spent hours in Howling Stones figuring this out. HS has one entry point, two exits, and both exits far away from zin and each other. So, although you may think you are exempt from the restriction in GM mode, don't believe it: Some things will not work right unless you play/test under normal conditions.

So_1337 08-01-2008 11:26 PM

I see that this is no longer stickied, but is work continuing on this? The detection is in, but there doesn't appear to be any form of punishment implemented that I can tell as of 1119.

Just checking in. The detection performs beautifully, thanks to everyone who has put work into this. It is sorely needed.

LordAdakos 11-24-2011 12:50 AM

Thread necroing, sorry -- Wondering if there was a way to implement punishment via perl script, or debuff ?


All times are GMT -4. The time now is 02:42 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.