Lelouch - Nov 19, 2013 7:47
					
				
				
					After killing all the monster in Floor Lvl 45 there are no warp portal leading to Lvl 46 and also i've noticed this when entering "[Admin] Lelouch of the party, , is entering the dungeon, Endless Tower." i think it should be "[Admin] Lelouch of the party,<Party Name>, is entering the dungeon, Endless Tower.". Please see pictures below...
[spoiler][img]http://i237.photobucket.com/albums/ff212/sai4455/screenUraniumRORenewal003.jpg[/img]
[img]http://i237.photobucket.com/albums/ff212/sai4455/screenUraniumRORenewal002.jpg[/img][/spoiler]
				
								
					
						This post has been edited by
						Lelouch
						on Nov 19, 2013 7:48					
									 
							 
									
				
					
						Haru - Nov 25, 2013 4:01
					
				
				
					Confirmed both points.
Part 1:[code=auto:0]2@tower,355,138,0	duplicate(1FGate102tower)	WARPNPCFGate102tower	WARPNPC,2,2
[/code]should be 45FGate102Tower instead.
Part 2:[code=auto:0]L_Enter:
	if (has_instance("1@tower") == "") {
		mes "The memorial dungeon " + .@md_name$ + " does not exist.";
		mes "The party leader did not generate the dungeon yet.";
		close;
	} else {
		mapannounce "e_tower", strcharinfo(0)+" of the party, "+.@p_name$+", is entering the dungeon, Endless Tower.",bc_map,"0x00ff99",FW_NORMAL,12;
		if (getarg(1)) {
			set etower_timer,gettimetick(2);
			setquest 60200;
			setquest 60201;
		}
		warp "1@tower",52,354;
		if (getarg(0) == 0)
			close;
		else
			end;
	}
[/code]This label gets called through callsub, but it relies on .@ variables (which are, by definition, out of scope, when it gets called as a subroutine). That's of course a very bad idea. It should be rewritten so that it takes those values through getarg instead.
				
							 
									
				
					
						Patskie - Dec 1, 2013 8:38
					
				
				
					Instead of .@variables we can use .variables 
Not tested :[code=auto:0]
e_tower,81,105,0	script	Tower Protection Stone	2_MONEMUS,{
	set .@party_id,getcharid(1);
	set .p_name$,getpartyname(.@party_id);
	set .md_name$,"Endless Tower";
	set .@etower_timer,checkquest(60200,PLAYTIME); // 1 week
	set .@etower_timer2,checkquest(60201,PLAYTIME); // 4 hours
	if (!instance_check_party(.@party_id,2)) {
		mes "Make or join a party with more than 1 member and try again.";
		close;
	}
	if (.@etower_timer == -1) {
		if (getcharid(0) == getpartyleader(.@party_id,2)) {
			mes "Confirmed the party has been made. Would you like to reserve entrance to the Endless Tower?";
			next;
			switch(select("Generate dungeon "+.md_name$+":Enter the dungeon:Return to Alberta:Cancel")) {
			case 1:
				set .@instance, instance_create(.md_name$,.@party_id);
				if (.@instance < 0) {
					mes "Party Name: "+.p_name$;
					mes "Party Leader: "+strcharinfo(0);
					mes "^0000ff"+.md_name$+" ^000000- Reservation Failed!";
					close;
				}
				mes "^0000ff"+.md_name$+"^000000 - Try to reserve";
				mes "After making a reservation, you have to talk to NPC behind and select the menu 'Enter the Dungeon' to enter the dungeon.";
				for( set .@i, 1; .@i <= 6; set .@i, .@i + 1 ) {
					if( instance_attachmap(.@i + "@tower", .@instance) == "" ) {
						mes "^0000ff"+.md_name$+" ^000000- Reservation Failed!";
						instance_destroy(.@instance);
						close;
					}
				}
				instance_set_timeout 14400,300,.@instance;
				instance_init(.@instance);
				close;
			case 2:
				callsub L_Enter,0,1;
			case 3:
				mes "I will move you to Alberta.";
				close2;
				warp "alberta",223,36;
				end;
			case 4:
				close;
			}
		}
		switch(select("Enter the "+.md_name$+":Return to Alberta:Cancel")) {
		case 1:
			callsub L_Enter,1,1;
		case 2:
			mes "I will move you to Alberta.";
			close2;
			warp "alberta",223,36;
			end;
		case 3:
			end;
		}
	} else if ((.@etower_timer >= 0) && (.@etower_timer2 < 2)) {
		mes "If you have the dungeon generated already, you can enter it. ";
		next;
		switch(select("Enter the "+.md_name$+":Return to Alberta:Cancel")) {
		case 1:
			callsub L_Enter,0,0;
		case 2:
			mes "I will move you to Alberta.";
			close2;
			warp "alberta",223,36;
			end;
		case 3:
			break;
		}
		close;
	} else if ((.@etower_timer >= 0) && (.@etower_timer < 2) && (.@etower_timer2 == 2)) {
		set .@dun_lim_time,etower_timer+604800; // 1 week
		set .@dun_lim_time2,etower_timer+14400; // 4 hours
		set .@dun_cur_time,gettimetick(2);
		set .@dun_ent_t,(.@dun_lim_time - .@dun_cur_time);
		set .@dun_h,(.@dun_ent_t / 3600);
		set .@dun_m,(.@dun_ent_t - (.@dun_h * 3600)) / 60;
		set .@dun_s,.@dun_ent_t - ((.@dun_h * 3600) + (.@dun_m * 60));
		mes "Due to the tower's aftereffects, you cannot enter the dungeon right now, " + .@dun_h + "hours " + .@dun_m + "minutes " + .@dun_s + "seconds left to enter the next dungeon.";
		next;
		mes "It is dangerous here. Let me move you to Alberta.";
		close2;
		warp "alberta",223,36;
		end;
	} else {
		set etower_timer,0;
		erasequest 60200;
		erasequest 60201;
		mes "^0000ffThe records and after effects related to the Endless Tower have been removed. You can generate and enter the Endless Tower again.^000000";
		close;
	}
L_Enter:
	if (has_instance("1@tower") == "") {
		mes "The memorial dungeon " + .md_name$ + " does not exist.";
		mes "The party leader did not generate the dungeon yet.";
		close;
	} else {
		mapannounce "e_tower", strcharinfo(0)+" of the party, "+.p_name$+", is entering the dungeon, Endless Tower.",bc_map,"0x00ff99",FW_NORMAL,12;
		if (getarg(1)) {
			set etower_timer,gettimetick(2);
			setquest 60200;
			setquest 60201;
		}
		warp "1@tower",52,354;
		if (getarg(0) == 0)
			close;
		else
			end;
	}
}
[/code]