Issue information

Issue ID
#1296
Status
Unable to Reproduce
Severity
None
Started
Hercules Elf Bot
Mar 30, 2008 3:32
Last Post
Hercules Elf Bot
Jun 23, 2012 9:45
Confirmation
N/A

Hercules Elf Bot - Mar 30, 2008 3:32

Originally posted by [b]Barron-Monster[/b]
[url="http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1296"]http://www.eathena.w...er&showbug=1296[/url]

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.

[codebox]- script Dark_Lord_Invasion -1,{
end;

OnRandom:
set $@maplordchoose,rand(22);
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";
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;
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;
set $@mapchoosendarklord$, $@mapdarklord$[$@maplordchoose];
set $@mapchoosendarklordx, $@mapdarklordx[$@maplordchoose];
set $@mapchoosendarklordy, $@mapdarklordy[$@maplordchoose];
end;

OnClock0324:
donpcevent "Dark_Lord_Invasion::OnRandom";
donpcevent "DL_Invasion::OnEnable";
end;
}

- script Dark Lord::DL_Invasion -1,{
end;

OnEnable:
Announce "Dark Lord: Mowhahahaha",8;
Announce "Dark Lord: Ce soir mon couroux tombera sur " + $@mapchoosendarklord$ + ".",8;
initnpctimer;
end;

OnTimer5000:
donpcevent "DL_Invasion::OnFirstVague";
end;

OnTimer300000:
if(.FirstVague > 0) {
Announce "Dark Lord: Vous �tes vraiment pitoyable vous ne pouvez pas tuer de simple Skogul.",8;
atcommand "@doommap";
killmonster "" + $@mapchoosendarklord$ + "","DL_Invasion::OnMobDeadFirstVague";
}
end;

OnFirstVague:
set .FirstVague,15;
monster "" + $@mapchoosendarklord$ + "",$@mapchoosendarklordx,$@mapchoosendarklordy,"Slave of Dark Lord",1752,15,"DL_Invasion::OnMobDeadFirstVague";
end;

OnMobDeadFirstVague:
set .FirstVague,.FirstVague-1;
if (.FirstVague < 1) {
Announce "Dark Lord: Mowhahahaha",8;
Announce "Dark Lord: Tr�s bien, passons � la suite.",8;
}
else {
set .badluck,rand(1,25);
if(.badluck == 3) {
charcommand "#effect 183 "+strcharinfo(0);
percentheal -100,0;
Announce "Dark Lord: Voil� pour toi " + strcharinfo(0) + ".",8;
Announce "Habitant de " + $@mapchoosendarklord$ + ": Ho non " + strcharinfo(0) + " vient d'�tre tuer par la vengeance de Dark Lord, il est vraiment sans coeur.",8;
}
}
end;
}[/codebox]

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

This post has been edited by Brian on Feb 8, 2012 18:03