Resource icon

CLEO Release imrpGiftBox

CLEO related
Status
Not open for further replies.

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Solutions
1
Reaction score
158
Mod which puts the marker on the minimap around the area of the gift box and displays time (in seconds) remaining to open another gift box due to 7 min limit (5 min for premium users). In combination with the separate objectFinder (for the streamed objects) it is quite reliable, on its own it isn't precise enough because of its working mechanism which is described below.

[video=youtube]https://youtu.be/ISFFurDOBno[/video]

Controls:
Activation of the measurement process - numpad * button
Cancellation of the measurement (if the player can't get through the obstacle) - numpad / button
Cooldown time toggle - /gbc command

Tested with:
-Cleo 4.1
-Samp 0.3.7
-Sampfuncs 5.3.1

Working mechanism:
Currently (2017) on IMRP server there's a "/giftbox" command which allows the user to see the exact distance (rounded to the nearest whole number) to the nearest gift box. Using it 4 times at 4 different positions it is possible to calculate the estimated position of that gift box. The mod sends "/giftbox" commands and parses the distance from the response while moving the dude around square-like shape. The precision of that position is limited by the distance covered during the measurement process and also by the fact that it does not take into account the 3d distance including altitude, the mod is only concerned about the 2d measurements (east-west, north-south).

[attachment=5266]
 

Attachments

  • imrpGiftBox.cs
    25.2 KB · Views: 108

Ezel

Active member
Joined
Dec 6, 2017
Messages
134
Reaction score
18
Location
Syria
imrp is shit but however you are doing quality stuff. interesting method, how did you discovered that?
 

opce

Active member
Joined
Dec 11, 2014
Messages
61
Reaction score
0
thanks, but objectfinder is better before, im finded all gift's but thanks. ;]
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Solutions
1
Reaction score
158
@Ezel
I used the command manually to check whether I'm getting closer to the gifts and realized it would be more effective if automatic calculation did it instead

@_=Gigant=_
It's "Gangsters Paradise" with piano intro, taken from this vid: https://www.youtube.com/watch?v=gV4Pu4KyY_c
 

PlasticBottle

Active member
Joined
Jul 13, 2016
Messages
162
Reaction score
1
If I understand well, at 4 different positions you kind of draw a circle, and the place where the 4 circles cross means there is likely the gift near that place ? (See the image explaining what I said, paint FTW)
h4bTYDO.png
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Solutions
1
Reaction score
158
it's more simple, it measures 2 separate lengths independently (horizontal and vertical). The circular movement is just to gather the data from 4 positions as quick as possible. So here's what it does:
x_giftbox = x_player + (distance / x_distance_covered_during_measurement * (east_distance - west_distance))
y_giftbox = y_player + (distance / y_distance_covered_during_measurement * (south_distance - north_distance))

If the player is standing at X=1000 Y=0 and the giftbox is at X=3000 Y=0 then the equations above would look something like this:
3000 = 1000 + (2000 / 20 * (2020 - 2000))
0 = 0 + (2010 / 20 * (2010 - 2010))
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Solutions
1
Reaction score
158
mom I made it;d
Btw the concept itself is much more simple than it seems by the written formula
 
Status
Not open for further replies.
Top