Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #001296

  • 0 - None Assigned

  • Unable To Reproduce

Issue Confirmations

  • Yes (0)No (0)
Photo

Killmonster Script Command Issue

Posted by Hercules Bot on 30 March 2008 - 03:32 AM

Originally posted by Barron-Monster
http://www.eathena.w...er&showbug=1296

Well
You can use variable for map name in monster script command but if you use a var for map name in killmonster script command you'll get:
[Debug]: mapindex_id2name: Requested name for non-existant map index [0] in cache.
The killmonster will work bug why getting this stupid debug msg?
You can try the following script for try.

-	script	Dark_Lord_Invasion	-1,{<br />	end;<br /><br />OnRandom:<br />	set $@maplordchoose,rand(22);<br />	setarray $@mapdarklord$[0], "prontera", "morocc", "geffen", "payon", "alberta", "izlude", "aldebaran", "xmas", "comodo", "yuno", "amatsu", "gonryun", "umbala", "niflheim", "louyang", "jawaii", "ayothaya", "einbroch", "lighthalzen", "hugel", "rachel", "veins";<br />	setarray $@mapdarklordx[0], 156, 159, 119, 155, 102, 128, 139, 145, 188, 158, 262, 159, 138, 193, 218, 203, 207, 131, 159, 146, 150, 197;<br />	setarray $@mapdarklordy[0], 285, 163, 112, 239, 221, 159, 144, 237, 165, 167, 191, 196, 227, 186, 121, 292, 227, 200, 130, 106, 242, 257;<br />	set $@mapchoosendarklord$, $@mapdarklord$[$@maplordchoose];<br />	set $@mapchoosendarklordx, $@mapdarklordx[$@maplordchoose];<br />	set $@mapchoosendarklordy, $@mapdarklordy[$@maplordchoose];<br />	end;<br /><br />OnClock0324:<br />	donpcevent "Dark_Lord_Invasion::OnRandom";<br />	donpcevent "DL_Invasion::OnEnable";<br />	end;<br />}<br /><br />-	script	Dark Lord::DL_Invasion	-1,{<br />	end;<br /><br />OnEnable:<br />	Announce "Dark Lord: Mowhahahaha",8;<br />	Announce "Dark Lord: Ce soir mon couroux tombera sur " + $@mapchoosendarklord$ + ".",8;<br />	initnpctimer;<br />	end;<br /><br />OnTimer5000:<br />	donpcevent "DL_Invasion::OnFirstVague";<br />	end;<br /><br />OnTimer300000:<br />	if(.FirstVague > 0) {<br />	Announce "Dark Lord: Vous �tes vraiment pitoyable vous ne pouvez pas tuer de simple Skogul.",8;<br />	atcommand "@doommap";<br />	killmonster "" + $@mapchoosendarklord$ + "","DL_Invasion::OnMobDeadFirstVague";<br />	}<br />	end;<br /><br />OnFirstVague:<br />	set .FirstVague,15;<br />	monster "" + $@mapchoosendarklord$ + "",$@mapchoosendarklordx,$@mapchoosendarklordy,"Slave of Dark Lord",1752,15,"DL_Invasion::OnMobDeadFirstVague";<br />	end;<br /><br />OnMobDeadFirstVague:<br />	set .FirstVague,.FirstVague-1;<br />	if (.FirstVague < 1) {<br />		Announce "Dark Lord: Mowhahahaha",8;<br />		Announce "Dark Lord: Tr�s bien, passons � la suite.",8;<br />	}<br />	else {<br />		set .badluck,rand(1,25);<br />		if(.badluck == 3) {<br />			charcommand "#effect 183 "+strcharinfo(0);<br />			percentheal -100,0;<br />			Announce "Dark Lord: Voil� pour toi " + strcharinfo(0) + ".",8;<br />			Announce "Habitant de " + $@mapchoosendarklord$ + ": Ho non " + strcharinfo(0) + " vient d'�tre tuer par la vengeance de Dark Lord, il est vraiment sans coeur.",8;<br />	}<br />	}<br />	end;<br />}


Ps: I don't care if the code sux it was for try.