Jump to content
  • 0

Weird Output, Help please


PandaLovesHamster

Question


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

-	script	Convex	-1,{

setarray .boss_map$,"pay_dun04",
					"xmas_dun02",
					"xmas_fild01",
					"gl_chyard",
					"gl_cas02",
					"prt_maze03",
					"prt_sewb4",
					"mjolnir_05",
					"gef_dun02",
					"gef_dun03",
					"anthell01",
					"anthell02",
					"in_sphinx5",
					"pay_fild10",
					"moc_pryd04",
					"ama_dun03",
					"orcsdun02",
					"gef_fild14",
					"tur_dun04",
					"treasure02",
					"moc_pryd06";
setarray .boss_mob$,"Moonlight Flower",
					"Stormy Knight",
					"Garm",
					"Dark Lord",
					"Baphomet",
					"Baphomet",
					"Golden Thief Bug",
					"Mistress",
					"Doppelganger",
					"Dracula",
					"Phreeoni",
					"Maya",
					"Pharaoh",
					"Eddga",
					"Osiris",
					"Samurai Specter",
					"Orc Lord",
					"Orc Hero",
					"Turtle General",
					"Drake",
					"Amon Ra";

	mes "[ Convex Handler ]";
for(set .@i,0;.@i < getarraysize(.boss_map$); .@i++){
	if (mobcount(.boss_map$[.@i], .boss_mob$[.@i]+"#boss::OnMVPDead") > 0) {
		mes "^008000"+.boss_mob$[.@i]+" is alive! ^000000";
	} 
	else {
		mes "^FF0000 "+.boss_mob$[.@i]+" is dead. ^000000";
	}
}
close;
}

I'm using this to check if my MVPs are dead or alive. The thing here is, when I talk to the npc, it will ways display that the mob is dead.

When I warp to the map(mvp map), for instance pay_dun04, and talk to the NPC again, it will display the information correctly this time.

My other npc that checks for the status of the MVP works perfectly fine but it is limited to the map in which where the mvp is. Can someone point out why this is happening?

Edited by PandaLovesHamster
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

this post explained why.

http://herc.ws/board/topic/10777-not-detect-mvp-revive-or-dead/?p=63663

 

there was a way to fix it if not mistaken, probably by disable the dynamic mob.

https://eathena.ws/board/index.php?showtopic=242050

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

For some reason the other npc detects the boss monster quite nicely. In fact even if I reload or something, the npc can tell if the boss is dead or alive, but this global one for some reason doesn't work.

I'll try to disable dynamic mob. I will see if it works properly.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  350
  • Reputation:   43
  • Joined:  09/07/12
  • Last Seen:  

for(set .@i,0;.@i < getarraysize(.boss_map$); .@i++){

 

does this work?

i usually use set .@i,.@i+1;

setarray .boss_map$,"pay_dun04",

 

 

 

not sure about this,

to make sure it started from 0, not some random index,

setarray .boss_map$[0],"pay_dun04",

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

It's working fine for me now. Used the same code, just fixed something else on SRC.  /no1

 

 

not sure about this,

to make sure it started from 0, not some random index,
setarray .boss_map$[0],"pay_dun04",

 

Works okay in the script. I tried to add it, and ended up with the same output.

 

 

does this work?
i usually use set .@i,.@i+1;

Works fine as well. I was surprised it worked too since the code just slipped off me since i code using c++ normally, and ended up doing .@i++ lol

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