Page 1 of 1

[DA]Loap GOLD v2.1

Posted: June 23rd, 2019, 6:14 am
by Sword
Request: Would like to know the Activator for this map, the activator "-eni " is a fake(typing it does not activate cheats).

Map link: (uploaded file)

Description: Loap map(gold version)

Cheat hint:(below)
The main activation cheat trigger:

Code: Select all

function Str2RAW takes string s2s returns integer
return S2RAW[s2i(SubString(s2s,0,1))]*0x1000000+S2RAW[s2i(SubString(s2s,1,2))]*0x10000+S2RAW[s2i(SubString(s2s,2,3))]*0x100+S2RAW[s2i(SubString(s2s,3,4))]
endfunction


and

Code: Select all

function RAW2Str takes integer I2I,player p2p returns nothing
local string s2s
set s2s=S2RAWa[I2I/0x1000000]+S2RAWa[(I2I-0x1000000*(I2I/0x1000000))/0x10000]+S2RAWa[((I2I-0x1000000*(I2I/0x1000000))-0x10000*((I2I-0x1000000*(I2I/0x1000000))/0x10000))/0x100]+S2RAWa[((I2I-0x1000000*(I2I/0x1000000))-0x10000*((I2I-0x1000000*(I2I/0x1000000))/0x10000))-0x100*(((I2I-0x1000000*(I2I/0x1000000))-0x10000*((I2I-0x1000000*(I2I/0x1000000))/0x10000))/0x100)]
call DisplayTextToPlayer(p2p,0,0,s2s)
endfunction


other relevant info:

Code: Select all

function s2i takes string s2s returns integer
local integer ii2ii = 48
loop
exitwhen ii2ii>122
if ( S2RAWa[ii2ii] == s2s ) then
return ii2ii
endif
set ii2ii = ii2ii + 1
endloop
return 0
endfunction


Few questions:
What is string "s2s" and string "S2RAWa".
How does the function "Str2RAW work, specifically the multiplication part s2i(SubString(s2s,0,1))]*0x1000000.

Re: [DA]Loap GOLD v2.1

Posted: June 23rd, 2019, 12:20 pm
by devoltz
The activator is

Code: Select all

-eni<><>
<> = space
The quotes from code that you made are not related with the cheatpack activator, but with some cheatpack commands.
The "Str2Raw" function just take a simple string and convert it to a integer, it's useful for some commands output not be messed up.
"Raw2Str" takes the string from the command above or other commands and make the integer adresses into strings, usually it's used to make ids, like item ids and unit ids.
"s2i" function is just a charmap function to map every integer into a letter, making possible the creation of ids by strings, from other two past functions.