Jump to content

[SRC] MVP Tomb + rA Patch for added Features


malufett

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  967
  • Reputation:   53
  • Joined:  11/13/11
  • Last Seen:  

@malufett Thanks man seems working.

Hmm though notice if you have a MVP Room enabled and tried to kill an MVP Monster it makes the mapserver crash.

of course

it duplicates stuff

With the current releases of this, the script versions, they summon the MvPs which conflicts with already spawned MvPs in the fields and dungeons. With this source, would it take the already spawned MvPs and when they die, create the tomb? Are do we need to add new MvP spawns so that this can work with them?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   1
  • Joined:  12/03/11
  • Last Seen:  

which mobsprite is used for this? i got errors :S

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

@malufett Thanks man no more map crash on MVP Arena anymore. but having this error somehow about duplicates.

[Warning]: npc_parsename: Duplicate unique name in file 'srcmappc.c', line'1
. Renaming 'n0' to '1_11_117_51'.
[Debug]: this npc:
  display name 'Tomb#1147'
  unique name 'n0'
  map=anthell02, x=117, y=51
[Debug]: other npc:
  display name 'Tomb#1115'
  unique name 'n0'
  map=pay_fild10, x=275, y=332
[Warning]: npc_parsename: Duplicate unique name in file 'c_reg_received: Failed
to properly remove player %d:%d from logging db!
', line'1'. Renaming 'n0' to '1_817_112_185'.
[Debug]: this npc:
  display name 'Tomb#1785'
  unique name 'n0'
  map=minedun01, x=112, y=185
[Debug]: other npc:
  display name 'Tomb#1115'
  unique name 'n0'
  map=pay_fild10, x=275, y=332

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

Hmm i have that line., I followed the main topic first post.

here's what i got on my npc.c

/**
MVP Tomb System. [malufett]
**/
static int totalnpctomb = 0;
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;
int count;
  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;
	 sprintf(w2, "Tomb#%d", boss_md->class_);
	 sprintf(w1, "%s, %d, %d, 1", map[boss_md->bl.m].name, x , y);
	 sprintf(w3, "n%d::OnMyMobDead", totalnpctomb);
	 sprintf(w2, "%s::n%d", w2, count=totalnpctomb++);
	 safestrncpy(md->npc_event, w3, sizeof(md->npc_event));
	 npc_parse_duplicate(w1,"duplicate(tomb_stone)",w2,"565", "-", "-", "MVP_TOMB"+boss_md->class_);
	 if(md->spawn_timer != INVALID_TIMER){
	  const struct TimerData * timer_data = get_timer(md->spawn_timer);
	  pc_setreg(sd, add_str("@spawn_delay"), DIFF_TICK(timer_data->tick, gettick())  + 60);
	 }
	 npc_event(sd,md->npc_event,0);
	 safestrncpy(md->npc_event, "", sizeof(md->npc_event));
	 if(SCRIPT_MAX_ARRAYSIZE > totalnpctomb) totalnpctomb = 0;
 }
}else{
 sprintf(w1, "n%d", md->target_id);
 nd = npc_name2id(w1);
 if (nd  != NULL){
	 npc_unload(nd);
	 md->target_id = 0;
	 totalnpctomb--;
 }
}
return count;
}

Edited by ngek202
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  299
  • Reputation:   5
  • Joined:  04/05/12
  • Last Seen:  

@malufett

i have a same problem of ngek202

when i kill the 3rd boss

this will be happenning

post-3669-0-61121800-1334317882_thumb.jpg

Edited by Jhosef
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

@ngek202

oh I see..it seems that the one you got is a bit not updated...

anyways this is the fix

if(SCRIPT_MAX_ARRAYSIZE < totalnpctomb) totalnpctomb = 0;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

Thanks malufett will try the fix and let you know about it. :D

Working Now Thanks a lot.

Edited by ngek202
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  299
  • Reputation:   5
  • Joined:  04/05/12
  • Last Seen:  

thanks its already fix

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

if(SCRIPT_MAX_ARRAYSIZE < totalnpctomb) totalnpctomb = 0; does this mean you'll have SCRIPT_MAX_ARRAYSIZE (128) unique name than he start the duplicate warning ??

If I get it right you needed that constant to retrieve the id in npc ye ? (wich is than used to .killer[] and such).

I didn't try your mod yet but if i'm right doesn't this mean you'll be caped to 128 tomb before having overlaping issues ??

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  149
  • Reputation:   12
  • Joined:  02/17/12
  • Last Seen:  

The tombstone doesn't go away after respawn and the players name isn't always right.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

@lighta

hmm..oh yeah...I think of a small scale server because it won't able kill all mvp at once...=p

anyways i'll try to formulate other way to store data..thanks for that info

I already tried that, by storing it on the names but the digit is too large...

what if I do it on a multidimensional array??

@sizenine

it works for me but if your reach 127 at once that problem will occur

Edited by malufett
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

hmm would probably work.

But just to get it right why do you need a "totalnpctomb" attribute, are we limited by the number of duplicate or something ?

I mean I saw no loop on it or anything so if it's just for basic info you could just use it as static and wil be reset on server reboot or reload..

For the id issue well I'd simply use the charid instead, since we that they all different would that be possible ?, (I didn't get your n%d, totalnpctomb for npc name

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

I use that variable as counter for each tomb and reset if it gets to its max value and naming the tomb by n(value)...if I use charid it means I will use sql statement on the script..anyways I think of a better idea I'll remove the counter thing then all variable needed will be store in a string and it will parse by the npc so no more array..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  149
  • Reputation:   12
  • Joined:  02/17/12
  • Last Seen:  

i just killed an Amon and the time is off (refer to server time). the name is not my char name either. and notice the three tombs.. ^_^

p.s. all three tombs say this same message with same time and same name.

jj3MuPxD8uqgb.png

this error showed in map server when i killed the third amon ra:

[Warning]: npc_parsename: Duplicate unique name in file '  map=%s, x=%d, y=%d
', line'1'. Renaming 'n9' to '2_116_101_84'.
[Debug]: this npc:
  display name 'Tomb#1511'
  unique name 'n9'
  map=moc_pryd06, x=101, y=84
[Debug]: other npc:
  display name 'Tomb#1688'
  unique name 'n9'
  map=ayo_dun02, x=142, y=101

Edited by sizenine
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

I'm also still having the same error.

tomberror.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

@malufett

No I meant something like this format :

Tombstone#mobid|charid

e.g :

Tombstone#1785|200012

Then with a simple parsing on npc name as you use to do you'll do something like this

strcharinfo(0,200012) to retrieve the name. (no need sql statement)

ps : I just realise you'll have to edit strcharinfo function to do something like that but i't a 3 line edit so.

You can still add your counter to make the name more unique but this remove the npc array needed to storing id and such and so should also remove the size restriction on it.

Do you get what I mean ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  04/17/12
  • Last Seen:  

hi

Great work congrats

a doubt

Download the npc

but gave errors

76993457.jpg

help plis

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

Seem like you don't have the "replacestr" function, are you sure you're using the latest rA ?.

Anyway you'll need it so found that function (I think it was with toasty string command); Put it in script.c, recompile and you should be fine.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

@Lighta

yup I get what you mean I'm just worried about the spawn time cause it contains large digit but I release then that there is no MVP that has a spawn time more than 24 hrs..anyways thanks for the info

UPDATE Main Post - v3.0 "Fixed duplicate issue and max gap"

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  04/17/12
  • Last Seen:  

all perfect thanks

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  299
  • Reputation:   5
  • Joined:  04/05/12
  • Last Seen:  

What is the Bringer Response and the Time Respawn and Time of Death

is the same time

post-3669-0-45325000-1334982636_thumb.jpg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

did you apply the new patch?

I think it happens again with you..hehe

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

@malufett from the previous version I remember it also needs to modify something with script.c and script.h? do we need to revert them?

if we apply v3?

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

×
×
  • Create New...