Jump to content

Question

Posted

I have a question.  I was checking out the Endless Tower instance, and I noticed something.  The warp commands just have 1@tower as the warp destination, for example.

 

When a map is instanced, it adds numbers from 000 to 999 in front of the name, like 0011@tower.

 

So how does the script know what instance to warp you to, if you just set the warp to 1@tower?  How does it know to send you to 001 or 027?  Is there part of the script I am not understanding right, or does it just automatically detect if you have an instance and warp you to the right one?

2 answers to this question

Recommended Posts

Posted

So how does the script know what instance to warp you to, if you just set the warp to 1@tower?  How does it know to send you to 001 or 027?  Is there part of the script I am not understanding right, or does it just automatically detect if you have an instance and warp you to the right one?

pc.c

	if( map[m].flag.src4instance && sd->status.party_id && (p = party_search(sd->status.party_id)) != NULL && p->instance_id )
	{
		// Request the mapid of this src map into the instance of the party
		int im = instance_map2imap(m, p->instance_id);
		if( im < 0 )
			; // Player will enter the src map for instances
		else
		{ // Changes destiny to the instance map, not the source map
			m = im;
			mapindex = map_id2index(m);
		}
	}

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