Jump to content
Sign in to follow this  
Cretino

New @reload command

Recommended Posts

Name: @reload atcommand

Creator: Me (@Cretino)

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

Contributors:

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

R:

Spoiler

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:

Spoiler

@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:

Spoiler

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. :)

Note: Sorry for my English.

Diff file: @reload_by_cretino_v0.2.diff

@reload_by_cretino_v0.1.diff

Edited by Cretino
Some fixes and improvements.

Share this post


Link to post
Share on other sites
3 hours ago, Cretino said:

Name: @reload atcommand

Creator: Me (@Cretino)

Version: 0.1 (Initial version [Cretino])

Contributors:

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

R:

  Reveal hidden contents

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:

  Reveal hidden contents

@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:

  Reveal hidden contents

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. :)

Note: Sorry for my English.

Diff file:  @reload_by_cretino_v0.1.diff 27.17 kB · 1 download

Will you support for rA version?

Share this post


Link to post
Share on other sites

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.

 

On 8/21/2019 at 10:43 PM, Eternity said:

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: @reload_by_cretino_v0.1_rathena.diff

Edited by Cretino

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.