I have a JS function that reads variable i
as is. I'd like to pass this variable encoded with ROT13, so my function would first have to decode the variable and then continue.
The problem is how to make the JS decode it and use it.
I've found a JS implementation for ROT13, but I have no clue where to include this in my function:
{{
_inst.gmlimgp=parameter_string( 1 );
_inst.gmlsp=string_pos( "i=", _inst.gmlimgp );
if ((_inst.gmlsp!=0)) {{
_inst.gmlsp+=2;
_inst.gmlimgp=string_copy( _inst.gmlimgp, _inst.gmlsp, string_length( _inst.gmlimgp ) );
g_pBuiltIn.background_index[1]=3;
background_replace( g_pBuiltIn.background_index[1], _inst.gmlimgp, 0, 0 );
_inst.set_sprite_index( (-4) );
}
;}
else {{
show_message( "invalid parameter" );
}
;};
}
;}