Jump to content
  • 0

Gold Room Instance Help


Radian

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

Hey guys, I need help with this part of a script.

			//Requirements check
			if(GoldRoomTimeLimit > gettimetick(2)) {
				mes .@n$;
				mes "Im sorry you have to wait for 12 hours before entering again, the room is cooling down.";
				close;
			}
			mes .@n$;
			mes "Which room do you want to enter?";
			next;
			.@sel = select("1 hour room","2 hours room","3 hours room");
			.@inst$ = .instance$[.@sel];
			mes .@n$;
			mes "To enter the room you need these";
			for(.@i = 0; .@i < getarraysize(.requirements); .@i+=2){
				mes getitemname(.requirements[.@i]) + " " + .requirements[.@i+1]*.@sel + "x";
			}
			mes "Confirm?";
			next;
			if(select("Confirm","Cancel") == 2){
				close;
			}
			.@check = Req(.@sel,0);
			if(!.@check){
				mes "You don't have enough required items to enter this room.";
				close;
			}
			Req(.@sel,1);
			GoldRoomTimeLimit = gettimetick(2) + 3600*.@sel + 43200;
			GPLimit = 10000*.@sel;
			GPEarned = 0;
			.@error = instance_create(.@inst$, IM_CHAR);
			if(.@error < 0){
				mes .@n$;
				mes "Instance creation failed with error code " + .@error + ".";
				mes "Please report this to the GM team.";
				close;
			}
			instance_enter(.@inst$);
			end;
			break;

Issue is npc dont warp the player inside the map. No error at map-server and Instanced was created.

[Info]: [Instance] Created map '1#rdeal_1-1' ('981') from map 'ordeal_1-1' ('148')

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

That's false about Instance Maps, I use the gef_fild14 Map for my Hunting Ground Script and no issue at all. Since the Instance System automatically generates an map for the instance exclusive, based on the given one.

You could also try to change instance_enter(.@inst$) into this:
 

switch(instance_enter(.@inst$)) {
		
	case IE_NOINSTANCE:
	mes "You didn't generate the time gap yet!";
	close;
			
	case IE_NOMEMBER:
	case IE_OTHER:
	mes "Unknown Error has occurded in entering "+.@inst$+".";
	close;
			
	case IE_OK:
	mes "You'll now enter the "+.@inst$+".";
	end;
}
end;

That way you also get a certain message, why it fails.

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

Instances should have '@' sign after number.. and maps should not contain more than 11 letters. so the map should be something like 1@ordeal..

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

4 hours ago, Haruka Mayumi said:

Instances should have '@' sign after number.. and maps should not contain more than 11 letters. so the map should be something like 1@ordeal..

You mean this part? instance_enter(.@inst$); I don't understand what you we're saying. im sorry /sry

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

Since i don't see the full script. its probably like this. 

set .@inst$,"ordeal_1-1";

This should be

set .@inst$,"Gold Room";

Well, this will not fix it yet. you should do the following.

1. go to your data.grf, extract ordeal_1-1.gat .rsw .gnd and the ordeal_1-1.bmp from maps. then rename all this into 1@ordeal

2. insert the [email protected] onto your map_cache in db/(pre)-re)/map_cache.dat. and add 1@ordeal on conf/maps_athena.conf and db/map_index..

3. go to db/(pre)-re/instance_db.txt and insert this line.

5,Gold Room,3600,300,1@ordeal,150,150	//This instance is 1 hour as its 3600 seconds.

4. restart your server.

5. add [email protected] .rsw .gnd and [email protected] on your grf

6. Lastly, you just need to tweak your script.

 

Up Vote and Answer if it helps. ?

Edited by Haruka Mayumi
Link to comment
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.   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.

×
×
  • Create New...