Clare 0 Posted December 12, 2014 (edited) Hey guysi'm using the mapflag "Zone" with this modification by AnnieRuru: http://herc.ws/board/topic/334-suggestion-for-restricted-equipment-making-a-new-conf-for-it/?p=31003 everything works perfectly, but here comes a problem ... It would not be possible to place the same map in two different zones? For example if the niflheim map is in the "Towns Zone" it will not receive the restriction of new "zones" that I put it. I need to put the niflheim map in a Custom Zone but without removing it from its Current "Towns Zone" and without adding new restrictions on other maps of "Towns Zone"...Then, How to make the same map were in two different zones? Edited December 12, 2014 by Suzuya Quote Share this post Link to post Share on other sites
jaBote 438 Posted December 13, 2014 You could create a new zone inheriting characteristics of another zone, but enabling or disabling other characteristics. Give it a try! Quote Share this post Link to post Share on other sites
Clare 0 Posted December 13, 2014 I have tried to do this, but if I create a new zone and put that inherit the characteristics of the zone "towns", all other maps belonging to the new zone will also be taken as towns ... I need to get only some maps of the Tonws zone and give them characteristics of my New Zone, but without the other maps of the zone Tonws inherit the characteristics of the new zone or the maps of the new zone inherit the characteristics of Tonws zone .. . I think the simplest would be to find a way to allow maps to be in more than one zone at the same time, is it possible to do this? Quote Share this post Link to post Share on other sites
jaBote 438 Posted December 13, 2014 Have you tried to remove the town mapflag on the other zone? mapname mapflag town off Quote Share this post Link to post Share on other sites
Clare 0 Posted December 14, 2014 (edited) JaBote think you do not understand me ... ok, lets explain again ... I have the mapflag "towns" and also have my new mapflag "NoAzoth" my mapflag restricts the use of Azoth item on some maps except in maps of "War of Emperium". If I put any map that is in any other zone in my "NoAzoth mapflag" these will not receive the restrictions of "NoAzoth", because they are already in other zone. For put the maps in my "mapflag NoAzoth" i need remove the maps of any area he was previously. Otherwise NOAzoth mapflag has no effect on these maps that are already in another zone So to put Nifheim to receive the restrictions of zone "NoAzoth" I need remove it from Tonws zone and put it in my zone "NoAzoth", but if I do that it will lose the benefits of zone "Tonws" and if I put the zone "NoAzoth" for inherit the characteristics of zone "Towns", all other maps belonging to zone NoAzoth also will receive this restriction of zone "Towns"... While I put the Towns zone inherit characteristics of the zone NoAzoth all maps of zone "towns" will have the restriction of NoAzoth area. And it's not what I want, because only some of the maps in zone "tonws" should receive the restriction without not to lose the characteristics of zone "tonws". So if I restrict zone Towns in zone "NoAzoth" as you suggested, all maps of zone "Towns" entering the zone "NoAzoth" lose the characteristics of zone "Towns", and I want some, I said some of the maps, have restrictions of the two zones, while others have restrictions only one. Edited December 14, 2014 by Suzuya Quote Share this post Link to post Share on other sites
Angelmelody 221 Posted December 14, 2014 (edited) niflheim mapflag zone Towns niflheim mapflag zone NoAzoth my test results are the zone 'NoAzoth' will overwrite zone 'Towns' if the map zone order is like above. and restrictions of NoAzoth are applied to niflheim , but Towns not. Edited December 14, 2014 by Angelmelody 1 Clare reacted to this Quote Share this post Link to post Share on other sites
Clare 0 Posted December 14, 2014 (edited) Angelmelody this is exactly what happens!!! but I can not put into a mapflag inherit characteristics from each other because in them there is not only the niftheim map, you could understand?So I want to do the two mapflags work together and not overwrit.you know how I do it? would need to edit the source? Edited December 14, 2014 by Suzuya Quote Share this post Link to post Share on other sites
jaBote 438 Posted December 14, 2014 I can't test but I think I already gave you an answer: src/map/npc.c /*========================================== * Set or disable mapflag on map * eg : bat_c01<TAB>mapflag<TAB>battleground<TAB>2 * also chking if mapflag conflict with another *------------------------------------------*/const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int *retval) { int16 m; char mapname[32]; int state = 1; // w1=<mapname> if( sscanf(w1, "%31[^,]", mapname) != 1 ) { ShowError("npc_parse_mapflag: Invalid mapflag definition in file '%s', line '%d'.n * w1=%sn * w2=%sn * w3=%sn * w4=%sn", filepath, strline(buffer,start-buffer), w1, w2, w3, w4); if (retval) *retval = EXIT_FAILURE; return strchr(start,'n');// skip and continue } m = map->mapname2mapid(mapname); if (m < 0) { ShowWarning("npc_parse_mapflag: Unknown map in file '%s', line '%d': %sn * w1=%sn * w2=%sn * w3=%sn * w4=%sn", filepath, strline(buffer,start-buffer), mapname, w1, w2, w3, w4); if (retval) *retval = EXIT_FAILURE; return strchr(start,'n');// skip and continue } if (w4 && !strcmpi(w4, "off")) state = 0; //Disable mapflag rather than enable it. [Skotlex] Just set the noazoth mapflag to off on the other zone that overwrites the first one. Quote Share this post Link to post Share on other sites
Clare 0 Posted December 14, 2014 (edited) I can't test but I think I already gave you an answer: src/map/npc.c /*========================================== * Set or disable mapflag on map * eg : bat_c01<TAB>mapflag<TAB>battleground<TAB>2 * also chking if mapflag conflict with another *------------------------------------------*/const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int *retval) { int16 m; char mapname[32]; int state = 1; // w1=<mapname> if( sscanf(w1, "%31[^,]", mapname) != 1 ) { ShowError("npc_parse_mapflag: Invalid mapflag definition in file '%s', line '%d'.n * w1=%sn * w2=%sn * w3=%sn * w4=%sn", filepath, strline(buffer,start-buffer), w1, w2, w3, w4); if (retval) *retval = EXIT_FAILURE; return strchr(start,'n');// skip and continue } m = map->mapname2mapid(mapname); if (m < 0) { ShowWarning("npc_parse_mapflag: Unknown map in file '%s', line '%d': %sn * w1=%sn * w2=%sn * w3=%sn * w4=%sn", filepath, strline(buffer,start-buffer), mapname, w1, w2, w3, w4); if (retval) *retval = EXIT_FAILURE; return strchr(start,'n');// skip and continue } if (w4 && !strcmpi(w4, "off")) state = 0; //Disable mapflag rather than enable it. [Skotlex] Just set the noazoth mapflag to off on the other zone that overwrites the first one. first: I do not want to disable the mapflag "zone towns", I want it to work with my mapflag "zone noazoth". Have you tried to remove the town mapflag on the other zone? mapname mapflag town off Second: the writing format of mapflag alb_ship mapflag zone towns "zone" is the mapflag if I put "zone off" all areas will be disabled on this map, the mapflag "zone" is different from the others mapflags, it works by creating zoning restrictions, but each zone is not a new mapflag, all are only a mapflag but restricting separate maps. for this if i put alb_ship mapflag zone towns off will not work! Edited December 14, 2014 by Suzuya Quote Share this post Link to post Share on other sites