Jump to content

malufett

Members
  • Posts

    554
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by malufett

  1. @ngek202 oh I see..it seems that the one you got is a bit not updated... anyways this is the fix
  2. ah..there is a problem in your implementation...as I see the unique name 'n0' doesn't change this line must take effect so duplicates won't happen sprintf(w2, "%s::n%d", w2, count=totalnpctomb++); check again the the codes you put maybe you forgot something...^^
  3. @ngek202 the tomb suppose not to work on MVP arena since it use the 'monster' script to summon the monsters... however I made a mistake and sorry for that an illogical condition makes the crashing... this line: if( md->bl.id == boss_md->bl.id && boss_md != NULL && boss_md->bl.prev != NULL ) { must change to if( boss_md != NULL && boss_md->bl.prev != NULL && md->bl.id == boss_md->bl.id ) { anyways thanks for mentioning a bug...^^ @versus update your rdata.grf to obtain the sprite.. or here the old sprite by DevilEvil: http://www.divinero.net/devilevil/Tombstone.rar Updated main topic..
  4. oops.....sorry forgot something...^^ @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); @script.h #define NUM_WHISPER_VAR 10 +/// Maximum amount of elements in script arrays +#define SCRIPT_MAX_ARRAYSIZE 128 @script.c #define FETCH(n, t) if( script_hasdata(st,n) ) (t)=script_getnum(st,n); -/// Maximum amount of elements in script arrays -#define SCRIPT_MAX_ARRAYSIZE 128 @jhosef add this snippets to fix the problem... @KeiKun thanks for reminding....hehehe..I'm not good in making diff/patch @ngek202 its just a normal script for spawning mvp mobs... I mean there is to you be able to add a tomb to a monster you must use the 'boss_monster' script..and note only one mvp monster is allowed per map and the first occurrence will be consider the MVP.... main topic updated....
  5. did you apply the new patch and recompile? suppose to show like this:
  6. 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...
  7. @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
  8. Thanks... the time left? or the time it will re-spawn again?
  9. @Keikun Thanks! @Jhosef note at this 2. Add this line at the very first line of scripts_monsters.conf npc: npc/custom/tomb_stone.txt you must put this line before the spawning of mobs....
  10. 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....
×
×
  • Create New...