Jump to content
  • 0

Question

Posted

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')

 

4 answers to this question

Recommended Posts

  • 0
Posted

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
  • 0
Posted
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

  • 0
Posted (edited)

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

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...