Jump to content
  • 0

Question

Posted

hi guys, i've tried many codes to my lhz04 dungeon and it doesnt work!!!

 

here's my code (jupe_ele is my testing area), after i reloadscript they are summoned, but i put 2 seconds delay (for testing purpose) and it doesnt respawn anymore. please help

.

jupe_ele,0,0,0,0	monster	Richard Frost	3300,90,5000,0,0
jupe_ele,0,0,0,0	monster	Melody Windrush	3301,80,5000,0,0
jupe_ele,0,0,0,0	monster	Lara Nightstone	3302,65,5000,0,0
jupe_ele,0,0,0,0	monster	Sakura de Sylva	3303,65,5000,0,0
jupe_ele,0,0,0,0	monster	Tundra Neyomi	3304,65,5000,0,0

jupe_ele,139,158,20,11	monster	Clown Richard	3200,1,9200000,600000,1
jupe_ele,138,138,36,34	monster	Gypsy Melody	3201,1,9200000,600000,1
jupe_ele,114,138,12,16	monster	Paladin Lara	3202,1,9200000,600000,1
jupe_ele,139,117,20,11	monster	Professor Sakura	3203,1,9200000,600000,1
jupe_ele,163,138,12,16	monster	Stalker Tundra	3204,1,9200000,600000,1


jupe_ele,0,0,0	script	mvp_jupe_ele	-1,{
OnTimer2000: // delay1 = 6000000 ms (100 min)
	stopnpctimer;
	sleep rand(0,1)*60000; // 0 to 1 minutes
OnInit:
	// Select Coordinates to summon a random MVP on
	switch(rand(1,7)) {
		case 1:  set .@x,77;   set .@y,251;  break;
		case 2:  set .@x,147;  set .@y,224;  break;
		case 3:  set .@x,219;  set .@y,219;  break;
		case 4:  set .@x,244;  set .@y,120;  break;
		case 5:  set .@x,149;  set .@y,41;   break;
		case 6:  set .@x,53;   set .@y,109;  break;
		case 7:  set .@x,149;  set .@y,151;  break;
	}
	set .@mob,rand(3200,3204);
	monster "jupe_ele",.@x,.@y,strmobinfo(1,.@mob),.@mob,1,strnpcinfo(3)+"::OnMyMVPDead";

	// Select Coordinates to summon a random 99 on
	switch(rand(1,7)) {
		case 1:  set .@x2,77;   set .@y2,251;  break;
		case 2:  set .@x2,147;  set .@y2,224;  break;
		case 3:  set .@x2,219;  set .@y2,219;  break;
		case 4:  set .@x2,244;  set .@y2,120;  break;
		case 5:  set .@x2,149;  set .@y2,41;   break;
		case 6:  set .@x2,53;   set .@y2,109;  break;
		case 7:  set .@x2,149;  set .@y2,151;  break;
	}
	set .@mob2,rand(3305,3309);
	monster "jupe_ele",.@x2,.@y2,strmobinfo(1,.@mob2),.@mob2,1,strnpcinfo(3)+"::OnMy99Dead";
	end;

OnMyMVPDead:
	killmonster "jupe_ele",strnpcinfo(3)+"::OnMy99Dead";
	initnpctimer;
OnMy99Dead:
	end;
}

5 answers to this question

Recommended Posts

Posted (edited)

1. Check Mob ID if its correct.
2. The script sleeps in 1 minute.

OnTimer2000: // delay1 = 6000000 ms (100 min)
	stopnpctimer;
	sleep rand(0,1)*60000; // 0 to 1 minutes

but you can change or remove the sleep time if you want...

example: 2 seconds sleep time

OnTimer2000: // delay1 = 6000000 ms (100 min)
	stopnpctimer;
	sleep 2000; // 2 seconds
Edited by Lelouch vi Britannia
Posted (edited)

 

hi guys, i've tried many codes to my lhz04 dungeon and it doesnt work!!!

 

here's my code (jupe_ele is my testing area), after i reloadscript they are summoned, but i put 2 seconds delay (for testing purpose) and it doesnt respawn anymore. please help

.

jupe_ele,0,0,0,0	monster	Richard Frost	3300,90,5000,0,0
jupe_ele,0,0,0,0	monster	Melody Windrush	3301,80,5000,0,0
jupe_ele,0,0,0,0	monster	Lara Nightstone	3302,65,5000,0,0
jupe_ele,0,0,0,0	monster	Sakura de Sylva	3303,65,5000,0,0
jupe_ele,0,0,0,0	monster	Tundra Neyomi	3304,65,5000,0,0

jupe_ele,139,158,20,11	monster	Clown Richard	3200,1,9200000,600000,1
jupe_ele,138,138,36,34	monster	Gypsy Melody	3201,1,9200000,600000,1
jupe_ele,114,138,12,16	monster	Paladin Lara	3202,1,9200000,600000,1
jupe_ele,139,117,20,11	monster	Professor Sakura	3203,1,9200000,600000,1
jupe_ele,163,138,12,16	monster	Stalker Tundra	3204,1,9200000,600000,1


jupe_ele,0,0,0	script	mvp_jupe_ele	-1,{
OnTimer2000: // delay1 = 6000000 ms (100 min)
	stopnpctimer;
	sleep rand(0,1)*60000; // 0 to 1 minutes
OnInit:
	// Select Coordinates to summon a random MVP on
	switch(rand(1,7)) {
		case 1:  set .@x,77;   set .@y,251;  break;
		case 2:  set .@x,147;  set .@y,224;  break;
		case 3:  set .@x,219;  set .@y,219;  break;
		case 4:  set .@x,244;  set .@y,120;  break;
		case 5:  set .@x,149;  set .@y,41;   break;
		case 6:  set .@x,53;   set .@y,109;  break;
		case 7:  set .@x,149;  set .@y,151;  break;
	}
	set .@mob,rand(3200,3204);
	monster "jupe_ele",.@x,.@y,strmobinfo(1,.@mob),.@mob,1,strnpcinfo(3)+"::OnMyMVPDead";

	// Select Coordinates to summon a random 99 on
	switch(rand(1,7)) {
		case 1:  set .@x2,77;   set .@y2,251;  break;
		case 2:  set .@x2,147;  set .@y2,224;  break;
		case 3:  set .@x2,219;  set .@y2,219;  break;
		case 4:  set .@x2,244;  set .@y2,120;  break;
		case 5:  set .@x2,149;  set .@y2,41;   break;
		case 6:  set .@x2,53;   set .@y2,109;  break;
		case 7:  set .@x2,149;  set .@y2,151;  break;
	}
	set .@mob2,rand(3305,3309);
	monster "jupe_ele",.@x2,.@y2,strmobinfo(1,.@mob2),.@mob2,1,strnpcinfo(3)+"::OnMy99Dead";
	end;

OnMyMVPDead:
	killmonster "jupe_ele",strnpcinfo(3)+"::OnMy99Dead";
	initnpctimer;
OnMy99Dead:
	end;
}

 

 

It may seem a bit weird but I tried using your script and found this error in the mapserver

post-7005-0-93495700-1440033754_thumb.png

 

What I did was to take off the "My" from the events OnMyMVPDead and OnMy99Dead, and your script worked fine.

I'm not really sure what went wrong there.

 

and just a tip

 

jupe_ele,0,0,0    script    mvp_jupe_ele    -1

 

 

try using '-' instead of "jupe_ele,0,0,0" if you're creating an event script :)

 

 

final code:

jupe_ele,0,0,0,0 monster Richard Frost 3300,90,5000,0,0
jupe_ele,0,0,0,0 monster Melody Windrush 3301,80,5000,0,0
jupe_ele,0,0,0,0 monster Lara Nightstone 3302,65,5000,0,0
jupe_ele,0,0,0,0 monster Sakura de Sylva 3303,65,5000,0,0
jupe_ele,0,0,0,0 monster Tundra Neyomi 3304,65,5000,0,0


jupe_ele,139,158,20,11 monster Clown Richard 3200,1,9200000,600000,1
jupe_ele,138,138,36,34 monster Gypsy Melody 3201,1,9200000,600000,1
jupe_ele,114,138,12,16 monster Paladin Lara 3202,1,9200000,600000,1
jupe_ele,139,117,20,11 monster Professor Sakura 3203,1,9200000,600000,1
jupe_ele,163,138,12,16 monster Stalker Tundra 3204,1,9200000,600000,1




jupe_ele,0,0,0 script mvp_jupe_ele -1,{
OnTimer2000: // delay1 = 6000000 ms (100 min)
stopnpctimer;
sleep rand(0,1)*60000; // 0 to 1 minutes
OnInit:
// Select Coordinates to summon a random MVP on
switch(rand(1,7)) {
case 1:  set .@x,77;   set .@y,251;  break;
case 2:  set .@x,147;  set .@y,224;  break;
case 3:  set .@x,219;  set .@y,219;  break;
case 4:  set .@x,244;  set .@y,120;  break;
case 5:  set .@x,149;  set .@y,41;   break;
case 6:  set .@x,53;   set .@y,109;  break;
case 7:  set .@x,149;  set .@y,151;  break;
}
set .@mob,rand(3200,3204);
monster "jupe_ele",.@x,.@y,strmobinfo(1,.@mob),.@mob,1,strnpcinfo(3)+"::OnMVPDead";


// Select Coordinates to summon a random 99 on
switch(rand(1,7)) {
case 1:  set .@x2,77;   set .@y2,251;  break;
case 2:  set .@x2,147;  set .@y2,224;  break;
case 3:  set .@x2,219;  set .@y2,219;  break;
case 4:  set .@x2,244;  set .@y2,120;  break;
case 5:  set .@x2,149;  set .@y2,41;   break;
case 6:  set .@x2,53;   set .@y2,109;  break;
case 7:  set .@x2,149;  set .@y2,151;  break;
}
set .@mob2,rand(3305,3309);
monster "jupe_ele",.@x2,.@y2,strmobinfo(1,.@mob2),.@mob2,1,strnpcinfo(3)+"::On99Dead";
end;


OnMVPDead:
killmonster "jupe_ele",strnpcinfo(3)+"::On99Dead";
initnpctimer;
On99Dead:
end;
}
Edited by jezznar
Posted (edited)

 

 

hi guys, i've tried many codes to my lhz04 dungeon and it doesnt work!!!

 

here's my code (jupe_ele is my testing area), after i reloadscript they are summoned, but i put 2 seconds delay (for testing purpose) and it doesnt respawn anymore. please help

.

jupe_ele,0,0,0,0	monster	Richard Frost	3300,90,5000,0,0
jupe_ele,0,0,0,0	monster	Melody Windrush	3301,80,5000,0,0
jupe_ele,0,0,0,0	monster	Lara Nightstone	3302,65,5000,0,0
jupe_ele,0,0,0,0	monster	Sakura de Sylva	3303,65,5000,0,0
jupe_ele,0,0,0,0	monster	Tundra Neyomi	3304,65,5000,0,0

jupe_ele,139,158,20,11	monster	Clown Richard	3200,1,9200000,600000,1
jupe_ele,138,138,36,34	monster	Gypsy Melody	3201,1,9200000,600000,1
jupe_ele,114,138,12,16	monster	Paladin Lara	3202,1,9200000,600000,1
jupe_ele,139,117,20,11	monster	Professor Sakura	3203,1,9200000,600000,1
jupe_ele,163,138,12,16	monster	Stalker Tundra	3204,1,9200000,600000,1


jupe_ele,0,0,0	script	mvp_jupe_ele	-1,{
OnTimer2000: // delay1 = 6000000 ms (100 min)
	stopnpctimer;
	sleep rand(0,1)*60000; // 0 to 1 minutes
OnInit:
	// Select Coordinates to summon a random MVP on
	switch(rand(1,7)) {
		case 1:  set .@x,77;   set .@y,251;  break;
		case 2:  set .@x,147;  set .@y,224;  break;
		case 3:  set .@x,219;  set .@y,219;  break;
		case 4:  set .@x,244;  set .@y,120;  break;
		case 5:  set .@x,149;  set .@y,41;   break;
		case 6:  set .@x,53;   set .@y,109;  break;
		case 7:  set .@x,149;  set .@y,151;  break;
	}
	set .@mob,rand(3200,3204);
	monster "jupe_ele",.@x,.@y,strmobinfo(1,.@mob),.@mob,1,strnpcinfo(3)+"::OnMyMVPDead";

	// Select Coordinates to summon a random 99 on
	switch(rand(1,7)) {
		case 1:  set .@x2,77;   set .@y2,251;  break;
		case 2:  set .@x2,147;  set .@y2,224;  break;
		case 3:  set .@x2,219;  set .@y2,219;  break;
		case 4:  set .@x2,244;  set .@y2,120;  break;
		case 5:  set .@x2,149;  set .@y2,41;   break;
		case 6:  set .@x2,53;   set .@y2,109;  break;
		case 7:  set .@x2,149;  set .@y2,151;  break;
	}
	set .@mob2,rand(3305,3309);
	monster "jupe_ele",.@x2,.@y2,strmobinfo(1,.@mob2),.@mob2,1,strnpcinfo(3)+"::OnMy99Dead";
	end;

OnMyMVPDead:
	killmonster "jupe_ele",strnpcinfo(3)+"::OnMy99Dead";
	initnpctimer;
OnMy99Dead:
	end;
}

 

 

It may seem a bit weird but I tried using your script and found this error in the mapserver

attachicon.gifCapture.PNG

 

What I did was to take off the "My" from the events OnMyMVPDead and OnMy99Dead, and your script worked fine.

I'm not really sure what went wrong there.

 

and just a tip

 

jupe_ele,0,0,0    script    mvp_jupe_ele    -1

 

 

try using '-' instead of "jupe_ele,0,0,0" if you're creating an event script :)

 

 

final code:

jupe_ele,0,0,0,0 monster Richard Frost 3300,90,5000,0,0
jupe_ele,0,0,0,0 monster Melody Windrush 3301,80,5000,0,0
jupe_ele,0,0,0,0 monster Lara Nightstone 3302,65,5000,0,0
jupe_ele,0,0,0,0 monster Sakura de Sylva 3303,65,5000,0,0
jupe_ele,0,0,0,0 monster Tundra Neyomi 3304,65,5000,0,0


jupe_ele,139,158,20,11 monster Clown Richard 3200,1,9200000,600000,1
jupe_ele,138,138,36,34 monster Gypsy Melody 3201,1,9200000,600000,1
jupe_ele,114,138,12,16 monster Paladin Lara 3202,1,9200000,600000,1
jupe_ele,139,117,20,11 monster Professor Sakura 3203,1,9200000,600000,1
jupe_ele,163,138,12,16 monster Stalker Tundra 3204,1,9200000,600000,1




jupe_ele,0,0,0 script mvp_jupe_ele -1,{
OnTimer2000: // delay1 = 6000000 ms (100 min)
stopnpctimer;
sleep rand(0,1)*60000; // 0 to 1 minutes
OnInit:
// Select Coordinates to summon a random MVP on
switch(rand(1,7)) {
case 1:  set .@x,77;   set .@y,251;  break;
case 2:  set .@x,147;  set .@y,224;  break;
case 3:  set .@x,219;  set .@y,219;  break;
case 4:  set .@x,244;  set .@y,120;  break;
case 5:  set .@x,149;  set .@y,41;   break;
case 6:  set .@x,53;   set .@y,109;  break;
case 7:  set .@x,149;  set .@y,151;  break;
}
set .@mob,rand(3200,3204);
monster "jupe_ele",.@x,.@y,strmobinfo(1,.@mob),.@mob,1,strnpcinfo(3)+"::OnMVPDead";


// Select Coordinates to summon a random 99 on
switch(rand(1,7)) {
case 1:  set .@x2,77;   set .@y2,251;  break;
case 2:  set .@x2,147;  set .@y2,224;  break;
case 3:  set .@x2,219;  set .@y2,219;  break;
case 4:  set .@x2,244;  set .@y2,120;  break;
case 5:  set .@x2,149;  set .@y2,41;   break;
case 6:  set .@x2,53;   set .@y2,109;  break;
case 7:  set .@x2,149;  set .@y2,151;  break;
}
set .@mob2,rand(3305,3309);
monster "jupe_ele",.@x2,.@y2,strmobinfo(1,.@mob2),.@mob2,1,strnpcinfo(3)+"::On99Dead";
end;


OnMVPDead:
killmonster "jupe_ele",strnpcinfo(3)+"::On99Dead";
initnpctimer;
On99Dead:
end;
}

 

 

Actually he's using the script from npc\re\mobs\dungeons\lhz_dun.txt also i tested a sample and its working perfectly fine.

Sample:

new_1-1,0,0,0	script	mvp_jupe_ele	-1,{
OnTimer2000: // delay1 = 6000000 ms (100 min)
	stopnpctimer;
	sleep rand(0,1)*60000; // 0 to 1 minutes
OnInit:
	// Select Coordinates to summon a random MVP on
	switch(rand(1,5)) {
		case 1:  set .@x,44;   set .@y,108;  break;
		case 2:  set .@x,51;  set .@y,104;  break;
		case 3:  set .@x,57;  set .@y,110;  break;
		case 4:  set .@x,50;  set .@y,117;  break;
		case 5:  set .@x,51;  set .@y,111;   break;
	}
	set .@mob,rand(1007,1011);
	monster "new_1-1",.@x,.@y,strmobinfo(1,.@mob),.@mob,1,strnpcinfo(3)+"::OnMyMVPDead";

	// Select Coordinates to summon a random 99 on
	switch(rand(1,5)) {
		case 1:  set .@x,44;   set .@y,108;  break;
		case 2:  set .@x,51;  set .@y,104;  break;
		case 3:  set .@x,57;  set .@y,110;  break;
		case 4:  set .@x,50;  set .@y,117;  break;
		case 5:  set .@x,51;  set .@y,111;   break;
	}
	set .@mob2,rand(1012,1016);
	monster "new_1-1",.@x2,.@y2,strmobinfo(1,.@mob2),.@mob2,1,strnpcinfo(3)+"::OnMy99Dead";
	end;

OnMyMVPDead:
	killmonster "new_1-1",strnpcinfo(3)+"::OnMy99Dead";
	initnpctimer;
OnMy99Dead:
	end;
}

Also did you notice that 2 comments in spawn coordinates
1. Select Coordinates to summon a random MVP on = It only spawn MVP mobs.
2. Select Coordinates to summon a random 99 on = It only spawn Level 99 mobs.

Edited by Lelouch vi Britannia
Posted

Actually he's using the script from npc\re\mobs\dungeons\lhz_dun.txt also i tested a sample and its working perfectly fine.

Sample:

new_1-1,0,0,0    script    mvp_jupe_ele    -1,{
OnTimer2000: // delay1 = 6000000 ms (100 min)
    stopnpctimer;
    sleep rand(0,1)*60000; // 0 to 1 minutes
OnInit:
    // Select Coordinates to summon a random MVP on
    switch(rand(1,5)) {
        case 1: set .@x,44; set .@y,108; break;
        case 2: set .@x,51; set .@y,104; break;
        case 3: set .@x,57; set .@y,110; break;
        case 4: set .@x,50; set .@y,117; break;
        case 5: set .@x,51; set .@y,111; break;
    }
    set .@mob,rand(1007,1011);
    monster "new_1-1",.@x,.@y,strmobinfo(1,.@mob),.@mob,1,strnpcinfo(3)+"::OnMyMVPDead";

    // Select Coordinates to summon a random 99 on
    switch(rand(1,5)) {
        case 1: set .@x,44; set .@y,108; break;
        case 2: set .@x,51; set .@y,104; break;
        case 3: set .@x,57; set .@y,110; break;
        case 4: set .@x,50; set .@y,117; break;
        case 5: set .@x,51; set .@y,111; break;
    }
    set .@mob2,rand(1012,1016);
    monster "new_1-1",.@x2,.@y2,strmobinfo(1,.@mob2),.@mob2,1,strnpcinfo(3)+"::OnMy99Dead";
    end;

OnMyMVPDead:
    killmonster "new_1-1",strnpcinfo(3)+"::OnMy99Dead";
    initnpctimer;
OnMy99Dead:
    end;
}

Also did you notice that 2 comments in spawn coordinates
1. Select Coordinates to summon a random MVP on = It only spawn MVP mobs.
2. Select Coordinates to summon a random 99 on = It only spawn Level 99 mobs.

 

 

 

 

Yes, I am aware that it works if you take only the event script part, but if you put in the monster flags

jupe_ele,0,0,0,0    monster    Richard Frost    3300,90,5000,0,0
jupe_ele,0,0,0,0    monster    Melody Windrush    3301,80,5000,0,0
jupe_ele,0,0,0,0    monster    Lara Nightstone    3302,65,5000,0,0
jupe_ele,0,0,0,0    monster    Sakura de Sylva    3303,65,5000,0,0
jupe_ele,0,0,0,0    monster    Tundra Neyomi    3304,65,5000,0,0

jupe_ele,139,158,20,11    monster    Clown Richard    3200,1,9200000,600000,1
jupe_ele,138,138,36,34    monster    Gypsy Melody    3201,1,9200000,600000,1
jupe_ele,114,138,12,16    monster    Paladin Lara    3202,1,9200000,600000,1
jupe_ele,139,117,20,11    monster    Professor Sakura    3203,1,9200000,600000,1
jupe_ele,163,138,12,16    monster    Stalker Tundra    3204,1,9200000,600000,1

It doesn't.

 

I don't know if it works on you, but it doesn't on mine. :)

Posted

thankyou @jezznar and @lelouch 

 

i tried your script jezznar but mobs won't show up. i tried lelouch and it's working fine now! I just gotta change the coordinates. Thankyou guys :)

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...