Hercules 1st 2014 MegaPatch

OMO
default_biggrin.png
nice patch

 
Amazing.

The most awaited features are now on Hercules (@at persistent and 4billion array limit.)

 
By the way, I don't know if you guys have realised yet, but this means you won't ever need an external plugin to make a vending database work!

 
Last edited by a moderator:
Great Hercules!

Great Ind yommy All of you.

And another things.

I have a Chinese RO server, It support autotrade recovery for a long times.

I found the developer use many SQL table to remember items. It seemed every Item had a Serial Number themselves. When server restart or Physical server reboot the autotraders will Reopen the vending. And the Process will be displayed in the console interface.

But I have not Source code. I just bought the Release version. Did you need to Reference about it? maybe some helpful?

 
great ! no more the ugly 127 index in an array

next ->

2 dimensional array !

.array[1][0] <-- like this

is this possible ?
default_tongue.png


then no more ugly setd/getd stuff like

setd ".party"+ getcharid(1) +"data["+ .@i +"]", value;

if possible, please make it support at least 3 dimension

I have made a custom utility script that runs on 3 dimensional loop

 
Last edited by a moderator:
great ! no more the ugly 127 index in an array

next ->

2 dimensional array !

.array[1][0] <-- like this

is this possible ?
default_tongue.png


then no more ugly setd/getd stuff like

setd ".party"+ getcharid(1) +"data["+ .@i +"]", value;

if possible, please make it support at least 3 dimension

I have made a custom utility script that runs on 3 dimensional loop
already going 3D eh
default_tongue.png


 
does this mean we shortly can get 147b zeny or just 4 ? mby even higher value ? i have a npc banker who can achieve like bilions bilions

 
[*]Magnificent Array Improvement (to all variable types)

[*]Size limit modified from 127 to ...4 billion!
In fact it's limited to 2 billion index max : since the script engine use integer (and not unsigned integer) to store variables and numbers.

But still a great improvement
default_smile.png


 
[*]Magnificent Array Improvement (to all variable types)

[*]Size limit modified from 127 to ...4 billion!
In fact it's limited to 2 billion index max : since the script engine use integer (and not unsigned integer) to store variables and numbers.

But still a great improvement
default_smile.png
eh?

Where do you see the signed int part?

A bit of searching for "max_arraysize" brought me to script.h

#define SCRIPT_MAX_ARRAYSIZE (UINT_MAX - 1)
Looks like an unsigned int to me.

script.h imports cbasetypes.h which has

#define UINT_MAX 0xffffffff
Which is: 4294967295

 
Last edited by a moderator:
eh?

Where do you see the signed int part?

A bit of searching for "max_arraysize" brought me to script.h

#define SCRIPT_MAX_ARRAYSIZE (UINT_MAX - 1)Looks like an unsigned int to me.
script.h imports cbasetypes.h which has

#define UINT_MAX 0xffffffffWhich is: 4294967295
Basically:

https://github.com/HerculesWS/Hercules/blob/master/src/map/script.c#L1105

https://github.com/HerculesWS/Hercules/blob/master/src/map/script.c#L3011

https://github.com/HerculesWS/Hercules/blob/master/src/map/script.c#L3425

Number in script are integer, supported from -2147483647 to 2147483647, else it lead to overflow error.

So if you can't create a number greater than this value, you will never be able to select an index superior than 2147483647 in an array.

 
indeed, I'll update the documentation accordingly. Thank you!

 
Back
Top