Jump to content
  • 0
hideki6

lhz dun mvp drop

Question

hi i want to make sure that every lhz mvp will drop another item, yet its not working:

 

Onsummon:	// Select Coordinates to summon a random MVP on	switch(rand(1,6)) {	case 1: set .@x,140;	set .@y,232;	break;	case 2: set .@x,75;	set .@y,138;	break;	case 3: set .@x,140;	set .@y,87;		break;	case 4: set .@x,205;	set .@y,140;	break;	case 5: set .@x,123;	set .@y,137;	break;	case 6: set .@x,175;	set .@y,137;	break;	}	set .@mob,rand(1646,1651);	monster "lhz_dun03",.@x,.@y,strmobinfo(1,.@mob),.@mob,1,"summon_boss_lt::OnMyMvPDead";	// Select Coordinates to summon a random 99 on	switch(rand(1,6)) {	case 1: set .@x2,183;	set .@y2,97;	break;	case 2: set .@x2,97;	set .@y2,96;	break;	case 3: set .@x2,47;	set .@y2,139;	break;	case 4: set .@x2,231;	set .@y2,140;	break;	case 5: set .@x2,139;	set .@y2,211;	break;	case 6: set .@x2,139;	set .@y2,259;	break;	}	set .@mob2,rand(1640,1645);	monster "lhz_dun03",.@x2,.@y2,strmobinfo(1,.@mob2),.@mob2,1,"summon_boss_lt::OnMVP";	end;OnMyMvPDead:		if ( .@mob == 1646 ) { getitem 20051,1;}		if ( .@mob == 1647 ) { getitem 20023,1;}			if ( .@mob == 1648 ) { getitem 20075,1;}			if ( .@mob == 1649 ) { getitem 20044,1;}			if ( .@mob == 1650 ) { getitem 20067,1;}			if ( .@mob == 1651 ) { getitem 20045,1;}	killmonster "lhz_dun03","summon_boss_lt::OnMVP";	initnpctimer;	end;//Required to keep from erroringOnMVP:	end;}

the .@mob is the same variable as the thing the script uses to decide which mvp should spawn.

 

thanks in advance!


 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

The issue is because .@mob is a temporary variable, it cannot be read outside Onsummon. For that, you'd have to use .mob. On a side note, it's preferred to use .@var = value; instead of set .@var, value;

 

Onsummon:	// Select Coordinates to summon a random MVP on	setarray .@positions, 140, 232, 75, 138, 140, 87, 205, 140, 123, 137, 175, 137;	.mob = rand(1646,1651);	.@rnd = rand(0, 5);	monster "lhz_dun03",.@positions[2 * .@rnd],.@positions[2 * .@rnd + 1],"--ja--",.mob,1,"summon_boss_lt::OnMyMvPDead";	// Select Coordinates to summon a random 99 on	setarray .@positions, 183, 97, 97, 96, 47, 139, 231, 140, 139, 211, 139, 259;	.@mob2 = rand(1640,1645);	.@rnd = rand(0, 5);	monster "lhz_dun03",.@positions[2 * .@rnd],.@positions[2 * .@rnd + 1],"--ja--",.@mob2,1,"summon_boss_lt::OnMVP";	end;OnMyMvPDead:	if ( .mob == 1646 ) getitem 20051,1;	if ( .mob == 1647 ) getitem 20023,1;	if ( .mob == 1648 ) getitem 20075,1;	if ( .mob == 1649 ) getitem 20044,1;	if ( .mob == 1650 ) getitem 20067,1;	if ( .mob == 1651 ) getitem 20045,1;	killmonster "lhz_dun03","summon_boss_lt::OnMVP";	initnpctimer;	end;//Required to keep from erroringOnMVP:	end;}

 

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.