Log In  

Hone your cart hacking abilities with this HackTheBox-like cart!

Simple premise:
You control a square which can move around the screen.
Your goal is to move out of the top left corner and after, without triggering btnp(), get back into the top left corner.
Sounds simple enough.
In fact, I will even let you look at the code!
It is very difficult, so I made an easier version of it for you to try out first.
You will need to download the cart to solve the challenge.

Have fun solving this challenge!

Easier version (try this one first!):

Cart #hacking4_1-0 | 2023-07-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

Solution:


Go to a different location, using the btnp() keys you have set;
Press esc, to enter the terminal;
Create a function which takes in an argument. Inside the function make p= the argument;
E.g.:

function t(k)
 p=k
end

Call the function and as the argument use the table:{x=0,y=0} or {y=0,x=0};
Modify the _draw() function like so:

function _draw()
 cls()
 move_pl(p)
end

Type resume and hit enter.

Hard (I may or may not have solved it):

Cart #hacking4_2-0 | 2023-07-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

Solution:


Make a table. In this example it is called p;
Set the table to:{x=0,y=0} or {y=0,x=0};
Modify the _draw() function like so:

function _draw()
 cls()
 if(btnp(⬆️)and p.y>0)then
   p.y=p.y-1
  elseif(btnp(⬇️)and p.y<15)then
   p.y=p.y+1
  elseif(btnp(⬅️)and p.x>0)then
   p.x=p.x-1
  elseif(btnp(➡️)and p.x<15)then
   p.x=p.x+1
  end
  spr(1,p.x*8,p.y*8)
end

Type resume and hit enter.

P#132496 2023-07-28 12:53 ( Edited 2023-07-30 09:47)

i dunno if this is possible on the web...

P#132713 2023-08-04 03:42

Not at all. I did mention that downloading the cart is required.

P#132830 2023-08-07 11:18

[Please log in to post a comment]