[Request] A little information ;)

06/15/2009 06:11 velorian#1
1. Advance Zone second map

Eh, I'm having problems finding it :D. (The one with Basilisks) it should be map 1217 but it is neither referred to -outside of the monster spawn db- nor can I find any instance of it in the game files, TQ release or otherwise. So how are you suppose to get to it O.o. The map that is currently set as AZ is very small with no spawns and no portals (1017) and most definitely isn't the correct one.

2. A quick example for storing values

Since I'm obviously new to C >.>. I am native to java so, while I know how it works and have a vague idea of how I want it set up, I'm not sure how to code it exactly.
What I want to do is set a specific map for each Boxer and Conductress so that when they are used, it stores the map ID and a set of coords as a variable and I can return to that location from the training grounds or market with something like
"Teleport(variable,0, CSocket);"
or
if variable =
Teleport(map,co,ord, 0, CSocket);
06/15/2009 06:32 Zeroxelli#2
@1
/gmove 1214 500 500

Map ID is 1214

@2
Make an int in the Entities/Character.cs, set it to
Code:
(int)CSocket.Client.Map;
every time you move to a new map (Scrolls, GC, etc. Just modify the teleport function to set it.) Then just refer to it later, i.e. you named it LastMap, Teleport(CSocket.Client.LastMap, X, Y, CSocket);
06/15/2009 07:20 velorian#3
Wouldn't that still return to a single set of co-ords though (a set determined by the npc instead of a variable)? It kept returning case errors too >.<

So I did things my half-assed long way, based on what you gave me :p
Add public ints:
Code:
public int LastMap;
public int Xc;
public int Yc;
Each conductress/boxer gets something like:
Code:
CSocket.Client.LastMap = 1002;CSocket.Client.Xc = 439;CSocket.Client.Yc = 390;
and any return npc gets the same thing regardless of which it is:
Code:
Teleport(Csocket.Client.LastMap,CSocket.Client.Xc,CSocket.Client.Yc, 0, CSocket);

I feel you had a shorter way though xD

Edit: on the AZ map bit, I checked that one earlier too but it's still not the one I was looking for T.T. I suppose the one I'm thinking of could be considered AZ 1 or 2 depending on which direction you're going. The one I want has one bridge at the diagonal with SeniorSerpents and something else on one side and Basilisks and AlienSerpents on the other. It's one map away from 1214 but I can't find it >.<
06/15/2009 07:26 Zeroxelli#4
Code:
public Dictionary<string, int> LastMap = new Dictionary<string, int>();
//...
CSocket.LastMap.Clear();
CSocket.LastMap.Add("map", (int)CSocket.Client.Map);
CSocket.LastMap.Add("x", CSocket.Client.X);
CSocket.LastMap.Add("y", CSocket.Client.Y);
//...
Teleport(CSocket.LastMap["map"], CSocket.LastMap["x"], CSocket.LastMap["y"], CSocket);
I just wrote that now, likely an easier way but that's the easiest I can think of in 10 seconds.

EDIT: Come to think of it;
Code:
public List<int> LastMap = new List<int>();
//...
CSocket.Client.LastMap = new List<int>(){(int)CSocket.Client.Map, CSocket.Client.X, CSocket.Client.Y};
//...
Teleport(CSocket.Client.LastMap[0], CSocket.Client.LastMap[1], CSocket.Client.LastMap[2], CSocket);
06/15/2009 20:58 andyd123#5
To answer your question,

the basi/serp/alienserp map is what is called an instanced/dynamic map.
It is a copy of the AC2 map, given an instanced/dynamic ID of 1217.

You'll have to setup a system like that for your server if you want to include access to those maps.
06/15/2009 23:26 velorian#6
Quote:
Originally Posted by andyd123 View Post
To answer your question,

the basi/serp/alienserp map is what is called an instanced/dynamic map.
It is a copy of the AC2 map, given an instanced/dynamic ID of 1217.

You'll have to setup a system like that for your server if you want to include access to those maps.
Mmmm... would be easier to move the spawns :(
Oh well.