Jump to content
  • 0

Two different kinds of Emperium


NexusXVI

Question


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

Is it possible to have a different empeium on each and every castle?

With Different MOB ID's (Custom EMPERIUM perhaps)>?

Because I want to have a baby woe with no custom items nor mvp card enabled :D
my current emperium hp is on 3M and they literally spend 40mins just to break it .. which is kinda discouraging.

Edited by NexusXVI
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

This would require a src edit. Not too big of one, but enough really.

 

* NOTE - ALWAYS BACK UP YOUR SRC FILES BEFORE MAKING CHANGES *

Find this in: src/map.h

enum MOBID {
MOBID_PORING	= 1002,
MOBID_RED_PLANT	= 1078,
MOBID_BLACK_MUSHROOM	= 1084,
MOBID_GOBLIN_1	= 1122,
MOBID_GOBLIN_2,
MOBID_GOBLIN_3,
MOBID_GOBLIN_4,
MOBID_GOBLIN_5,
MOBID_MARINE_SPHERE	= 1142,
MOBID_A_GUARDIAN	= 1285,
MOBID_K_GUARDIAN,
MOBID_S_GUARDIAN,
MOBID_EMPERIUM,
MOBID_TREAS01	= 1324,
MOBID_TREAS40	= 1363,
MOBID_G_PARASITE	= 1555,
MOBID_G_FLORA	= 1575,
MOBID_G_HYDRA	= 1579,
MOBID_G_MANDRAGORA	= 1589,
MOBID_G_GEOGRAPHER	= 1590,
MOBID_S_GUARDIAN_	= 1899,
MOBID_A_GUARDIAN_,
MOBID_BARRICADE1	= 1905,
MOBID_BARRICADE2,
MOBID_GUARIDAN_STONE1,
MOBID_GUARIDAN_STONE2,
MOBID_FOOD_STOR,
MOBID_BLUE_CRYST	= 1914,
MOBID_PINK_CRYST,
MOBID_TREAS41	= 1938,
MOBID_TREAS49	= 1946,
MOBID_TATACHO	= 1986,
MOBID_CENTIPEDE,
MOBID_NEPENTHES,
MOBID_HILLSRION,
MOBID_HARDROCK_MOMMOTH,
MOBID_TENDRILRION,
MOBID_CORNUS,
MOBID_NAGA,
MOBID_LUCIOLA_VESPA,
MOBID_PINGUICULA,
MOBID_G_TATACHO	= 1997,
MOBID_G_HILLSRION,
MOBID_CENTIPEDE_LARVA,
MOBID_SILVERSNIPER	= 2042,
MOBID_MAGICDECOY_FIRE,
MOBID_MAGICDECOY_WATER,
MOBID_MAGICDECOY_EARTH,
MOBID_MAGICDECOY_WIND,
MOBID_ZANZOU	= 2308,
MOBID_S_HORNET	= 2158,
MOBID_S_GIANT_HORNET,
MOBID_S_LUCIOLA_VESPA,
};

Add after MOBID_S_LUCIOLA_VESPA,

MOBID_ZANZOU    = 2308,
MOBID_S_HORNET    = 2158,
MOBID_S_GIANT_HORNET,
MOBID_S_LUCIOLA_VESPA,
MOBID_EMPERIUM_2    = XXXX, //xxxx = ID of new emperium created.
};

Should look like above when finished.

 

Find in: src/mob.c

	if (mob_id == MOBID_EMPERIUM)
{
struct guild_castle* gc = guild_mapindex2gc(map[m].index);
struct guild* g = (gc) ? guild_search(gc->guild_id) : NULL;
if (gc)
{

And change to:

	if (mob_id == MOBID_EMPERIUM || mob_id == MOBID_EMPERIUM_2)
{
struct guild_castle* gc = guild_mapindex2gc(map[m].index);
struct guild* g = (gc) ? guild_search(gc->guild_id) : NULL;
if (gc)
{

Find in: src/mob.h

#define mob_is_gvg(md) (map[(md)->bl.m].flag.gvg_castle && ( (md)->mob_id == MOBID_EMPERIUM || (md)->mob_id == MOBID_BARRICADE1 || (md)->mob_id == MOBID_GUARIDAN_STONE1 || (md)->mob_id == MOBID_GUARIDAN_STONE2) )

Change to:

#define mob_is_gvg(md) (map[(md)->bl.m].flag.gvg_castle && ( (md)->mob_id == MOBID_EMPERIUM || (md)->mob_id == MOBID_EMPERIUM_2 || (md)->mob_id == MOBID_BARRICADE1 || (md)->mob_id == MOBID_GUARIDAN_STONE1 || (md)->mob_id == MOBID_GUARIDAN_STONE2) )

That takes care of the easy parts... Now the more time consuming ones.

 

Everything else, listed will be found in src/map/battle.c until otherwise specified.

Find in: src/battle.c

	if(md && md->guardian_data) {
if(class_ == MOBID_EMPERIUM && flag&BF_SKILL && !(skill_get_inf3(skill_id)&INF3_HIT_EMP)) //Skill immunity.
return false;

if(src->type != BL_MOB) {
struct guild *g = src->type == BL_PC ? ((TBL_PC *)src)->guild : guild_search(status_get_guild_id(src));
if (class_ == MOBID_EMPERIUM && (!g || guild_checkskill(g,GD_APPROVAL) <= 0 ))
return false;

Change To: (Should make your new emperium immune to certain skills like original emperium).

	if(md && md->guardian_data) {
if(class_ == MOBID_EMPERIUM && flag&BF_SKILL && !(skill_get_inf3(skill_id)&INF3_HIT_EMP) || class_ == MOBID_EMPERIUM_2 && flag&BF_SKILL && !(skill_get_inf3(skill_id)&INF3_HIT_EMP)) //Skill immunity.
return false;

if(src->type != BL_MOB) {
struct guild *g = src->type == BL_PC ? ((TBL_PC *)src)->guild : guild_search(status_get_guild_id(src));
if (class_ == MOBID_EMPERIUM && (!g || guild_checkskill(g,GD_APPROVAL) <= 0 ) || class_ == MOBID_EMPERIUM_2 && (!g || guild_checkskill(g,GD_APPROVAL) <= 0 ))
return false;

Find:

if( attack_hits && class_ == MOBID_EMPERIUM ) {

Change To:

if( attack_hits && class_ == MOBID_EMPERIUM || attack_hits && class_ == MOBID_EMPERIUM_2 ) {

Find:

	if( bl->type == BL_MOB && ((TBL_MOB*)bl)->mob_id == MOBID_EMPERIUM )
return 0;

Change To:

	if( bl->type == BL_MOB && ((TBL_MOB*)bl)->mob_id == MOBID_EMPERIUM || bl->type == BL_MOB && ((TBL_MOB*)bl)->mob_id == MOBID_EMPERIUM_2 )
return 0;

Find:

	case BL_MER:
if (t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->mob_id == MOBID_EMPERIUM && flag&BCT_ENEMY)
return 0; //mercenary may not attack Emperium

Change To:

	case BL_MER:
if (t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->mob_id == MOBID_EMPERIUM && flag&BCT_ENEMY || t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->mob_id == MOBID_EMPERIUM_2 && flag&BCT_ENEMY )
return 0; //mercenary may not attack Emperium

Find:

	if( map_flag_gvg(m) && !sd->status.guild_id && t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->mob_id == MOBID_EMPERIUM )
return 0; //If you don't belong to a guild, can't target emperium.

Change To:

	if( map_flag_gvg(m) && !sd->status.guild_id && t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->mob_id == MOBID_EMPERIUM || map_flag_gvg(m) && !sd->status.guild_id && t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->mob_id == MOBID_EMPERIUM_2 )
return 0; //If you don't belong to a guild, can't target emperium.

That should be everything on the src side. Now you just need to create a new monster, and give it the ID you listed in the begining of this guide.

IF everything finishes without any errors, then you should have effectively duplicated the emperium by giving it a new ID.

 

There might be better/simpler ways to do this, but this is what I can think of.

Edited by GmOcean
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

Thank you so much GM Ocean a good and clean tutorial :D

I'll update if this works


This would require a src edit. Not too big of one, but enough really.

 

* NOTE - ALWAYS BACK UP YOUR SRC FILES BEFORE MAKING CHANGES *

Find this in: src/map.h

enum MOBID {
MOBID_PORING	= 1002,
MOBID_RED_PLANT	= 1078,
MOBID_BLACK_MUSHROOM	= 1084,
MOBID_GOBLIN_1	= 1122,
MOBID_GOBLIN_2,
MOBID_GOBLIN_3,
MOBID_GOBLIN_4,
MOBID_GOBLIN_5,
MOBID_MARINE_SPHERE	= 1142,
MOBID_A_GUARDIAN	= 1285,
MOBID_K_GUARDIAN,
MOBID_S_GUARDIAN,
MOBID_EMPERIUM,
MOBID_TREAS01	= 1324,
MOBID_TREAS40	= 1363,
MOBID_G_PARASITE	= 1555,
MOBID_G_FLORA	= 1575,
MOBID_G_HYDRA	= 1579,
MOBID_G_MANDRAGORA	= 1589,
MOBID_G_GEOGRAPHER	= 1590,
MOBID_S_GUARDIAN_	= 1899,
MOBID_A_GUARDIAN_,
MOBID_BARRICADE1	= 1905,
MOBID_BARRICADE2,
MOBID_GUARIDAN_STONE1,
MOBID_GUARIDAN_STONE2,
MOBID_FOOD_STOR,
MOBID_BLUE_CRYST	= 1914,
MOBID_PINK_CRYST,
MOBID_TREAS41	= 1938,
MOBID_TREAS49	= 1946,
MOBID_TATACHO	= 1986,
MOBID_CENTIPEDE,
MOBID_NEPENTHES,
MOBID_HILLSRION,
MOBID_HARDROCK_MOMMOTH,
MOBID_TENDRILRION,
MOBID_CORNUS,
MOBID_NAGA,
MOBID_LUCIOLA_VESPA,
MOBID_PINGUICULA,
MOBID_G_TATACHO	= 1997,
MOBID_G_HILLSRION,
MOBID_CENTIPEDE_LARVA,
MOBID_SILVERSNIPER	= 2042,
MOBID_MAGICDECOY_FIRE,
MOBID_MAGICDECOY_WATER,
MOBID_MAGICDECOY_EARTH,
MOBID_MAGICDECOY_WIND,
MOBID_ZANZOU	= 2308,
MOBID_S_HORNET	= 2158,
MOBID_S_GIANT_HORNET,
MOBID_S_LUCIOLA_VESPA,
};

Add after MOBID_S_LUCIOLA_VESPA,

MOBID_ZANZOU    = 2308,
MOBID_S_HORNET    = 2158,
MOBID_S_GIANT_HORNET,
MOBID_S_LUCIOLA_VESPA,
MOBID_EMPERIUM_2    = XXXX, //xxxx = ID of new emperium created.
};

Should look like above when finished.

 

Find in: src/mob.c

	if (mob_id == MOBID_EMPERIUM)
{
struct guild_castle* gc = guild_mapindex2gc(map[m].index);
struct guild* g = (gc) ? guild_search(gc->guild_id) : NULL;
if (gc)
{

And change to:

	if (mob_id == MOBID_EMPERIUM || mob_id == MOBID_EMPERIUM_2)
{
struct guild_castle* gc = guild_mapindex2gc(map[m].index);
struct guild* g = (gc) ? guild_search(gc->guild_id) : NULL;
if (gc)
{

Find in: src/mob.h

#define mob_is_gvg(md) (map[(md)->bl.m].flag.gvg_castle && ( (md)->mob_id == MOBID_EMPERIUM || (md)->mob_id == MOBID_BARRICADE1 || (md)->mob_id == MOBID_GUARIDAN_STONE1 || (md)->mob_id == MOBID_GUARIDAN_STONE2) )

Change to:

#define mob_is_gvg(md) (map[(md)->bl.m].flag.gvg_castle && ( (md)->mob_id == MOBID_EMPERIUM || (md)->mob_id == MOBID_EMPERIUM_2 || (md)->mob_id == MOBID_BARRICADE1 || (md)->mob_id == MOBID_GUARIDAN_STONE1 || (md)->mob_id == MOBID_GUARIDAN_STONE2) )

That takes care of the easy parts... Now the more time consuming ones.

 

Everything else, listed will be found in src/map/battle.c until otherwise specified.

Find in: src/battle.c

	if(md && md->guardian_data) {
if(class_ == MOBID_EMPERIUM && flag&BF_SKILL && !(skill_get_inf3(skill_id)&INF3_HIT_EMP)) //Skill immunity.
return false;

if(src->type != BL_MOB) {
struct guild *g = src->type == BL_PC ? ((TBL_PC *)src)->guild : guild_search(status_get_guild_id(src));
if (class_ == MOBID_EMPERIUM && (!g || guild_checkskill(g,GD_APPROVAL) <= 0 ))
return false;

Change To: (Should make your new emperium immune to certain skills like original emperium).

	if(md && md->guardian_data) {
if(class_ == MOBID_EMPERIUM && flag&BF_SKILL && !(skill_get_inf3(skill_id)&INF3_HIT_EMP) || class_ == MOBID_EMPERIUM_2 && flag&BF_SKILL && !(skill_get_inf3(skill_id)&INF3_HIT_EMP)) //Skill immunity.
return false;
    if(md && md->guardian_data) {
if(class_ == MOBID_EMPERIUM && flag&BF_SKILL && !(skill_get_inf3(skill_id)&INF3_HIT_EMP)) //Skill immunity.
return false;

if(src->type != BL_MOB) {
struct guild *g = src->type == BL_PC ? ((TBL_PC *)src)->guild : guild_search(status_get_guild_id(src));
if (class_ == MOBID_EMPERIUM && (!g || guild_checkskill(g,GD_APPROVAL) <= 0 ) || class_ == MOBID_EMPERIUM_2 && (!g || guild_checkskill(g,GD_APPROVAL) <= 0 ))
return false;

Find:

if( attack_hits && class_ == MOBID_EMPERIUM ) {

Change To:

if( attack_hits && class_ == MOBID_EMPERIUM || attack_hits && class_ == MOBID_EMPERIUM_2 ) {

Find:

	if( bl->type == BL_MOB && ((TBL_MOB*)bl)->mob_id == MOBID_EMPERIUM )
return 0;

Change To:

	if( bl->type == BL_MOB && ((TBL_MOB*)bl)->mob_id == MOBID_EMPERIUM || bl->type == BL_MOB && ((TBL_MOB*)bl)->mob_id == MOBID_EMPERIUM_2 )
return 0;

Find:

	case BL_MER:
if (t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->mob_id == MOBID_EMPERIUM && flag&BCT_ENEMY)
return 0; //mercenary may not attack Emperium

Change To:

	case BL_MER:
if (t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->mob_id == MOBID_EMPERIUM && flag&BCT_ENEMY || t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->mob_id == MOBID_EMPERIUM_2 && flag&BCT_ENEMY )
return 0; //mercenary may not attack Emperium

Find:

	if( map_flag_gvg(m) && !sd->status.guild_id && t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->mob_id == MOBID_EMPERIUM )
return 0; //If you don't belong to a guild, can't target emperium.

Change To:

	if( map_flag_gvg(m) && !sd->status.guild_id && t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->mob_id == MOBID_EMPERIUM || map_flag_gvg(m) && !sd->status.guild_id && t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->mob_id == MOBID_EMPERIUM_2 )
return 0; //If you don't belong to a guild, can't target emperium.

That should be everything on the src side. Now you just need to create a new monster, and give it the ID you listed in the begining of this guide.

IF everything finishes without any errors, then you should have effectively duplicated the emperium by giving it a new ID.

 

There might be better/simpler ways to do this, but this is what I can think of.

Followed it and got this results on the log :

 

battle.c: In function ‘battle_can_hit_gvg_target’:
battle.c:1317: warning: suggest parentheses around ‘&&’ within ‘||’
battle.c:1325: warning: suggest parentheses around ‘&&’ within ‘||’
battle.c:1374: error: invalid storage class for function ‘battle_calc_drain’
battle.c:1577: error: invalid storage class for function ‘battle_calc_base_damage’
battle.c:1690: error: invalid storage class for function ‘battle_range_type’
battle.c:1710: error: invalid storage class for function ‘battle_blewcount_bonus’
battle.c:1856: error: invalid storage class for function ‘target_has_infinite_defense’
battle.c:1879: error: invalid storage class for function ‘is_skill_using_arrow’
battle.c:1897: error: invalid storage class for function ‘is_attack_right_handed’
battle.c:1917: error: invalid storage class for function ‘is_attack_left_handed’
battle.c:1946: error: invalid storage class for function ‘is_attack_critical’
battle.c:2013: error: invalid storage class for function ‘is_attack_piercing’
battle.c:2052: error: invalid storage class for function ‘battle_skill_get_damage_properties’
battle.c:2068: error: invalid storage class for function ‘is_attack_hitting’
battle.c:2209: error: invalid storage class for function ‘attack_ignores_def’
battle.c:2258: error: invalid storage class for function ‘battle_skill_stacks_masteries_vvs’
battle.c:2306: error: invalid storage class for function ‘battle_get_weapon_element’
battle.c:2390: error: invalid storage class for function ‘battle_calc_element_damage’
battle.c:2460: error: invalid storage class for function ‘battle_calc_attack_masteries’
battle.c:2767: error: invalid storage class for function ‘battle_calc_multi_attack’
battle.c:2832: error: invalid storage class for function ‘battle_calc_attack_skill_ratio’
battle.c:3733: error: invalid storage class for function ‘battle_calc_skill_constant_addition’
battle.c: In function ‘battle_calc_attack_plant’:
battle.c:4182: warning: suggest parentheses around ‘&&’ within ‘||’
battle.c: In function ‘battle_can_hit_gvg_target’:
battle.c:4411: error: invalid storage class for function ‘initialize_weapon_data’
battle.c:4573: error: invalid storage class for function ‘battle_calc_weapon_attack’
battle.c:4809: error: static declaration of ‘battle_calc_magic_attack’ follows non-static declaration
battle.c:1844: note: previous declaration of ‘battle_calc_magic_attack’ was here
battle.c:5480: error: static declaration of ‘battle_calc_misc_attack’ follows non-static declaration
battle.c:1845: note: previous declaration of ‘battle_calc_misc_attack’ was here
battle.c: In function ‘battle_damage_area’:
battle.c:6099: warning: suggest parentheses around ‘&&’ within ‘||’
battle.c: In function ‘battle_check_target’:
battle.c:6763: warning: suggest parentheses around ‘&&’ within ‘||’
battle.c:6788: warning: suggest parentheses around ‘&&’ within ‘||’
battle.c: In function ‘battle_can_hit_gvg_target’:
battle.c:7501: error: invalid storage class for function ‘rAthena_report_timer’
battle.c:7669: error: expected declaration or statement at end of input
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Okay, again, I wasn't 100% sure it would even work. From what I can tell, there are some syntax errors, in the guide I gave you. I, for the life of me, can't find them lol. So I suggest taking this to source requests/support to see if someone more skilled and knowledge able from me can help you with that, since again, it was just a; "here, hope this works out for you." Attempt.

 

Again, sorry and good luck! :D

 

Edit: I did find one error though.

    if(md && md->guardian_data) {
if(class_ == MOBID_EMPERIUM && flag&BF_SKILL && !(skill_get_inf3(skill_id)&INF3_HIT_EMP)) //Skill immunity.
return false;

seems an extra copy of this was added to my: Change To   post. That would cause some errors of duplicate entrys.

Though, that's all I could gather from this, I have some ideas but i'd rather not say them and send you on a wild goose chase lol. So let's leave this up to the far more experienced src mods on rA.

Edited by GmOcean
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

Thats fine :D

Atleast someone noticed thanks

Link to comment
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
Answer this question...

×   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.

×
×
  • Create New...