New @reload command

Cretino

New member
Messages
75
Points
0
Name: @reload atcommand

Creator: Me (@Cretino)

Version: 0.2 (Some fixes and improvements [Cretino])

Contributors:

Q: 'What features have '@reload atcommand'?'

R:

You can reload just one thing you want without remove all NPCs, Mobs, etc...
eg: You can reload your scripts without remove your mobs alive.

@reload "script/mob/shop/warp/trader/function/zone/mapflag/all"

script:
Only reload your scripts files.

mob:
Only reload your mobs files.

shop:
Only reload your shops files.

warp:
Only reload your warps files.

trader:
Only reload your traders files.

function:
Only reload your functions files.

zone:
Only reload your zones configuration.

mapflag:
Only reload your mapflags files.

all:
Reload all npc files like '@reloadscript'.

You can enable 'Reload Fast Mode' to simplify the atcommand uncommenting '#define RELOAD_FAST_MODE' in 'npc.h' after apply the '.diff' file.
The atcommand will work like this:
@reload "script/mob/function/zone/mapflag/all"

script:
Now 'script' will reload all your scripts (including scripts, shops, traders and warps).

mob:
Only reload your mobs files.

function:
Only reload your functions files.

zone:
Only reload your zones configuration.

mapflag:
Only reload your mapflags files.

all:
Reload all npc files like '@reloadscript'.

Q: 'How to use these features?'

R:

@reload "script/mob/shop/warp/trader/function/zone/mapflag/all"

@reload script
// Will reload only your scripts files.

@reload script|mob
// Will reload your scripts and mobs files.

@reload script|mob|mapflag
// Will reload your scripts, mobs and mapflags files.

@reload shop
// Will reload only your shops files.

@reload shop|trader|warp
// Will reload your shops, traders and warp files.

@reload warp
// Will reload only your warps files.

@reload function
// Will reload only your functions files.

@reload zone
// Will reload only your zones configuration.

@reload all
// Will reload all npc files like '@reloadscript'.

@reload script|mob|shop|warp|trader|function|zone|mapflag
// Will reload your scripts, mobs, shops, warps, traders, functions, zones and mapflags like '@reload all' or '@reloadscript'.

Q: 'How Can I enable 'Reload Fast Mode'?'

R:

After apply the '.diff' file, go to 'src\map\npc.h' and open.
Search for:
// [Cretino]
// Uncomment to enable the reload command fast mode.
//#define RELOAD_FAST_MODE

enum e_reload_type
{
RELOAD_NONE = 0x000,
RELOAD_MOB = 0x001,
RELOAD_SCRIPT = 0x002,
#ifndef RELOAD_FAST_MODE
RELOAD_SHOP = 0x004,
RELOAD_WARP = 0x008,
RELOAD_TRADER = 0x010,
RELOAD_FUNCTION = 0x020,
RELOAD_ZONE = 0x040,
RELOAD_MAPFLAG = 0x080,
RELOAD_ALL = 0x0FF
#else
RELOAD_FUNCTION = 0x004,
RELOAD_ZONE = 0x008,
RELOAD_MAPFLAG = 0x010,
RELOAD_ALL = 0x01F
#endif /* RELOAD_FAST_MODE */
};

Change to:
// [Cretino]
// Uncomment to enable the reload command fast mode.
#define RELOAD_FAST_MODE

enum e_reload_type
{
RELOAD_NONE = 0x000,
RELOAD_MOB = 0x001,
RELOAD_SCRIPT = 0x002,
#ifndef RELOAD_FAST_MODE
RELOAD_SHOP = 0x004,
RELOAD_WARP = 0x008,
RELOAD_TRADER = 0x010,
RELOAD_FUNCTION = 0x020,
RELOAD_ZONE = 0x040,
RELOAD_MAPFLAG = 0x080,
RELOAD_ALL = 0x0FF
#else
RELOAD_FUNCTION = 0x004,
RELOAD_ZONE = 0x008,
RELOAD_MAPFLAG = 0x010,
RELOAD_ALL = 0x01F
#endif /* RELOAD_FAST_MODE */
};

Now, 'Reload Fast Mode' is actived. :) (Need compile the emulator after the change)

I've tested and is working well, but can have bugs.

I'm accepting suggestions.

If you found any bug, report in topic or send me a private message.

I'll solve the problem as quickly as possible.

I think is it.
default_smile.png


Note: Sorry for my English.

Diff file: View attachment @reload_by_cretino_v0.2.diff

@reload_by_cretino_v0.1.diff

 

Attachments

Last edited by a moderator:
Name: @reload atcommand

Creator: Me (@Cretino)

Version: 0.1 (Initial version [Cretino])

Contributors:

Q: 'What features have '@reload atcommand'?'

R:

You can reload just one thing you want without remove all NPCs, Mobs, etc...
eg: You can reload your scripts without remove your mobs alive.

@reload "script/mob/shop/warp/trader/function/zone/mapflag/all"

script:
Only reload your scripts files.

mob:
Only reload your mobs files.

shop:
Only reload your shops files.

warp:
Only reload your warps files.

trader:
Only reload your traders files.

function:
Only reload your functions files.

zone:
Only reload your zones configuration.

mapflag:
Only reload your mapflags files.

all:
Reload all npc files like '@reloadscript'.

You can enable 'Reload Fast Mode' to simplify the atcommand uncommenting '#define RELOAD_FAST_MODE' in 'npc.h' after apply the '.diff' file.
The atcommand will work like this:
@reload "script/mob/function/zone/mapflag/all"

script:
Now 'script' will reload all your scripts (including scripts, shops, traders and warps).

mob:
Only reload your mobs files.

function:
Only reload your functions files.

zone:
Only reload your zones configuration.

mapflag:
Only reload your mapflags files.

all:
Reload all npc files like '@reloadscript'.

You can reload just one thing you want without remove all NPCs, Mobs, etc...
eg: You can reload your scripts without remove your mobs alive.

@reload "script/mob/shop/warp/trader/function/zone/mapflag/all"

script:
Only reload your scripts files.

mob:
Only reload your mobs files.

shop:
Only reload your shops files.

warp:
Only reload your warps files.

trader:
Only reload your traders files.

function:
Only reload your functions files.

zone:
Only reload your zones configuration.

mapflag:
Only reload your mapflags files.

all:
Reload all npc files like '@reloadscript'.

You can enable 'Reload Fast Mode' to simplify the atcommand uncommenting '#define RELOAD_FAST_MODE' in 'npc.h' after apply the '.diff' file.
The atcommand will work like this:
@reload "script/mob/function/zone/mapflag/all"

script:
Now 'script' will reload all your scripts (including scripts, shops, traders and warps).

mob:
Only reload your mobs files.

function:
Only reload your functions files.

zone:
Only reload your zones configuration.

mapflag:
Only reload your mapflags files.

all:
Reload all npc files like '@reloadscript'.

Q: 'How to use these features?'

R:

@reload "script/mob/shop/warp/trader/function/zone/mapflag/all"

@reload script
// Will reload only your scripts files.

@reload script|mob
// Will reload your scripts and mobs files.

@reload script|mob|mapflag
// Will reload your scripts, mobs and mapflags files.

@reload shop
// Will reload only your shops files.

@reload shop|trader|warp
// Will reload your shops, traders and warp files.

@reload warp
// Will reload only your warps files.

@reload function
// Will reload only your functions files.

@reload zone
// Will reload only your zones configuration.

@reload all
// Will reload all npc files like '@reloadscript'.

@reload script|mob|shop|warp|trader|function|zone|mapflag
// Will reload your scripts, mobs, shops, warps, traders, functions, zones and mapflags like '@reload all' or '@reloadscript'.

@reload "script/mob/shop/warp/trader/function/zone/mapflag/all"

@reload script
// Will reload only your scripts files.

@reload script|mob
// Will reload your scripts and mobs files.

@reload script|mob|mapflag
// Will reload your scripts, mobs and mapflags files.

@reload shop
// Will reload only your shops files.

@reload shop|trader|warp
// Will reload your shops, traders and warp files.

@reload warp
// Will reload only your warps files.

@reload function
// Will reload only your functions files.

@reload zone
// Will reload only your zones configuration.

@reload all
// Will reload all npc files like '@reloadscript'.

@reload script|mob|shop|warp|trader|function|zone|mapflag
// Will reload your scripts, mobs, shops, warps, traders, functions, zones and mapflags like '@reload all' or '@reloadscript'.

Q: 'How Can I enable 'Reload Fast Mode'?'

R:

After apply the '.diff' file, go to 'src\map\npc.h' and open.
Search for:
// [Cretino]
// Uncomment to enable the reload command fast mode.
//#define RELOAD_FAST_MODE

enum e_reload_type
{
RELOAD_NONE = 0x000,
RELOAD_MOB = 0x001,
RELOAD_SCRIPT = 0x002,
#ifndef RELOAD_FAST_MODE
RELOAD_SHOP = 0x004,
RELOAD_WARP = 0x008,
RELOAD_TRADER = 0x010,
#endif /* RELOAD_FAST_MODE */
RELOAD_FUNCTION = 0x020,
RELOAD_ZONE = 0x040,
RELOAD_MAPFLAG = 0x080,
RELOAD_ALL = 0x0FF
};

Change to:
// [Cretino]
// Uncomment to enable the reload command fast mode.
#define RELOAD_FAST_MODE

enum e_reload_type
{
RELOAD_NONE = 0x000,
RELOAD_MOB = 0x001,
RELOAD_SCRIPT = 0x002,
#ifndef RELOAD_FAST_MODE
RELOAD_SHOP = 0x004,
RELOAD_WARP = 0x008,
RELOAD_TRADER = 0x010,
#endif /* RELOAD_FAST_MODE */
RELOAD_FUNCTION = 0x020,
RELOAD_ZONE = 0x040,
RELOAD_MAPFLAG = 0x080,
RELOAD_ALL = 0x0FF
};

Now, 'Reload Fast Mode' is actived. :) (Need compile the emulator after the change)

After apply the '.diff' file, go to 'src\map\npc.h' and open.
Search for:
// [Cretino]
// Uncomment to enable the reload command fast mode.
//#define RELOAD_FAST_MODE

enum e_reload_type
{
RELOAD_NONE = 0x000,
RELOAD_MOB = 0x001,
RELOAD_SCRIPT = 0x002,
#ifndef RELOAD_FAST_MODE
RELOAD_SHOP = 0x004,
RELOAD_WARP = 0x008,
RELOAD_TRADER = 0x010,
#endif /* RELOAD_FAST_MODE */
RELOAD_FUNCTION = 0x020,
RELOAD_ZONE = 0x040,
RELOAD_MAPFLAG = 0x080,
RELOAD_ALL = 0x0FF
};

Change to:
// [Cretino]
// Uncomment to enable the reload command fast mode.
#define RELOAD_FAST_MODE

enum e_reload_type
{
RELOAD_NONE = 0x000,
RELOAD_MOB = 0x001,
RELOAD_SCRIPT = 0x002,
#ifndef RELOAD_FAST_MODE
RELOAD_SHOP = 0x004,
RELOAD_WARP = 0x008,
RELOAD_TRADER = 0x010,
#endif /* RELOAD_FAST_MODE */
RELOAD_FUNCTION = 0x020,
RELOAD_ZONE = 0x040,
RELOAD_MAPFLAG = 0x080,
RELOAD_ALL = 0x0FF
};

Now, 'Reload Fast Mode' is actived. :) (Need compile the emulator after the change)

I've tested and is working well, but can have bugs.

I'm accepting suggestions.

If you found any bug, report in topic or send me a private message.

I'll solve the problem as quickly as possible.

I think is it.
default_smile.png


Note: Sorry for my English.

Diff file: View attachment 5422
Will you support for rA version?

 
Hey guys, I've tested more my command and found some bugs.

I made some fixes and improvements, now is working well.

If have any bug, report to me for trying fix.

You guys can take the new '.diff' file in first post.

Thank you I'll be looking forward Cretino!
It give me bit of work, but it's done.

I did some testing and it's working fine.

Commands for rAthena version:

@reload "script/mob/shop/warp/function/mapflag/all"


Diff file: View attachment @reload_by_cretino_v0.1_rathena.diff

 
Last edited by a moderator:
Back
Top