Jump to content

malufett

Members
  • Posts

    554
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by malufett

  1. Updated!

    Sorry it get a bit long...because I revamped everything due to handling of variables....

    and here with the update your request is already included and I also change the behavior where tomb will only be created once the monster dies so less memory usage...

    do anyone knows how convex mirror works with tomb,,,tenks...

  2. @mysterious

    hmm..well the tomb will be created once the server loaded the npc script..so before the monster will die the tomb is already created just hidden so once it dies it will just move the npc tomb right before the MVP monster location..and since the script for the spawn of MVP is already created nothing to bother...but if you have custom mobs/MVP just us the usual way to add MVP spawn script..."anthell02,0,0,0,0 boss_monster Maya 1147,1,7200000,0,1"

    @jhosef

    ok..coming right up

    /no1

  3. 23h7pcm.jpg

    kRO MVP Tomb System....

    Changelog:

    • 1.0 First version
    • 2.0 Added Feature showTimeRespawn and showTimerRespawn.
    • 2.1 Fixed map crashing when MVP arena is use or summoning MVP using 'monster' script.
    • 3.0 Fixed duplicate issue and max gap.

    TODO:

    incorporate with the convex mirror. (need info in official behavior)

    @battle.h

    // rAthena
    int max_third_parameter;
    int atcommand_max_stat_bypass;
    
    +// Tomb System [malufett]
    +int show_mvp_tomb;
    

    @battle.c

    **/
    { "max_third_parameter",				  &battle_config.max_third_parameter,				   20,	  0,	  INT_MAX,		},
    { "atcommand_max_stat_bypass",	&battle_config.atcommand_max_stat_bypass,	   0,	  0,			  100,		 },		  
    +{ "skill_amotion_leniency",			  &battle_config.skill_amotion_leniency,				 90,	  0,			  100,		 },
    +// Tomb System [malufett]
    +{ "show_mvp_tomb",					  &battle_config.show_mvp_tomb,							 1,	  0,				  1		 },
    

    
    // Should MVP slaves retain their target when summoned back to their master?
    mob_slave_keep_target: yes
    
    +// Show Tomb when MVP got killed?
    +show_mvp_tomb: yes
    

    @mob.c

    md->spawn_timer = add_timer(gettick()+spawntime, mob_delayspawn, md->bl.id, 0);
    
    +if( md->status.mode&MD_BOSS &&
    +	 battle_config.show_mvp_tomb){//Tomb System [malufett]
    
    +		  struct map_session_data *sd =  map_id2sd(md->target_id);
    +		  md->target_id = npc_mvp_tomb(md, sd );
    +}

    int mob_spawn (struct mob_data *md)
    {
    	  int i=0;
    	  unsigned int tick = gettick();
    	  int c =0;
    
    +if(md->status.mode&MD_BOSS &&
    +		  battle_config.show_mvp_tomb){//Tomb System [malufett]
    +		  npc_mvp_tomb(md, NULL);
    +}

    clif_clearunit_delayed(&md->bl, CLR_DEAD, tick+250);
    
    if(!md->spawn) //Tell status_damage to remove it from memory.
    	  return 5; // Note: Actually, it's 4. Oh well...
    +if( mvp_sd && md->status.mode&MD_BOSS && battle_config.show_mvp_tomb)//Tomb System [malufett]
    +		  md->target_id = mvp_sd->bl.id;

    @npc.c

    npc_debug_warps_sub(map[m].npc[i]);
    }
    
    +/**
    MVP Tomb System. [malufett]
    +**/
    +int npc_mvp_tomb(struct mob_data *md, struct map_session_data *sd){
    +		  char w1[256], w2[256], w3[256];
    +		  struct npc_data *nd = NULL;
    +
    +		  nullpo_ret(md);
    +
    +		  if(sd){
    +					struct mob_data *boss_md = map_getmob_boss(sd->bl.m); // Search for Boss on this Map and ignore summoned Boss
    +
    +					if( boss_md != NULL &&
    +					boss_md->bl.prev != NULL &&
    +					md->bl.id == boss_md->bl.id )
    +					{
    +							 int x = boss_md->bl.x, y = boss_md->bl.y;
    +							  const struct TimerData * timer_data = get_timer(md->spawn_timer);
    +
    +							  if(md->spawn_timer == INVALID_TIMER)
    +										return 1;
    +
    +							  sprintf(w2, "Tomb#%d|%d", boss_md->class_, (DIFF_TICK(timer_data->tick, gettick())  + 60));
    +							  sprintf(w1, "%s, %d, %d, 1", map[boss_md->bl.m].name, x , y);
    +							  sprintf(w3, "%s@%s", sd->status.name, map[boss_md->bl.m].name);
    +							  sprintf(w2, "%s::%s", w2, w3);
    +							  sprintf(w3, "%s::OnMyMobDead", w3);
    +
    +							  safestrncpy(md->npc_event, w3, sizeof(md->npc_event));
    +							  npc_parse_duplicate(w1,"duplicate(tomb_stone)",w2,"565", "-", "-", "MVP_TOMB"+boss_md->class_);
    +
    +							  npc_event(sd,md->npc_event,0);
    +							  safestrncpy(md->npc_event, "", sizeof(md->npc_event));
    +							  return sd->bl.id;
    +					}
    +		  }else{
    +					struct map_session_data *msd =  map_id2sd(md->target_id);
    +
    +					if(msd != NULL){
    +							  sprintf(w1, "%s@%s", msd->status.name, map[md->bl.m].name);
    +							  nd = npc_name2id(w1);
    +							  if (nd  != NULL){
    +										npc_unload(nd);
    +										md->target_id = 0;
    +							  }
    +					}
    +		  }
    +		  return 0;
    +}
    

    @npc.h

    int npc_duplicate4instance(struct npc_data *snd, int m);
    int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int points);
    +int npc_mvp_tomb(struct mob_data *md, struct map_session_data *sd);

    How to configure?

    1. Add this script on your npc/custom folder.

    tomb_stone.txt - v1.0

    tomb_stone.txt - v2.0

    tomb_stone.txt - v3.0

    2. Add this line scripts_custom.conf

    npc: npc/custom/tomb_stone.txt

    3. And lastly the adding of tomb to MVP monster

    *for this nothing to configure in your mob folder, just make/add to your liking

    ex.

    anthell02,0,0,0,0 boss_monster Maya 1147,1,7200000,0,1

    4. Open tomb_stone.txt and edit the settings for your likings.

    //+-- -- -- -- -- -- -- +

    //| Settings |

    //+-- -- -- -- -- -- -- +

    set .showTimeRespawn, 1; // Display the time when the MVP will respawn

    set .showTimerRespawn, 1; // Display countdown timer

    Patch for rA MVP Tomb Version.

    Download: MVP_Tomb_added_features.patch

    Download:MVP_Tomb_Added_Features_15981_v1.1.PATCH

    *must update rA rev to 15908+

    Patch for eA with rA MVP Tomb Version.

    Download: rA_MVP_Tomb_Added_Features_For_eA15090.PATCH

    Note: Add on your own risk...=P

    Enjoy!! ^^,

    Comments and suggestions are highly accepted....

    • Upvote 7
×
×
  • Create New...