• 0
Sign in to follow this  
Brizyous

Script crashes mapserver.

Question

In this Temple of Demon God script when i'm going to start the instance it crashes the map-server, no information in the console, just a "Server received crash signal! attempting to save all online characters".

 

//===== Alayne Scripts =======================================
//= Temple of Demon God Instance
//===== By: ================================================== 
//= Alayne
//===== Current Version: ===================================== 
//= 1.0
//===== Compatible With: ===================================== 
//= rAthena SVN
//= hercules SVN
//===== Description: ========================================= 
//= The official instance Temple of Demon God transcription
//===== Todo Remaining: ======================================
//
//===== Additional Comments: =================================
//
//
//============================================================

moro_vol,108,88,5	script	Commander Hiva Agip::alatdgcha	4_M_REDSWORD,{
	set [email protected]$, "[Commander Hiva Agip]";
	cutin "ep13_captin_edq", 2;
	mes [email protected]$;
	if(checkquest(.questId) == -1)
	{
		mes "Hey! You! Come here.";
		mes "I need you help.";
		mes "Morocc is regaining his power! We absolutely need to defy him, and defeat him before he raised again.";
		mes "But I'm affraid we're not strong enough to fight him...";
		mes "Can you help us?";
		if(select("Yes","No") == 1)
		{
			next;
			mes [email protected]$;
			mes "Good! I'm couting on you!";
			mes "I'll pray for your victory!";
			setquest .questId;
		}
	}
	else if(checkquest(.questId, HUNTING) < 2)
	{
		//uncomplete quest
		mes "You didn't fullfill the quest yet, do you?";
	}
	else if(checkquest(.questId, HUNTING) == 2)
	{
		//complete quest
		mes "*Whistle* Good work!";
		mes "How's the Temple of Demon God? Still the same?";
		getitem 22537,1;
		//getitem reward
		completequest .questId;
		erasequest .questId;
	}
	else
	{
		mes "Now that we've taken care of the main body, we can take things slow.";
		mes "Why don't you go rest for now? Leave the rest to us.";
	}
	cutin "", 255;
	close;
	
OnInit:
	set .questId, 7593;
	end;
}	


moro_vol,110,90,3	script	Abidal::alatdga	4_M_KNIGHT_GOLD,{
	set [email protected]$, "[Abidal]";
	mes [email protected]$;
	if(checkquest(.questId) == -1)
	{
		mes "Hey! I've heard the Commander gave you a quest.";
		mes "I have also something to ask you.";
		mes "Two monsters protect Morocc. Brinaranea and Muspelskoll.";
		mes "If you defeat them, it'll weakened this Demon...";
		mes "Can you handle that?";
		if(select("Yes","No") == 1)
		{
			next;
			mes [email protected]$;
			mes "Good! I'm couting on you!";
			mes "I'll pray for your victory!";
			setquest .questId;
		}
	}
	else if(checkquest(.questId, HUNTING) < 2)
	{
		//uncomplete quest
		mes "You didn't fullfill the quest yet, do you?";
	}
	else if(checkquest(.questId, HUNTING) == 2)
	{
		//complete quest"
		mes "You did it! I knew you would!";
		mes "Congratulations!";
		mes "But I'm affraid this is not over yet.";
		mes "I have this nagging sense of misgiving.";
		mes "I'm sorry. Maybe I'm thinking irrationally.";
		next;
		mes [email protected]$;
		mes "Take this as a reward, and a thanks from me.";
		//getitem 
		completequest .questId;
		erasequest .questId;
	}
	else
	{
		mes "Take some rest now.";
	}
	close;
	
OnInit:
	set .questId, 7594;
	end;
}	

moro_cav,43,73,3	script	Yggdrasil Lookalike::alatdgyl	HIDDEN_NPC,{
OnStart:
	set [email protected]_id, getcharid(1);
	set [email protected]_leader, ( getcharid(0) == getpartyleader([email protected]_id,2) );

	set [email protected]_instance, TDG_INSTANCE_ID > 0;
	
	set [email protected]_delay, ( instance_delay_templedg - gettimetick(2) );

	set [email protected]$, "[Yggdrasil Lookalike]";
	mes [email protected]$;
	mes "You touched the tree and felt a strange flow of mana.";
	mes "Perhaps the flow of mana will guide to the depth of the temple.";
	if( ep14_3_morse == 0 )
		next;
	if( [email protected]_delay > 0 )
	{
		mes "You have to wait : ^FF0000"[email protected]_delay+" Seconds.^000000";
		close;
	}
	
	switch( select( 
		(( [email protected]_id && [email protected]_leader && [email protected]_instance )?"Create " + .instance_name$:""),
		(( [email protected]_id && [email protected]_instance )?"Enter " + .instance_name$:""),
		(( [email protected]_id && [email protected]_leader && [email protected]_instance )?"Destroy " + .instance_name$:""),
	"Nevermind."
		)){
	case 1:
		getpartymember [email protected]_id,2;
		if( .min_party_member >= 1 ){
			set [email protected], getcharid(3);
			set [email protected], gettimetick(2);
			for( set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected]+1 )
				if( attachrid( [email protected][[email protected]] ) ){
					set [email protected]_count, [email protected]_count + 1;
					if( BaseLevel < .base_level[0] || BaseLevel > .base_level[1] ) set [email protected], [email protected]|1;
					if( Zeny < .instance_zeny ) set [email protected], [email protected]|2;
					if( instance_delay_templedg > [email protected] ) set [email protected], [email protected]|4;
					if( [email protected] ){
						set [email protected]$, strcharinfo(0);
						break;
					}
				}
			attachrid( [email protected] );
		}
		
		//clean any previously remaining instance
		if(TDG_INSTANCE_ID > 0)
		{			
			getpartymember getcharid(1),2;
			for( set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected]+1 )
				if( attachrid( [email protected][[email protected]] ) && TDG_INSTANCE_ID > 0){
					set TDG_INSTANCE_ID, -1;
				}
			instance_destroy instance_id();
		}
		
		if( [email protected]$ != "" && [email protected] ){
			mes "^FF0000[ Failed ]^000000";
			mes "^0055FF"[email protected]$+"^000000, You cannot join right now.";
			mes " ";
			mes "^FF0000[ Reason: ]^000000";
			if( [email protected] & 1 ) mes "^777777You must be Level: "+.base_level[0]+" - "+.base_level[1]+"^000000";
			if( [email protected] & 2 ) mes "^777777You need "+ .instance_zeny +" Zeny^000000";
			if( [email protected] & 4 ) mes "^777777You still have cooldown.^000000";
			break;
		}
		
		getpartymember getcharid(1),0;
		if (instance_check_party([email protected]_id, .min_party_member, .base_level[0], .base_level[1]) == 0) {
			mes "^0055FF[ "+.instance_name$+" ]^000000";
			mes "Make or join a party with at least "+.min_party_member+" member and try again, with level between " +.base_level[0] + " and " + .base_level[1] + ".";
		}
		else{
			set [email protected], instance_create( .instance_name$ );
			if( [email protected] < 0 ) {
				npctalk .instance_name$ + " reservation failed.";
				mes "^0000FF"+ .instance_name$ +" ^000000 - Reservation Failed!";
				close;
			}
			mes "^0055FF[ "+.instance_name$+" ]^000000";
			mes "^0000FF"+.instance_name$+" ^000000 - Reserved";
			set [email protected], gettimetick(2);
			getpartymember [email protected]_id,2;
			for( set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected]+1 )
				if( attachrid( [email protected][[email protected]] ) )
					set TDG_INSTANCE_ID, [email protected];
			attachrid( [email protected] );
			npctalk .instance_name$ + " has been generated for Party - " + getpartyname( [email protected]_id );
			
			//disable unused npcs for now
			disablenpc instance_npcname( "tdgWarp#1", instance_id() );
			disablenpc instance_npcname( "tdgWarp#2", instance_id() );
			disablenpc instance_npcname( "tdgWarp#3", instance_id() );
			disablenpc instance_npcname( "tdgWarp#4", instance_id() );
			disablenpc instance_npcname( "tdgWarp#5", instance_id() );
 		}
	case 2:
		if( TDG_INSTANCE_ID <= 0 ){
			mes .instance_name$ + " doesn't exist for Party - "+getpartyname( [email protected]_id );
		}
		else{
			getmapxy([email protected]$, [email protected], [email protected], UNITTYPE_PC);
			//save [email protected]$, [email protected], [email protected];
			set instance_delay_templedg, ( [email protected] + ( .instance_delay ));
			switch(instance_enter(.instance_name$)) {
				default:
					mes "An unknown error has occurred.";
					close;
				case 2:
					mes "The memorial dungeon " + .instance_name$ + " does not exist.";
					mes "The party leader did not generate the dungeon yet.";
					close;
				case 1:
					mes "You can enter the dungeon after making the party.";
					close;
				case 0:
					mapannounce [email protected]$, strcharinfo(0)+" from party, " +getpartyname( [email protected]_id )+", tdg entering the dungeon, "+.instance_name$+".",bc_map,"0x00ff99",FW_NORMAL,12;
					close;
			}
		}
		break;
	case 3:
		mes .instance_name$ + " Destroyed.";
		getpartymember getcharid(1),2;
		for( set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected]+1 )
			if( attachrid( [email protected][[email protected]] ) && TDG_INSTANCE_ID > 0){
				set TDG_INSTANCE_ID, -1;
			}
		instance_destroy instance_id();
		break;
	default: 
		break;
}
close;

OnPCLoginEvent:
OnPCLogoutEvent:
	set TDG_INSTANCE_ID, -1;
	end;

OnInit:
	setarray .base_level[0],145, 175;
	setarray .map$[0],"[email protected]";
	set .map_size, getarraysize( .map$ );
	set .min_party_member, 1;
	set .instance_delay, 7200;
	set $tdg_timer_delay, 3600; //1 hour to clean the instance
	set .instance_name$, "Temple of Demon God";
	end;
}


[email protected],101,107,4	script	temple_demon_god	HIDDEN_WARP_NPC,2,2,{
function summon_normal;
function summon_guardian;
end;

OnInstanceInit:
	set [email protected]$, strnpcinfo(4);
	
	set 'instance_tdg_level, 0;
	set .max_tdg_level, 6;
	
	set .moroccId, -1;
	
	instance_announce instance_id(), "[Temple of Demon God] Eliminate the Demon God's Apostles, Ahat and Shnaim.",bc_map,0x00ff99;
	sleep 1500;
	instance_announce instance_id(), "[Temple of Demon God] Then collect their Souls. Those are the key to open the Temple.",bc_map,0x00ff99;

	set 'ahatSoul, 6713;
	set 'shnaimSoul, 6714;
	set 'tdgMercenaryOn, 0;
	set [email protected]_name$, instance_npcname( strnpcinfo(0), instance_id() );
	summon_normal( [email protected]$,[email protected]_name$, 1 );
	
	set .timerCount, 0;
	initnpctimer;
	end;

function	summon_normal	{
	set [email protected]$, getarg(0);
	set [email protected]$, getarg(1);
	set [email protected], getarg(2);
	
	if([email protected] == 1)
	{
		'instance_tdg_level++;
	}
	
	switch( 'instance_tdg_level ){
		case 1:
			//ahat and shnaim
			setarray [email protected],3041,3039,3040;
			setarray [email protected],1,1,1;
			setarray [email protected],89,13,111,49;
			setarray [email protected]$, "OnAhatDied","OnShnaimDied",0;
			break;
		case 2:
			//dolomedes
			setarray [email protected],3088;
			setarray [email protected],5;
			setarray [email protected],54,97,33,138;
			break;
		case 3:
			//kasa
			setarray [email protected],3089;
			setarray [email protected],5;
			setarray [email protected],153,91,173,140;
			break;
		case 4:
			//two satan morocc
			setarray [email protected],3098,3099;
			setarray [email protected],1,1;
			setarray [email protected],90,208,116,176;
			break;
		case 6:
			//random pop salamander or dolomedes
			if(rand(0,1) == 1)
			{
				setarray [email protected],3088;
			}
			else
			{
				setarray [email protected],3090;
			}
			setarray [email protected],5;
			setarray [email protected],90,208,116,176;
			break;
	}
	set [email protected]_size, getarraysize( [email protected] );
	for( set [email protected], 0; [email protected] < [email protected]_size; set [email protected],[email protected]+1 ){
		set [email protected]_amount, ( [email protected][[email protected]] );
		set [email protected], 0;
		if(getarraysize([email protected]$) == 0)
		{
			set [email protected]$, [email protected]$ + "::OnNormalDied";
		}
		else
		{
			set [email protected]$, [email protected]$ + "::" + [email protected]$[[email protected]];
		}	
		areamonster [email protected]$,[email protected][0],[email protected][1],[email protected][2],[email protected][3],"--ja--",[email protected][[email protected]],[email protected]_amount,[email protected]$,[email protected];
	}
	return;
}

function	summon_guardian	{
	set [email protected]$, getarg(0);
	set [email protected]$, getarg(1);
			
	switch( 'instance_tdg_level ){
		case 2:
			//brynarea
			setarray [email protected],3091;
			setarray [email protected],54,97,33,138;
			break;
		case 3:
			//muspelskoll
			setarray [email protected],3092;
			setarray [email protected],153,91,173,140;
			break;
		case 4:
			//morocc boy
			setarray [email protected],3096;
			setarray [email protected],90,208,116,176;
			break;
		case 5:
			//morocc boy, 20% left
			setarray [email protected],3096;
			setarray [email protected],90,208,116,176;
			break;
		case 6:
			//morocc adult
			setarray [email protected],3097;
			setarray [email protected],90,208,116,176;
			break;
		default: 
			mapannounce [email protected]$,"[ Temple of Demon God ] : Cleared!! Congratulation!!",bc_map,0x00FF99;
			return;
	}
	set [email protected]_size, getarraysize( [email protected] );
	for( set [email protected], 0; [email protected] < [email protected]_size; set [email protected],[email protected]+1 ){
		set [email protected]_amount, 1;
		set [email protected], 0;
		if('instance_tdg_level == 4)
		{
			//RATHENA
			areamonster([email protected]$,[email protected][0],[email protected][1],[email protected][2],[email protected][3],"--ja--",[email protected][[email protected]],[email protected]_amount,[email protected]$,[email protected]);
			set .moroccId, [email protected][0];
			//HERCULES
			//set .moroccId, areamonster([email protected]$,[email protected][0],[email protected][1],[email protected][2],[email protected][3],"--ja--",[email protected][[email protected]],[email protected]_amount,[email protected]$,[email protected]);
		}
		else if('instance_tdg_level == 5)
		{
			//RATHENA
			areamonster([email protected]$,[email protected][0],[email protected][1],[email protected][2],[email protected][3],"--ja--",[email protected][[email protected]],[email protected]_amount,[email protected]$,[email protected]);
			set .moroccId, [email protected][0];
			getunitdata(.moroccId, [email protected]);
			setunitdata .moroccId, 2, [email protected][UMOB_MAXHP] * 20 / 100;
			//HERCULES
			//set .moroccId, areamonster([email protected]$,[email protected][0],[email protected][1],[email protected][2],[email protected][3],"--ja--",[email protected][[email protected]],[email protected]_amount,[email protected]el$,[email protected]);
			//set [email protected], getunitdata($moroccId, UDT_MAXHP);
			//setunitdata $moroccId, UDT_HP, [email protected] * 20 / 100;
		}
		else
		{
			areamonster([email protected]$,[email protected][0],[email protected][1],[email protected][2],[email protected][3],"--ja--",[email protected][[email protected]],[email protected]_amount,[email protected]$,[email protected]);
		}
	}
	return;
}

OnAhatDied:
	//get item
	getitem 'ahatSoul, 1;
	set [email protected]$, strnpcinfo(4);
	set [email protected]_name$, instance_npcname( strnpcinfo(0), instance_id() );
	set [email protected]_dead_num, mobcount([email protected]$,[email protected]_name$+"::OnShnaimDied" );
	if([email protected]_dead_num == 0)
	{
		instance_announce instance_id(), "[Temple of Demon God] Activate the Soul Globe to open the Temple.",bc_map,0x00ff99;
		enablenpc instance_npcname( "alatdgor", instance_id() );
	}
	end;

OnShnaimDied:
	//get item
	getitem 'shnaimSoul, 1;
	set [email protected]$, strnpcinfo(4);
	set [email protected]_name$, instance_npcname( strnpcinfo(0), instance_id() );
	set [email protected]_dead_num, mobcount([email protected]$,[email protected]_name$+"::OnAhatDied" );
	if([email protected]_dead_num == 0)
	{
		instance_announce instance_id(), "[Temple of Demon God] Activate the Soul Globe to open the Temple.",bc_map,0x00ff99;
		enablenpc instance_npcname( "alatdgor", instance_id() );
	}
	end;

OnNormalDied:
	set [email protected]$, strnpcinfo(4);
	set [email protected]_name$, instance_npcname( strnpcinfo(0), instance_id() );
	set [email protected]_dead_num, mobcount([email protected]$,[email protected]_name$+"::OnNormalDied" );
	if( [email protected]_dead_num == 0 && [email protected]_dead_num2 == 0 ){
		if('instance_tdg_level == 4)
		{
			'instance_tdg_level++;
			//summon morocc boy again
			summon_guardian( [email protected]$,[email protected]_name$+"::OnGuardianDied" );
		}	
	}
	end;
	
OnGuardianDied:
	set [email protected]$, strnpcinfo(4);
	set [email protected]_name$, instance_npcname( strnpcinfo(0), instance_id() );
	set [email protected]_dead_num, mobcount([email protected]$,[email protected]_name$+"::OnGuardianDied" );
	set [email protected]_id, getcharid(1);
	
	if( [email protected]_dead_num ){
	
		if('instance_tdg_level == 2)
		{
			killmonster strnpcinfo(4), "All";
			//nydhogg pop
			enablenpc instance_npcname( "alatdgny2", instance_id() );
			donpcevent instance_npcname( "alatdgny2", instance_id() ) + "::OnDialog2";
		}
		else if('instance_tdg_level == 3)
		{
			killmonster strnpcinfo(4), "All";
			//nydhogg pop
			enablenpc instance_npcname( "alatdgny3", instance_id() );	
			donpcevent instance_npcname( "alatdgny3", instance_id() ) + "::OnDialog3";	
		}
		else if('instance_tdg_level == 5)
		{
			'instance_tdg_level++;
			//morocc boy death
			instance_announce instance_id(), "[Morocc] This is getting more interesting, humans!",bc_map,0xFF0000;
			sleep 1500;
			instance_announce instance_id(), "[Morocc] You don't think this is already over, do you?!",bc_map,0xFF0000;
			sleep 1500;
			set .randomPop, 1;
			summon_guardian( [email protected]$, [email protected]_name$ + "::OnGuardianDied" );
		}
		else if ('instance_tdg_level == .max_tdg_level)
		{			
			killmonster strnpcinfo(4), "All";
			stopnpctimer;
			instance_announce instance_id(), "Do...Don't think...It's over...You! You're allready...Dead!!",bc_map,0xFF0000;
			sleep 1500;
			
			//enable portal
			enablenpc instance_npcname( "alatdgny4", instance_id() );
			
			end;
		}
	}
	end;
	
OnTimer10000:
	//each 10s, increase timer
	set .timerCount, .timerCount + 10;
	if(.timerCount == $tdg_timer_delay)
	{
		instance_announce instance_id(), "[ Temple of Demon God ] The Dimension collapse! I have to get you out of there!", bc_map, 0xFF0000;
		sleep 5000;
		getpartymember getcharid(1),2;
		for( set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected]+1 )
			if( attachrid( [email protected][[email protected]] ) && TDG_INSTANCE_ID > 0){
				set TDG_INSTANCE_ID, -1;
			}
		instance_destroy instance_id();
		stopnpctimer;
	}
	if(.randomPop == 1)
	{
		set [email protected]$, strnpcinfo(4);
		set [email protected]_name$, instance_npcname( strnpcinfo(0), instance_id() );
		set [email protected]_dead_num, mobcount([email protected]$,[email protected]_name$+"::OnNormalDied" );
		if([email protected]_dead_num == 0)
		{
			summon_normal( [email protected]$,[email protected]_name$, 0 );
		}
	}
	if(.checkHP == 1)
	{
		callsub OnCheckMoroccHP;
	}
	setnpctimer 0;
	end;
	
OnCheckMoroccHP:	
	//RATHENA
	getunitdata(.moroccId, [email protected]);
	if([email protected][UMOB_HP] <= [email protected][UMOB_MAXHP] / 2)
	//HERCULES
	//set [email protected], getunitdata($stefanId, UDT_HP);
	//set [email protected], getunitdata($stefanId, UDT_MAXHP);
	//if([email protected] <= [email protected] / 2)
	{
		set [email protected]$, strnpcinfo(4);
		set [email protected]_name$, strnpcinfo(3);
		killmonster strnpcinfo(4), "All";
		set .checkHP, 0;
		//stop, kill monster and pop 2 morocc
		summon_normal( [email protected]$, strnpcinfo(3), 0 );
	}	
	return;
	
OnFirstFloorOn:
	set [email protected]$, strnpcinfo(4);
	set [email protected]_name$, instance_npcname( strnpcinfo(0), instance_id() );
	//pop furious incarnation of morroc	
	summon_normal( [email protected]$, [email protected]_name$, 1 );
	end;
	
OnSecondFloorOn:
	set [email protected]$, strnpcinfo(4);
	set [email protected]_name$, instance_npcname( strnpcinfo(0), instance_id() );
	//pop dolomedes
	summon_normal( [email protected]$, [email protected]_name$, 1 );
	//pop brynarea	
	summon_guardian( [email protected]$, [email protected]_name$ + "::OnGuardianDied" );
	enablenpc instance_npcname( "tdgWarp#1", instance_id() );
	end;
	
OnThirdFloorOn:
	set [email protected]$, strnpcinfo(4);
	set [email protected]_name$, instance_npcname( strnpcinfo(0), instance_id() );
	//pop kasa
	summon_normal( [email protected]$, [email protected]_name$, 1 );
	//pop muspelskoll	
	summon_guardian( [email protected]$, [email protected]_name$ + "::OnGuardianDied" );
	enablenpc instance_npcname( "tdgWarp#3", instance_id() );
	end;
	
OnFourthFloorOn:
	set [email protected]$, strnpcinfo(4);
	set [email protected]_name$, instance_npcname( strnpcinfo(0), instance_id() );
	'instance_tdg_level++;
	//pop morocc boy	
	summon_guardian( [email protected]$, [email protected]_name$ + "::OnGuardianDied");
	enablenpc instance_npcname( "tdgWarp#5", instance_id() );
	set .checkHP, 1;
	end;
}

[email protected],101,62,3	script	Temple Entrance::alatdgwe	HIDDEN_WARP_NPC,2,2,{
	end;
	
OnTouch:
	warp strnpcinfo(4), 98, 115;
	end;
	
OnInit:
OnInstanceInit:
	disablenpc strnpcinfo(3);
	end;
}

[email protected],98,56,3	script	Soul Globe::alatdgor	HIDDEN_WARP_NPC,2,2,{
	set [email protected]$, "[Soul Globe]";
	mes [email protected]$;
	mes "Do you wish to insert the Souls?";
	if(select("Yes","No") == 1)
	{
		if(countitem('ahatSoul) > 0)
		{
			delitem 'ahatSoul, 1;
			set .ahat, 1;
		}
		if(countitem('shnaimSoul) > 0)
		{
			delitem 'shnaimSoul, 1;
			set .shnaim, 1;
		}
		if(.ahat == 1 && .shnaim == 1)
		{
			set .warpingOn, 1;
			npctalk "[Soul Globe] The Door is open.";
			instance_announce instance_id(), "[Soul Globe] The Door is open.", bc_map, 0x00FF99;
			//enable warp
			enablenpc instance_npcname( "alatdgwe", instance_id() );
			enablenpc instance_npcname( "alatdge", instance_id() );
			enablenpc instance_npcname( "alatdgmo", instance_id() );
			enablenpc instance_npcname( "alatdglo", instance_id() );
			enablenpc instance_npcname( "alatdgny", instance_id() );
		}
		else
		{
			next;
			mes "[Soul Globe]";
			mes "Insert the Ahat and Shnaim Souls to open the Door.";
		}
	}
	close;
	
OnInstanceInit:
OnInit:
	enablenpc strnpcinfo(3);
	set .ahat, 0;
	set .shnaim, 0;
	end;
}

[email protected],98,115,3	script	entrance::alatdge	HIDDEN_WARP_NPC,2,2,{
	end;
	
OnTouch:
	if('instance_tdg_level == 1)
	{
		sleep 5000;
		donpcevent instance_npcname( "alatdgmo", instance_id() ) + "::OnDialog1_1";
	}
	end;

OnInstanceInit:
OnInit:
	disablenpc strnpcinfo(3);
	end;
}

[email protected],102,124,3	script	Morocc::alatdgmo	4_F_MOCBOY,2,2,{
	end;
	
OnDialog1_1:
	if(.moTalking == 0)
	{
		set .moTalking, 1;
		npctalk "I'll create a new world and become its creator.";
		instance_announce instance_id(), "[Morocc] I'll create a new world and become its creator.",  bc_map, 0xFF0000;
		sleep 1500;
		npctalk "Let me ask you, the first creatures that have stepped in my newborn land.";
		instance_announce instance_id(), "[Morocc] Let me ask you, the first creatures that have stepped in my newborn land.", bc_map, 0xFF0000;
		sleep 1500;
		npctalk "How'd you like to follow me and watch the birth of a new world?";
		instance_announce instance_id(), "[Morocc] How'd you like to follow me and watch the birth of a new world?", bc_map, 0xFF0000;
		sleep 1500;
		donpcevent instance_npcname( "alatdglo", instance_id() ) + "::OnDialog1_2";
	}
	end;
	
OnDialog1_4:
	npctalk "Let me ask you, the first creatures that have stepped in my newborn land.";
	instance_announce instance_id(), "[Morocc] Let me ask you, the first creatures that have stepped in my newborn land.",bc_map, 0xFF0000;
	sleep 1500;
	npctalk "How'd you like to follow me and watch the birth of a new world?";
	instance_announce instance_id(), "[Morocc] How'd you like to follow me and watch the birth of a new world?",bc_map, 0xFF0000;
	sleep 1500;
	donpcevent instance_npcname( "alatdglo", instance_id() ) + "::OnDialog1_5";
	end;

OnInstanceInit:
OnInit:
	disablenpc strnpcinfo(3);
	set .moTalking, 0;
	end;
}

[email protected],95,125,5	script	Loki::alatdglo	4_M_BLACKMAN,2,2,{
	end;
	
OnDialog1_2:
	npctalk "Enough with your nonsense. Just say you like destroying things!";
	instance_announce instance_id(), "[Loki] Enough with your nonsense. Just say you like destroying things!", bc_map, 0x00FF99;
	sleep 1500;
	npctalk "Create a new world and become its creator? If this is the new world you're talking about, then I'm disappointed!";
	instance_announce instance_id(), "[Loki] Create a new world and become its creator? If this is the new world you're talking about, then I'm disappointed!", bc_map, 0x00FF99;
	sleep 1500;
	npctalk "Even if you burn your body, you power is not as potent as that of Ymir of the Genesis!";
	instance_announce instance_id(), "[Loki] Even if you burn your body, you power is not as potent as that of Ymir of the Genesis!",bc_map, 0x00FF99;
	sleep 1500;
	npctalk "Just the fact that you had to steal Yggdrasil shows you lack of creativity!";
	instance_announce instance_id(), "[Loki] Just the fact that you had to steal Yggdrasil shows you lack of creativity!",bc_map, 0x00FF99;
	sleep 1500;
	npctalk "Take a look at yourself. You're delusional if you think that you look like a creator of any kind!";
	instance_announce instance_id(), "[Loki] Take a look at yourself. You're delusional if you think that you look like a creator of any kind!",bc_map, 0x00FF99;
	sleep 1500;
	
	donpcevent instance_npcname( "alatdgny", instance_id() ) + "::OnDialog1_3";
	end;
	
OnDialog1_5:
	disablenpc instance_npcname( "alatdgmo", instance_id() );
	npctalk "Are you running?!";
	instance_announce instance_id(), "[Loki] Are you running?!",bc_map, 0x00FF99;
	
	disablenpc strnpcinfo(3);
	sleep 1500;
	set 'tdgMercenaryOn, 1;
		
	donpcevent instance_npcname( "temple_demon_god", instance_id() ) + "::OnSecondFloorOn";
	end;

OnInstanceInit:
OnInit:
	disablenpc strnpcinfo(3);
	end;
}

[email protected],93,122,5	script	Nydhogg::alatdgny	4_F_NYDHOG,{
	if (getcharid(0) == getpartyleader(getcharid(1),2)) {
		mes "[Nydhogg]";
		mes "Listen carefully.";
		next;
		mes "[Nydhogg]";
		mes "Morocc will soon overpower us all. We need to defeat him before it arrives.";
		next;
		mes "[Nydhogg]";
		mes "We need your powers to defeat him. We're not strong enough to defeat him by our own.";
		next;
		mes "[Nydhogg]";
		mes "I will offer you my strength in exchange for you to help me.";
		close2;
		summon "Nydhogg",3087,99999999;
		disablenpc strnpcinfo(3);
		end;
	}
	mes "[Nydhogg]";
	mes "I'm talking to your leader.";
	close;
	
OnDialog1_3:
	npctalk "I second that. You're unnecessary to this world. You don't belong here!";
	instance_announce instance_id(), "[Nydhogg] I second that. You're unnecessary to this world. You don't belong here!",bc_map, 0x0000FF;
	sleep 1500;
	npctalk "Even Yggdrasil denies your existence!";
	instance_announce instance_id(), "[Nydhogg] Even Yggdrasil denies your existence!",bc_map, 0x0000FF;
	sleep 1500;
	npctalk "As the Guardian of Yggdrasil, I have to erase your existence from this world.";
	instance_announce instance_id(), "[Nydhogg] As the Guardian of Yggdrasil, I have to erase your existence from this world.",bc_map, 0x0000FF;
	sleep 1500;

	donpcevent instance_npcname( "alatdgmo", instance_id() ) + "::OnDialog1_4";
	end;

OnInstanceInit:
OnInit:
	disablenpc strnpcinfo(3);
	set .endTalking, 0;
	end;
}

[email protected],102,124,3	script	Morocc::alatdgmoa	3097,2,2,{
	end;
	
OnTouch:
	if(.moTalking == 0)
	{
		set .moTalking, 1;
		npctalk "You exceeded my expectations.";
		instance_announce instance_id(), "[Morocc] You exceeded my expectations.",bc_map, 0xFF0000;
		sleep 1500;
		npctalk "I'll accept your challenge.";
		instance_announce instance_id(), "[Morocc] I'll accept your challenge.",bc_map, 0xFF0000;
		sleep 1500;
		npctalk "I shall drench the land with your flowing blood, and nourish it with your torn flesh.";
		instance_announce instance_id(), "[Morocc] I shall drench the land with your flowing blood, and nourish it with your torn flesh.",bc_map, 0xFF0000;
		sleep 1500;
		npctalk "I'll show you the true depth of despair.";
		instance_announce instance_id(), "[Morocc] I'll show you the true depth of despair.",bc_map, 0xFF0000;
		sleep 1500;
		disablenpc strnpcinfo(3);
		donpcevent instance_npcname( "temple_demon_god", instance_id() ) + "::OnFourthFloorOn";
	}
	end;

OnInstanceInit:
OnInit:
	disablenpc strnpcinfo(3);
	set .moTalking, 0;
	end;
}

[email protected],61,149,3	script	Nydhogg::alatdgny2	4_F_NYDHOG,{
	set [email protected]$, "[Nydhogg]";
	mes [email protected]$;
	mes "That was a tought battle.";
	mes "This may not be good enough, but I hope it'll help your growth.";
	if(NYDBRYN == 0)
	{
		//getexp 
		next;
		mes "Nydhogg rewarded you with a large amount of EXP for defeating Brinnaranea.";
		set NYDBRYN, 1;
	}
	close;
	
OnDialog2:
	instance_announce instance_id(), "[Nyddhog] Brinnaranea's influence has dissipated, and a new warp gate has appeared.",bc_map, 0x0000FF;
	enablenpc instance_npcname( "tdgWarp#2", instance_id() );
	donpcevent instance_npcname( "temple_demon_god", instance_id() ) + "::OnThirdFloorOn";
	end;
	
OnInstanceInit:
OnInit:
	disablenpc strnpcinfo(3);
	end;
}

[email protected],154,155,3	script	Nydhogg::alatdgny3	4_F_NYDHOG,{
	set [email protected]$, "[Nydhogg]";
	mes [email protected]$;
	mes "Good job again.";
	mes "This may not be good enough, but I hope it'll help your growth.";
	if(NYDMUS == 0)
	{
		//getexp 
		next;
		mes "Nydhogg rewarded you with a large amount of EXP for defeating Muspelskoll.";
		set NYDMUS, 1;
	}
	close;
	
OnDialog3:
	instance_announce instance_id(), "[Nyddhog] Muspelskoll's influence has dissipated, and a new warp gate has appeared.",bc_map, 0x0000FF;
	enablenpc instance_npcname( "tdgWarp#4", instance_id() );
	enablenpc instance_npcname( "alatdgmoa", instance_id() );
	end;
	
OnInstanceInit:
OnInit:
	disablenpc strnpcinfo(3);
	end;
}

[email protected],106,197,3	script	Nydhogg::alatdgny4	4_F_NYDHOG,{
	set [email protected]$, "[Nydhogg]";
	cutin "ep14_nyd01",1;
	mes [email protected]$;
	mes "I don't know what to say...";
	mes "We stopped the God in waiting.";
	mes "We ascomplished our goal.";
	mes "But I'm still unnerved...";
	next;
	mes [email protected]$;
	mes "This world is created in the mind of Morocc.";
	mes "He'll live forever in this garden he couldn't finish.";
	next;
	mes [email protected]$;
	mes "He probably doesn't know his body is destroyed forever.";
	mes "He was far too ambitious, even for him.";
	mes "He wanted to create a new world and become its creator.";
	next;
	mes [email protected]$;
	mes "But he couldn't create anything on his own.";
	mes "He abandonned his demon body, just to become a mere facsimile of an existing god.";
	next;
	mes [email protected]$;
	mes "He look the snape of a man.";
	mes "He wasn't creative enough to reinvent the concept of a God.";
	mes "He was some kind of paradox.";
	next;
	mes [email protected]$;
	mes "Now we need to get out of this trap in time and get back to reality.";
	mes "This world only exists in the Demon's mind, and this day will repeat endlessly.";
	next;
	mes [email protected]$;
	mes "Everyone entering this world will be dragged in this loop.";
	mes "In that sense, he succeeded in making his own world.";
	next;
	mes [email protected]$;
	mes "I've talked to much.";
	mes "The commander must be waiting. Let me validate your feat so you can report to him.";
	mes "You did a great job today.";
	cutin "", 255;
	next;
	getpartymember getcharid(1),2;
	for( set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected]+1 )
		if( attachrid( [email protected][[email protected]] ) && TDG_INSTANCE_ID > 0){
			set TDG_INSTANCE_ID, -1;
			getitem 22537,1;
			getitem 6715,1;
			getitem 22567,3;
		}
	instance_destroy instance_id();
	close;

OnInstanceInit:
OnInit:
	disablenpc strnpcinfo(3);
	end;
}

[email protected],91,120	warp	tdgWarp#1	2,2,[email protected],61,88
[email protected],69,149	warp	tdgWarp#2	2,2,[email protected],98, 115
[email protected],105,120	warp	tdgWarp#3	2,2,[email protected],133,93
[email protected],147,156	warp	tdgWarp#4	2,2,[email protected],98, 115
[email protected],98,127	warp	tdgWarp#5	2,2,[email protected],101,176

 

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

I didn't get a crash, but got a nullpo

--- nullpo info --------------------------------------------
d:\ragnarok\rathena\src\map\instance.cpp:377: in func `instance_create'

 

yeah, very common mistakes, rathena has to add a line in db\re\instance_db.txt

50,Temple of Demon God,7200,300,[email protected],102,16

then it work fine

 

that's why rathena instance is currently being rewritten

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, Brizyous said:

Thanks guys!! solved.

Word of advice:

Read git changes before you update your server files! 

then update your script file accordingly to prevent this kind of stuff from happening in future.

  • Like 1

Share this post


Link to post
Share on other sites
  • 0
12 minutes ago, utofaery said:

Word of advice:

Read git changes before you update your server files! 

then update your script file accordingly to prevent this kind of stuff from happening in future.

Yes i'm doing some research about that xD, some other instances script are crashing the server too.

Share this post


Link to post
Share on other sites
  • 0
11 minutes ago, Brizyous said:

Yes i'm doing some research about that xD, some other instances script are crashing the server too.

Have fun doing research!~

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this