Sign in to follow this  
Cretino

New @reload command

Recommended Posts

Name: @reload atcommand

Creator: Me (@Cretino)

Version: 0.1 (Initial version [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/function/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.

function:
Only reload your functions files.

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.hpp' after apply the '.diff' file.
The atcommand will work like this:
@reload "script/mob/function/mapflag/all"

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

mob:
Only reload your mobs files.

function:
Only reload your functions files.

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/function/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|warp
// Will reload your shops and warp files.

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

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

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

@reload script|mob|shop|warp|function|mapflag
// Will reload your scripts, mobs, shops, warps, functions 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.hpp' and open.
Search for:
// [Cretino]
// Uncomment to enable the reload command fast mode.
//#define RELOAD_FAST_MODE

enum e_reload_type : uint8
{
	RELOAD_NONE =		0x000,
	RELOAD_MOB =		0x001,
	RELOAD_SCRIPT =		0x002,
#ifndef RELOAD_FAST_MODE
	RELOAD_SHOP =		0x004,
	RELOAD_WARP =		0x008,
	RELOAD_FUNCTION =	0x010,
	RELOAD_MAPFLAG =	0x020,
	RELOAD_ALL =		0x03F
#else
	RELOAD_FUNCTION =	0x004,
	RELOAD_MAPFLAG =	0x008,
	RELOAD_ALL =		0x00F
#endif	/* RELOAD_FAST_MODE */
};

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

enum e_reload_type : uint8
{
	RELOAD_NONE =		0x000,
	RELOAD_MOB =		0x001,
	RELOAD_SCRIPT =		0x002,
#ifndef RELOAD_FAST_MODE
	RELOAD_SHOP =		0x004,
	RELOAD_WARP =		0x008,
	RELOAD_FUNCTION =	0x010,
	RELOAD_MAPFLAG =	0x020,
	RELOAD_ALL =		0x03F
#else
	RELOAD_FUNCTION =	0x004,
	RELOAD_MAPFLAG =	0x008,
	RELOAD_ALL =		0x00F
#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.1_rathena.diff

  • Upvote 2
  • Love 1

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.   Paste as plain text instead

  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