First of all, in this:
call TriggerRegisterPlayerChatEvent(uw,Player(0),"-",false)
The boolean argument here (The false value) means that "-" DOES NOT have to be an exact match. The chat message that could fire off this trigger could be... "-345fsfsd" ..could be " asdjadjaskld -" as long as it has a "-" in it.
As for the cheat...It's trivial where the checker lies
The condition...
Code: Select all
function vQ8 takes nothing returns boolean
if(not(CountUnitsInGroup(sA(GetTriggerPlayer(),1315990632))==1))then
return false
endif
return la(GetEventPlayerChatString())
endfunction
Code: Select all
function vZ8 takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
call ForGroupBJ(sA(GetTriggerPlayer(),1315990632),function vR8)
call CreateNUnitsAtLoc(1,1311781197,GetTriggerPlayer(),GetRectCenter(GetPlayableMapRect()),bj_UNIT_FACING)
if(v28())then
call SetUnitPositionLoc(GetLastCreatedUnit(),GetRandomLocInRect(cg))
else
call SetUnitPositionLoc(GetLastCreatedUnit(),GetRandomLocInRect(Dg))
endif
set J4[GetConvertedPlayerId(GetTriggerPlayer())]=GetLastCreatedUnit()
call SelectUnitForPlayerSingle(J4[GetConvertedPlayerId(GetTriggerPlayer())],GetTriggerPlayer())
call DisplayTextToForce(GetPlayersAll(),"Jiraiya starts to get serious...")
return
endfunction
This line here:
if(not(CountUnitsInGroup(sA(GetTriggerPlayer(),1315990632))==1))then
simply means "Number of Jiraiyas owned by the trigger player = 1"
This concludes that the string check occurs in this line:
return la(GetEventPlayerChatString())
So let's find out what happens...
Code: Select all
function ua takes real r returns integer
return r
return 0
endfunction
function Aa takes location ya returns integer
return ua(GetLocationX(ya))
endfunction
function aa takes location ya returns integer
return ua(GetLocationY(ya))
endfunction
function ua takes real r returns integer
return r
return 0
endfunction
function va takes integer i returns real
return i
return 0.
endfunction
function wa takes integer x,integer y returns location
return Location(va(x),va(y))
endfunction
function Ba takes string c returns integer
local string ba="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
local integer i=0
local integer Ca=StringLength(ba)
loop
exitwhen(c==SubString(ba,i,i+1))or(i>=Ca)
set i=i+1
endloop
return i
endfunction
function ca takes location Da,integer c returns nothing
local integer n=1
local integer Ea=11742
local integer Fa=0
local integer k1=5168478+c
local integer k2=2763741+c
local integer h1=Aa(Da)
local integer h2=aa(Da)
loop
exitwhen n>32
set h1=h1+((h2*16)+(h2/ 32))+h2+Fa+k1
set Fa=Fa+Ea
set h2=h2+((h1*16)+(h1/ 32))+h1+Fa+k2
set n=n+1
endloop
call za(Da,h1,h2)
endfunction
function za takes location ya,integer iX,integer iY returns nothing
call MoveLocation(ya,va(iX),va(iY))
endfunction
function xa takes location ya returns nothing
call RemoveLocation(ya)
endfunction
function la takes string s returns boolean
local integer Ha=0
local integer n=0
local integer Ca=StringLength(s)
local location Da=wa(0,0)
loop
exitwhen n>=Ca
set Ha=Ba(SubString(s,n,n+1))
call ca(Da,Ha)
set n=n+1
endloop
if(Aa(Da)==-223438418)then
if(aa(Da)==1501069220)then
call xa(Da)
set Da=null
return true
endif
endif
call xa(Da)
set Da=null
return false
endfunction
It creates a location at (0,0)
Based on the inputted string, it generates 2 integers and moves the location to these 2 integers
At the end of the algorithm, it checks to see if the location x and y value = some value
If they do, it returns true and the actions fire off
Best option here is to probably examine the algorithms and simplify the code.
Next, make estimates about it and quickly design a program to brute force the cheat.