[SNIPPET] DRAW_OUTLINED_BOX

This took me a while to make... and its really useful for me.

0AB1: @DRAW_OUTLINED_BOX 9 POS 300.0 300.0 SIZE 50.0 50.0 RGBA 255 0 0 255

You can make hacks like this with it:

CRTPpy273.png


Code:
//0AB1: @DRAW_OUTLINED_BOX 9 POS 300.0 300.0 SIZE 50.0 50.0 RGBA 255 0 0 255 THICKNESS 0.5
:DRAW_OUTLINED_BOX
0087: 14@  = 8@ // (float)
0087: 12@ = 2@ // (float)
0087: 13@ = 3@ // (float)
12@ /= 2.0 // (float)
13@ /= 2.0 // (float)
0087: 8@  = 0@ // (float)
005B: 8@ += 2@  // (float)
0063: 8@ -= 12@  // (float) 
0087: 9@  = 0@ // (float) 
0063: 9@ -= 2@  // (float)
005B: 9@ += 12@  // (float) 
0087: 10@ = 1@ // (float)
005B: 10@ += 3@  // (float) 
0063: 10@ -= 13@  // (float) 
0087: 11@ = 1@ // (float)     by OpcodeXe
0063: 11@ -= 3@  // (float)
005B: 11@ += 13@  // (float)   
03F0: enable_text_draw 1                                    
038E: draw_box_position  8@ 1@  size 14@ 3@ RGBA 4@ 5@ 6@ 7@ //  links
038E: draw_box_position  9@ 1@  size 14@ 3@ RGBA 4@ 5@ 6@ 7@  // rechts
038E: draw_box_position  0@ 10@  size 2@ 14@ RGBA 4@ 5@ 6@ 7@  // oben 
038E: draw_box_position  0@ 11@  size 2@ 14@ RGBA 4@ 5@ 6@ 7@  // unten 
0AB2: 0
 

chmo

Member
Joined
Feb 10, 2014
Messages
15
Reaction score
0
Re: DRAW_OUTLINED_BOX

Can you send me yours Crosshair please? ^^
 

J16D

Member
Joined
Jul 27, 2014
Messages
6
Reaction score
0
Re: DRAW_OUTLINED_BOX

uhm :/ I can't see the image, it seems that is offline
can you re-upload it? or can you describe what it does?
thank you ;)
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,486
Reaction score
227
Location
( ͡° ͜ʖ ͡°)
Re: DRAW_OUTLINED_BOX

J16D link said:
uhm :/ I can't see the image, it seems that is offline
can you re-upload it? or can you describe what it does?
thank you ;)
It draws a box which isnt filled, like a square where u can look through.
 

J16D

Member
Joined
Jul 27, 2014
Messages
6
Reaction score
0
Re: DRAW_OUTLINED_BOX

Opcode.eXe link said:
[quote author=J16D link=topic=7074.msg50262#msg50262 date=1406436951]
uhm :/ I can't see the image, it seems that is offline
can you re-upload it? or can you describe what it does?
thank you ;)
It draws a box which isnt filled, like a square where u can look through.
[/quote]
interesting... I never thought in this..  and only using lines, good job! ;)
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Solutions
1
Reaction score
158
Re: DRAW_OUTLINED_BOX

Is it possible to make it time-bounded? So it doesn't have to be in a loop all the time anymore
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,486
Reaction score
227
Location
( ͡° ͜ʖ ͡°)
Re: DRAW_OUTLINED_BOX

monday link said:
Is it possible to make it time-bounded? So it doesn't have to be in a loop all the time anymore
Be smart and creative :D
Combine snippets with snippets  :dont_care:

Code:
0AB1: @RUN_CLEO_MOD 11 AT LINE @DRAW_OUTLINED_BOX_HANDLER TIME 1000 POS 300.0 300.0 SIZE 10.0 10.0 RGBA 255 0 0 255 THICKNESS 0.5

:DRAW_OUTLINED_BOX_HANDLER
0000:
32@ = 0 // TIMER,

REPEAT
    WAIT 0
    0AB1: @DRAW_OUTLINED_BOX 9 POS 1@ 2@ SIZE 3@ 4@ RGBA 5@ 6@ 7@ 8@ THICKNESS 9@
UNTIL 001D:   32@ > 0@
004E: END_THIS_THREAD
0A93: END_THIS_THREAD
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Solutions
1
Reaction score
158
Re: DRAW_OUTLINED_BOX

Omg it works;d :forever_hurra: :somuchwin: :forever_hurra: :somuchwin:
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
I noticed, corners not connecting together, so snippet got some improvements
PHP:
:DRAW_OUTLINED_BOX
//0AB1: @DRAW_OUTLINED_BOX 9 POS 300.0 300.0 SIZE 50.0 50.0 RGBA 255 0 0 255 THICKNESS 0.5
0087: 16@ = 8@ // (float) // COPY THICKNESS
0087: 15@ = 8@ // (float) // COPY THICKNESS
0087: 14@ = 8@ // (float)
0087: 12@ = 2@ // (float)
0087: 13@ = 3@ // (float)
12@ /= 2.0 // (float)
13@ /= 2.0 // (float)
0087: 8@  = 0@ // (float)
005B: 8@ += 2@  // (float)
0063: 8@ -= 12@  // (float)
0087: 9@  = 0@ // (float)
0063: 9@ -= 2@  // (float)
005B: 9@ += 12@  // (float)
0087: 10@ = 1@ // (float)
005B: 10@ += 3@  // (float)
0063: 10@ -= 13@  // (float)
0087: 11@ = 1@ // (float)     by OpcodeXe
0063: 11@ -= 3@  // (float)
005B: 11@ += 13@  // (float)  
03F0: enable_text_draw 1
17@ = 2.0
18@ = 2.0
0073: 15@ /= 17@ // (float)
0073: 16@ /= 18@ // (float)
0063: 8@ -= 15@  // (float) // ADJUST POSITION ACCORDINGLY BOX THICKNESS
005B: 9@ += 16@  // (float) // ADJUST POSITION ACCORDINGLY BOX THICKNESS                                
038E: draw_box_position 8@ 1@ size 14@ 3@ RGBA 4@ 5@ 6@ 7@ //  left
038E: draw_box_position 9@ 1@ size 14@ 3@ RGBA 4@ 5@ 6@ 7@  // right
038E: draw_box_position 0@ 10@ size 2@ 14@ RGBA 4@ 5@ 6@ 7@  // above
038E: draw_box_position 0@ 11@ size 2@ 14@ RGBA 4@ 5@ 6@ 7@  // below
0AB2: ret 0
 
Top