• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Any Way to detect added Scripts?

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2010
Messages
950
like the title.. Any Way to detect added Scripts after a game is made?

Within a few days after i release my game (optimized) someone comes alone and adds a cheatpack script to it.. i mean im sure its never played becuz the bots dont host that one.. but it would be neat to be able to detect a line of the cheat packs code once its put in or even the activation text code entered and then Warn and crash the game when it happens.. xD
 
Level 3
Joined
Feb 6, 2009
Messages
50
yeah um protecting it doesn't quite work against a cheat pack...not all the time anyways, if there is a way to do something, there is always a way around that something. what codes are being used
ummm anyways...
the only thing I can think of right off the bat is, if you know any of the codes, or which cheat pack was implemented, make it if a player types that code in, than kick player from the game.

I think an easy way to figure out what codes are being used is make a debugmode where a player with your name types in a command (say debug) than it will relay any messages typed will be displayed as text to you (this way even if they go into obvs. chat it still gets to you)
i'm sure someone else will come up with a better way though XD
 
Level 8
Joined
Jun 28, 2008
Messages
356
I have an idea. The cheats have to use triggers, which are handles right? Then adding cheats would increase the standart amount of handles in the map at startup.

http://www.hiveworkshop.com/forums/jass-functions-413/vjass-handle-counter-119492/

First, make a map test like this:

On Initialization (Immedietly) execute call BJDebugMsg("Handles: " + I2S(CountHandles()))
Remember the number that appears at the beginning of the map. Then remove the debug message and add this:

if(CountHandles() != the number that was displayed) then

cheats a being used

else

everything is as normal

endif

I hope you get my idea.
 
Actually, I think HandleCounter is not going to work in this case.

What you can do is this:

JASS:
scope protect initializer init

function init takes nothing returns nothing
    local location loc = Location(0., 0.)
    if (GetHandleId(loc) != 0x100007) then // Adjust the integer by doing a BJDebugMsg() to know what it aught to be
        
        call BJDebugMsg("You are cheating!")
        
    else
        call RemoveLocation(loc)
        set loc = null
    endif
endfunction

endscope
 
Level 8
Joined
Jun 28, 2008
Messages
356
Actually, I think HandleCounter is not going to work in this case.

What you can do is this:

JASS:
scope protect initializer init

function init takes nothing returns nothing
    local location loc = Location(0., 0.)
    if (GetHandleId(loc) != 0x100007) then // Adjust the integer by doing a BJDebugMsg() to know what it aught to be
        
        call BJDebugMsg("You are cheating!")
        
    else
        call RemoveLocation(loc)
        set loc = null
    endif
endfunction

endscope

Why not? o_O Your code is better tho :] Here is something screwed up (using Bribe's code):

JASS:
scope protect initializer init

function init takes nothing returns nothing
    local location loc = Location(0., 0.)
    local dialog cheatdg = null
    if (GetHandleId(loc) != 0x100007) then // Adjust the integer by doing a BJDebugMsg() to know what it aught to be
        
        //Screwed up
        set cheatdg = DialogCreate()
        call DialogSetMessage(cheatdg, "No cheats _(_")
        call DialogDisplay(cheatdg, true) //no buttons, you can't close it :D You gotta Alt + F4, or Alt + Q + Q (if you know that)
        //End of screwed up
        
    else
        call RemoveLocation(loc)
        set loc = null
    endif
endfunction

endscope
 
Level 9
Joined
Oct 17, 2009
Messages
370
Maybe you could disable all triggers in the init trigger, and then enable the triggers u made, this would disable the other triggers if added, but... if its jass then it wont work. You could also remove the codes that u don't want if the cheatpack is added, like if gold is important in your map then just kick a player when they use -gold etc.
 
Wrong. The code gets obfuscated, so it would be a huge pain in the ass to find the init trigger and remove the anti-cheat system.
You don't know what you are talking about. I was able to unprotect dota in less then 1 hour with 4 tools and some hacks.

If anyone wants to hack your map, there is no way that you can actually prevent it.
I mean hacking does not mean it runs code at map init, but at ANY point. So there is no real method.
 
Level 8
Joined
Jun 28, 2008
Messages
356
You don't know what you are talking about. I was able to unprotect dota in less then 1 hour with 4 tools and some hacks.

If anyone wants to hack your map, there is no way that you can actually prevent it.
I mean hacking does not mean it runs code at map init, but at ANY point. So there is no real method.

You didn't understand what I was saying. The above anti-cheat thing that me and Bribe wrote is used on map initialization. If you want to inject cheat packs with a specific program that will prevent it. Ofcourse it's never 100% secure, but it will serve well to keep away the noobs who try to cheat cheap. Plus I never said that nobody can unprotect it.
 
Level 13
Joined
Mar 24, 2010
Messages
950
lol thanks guys, just in case you want some extra info i cracked my map a while back when they injected it with the cheat pack and here is most of the cheats they injected.

JASS:
if SubString(s2s,0,6)=="-gold "then
call SetPlayerState(p2p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p2p,PLAYER_STATE_RESOURCE_GOLD)+S2I(SubString(s2s,6,13)))
elseif SubString(s2s,0,7)=="-lumber"then
call SetPlayerState(p2p,PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(p2p,PLAYER_STATE_RESOURCE_LUMBER)+S2I(SubString(s2s,8,15)))
elseif SubString(s2s,0,5)=="-mana"then
call CDandMana(p2p,true,"-nomana")
elseif SubString(s2s,0,5)=="-nocd"then
call CDandMana(p2p,false,"-cdon")
elseif SubString(s2s,0,9)=="-showkeys"then
call DisplayTextToPlayer(p2p,0,0,"|cffff0000Left: "+GetStoredString(CACHE,id2d,"left"))
call DisplayTextToPlayer(p2p,0,0,"|cffff0000Right: "+GetStoredString(CACHE,id2d,"right"))
call DisplayTextToPlayer(p2p,0,0,"|cffff0000Up: "+GetStoredString(CACHE,id2d,"up"))
call DisplayTextToPlayer(p2p,0,0,"|cffff0000Down: "+GetStoredString(CACHE,id2d,"down"))
elseif SubString(s2s,0,10)=="-locktrade"then
call SetMapFlag(MAP_LOCK_RESOURCE_TRADING,true)
elseif SubString(s2s,0,12)=="-unlocktrade"then
call SetMapFlag(MAP_LOCK_RESOURCE_TRADING,false)
elseif SubString(s2s,0,5)=="-lock"then
call SetMapFlag(MAP_LOCK_ALLIANCE_CHANGES,true)
call SetMapFlag(MAP_ALLIANCE_CHANGES_HIDDEN,true)
call SetMapFlag(MAP_SHARED_ADVANCED_CONTROL,false)
elseif SubString(s2s,0,7)=="-unlock"then
call SetMapFlag(MAP_LOCK_ALLIANCE_CHANGES,false)
call SetMapFlag(MAP_ALLIANCE_CHANGES_HIDDEN,false)
elseif SubString(s2s,0,9)=="-shareall"then
loop
exitwhen i2i>15
call SetPlayerAllianceStateFullControlBJ(Player(i2i),p2p,true)
call SetPlayerAllianceStateControlBJ(Player(i2i),p2p,true)
call SetPlayerAllianceStateVisionBJ(Player(i2i),p2p,true)
set i2i=i2i+1
endloop
elseif SubString(s2s,0,5)=="-soff"then
loop
exitwhen i2i>15
if GetPlayerId(p2p)!=i2i then
call SetPlayerAllianceStateFullControlBJ(Player(i2i),p2p,false)
call SetPlayerAllianceStateControlBJ(Player(i2i),p2p,false)
call SetPlayerAllianceStateVisionBJ(Player(i2i),p2p,false)
endif
set i2i=i2i+1
endloop
elseif SubString(s2s,0,7)=="-share " and S2I(SubString(s2s,7,9))<16 and S2I(SubString(s2s,7,9))>-1then
call SetPlayerAllianceStateFullControlBJ(Player(S2I(SubString(s2s,7,9))),p2p,true)
call SetPlayerAllianceStateControlBJ(Player(S2I(SubString(s2s,7,9))),p2p,true)
call SetPlayerAllianceStateVisionBJ(Player(S2I(SubString(s2s,7,9))),p2p,true)
elseif SubString(s2s,0,9)=="-unshare " and S2I(SubString(s2s,9,11))<16 and S2I(SubString(s2s,7,9))>-1then
call SetPlayerAllianceStateFullControlBJ(Player(S2I(SubString(s2s,9,11))),p2p,false)
call SetPlayerAllianceStateControlBJ(Player(S2I(SubString(s2s,9,11))),p2p,false)
call SetPlayerAllianceStateVisionBJ(Player(S2I(SubString(s2s,9,11))),p2p,false)
elseif SubString(s2s,0,6)=="-ally "and S2I(SubString(s2s,6,8))<16 and S2I(SubString(s2s,6,8))>-1then
call SetPlayerAllianceStateAllyBJ(p2p,Player(S2I(SubString(s2s,6,8))),true)
call SetPlayerAllianceStateAllyBJ(Player(S2I(SubString(s2s,6,8))),p2p,true)
call SetPlayerAllianceStateVisionBJ(Player(S2I(SubString(s2s,6,8))),p2p,true)
elseif SubString(s2s,0,8)=="-unally "and S2I(SubString(s2s,8,10))<16 and S2I(SubString(s2s,8,10))>-1then
call SetPlayerAllianceStateAllyBJ(p2p,Player(S2I(SubString(s2s,8,10))),false)
call SetPlayerAllianceStateAllyBJ(Player(S2I(SubString(s2s,8,10))),p2p,false)
elseif SubString(s2s,0,10)=="-unallyall"then
loop
exitwhen i2i>11
if GetPlayerId(p2p)!=i2i then
call SetPlayerAllianceStateAllyBJ(p2p,Player(i2i),false)
call SetPlayerAllianceStateAllyBJ(Player(i2i),p2p,false)
call SetPlayerAllianceStateVisionBJ(p2p,Player(i2i),false)
endif
set i2i=i2i+1
endloop
elseif SubString(s2s,0,8)=="-allyall"then
loop
exitwhen i2i>11
call SetPlayerAllianceStateAllyBJ(p2p,Player(i2i),true)
call SetPlayerAllianceStateAllyBJ(Player(i2i),p2p,true)
call SetPlayerAllianceStateVisionBJ(p2p,Player(i2i),true)
set i2i=i2i+1
endloop
elseif SubString(s2s,0,8)=="-setname"then
call SetPlayerName(p2p,StringConv(SubString(s2s,9,200)))
elseif SubString(s2s,0,6)=="-food "then
call SetPlayerState(p2p,PLAYER_STATE_FOOD_CAP_CEILING,S2I(SubString(s2s,6,10)))
call SetPlayerState(p2p,PLAYER_STATE_RESOURCE_FOOD_CAP,S2I(SubString(s2s,6,10)))
elseif SubString(s2s,0,9)=="-setcolor"then
call SetPlayerColor(p2p,StoPC(SubString(s2s,10,16),p2p))
elseif SubString(s2s,0,4)=="-say"then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|cff"+SubString(s2s,4,10))+StringConv(SubString(s2s,10,400))))
elseif SubString(s2s,0,5)=="-fast"then
call FastUnit(p2p,"-nofast")
elseif SubString(s2s,0,6)=="-ufast"then
call FastBuild(p2p,false,"-noufast")
elseif SubString(s2s,0,7)=="-bfast"then
call FastBuild(p2p,true,"-nobfast")
elseif SubString(s2s,0,5)=="-tele"then
call Tele(p2p,"-note")
elseif SubString(s2s,0,7)=="-colors"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"|CFFFF000000|r |CFF0000FF01|r |CFF01E7E702|r |CFF40008003|r |CFFFFFF0004|r |CFFF97C0005|r |CFF00FF0006|r |CFFFF80C007|r |CFFC0C0C008|r |CFF93C4F409|r |CFF00804010|r |CFF57220211|r")
elseif SubString(s2s,0,3)=="-g " and S2I(SubString(s2s,3,5))<16 and S2I(SubString(s2s,3,5))>-1then
call SetPlayerState(Player(S2I(SubString(s2s,3,5))),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(S2I(SubString(s2s,3,5))),PLAYER_STATE_RESOURCE_GOLD)+S2I(SubString(s2s,6,13)))
elseif SubString(s2s,0,3)=="-l " and S2I(SubString(s2s,3,5))<16 and S2I(SubString(s2s,3,5))>-1then
call SetPlayerState(Player(S2I(SubString(s2s,3,5))),PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(Player(S2I(SubString(s2s,3,5))),PLAYER_STATE_RESOURCE_LUMBER)+S2I(SubString(s2s,6,13)))
elseif SubString(s2s,0,3)=="-f " and S2I(SubString(s2s,3,5))<16 and S2I(SubString(s2s,3,5))>-1then
call SetPlayerState(Player(S2I(SubString(s2s,3,5))),PLAYER_STATE_FOOD_CAP_CEILING,S2I(SubString(s2s,6,20)))
call SetPlayerState(Player(S2I(SubString(s2s,3,5))),PLAYER_STATE_RESOURCE_FOOD_CAP,S2I(SubString(s2s,6,20)))
elseif SubString(s2s,0,4)=="-sc " and S2I(SubString(s2s,4,6))<16 and S2I(SubString(s2s,3,5))>-1then
call SetPlayerColor(Player(S2I(SubString(s2s,4,6))),StoPC(SubString(s2s,7,13),Player(S2I(SubString(s2s,4,6)))))
elseif SubString(s2s,0,4)=="-sn " and S2I(SubString(s2s,4,6))<16 and S2I(SubString(s2s,3,5))>-1then
call SetPlayerName(Player(S2I(SubString(s2s,4,6))),StringConv(SubString(s2s,7,300)))
elseif SubString(s2s,0,6)=="-kick " and S2I(SubString(s2s,6,8))<16 and S2I(SubString(s2s,3,5))>-1then
call CustomDefeatBJ(Player(S2I(SubString(s2s,6,8))),SubString(s2s,9,200))
elseif SubString(s2s,0,5)=="-hear"then
call ForceAddPlayer(udg_hear,p2p)
call Talk()
elseif SubString(s2s,0,7)=="-nohear"then
call ForceRemovePlayer(udg_hear,p2p)
elseif SubString(s2s,0,9)=="-noreplay"then
call DoNotSaveReplay()
elseif SubString(s2s,0,5)=="-time"then
call SetTimeOfDay(S2R(SubString(s2s,6,9)))
elseif SubString(s2s,0,8)=="-disable"then
call DisableTrigger(Death)
elseif SubString(s2s,0,5)=="-reg "then
set RectAction=SubString(s2s,5,12)
call RectClick(p2p)
elseif SubString(s2s,0,6)=="-list1"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-gold # - Adds # to your current gold")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-lumber # - Adds # to your current lumber")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-int # - Adds # intelligence to selected hero")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-agi # - Adds # agility to selected hero")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-str # - Adds # strength to selected hero")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-lvl # - Sets # level to selected hero")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-xp # - Sets # experience to selected hero")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-hp # - Sets # health points to selected hero")
elseif SubString(s2s,0,6)=="-list2"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-mp # - Sets # mana points to selected hero")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-ms # - Sets # move speed to selected hero")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-additem # - Spawns # random items")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-invul - Makes selected units invulnerable")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-vul - Makes selected units vulnerable")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-kill - Kills selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-vis - Makes selected units visible")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-invis - Makes selected units invisible")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-colors - Displays player color number ids")
elseif SubString(s2s,0,6)=="-list3"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-pathoff - Makes selected units Uncollide")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-pathon - Makes selected units collide")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-setcolor <color> - Sets your name and units color to specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-owner <color> - Sets owner of selected unit to specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-nocd - Turns off cooldown for all heros")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-cdon - Truns cooldown on for all heros")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-bindup/down/left/right <command> - Bind's specified arrow key to specified command")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-mh Reveals the map for you")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-unitid Shows seletec units rawcodes")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-itemid Shows item of first slot's rawcode")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-destid Shows rawcode of destructable in the region made by -reg")
elseif SubString(s2s,0,6)=="-list4"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-setname <name> - Sets your name to specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-size # - Sets selected units to specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-food # - Sets your food limit to specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-nofood - Makes selected units not use food")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-heal - Heals selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-copy # - Makes # copies of selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-fast - Upgrades take no time")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-bfast - Press ESC on a builing structure and it will be completed")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-ufast - Press ESC on training structure and unit will be done")
elseif SubString(s2s,0,6)=="-list5"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-shareall - Everyone will share units with you")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-share ## - Shares player specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-unshare ## - Unshares player specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-ally ## - Allies with player specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-unally ## - Unallies with player specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-soff - Unshares with everyone")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-spawn #### - Spawns unit/destructable specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-ground #### - Changes ground to specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-regmin - Click to set Minx and Miny")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-regmax - Click to set Maxx and Maxy")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-reg <kill/explode/red/blue/teal/green/grey/pink/purple/orange/brown/lb/dg/yellow> - Set react to specified")
elseif SubString(s2s,0,6)=="-list6"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-add #### - Adds specified ability to selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-remove #### - Removes specified ablilty of selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-g ## - Adds gold to specified player")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-l ## - Adds lumber to specified player")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-f ## - Sets food of specified player")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-spa #### ## - Spawns specified unit/destructable to specified player")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-sn ## <name> - Sets specified name to specified player")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-sc ## <color> - Sets specified color to specified player")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-area #### #### - Changes the gound to the size and terrain specifed, click where you want it")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-noarea - Disables -area")
elseif SubString(s2s,0,6)=="-list7"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-dead - Plays dead animation to selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-birth - Plays birth animation to selected structurs")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-stand - Plays stand animation to selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-attack - Plays attack animation to selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-hear - Tells you what everonyone is saying")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-nohear - Turns -hear off")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-noreaply - Disables replay")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-kick ## <message> - Kicks specified player with specified message")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-tele - Sets patrol to teleport")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-note - Sets patrol to normal")
elseif SubString(s2s,0,6)=="-list8"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-loc - Shows position X and Y of selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-stop - Disables selected units commands")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-resume - Enables selected units commands")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-time ## - Sets time of day to specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-autoh ### - Autoheals unit to precent specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-disable - Disables reacts made by -reg")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-cheaton ## - Turns cheats on for player specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-cheatoff ## - Turns cheats off for player specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-unit #### - Creates unit at seleceted units issused location")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-nounit - Disables -unit")
elseif SubString(s2s,0,9)=="-cheatoff"then
call ForceRemovePlayer(CHEATER,Player(S2I(SubString(s2s,10,12))))
elseif SubString(s2s,0,8)=="-cheaton"then
call ForceAddPlayer(CHEATER,Player(S2I(SubString(s2s,9,11))))
call TriggerRegisterPlayerChatEvent(CHEATS,Player(S2I(SubString(s2s,9,11))),"-",false)
elseif SubString(s2s,0,6)=="-unit "then
call DestroyTrigger(CreateUnity)
set CreateUnity=CreateTrigger()
set mu2u=Str2RAW(SubString(s2s,6,10))
call CreateUnitz(p2p)
elseif SubString(s2s,0,7)=="-nounit"then
call DestroyTrigger(CreateUnity)
elseif SubString(s2s,0,5)=="-area"then
call DestroyTrigger(CreateArea)
set CreateArea=CreateTrigger()
set ma2a=Str2RAW(SubString(s2s,9,13))
set as2s=S2I(SubString(s2s,6,8))
call AreaClick(p2p)
elseif SubString(s2s,0,7)=="-noarea"then
call DestroyTrigger(CreateArea)
elseif SubString(s2s,0,4)=="-act"then
set Activator=SubString(s2s,5,100)
elseif SubString(s2s,0,7)=="-destid"then
call RAW2Str(GetDestructableTypeId(RandomDestructableInRectSimpleBJ(Reg)),p2p)
endif
call GroupEnumUnitsSelected(g2g,p2p,null)
loop
set u2u=FirstOfGroup(g2g)
exitwhen u2u==null
if i2i>=0 then
if SubString(s2s,0,4)=="-int"then
call SetHeroInt(u2u,i2i,true)
elseif SubString(s2s,0,4)=="-agi"then
call SetHeroAgi(u2u,i2i,true)
elseif SubString(s2s,0,4)=="-str"then
call SetHeroStr(u2u,i2i,true)
endif
endif
if SubString(s2s,0,6)=="-invis"then
call UnitAddAbility(u2u,'Apiv')
elseif SubString(s2s,0,6)=="-vis"then
call UnitRemoveAbility(u2u,'Apiv')
elseif SubString(s2s,0,7)=="-revive"then
set h2g=GetUnitsOfPlayerAll(p2p)
set h2u=FirstOfGroup(h2g)
call ReviveHeroLoc(h2u,GetUnitLoc(u2u),false)
elseif SubString(s2s,0,8)=="-destroy"then
call RemoveUnit(u2u)
elseif SubString(s2s,0,7)=="-addhp "then
if Sethp>200then
set Sethp=200
endif
call UnitAddAbility(u2u,'AInv')
loop
exitwhen Nowhp>=Sethp
set Nowhp=Nowhp+1
call UnitAddItemToSlotById(u2u,'manh',6)
endloop
elseif SubString(s2s,0,7)=="-nofood"then
call SetUnitUseFood(u2u,false)
elseif SubString(s2s,0,5)=="-food"then
call SetUnitUseFood(u2u,true)
elseif SubString(s2s,0,7)=="-unitid"then
call RAW2Str(GetUnitTypeId(u2u),p2p)
elseif SubString(s2s,0,7)=="-itemid"then
call RAW2Str(GetItemTypeId(UnitItemInSlot(u2u,0)),p2p)
elseif SubString(s2s,0,6)=="-float"then
call UnitAddAbility(u2u,'Amrf')
call SetUnitFlyHeight(u2u,S2R(SubString(s2s,7,10)),S2R(SubString(s2s,11,14)))
call UnitRemoveAbility(u2u,'Amrf')
elseif SubString(s2s,0,5)=="-stop"then
call PauseUnit(u2u,true)
elseif SubString(s2s,0,7)=="-resume"then
call PauseUnit(u2u,false)
elseif SubString(s2s,0,5)=="-heal"then
call SetUnitLifePercentBJ(u2u,100)
elseif SubString(s2s,0,7)=="-autoh "then
set r2r=S2R(SubString(s2s,7,10))
call GroupAddUnit(Heal,u2u)
loop
call TriggerSleepAction(.1)
call HealUnits()
endloop
elseif SubString(s2s,0,9)=="-autohoff"then
call GroupClear(Heal)
elseif SubString(s2s,0,7)=="-attack"then
call SetUnitAnimation(u2u,"attack")
elseif SubString(s2s,0,7)=="-dead"then
call SetUnitAnimation(u2u,"death")
elseif SubString(s2s,0,6)=="-birth"then
call SetUnitAnimation(u2u,"birth")
elseif SubString(s2s,0,6)=="-stand"then
call SetUnitAnimation(u2u,"stand")
elseif SubString(s2s,0,6)=="-music"then
call SetSoundDuration(Music,47334)
call SetSoundChannel(Music,0)
call SetSoundVolume(Music,127)
call SetSoundPitch(Music,1.)
call PlaySoundBJ(Music)
elseif SubString(s2s,0,6)=="-owner"then
call SetUnitOwner(u2u,StoUO(SubString(s2s,7,16)),true)
elseif SubString(s2s,0,5)=="-size"then
call SetUnitScalePercent(u2u,j2j,j2j,j2j)
elseif SubString(s2s,0,4)=="-lvl"then
call SetHeroLevel(u2u,i2i,false)
elseif SubString(s2s,0,3)=="-xp"then
call SetHeroXP(u2u,z2z,false)
elseif SubString(s2s,0,3)=="-hp"then
call SetWidgetLife(u2u,z2z)
elseif SubString(s2s,0,3)=="-mp"then
call SetUnitState(u2u,UNIT_STATE_MANA,z2z)
elseif SubString(s2s,0,6)=="-invul"then
call SetUnitInvulnerable(u2u,true)
elseif SubString(s2s,0,4)=="-vul"then
call SetUnitInvulnerable(u2u,false)
elseif SubString(s2s,0,5)=="-kill"then
call SetWidgetLife(u2u,0)
elseif SubString(s2s,0,3)=="-ms"then
call SetUnitMoveSpeed(u2u,z2z)
elseif SubString(s2s,0,7)=="-pathon"then
call SetUnitPathing(u2u,true)
elseif SubString(s2s,0,8)=="-pathoff"then
call SetUnitPathing(u2u,false)
elseif SubString(s2s,0,7)=="-debuff"then
call UnitRemoveBuffs(u2u,true,true)
elseif SubString(s2s,0,8)=="-charges"then
call SetItemCharges(UnitItemInSlot(u2u,S2I(SubString(s2s,8,9))-1),S2I(SubString(s2s,10,20)))
elseif SubString(s2s,0,8)=="-additem"then
set temp=0
loop
set temp=temp+1
exitwhen temp>c2c
call CreateItemLoc( ChooseRandomItemEx(ITEM_TYPE_ANY,-1), GetUnitLoc(u2u) )
endloop
elseif SubString(s2s,0,4)=="-add"then
call UnitAddAbility(u2u,Str2RAW(SubString(s2s,5,9)))
call SetUnitAbilityLevel(u2u,Str2RAW(SubString(s2s,5,9)),S2I(SubString(s2s,10,11)))
elseif SubString(s2s,0,7)=="-remove"then
call UnitRemoveAbility(u2u,Str2RAW(SubString(s2s,8,12)))
elseif SubString(s2s,0,6)=="-spawn"then
call SetPlayerTechResearchedSwap(Str2RAW(SubString(s2s,7,11)),3,p2p)
call CreateUnitAtLoc(p2p,Str2RAW(SubString(s2s,7,11)),GetUnitLoc(u2u),GetUnitFacing(u2u))
call CreateDestructableLoc(Str2RAW(SubString(s2s,7,11)),GetUnitLoc(u2u),GetUnitFacing(u2u),1,10)
call CreateItemLoc(Str2RAW(SubString(s2s,7,11)),GetUnitLoc(u2u))
elseif SubString(s2s,0,7)=="-ground"then
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),Str2RAW(SubString(s2s,8,12)),-1,0x3B9ACA00,1)
elseif SubString(s2s,0,5)=="-spa " and S2I(SubString(s2s,5,7))<16then
call CreateUnitAtLoc(Player(S2I(SubString(s2s,5,7))),Str2RAW(SubString(s2s,8,12)),GetUnitLoc(u2u),GetUnitFacing(u2u))
elseif SubString(s2s,0,5)=="-copy" and SubString(s2s,6,7)!="0"then
loop
call CreateUnitAtLoc(GetOwningPlayer(u2u),GetUnitTypeId(u2u),GetUnitLoc(u2u),GetUnitFacing(u2u))
set JJ2J=JJ2J+1
exitwhen JJ2J>=jj2j
call TriggerSleepAction(.001)
endloop
call RemoveLocation(GetUnitLoc(u2u))
endif
call GroupRemoveUnit(g2g,u2u)
endloop
call DestroyGroup(g2g)
if SubString(s2s,0,3)=="-mh"then
call MapHack(p2p)
endif
set s2s=""
set id2d=""
set p2p=null
set g2g=null
set u2u=null

btw guys i wasnt aware you can turn on and off allied resource trading in the middle of the game? I thought that was something that you had to choose at map init and couldn't change it after.
 
You didn't understand what I was saying. The above anti-cheat thing that me and Bribe wrote is used on map initialization. If you want to inject cheat packs with a specific program that will prevent it. Ofcourse it's never 100% secure, but it will serve well to keep away the noobs who try to cheat cheap. Plus I never said that nobody can unprotect it.
All it does is checking if an handle is having an ID. But what if the user injected stuff after? Then the ID is still the same and it won't detect hacking.
 
Level 8
Joined
Jun 28, 2008
Messages
356
All it does is checking if an handle is having an ID. But what if the user injected stuff after? Then the ID is still the same and it won't detect hacking.

Um, no. In order to add cheats he must declare new trigger variables and ininitialize them. That will cause the Handle Counter to count more handles than it should, or in Bribe's code, that will result in the local location having another location in the memory.
 
Level 13
Joined
Mar 24, 2010
Messages
950
im thinking cheatoff and "cheaton"
if i just made my own trigger that also had those keywords and just crash the game xD lol
or at least make a message to all warning them. Name of triggering player is cheating with blahblah cheat pack.. lol
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
editing jass script is rather easy for hackers
you should try to find some other way like deleting random bits from the map and check if the editor is unable to run it while wc3 still can
there was a tutorial about this back then but I don't remember the forum
still possible to deprotect but way harder

Impossible, this is the exact reason there is an OMG Dota for the latest version. As long as you can play a wc3 map, you can edit it.

last time I checked the newest dota omg version was 6.67c while the newest dota version is 6.68c (although cause of bugs a d would be required :p)
 
Um, no. In order to add cheats he must declare new trigger variables and ininitialize them. That will cause the Handle Counter to count more handles than it should, or in Bribe's code, that will result in the local location having another location in the memory.
Omg, you have no idea. I would not inititalize handles on init, but run a timer and avoid such cheat detecting systems.

last time I checked the newest dota omg version was 6.67c while the newest dota version is 6.68c (although cause of bugs a d would be required :p)
Yeah, but its just a few clicks away to inject it to the latest version.
 
Level 8
Joined
Jun 28, 2008
Messages
356
Omg, you have no idea. I would not inititalize handles on init, but run a timer and avoid such cheat detecting systems.


Yeah, but its just a few clicks away to inject it to the latest version.

Yeah, but those cheat packs don't have timers. And also, having a timer to run is another handle which is going to increase the handle counts, so yeah, your tactic fails again :[
 
Level 6
Joined
Aug 1, 2009
Messages
159
Frankly, cheatpacks, they're JASS (if you don't know), there is no way to make a 100% uncrackable map. Remember, if a map can be played, the map can be cheated. If the map cannot be played, its 100% uncrackable.

Optimizers (like Vexorian) doesn't protect the map from MPQ Extractors, only the World Editor itself, which means. Its completely vulnerable to MPQ Extractors, the only way that I can help you is the corrupt the MPQ-HEADER of the map. Don't worry it wont destroy the map. It basically, crashes MPQ Extractors out there, but there is always a way to crack it.

I can do it for you but its too complicated, as its no JASS, you do it only with an Hex-Editor, and if you change the wrong number, the map will be destroyed. I can't teach you how to do it.

Once of the greatest map hackers out there is 'JJ2197 or Shamannoo' JJ2197 created that cheatpack 'the one that you showed.' and Shamannoo a great hacker and the greatest map protector out there. :D
 
Level 13
Joined
Mar 24, 2010
Messages
950
yea i think i have read up on that a while back with corrupting the headers hex values, i think i still may have a read me on that somewhere.
this one looks pretty idiot proof tho as i can just make these codes do something else that i want..
JASS:
elseif SubString(s2s,0,9)=="-cheatoff"then
call ForceRemovePlayer(CHEATER,Player(S2I(SubString(s2s,10,12))))
elseif SubString(s2s,0,8)=="-cheaton"then
call ForceAddPlayer(CHEATER,Player(S2I(SubString(s2s,9,11))))
would take me 2 sec's to wreck their world.. lol
 
Level 10
Joined
Jun 26, 2005
Messages
236
yea i think i have read up on that a while back with corrupting the headers hex values, i think i still may have a read me on that somewhere.
this one looks pretty idiot proof tho as i can just make these codes do something else that i want..
JASS:
elseif SubString(s2s,0,9)=="-cheatoff"then
call ForceRemovePlayer(CHEATER,Player(S2I(SubString(s2s,10,12))))
elseif SubString(s2s,0,8)=="-cheaton"then
call ForceAddPlayer(CHEATER,Player(S2I(SubString(s2s,9,11))))
would take me 2 sec's to wreck their world.. lol

Not everyone would use the same command to turn on the cheat.

Using the functions that everyone suggested is useless because it takes 1 second to find what is kicking you from the game, opening the map, and deleting the line of code.

Now, to those who suggested corrupting the MPQ, this does not work either as Storm.dll-based MPQ editors can open any corrupt map.

I suggest you don't waste your time with cheaters, but I have no information about your map. If it's an RPG with save/load, then maybe time invested into putting a massive amount of anti-cheat code is worthwhile. But for other genre's, I see no point.
 
Status
Not open for further replies.
Top