Replies: 5 comments 5 replies
-
Seems to be calculated by some lua function that takes 2 args. I'm not skilled enough to trace the call, but I have verified that the function produces the correct values using CheatEngine. // #STR: "calcTaxiCharge"
int __thiscall sub_5AA590(void *this, int a2, unsigned __int16 a3)
{
int v3; // esi
void (__thiscall *v4)(int); // eax
struct lua_State *v5; // edx
int v6; // edi
int v7; // edi
int v9; // edi
void (__thiscall *v10)(int); // edx
char v11[4]; // [esp+18h] [ebp-18h] BYREF
int v12; // [esp+1Ch] [ebp-14h]
int v13; // [esp+20h] [ebp-10h]
int v14; // [esp+2Ch] [ebp-4h]
(*(*this + 16))(this, v11);
v14 = 0;
if ( !v12 )
return 0;
v3 = v12 + 24;
v4 = *(*(v12 + 24) + 4);
v13 = v12 + 24;
v4(v12 + 24);
v5 = *(v12 + 20);
LOBYTE(v14) = 1;
lua_getfield(v5, -10002, aCalctaxicharge);
v6 = v12;
lua_pushnumber(*(v12 + 20), a2);
++*(v6 + 16);
v7 = v12;
lua_pushnumber(*(v12 + 20), a3);
++*(v7 + 16);
if ( !sub_5A8780(v12) )
{
LOBYTE(v14) = 0;
(*(*v3 + 8))(v3);
v14 = -1;
sub_A7D640(v11);
return 0;
}
v9 = sub_5A8510(1);
v10 = *(*v3 + 8);
LOBYTE(v14) = 0;
v10(v3);
v14 = -1;
sub_A7D640(v11);
return v9;
} |
Beta Was this translation helpful? Give feedback.
-
I have also added some min max meso per mob lvl. maybe that is also in some lua function? is this related to Data\lua\Precompiled.m2d ? |
Beta Was this translation helpful? Give feedback.
-
I think I found that function inside luapack in that Precompiled.m2d and also a lot of other functions, some broken but ok... calcTaxiCharge = function(l_23_0, l_23_1) |
Beta Was this translation helpful? Give feedback.
-
calcAirTaxiCharge = function(l_24_0) |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
We know so far that the taxi costs are already calculated in the client side. We need to figure out what the formula is.
Here's a handful of data that sharr from Discord was able to grab.:
https://docs.google.com/spreadsheets/d/12YKsVO3qMdVRUoRMvUQRBo0DaOuhVFchy-y569CLWTY/edit#gid=724092846
(2nd sheet)
it contains level, map origin, map destination, and price
It is likely that the distance and size (from world map) is taken into consideration. You'll find the coords on the right hand side.
Anyone have any idea what the formula could be?
#86
Beta Was this translation helpful? Give feedback.
All reactions