System Ultimaprotect

Azlier

Old World Ghost
Reaction score
461
Frankly, MapLock is easy to remove. Scroll to map top, remove. Scroll to map bottom, remove. Done. Ultimaprotect makes removing MapLock a nightmare.

What it does is simply not care. If you remove MapLock, whoop dee doo, game crash. If you remove internal function, it yawns and crashes. If you remove what crashes the game when you remove internal functions, it blows its nose and crashes again.

If you remove seemingly everything having to do with Ultimaprotect, every single function, it still crashes. I love it!

I highly reccommend tweaking it to be unique to your map. The less like the original the better. But be warned. This is like a woman. Only its makers know its internal workings.

Requires a vJass preprocessor and MapLock, by Jesus4Lyf.

JASS:
scope Ultimaprotect initializer InitBlizzardTriggers 
//I HIGHLY reccommend replacing every instance of 'Ultimaprotect' 
//with something a little less... obvious.

globals
    private constant string MAPLOCK_FUNC_FIRST = "MapLo"
    private constant string MAPLOCK_FUNC_MIDDLE = "ckNort"
    private constant string MAPLOCK_FUNC_LAST = "h_GetIndex"
    //These put together should be a MapLock function.
    //It is suggested to mess with these. Just make sure
    //that they equal MaplockNorth_GetIndex when all added together.
endglobals
//** Script Code. It is actually reccommended that you tweak this to fit your map. **
//      Ultimaprotect is not for the inexperienced. Not for unskilled hackers. 
//                          Not for unskilled Jassers.
globals
    private trigger PTrig = null
    private triggercondition PTrigCond = null
    private trigger Trig = CreateTrigger()
endglobals

private function Foo takes nothing returns boolean
    if PTrig == null or PTrigCond == null then
        return ExecuteFunc(SCOPE_PRIVATE + "Foo")
    endif
    return false
endfunction

private function This takes nothing returns nothing
    set PTrig = CreateTrigger()
    call ExecuteFunc(MAPLOCK_FUNC_FIRST + MAPLOCK_FUNC_MIDDLE + MAPLOCK_FUNC_LAST)
endfunction

//! textmacro ProtectChainFunc takes FUNCNAME, TOEXECUTE
private function $FUNCNAME$ takes nothing returns nothing
    call ExecuteFunc(SCOPE_PRIVATE + "$TOEXECUTE$")
    call ExecuteFunc(MAPLOCK_FUNC_FIRST + MAPLOCK_FUNC_MIDDLE + MAPLOCK_FUNC_LAST)
endfunction
//! endtextmacro

private function That takes nothing returns boolean
    call ExecuteFunc(SCOPE_PRIVATE + "What")
    //At this point, you can create a chain of functions. 
    //There is a textmacro just for the purpose to make chains. Let's make this call one called 'What'
    //The last one in the chain must call 'This'
    set PTrigCond = TriggerAddCondition(Trig, Condition(function That))
    return false
endfunction

//These don't have to be in any particular order. Feel free to add more.
//! runtextmacro ProtectChainFunc ("What", "Huh")
//! runtextmacro ProtectChainFunc ("Huh", "Doh")
//! runtextmacro ProtectChainFunc ("Doh", "Bread")
//! runtextmacro ProtectChainFunc ("Bread", "Cheese")
//! runtextmacro ProtectChainFunc ("Cheese", "This")
//The last must use "This"                    ^^^^

function InitBlizzardTriggers takes nothing returns nothing
//Or some other official sounding name.
    call ExecuteFunc(SCOPE_PRIVATE + "That")
    call ExecuteFunc(SCOPE_PRIVATE + "Foo")
    if PTrig == null or PTrigCond == null then
        call ExecuteFunc("main")
    endif
    call DestroyTrigger(Trig)
    set Trig = null
    call ExecuteFunc(MAPLOCK_FUNC_FIRST + MAPLOCK_FUNC_MIDDLE + MAPLOCK_FUNC_LAST)
endfunction

endscope


Remember, kids. Always modify this monster!

Thanks to Jesus4Lyf for MapLock and Daxtreme for testing it.

And WastedSavior, the innocent bystander to this madness.

Now, we pray to (insert deity here) that Blizzard doesn't fix the return bug. Or C2I.
 

cleeezzz

The Undead Ranger.
Reaction score
268
What it does is simply not care. If you remove MapLock, whoop dee doo, game crash. If you remove internal function, it yawns and crashes. If you remove what crashes the game when you remove internal functions, it blows its nose and crashes again.

If you remove seemingly everything having to do with Ultimaprotect, every single function, it still crashes. I love it!
could you explain how that works? or is that secret lol.
 

Azlier

Old World Ghost
Reaction score
461
ExecuteFunc, a very fun native.
 

cleeezzz

The Undead Ranger.
Reaction score
268
but why would it crash if you removed maplock and ultimaprotect?

edit: i guess "seemingly" is the key word
 

Azlier

Old World Ghost
Reaction score
461
If you remove every function of MapLock, every function of Ultimaprotect... it still crashes. It injects into main :D.

Edit: Yes, seemingly is the keyword.
JASS:
keyword Seemingly
 

cleeezzz

The Undead Ranger.
Reaction score
268
nvm, i guess i dont get what injection is. (couldn't you just remove the line that injects it?)

Edit: lol okay, i guess i might use it then, thanks
 

Azlier

Old World Ghost
Reaction score
461
Remove the line that injects? Have fun with syntax errors :p.

Since it injects into main, it would be wise to fix it so it does weather and map name correctly. It's one of those silly things that happens when you inject into main.
 

Romek

Super Moderator
Reaction score
963
> ExecuteFunc("Ultimaprotect_Foo")
ExecuteFunc(Foo.name)
Makes it easier to change the name of the whole library. (Same with other functions)

Also, it seems painfully easy to just remove:
JASS:
    call ExecuteFunc("Ultimaprotect_That")
    call ExecuteFunc("Ultimaprotect_Foo")


Would it still crash after that?
 

Azlier

Old World Ghost
Reaction score
461
>blah.name
I knew that. For some reason, I was thinking it would make things harder for hackers if I did it directly. I can see clearly, now.:rolleyes:

But, sad part: The functions then need to be in order :(.

I'll prolly release two flavors.

>Would it still crash after that.
Yes. Yes it would. Test it. Daxtreme did.
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615

Azlier

Old World Ghost
Reaction score
461
One question, why can't I use a well named scope initializer? I dunno. Injecting into main seems unnecessary. Fixering.
 

Azlier

Old World Ghost
Reaction score
461
Why wouldn't it be? I don't see anything that would change.

If it's incompatible, I blame MapLock.

This also needs a name that I didn't come up with in three seconds...
 

Romek

Super Moderator
Reaction score
963
> But, sad part: The functions then need to be in order .
Use keywords?
Or, use:
JASS:
call ExecuteFunc(SCOPE_PRIVATE + "Foo")

And the same for every other function.

> This also needs a name that I didn't come up with in three seconds...
I couldn't agree more.

Something more original than "Red Flavour" and "Blue Flavour" would be nice too.
 

Azlier

Old World Ghost
Reaction score
461
I can't think of anything but red and blue. TimerUtils uses it. I don't want 'Green Flavor' and 'Rainbow Flavor'.

Keywords work with functions? Interesting.
 

Romek

Super Moderator
Reaction score
963
> I can't think of anything but red and blue. TimerUtils uses it. I don't want 'Green Flavor' and 'Rainbow Flavor'.
Seems like you're missing the point. How about dropping the whole "Flavours" thing?

> Keywords work with functions? Interesting.
I've never tried it, but if .name doesn't work with functions below, I'd expect it'd work with keywords. Regardless, you can always use the other alternative.
 

Azlier

Old World Ghost
Reaction score
461
Dropped flavors. Added a textmacro to make stupidity/insanity easier to accomplish.
 

Sim

Forum Administrator
Staff member
Reaction score
534
> Daxtreme for testing it.

You mean having the idea. :rolleyes:

Are you sure the self-return crashes? I think ExecuteFunc removes the op limit.

When I tested it previously it featured the display bug.

> you try to hit with ExecuteFunc from getlocalisedstring?

We dropped that idea. :p
 

Azlier

Old World Ghost
Reaction score
461
>You mean having the idea. :rolleyes:
I thought of the workings and assembled it :(.

>How about all the function names in the map?
I didn't know the Optimizer did that. Mine doesn't.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top