소스 검색

added noVending mapflag. Tested. + custom Market Place NPC, fixed MSG strings

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6755 54d463be-8e91-2dee-dedb-b68131a5f0ec
Lupus 19 년 전
부모
커밋
d5dd578e57
12개의 변경된 파일82개의 추가작업 그리고 12개의 파일을 삭제
  1. 4 0
      Changelog-Trunk.txt
  2. 5 3
      conf-tmpl/msg_athena.conf
  3. 1 0
      db/const.txt
  4. 2 2
      doc/script_commands.txt
  5. 2 0
      npc/Changelog.txt
  6. 43 0
      npc/custom/market.txt
  7. 3 1
      npc/scripts_custom.conf
  8. 7 5
      src/map/atcommand.c
  9. 1 0
      src/map/map.h
  10. 3 0
      src/map/npc.c
  11. 7 1
      src/map/script.c
  12. 4 0
      src/map/vending.c

+ 4 - 0
Changelog-Trunk.txt

@@ -4,6 +4,10 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/05/25
+	* Resolved differences between Stable/Trunk msg_athena.conf. [Lupus]
+		Fixed atcommand @request MSG numbers accordinly.
+		On adding new MSG strings, plzm reserve them in STABLE msg_athena.conf, too
+	* Added NoVending mapflag. You may disable vending in the streets [Lupus]
 	* Increased capacity for Account Variables to 64 [Skotlex]
 	* Reverted Intravision implementation to that of stable's. [Skotlex]
 	* Corrected Login Server taking it's first argument as both login config

+ 5 - 3
conf-tmpl/msg_athena.conf

@@ -284,9 +284,11 @@
 272: You can't trade on this map
 273: Commands available:
 274: %d commands found.
-275: Usage: @request <petition/message to online GMs>.
-276: (@request): %s
-277: @request sent.
+275: No commands found.
+276: You can't open shop on this map
+277: Usage: @request <petition/message to online GMs>.
+278: (@request): %s
+279: @request sent.
 // Guild Castles Number
 // --------------------
 299: ?? Castles

+ 1 - 0
db/const.txt

@@ -130,6 +130,7 @@ mf_nocommand	37
 mf_nodrop	38
 mf_jexp		39
 mf_bexp		40
+mf_novending	41
 
 cell_wall	1
 cell_water	3

+ 2 - 2
doc/script_commands.txt

@@ -3753,8 +3753,8 @@ mf_noteleport, mf_nowarp, mf_nogo) storing location when disconnected
 (mf_nosave), dead branch usage (mf_nobranch), penalties upon death 
 (mf_nopenalty, mf_nozenypenalty), PVP behavior (mf_pvp, mf_pvp_noparty, 
 mf_pvp_noguild, mf_nopvp), WoE behavior (mf_gvg,mf_gvg_noparty), ability to use 
-skills or open up trade deals (mf_notrade, mf_noskill, mf_noicewall), current 
-weather effects (mf_snow, mf_fog, mf_sakura, mf_leaves, mf_rain, mf_clouds, 
+skills or open up trade deals (mf_notrade, mf_novending, mf_noskill, mf_noicewall),
+current weather effects (mf_snow, mf_fog, mf_sakura, mf_leaves, mf_rain, mf_clouds, 
 mf_fireworks) and whether day/night will be in effect on this map (mf_indoors).
 
 ---------------------------------------

+ 2 - 0
npc/Changelog.txt

@@ -31,6 +31,8 @@ Evera
 Date		Added
 ======
 05/25
+	* Added a custom Market Place to clear Prontera streets from annoying shops. [Lupus]
+		'novending' mapflag sample: Try it and adjust the script as you want. 
 	* Optimized a bit scripted warps, got rid of 'anthell' perm var [Lupus]
 05/24
 	* Removed Blue Potions from Yuno Shops [Playtester]

+ 43 - 0
npc/custom/market.txt

@@ -0,0 +1,43 @@
+//===== Athena Script =======================================
+//= Market Place
+//===== By ================================================
+//= Lupus
+//===== Version ===========================================
+//= 1.0
+//===== Compatible With ===================================
+//= eAthena 5760+
+//===== Description =======================================
+//= This script should move vending crowds from Prontera
+//= streets to a suitable market place. Save your traffic 8)
+//===== Comments ==========================================
+// No comments yet
+//=========================================================
+
+
+prontera.gat,144,174,3	script	Market Place	722,{
+	mes"[Market Place]";
+	mes"Tristan III's order: ^FF0000Move all the private shops to a special Market Place^000000.";
+	next;
+	menu "Enter the Market",M_ENTER, "Cancel",-;
+	close2;
+	end;
+
+M_ENTER:
+	if(rand(10)==0 && checkcart(0) && @mrketflg<30 && @mrketflg>5 && getcharid(2)>1) FlagEmblem getcharid(2);
+	warp "gon_test",27+rand(5),98;
+	set @mrketflg,@mrketflg+1;
+	end;
+}
+
+gon_test,73,103,0	script	MarketExit	45,1,2,{
+	warp "prontera.gat",155,177-rand(10);
+	end;
+}
+
+//disable vending in Prontera
+prontera.gat	mapflag	novending
+prt_in.gat	mapflag	novending
+//Market Place settings
+gon_test	mapflag	noteleport
+gon_test	mapflag	nomemo
+gon_test	mapflag	nobranch

+ 3 - 1
npc/scripts_custom.conf

@@ -125,4 +125,6 @@ npc: npc/custom/adoption.txt
 //Nice Custom thanatos Tower Statues Quest
 //npc: npc/custom/quests/tha_statues.txt
 // -- A quest for Jewel Case for 99 Level Players of any 2nd Class
-//npc: npc/custom/quests/lvl99_quest.txt
+//npc: npc/custom/quests/lvl99_quest.txt
+// Disable shops in the Prontera streets and open a special market place.
+//npc/custom/market.txt

+ 7 - 5
src/map/atcommand.c

@@ -5759,18 +5759,20 @@ int atcommand_mapinfo(
 		strcat(atcmd_output, "NoBranch | ");
 	if (map[m_id].flag.notrade)
 		strcat(atcmd_output, "NoTrade | ");
+	if (map[m_id].flag.novending)
+		strcat(atcmd_output, "NoVending | ");
 	if (map[m_id].flag.nodrop)
 		strcat(atcmd_output, "NoDrop | ");
 	if (map[m_id].flag.noskill)
 		strcat(atcmd_output, "NoSkill | ");
 	if (map[m_id].flag.noicewall)
 		strcat(atcmd_output, "NoIcewall | ");
-	if (map[m_id].flag.nocommand)
-		strcat(atcmd_output, "NoCommand | ");
 		
 	clif_displaymessage(fd, atcmd_output);
 
 	strcpy(atcmd_output,"Other Flags: ");
+	if (map[m_id].flag.nocommand)
+		strcat(atcmd_output, "NoCommand | ");
 	if (map[m_id].flag.nobaseexp)
 		strcat(atcmd_output, "NoBaseEXP | ");
 	if (map[m_id].flag.nojobexp)
@@ -10285,14 +10287,14 @@ int atcommand_request(
 	const char* command, const char* message)
 {
 	if (!message || !*message) {
-		clif_displaymessage(sd->fd,msg_txt(275));
+		clif_displaymessage(sd->fd,msg_txt(277));
 		return -1;
 	}
 
-	sprintf(atcmd_output, msg_txt(276), message);
+	sprintf(atcmd_output, msg_txt(278), message);
 	intif_wis_message_to_gm(sd->status.name, lowest_gm_level, atcmd_output);
 	clif_disp_onlyself(sd, atcmd_output, strlen(atcmd_output));
-	clif_displaymessage(sd->fd,msg_txt(277));
+	clif_displaymessage(sd->fd,msg_txt(279));
 	return 0;
 }
 

+ 1 - 0
src/map/map.h

@@ -1079,6 +1079,7 @@ struct map_data {
 		unsigned restricted	: 1; // [Komurka]
 		unsigned nocommand : 1; //Blocks @/# commands for non-gms. [Skotlex]
 		unsigned nodrop : 1;
+		unsigned novending : 1;
 	} flag;
 	struct point save;
 	struct npc_data *npc[MAX_NPC_PER_MAP];

+ 3 - 0
src/map/npc.c

@@ -2376,6 +2376,9 @@ static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4)
 	else if (strcmpi(w3,"notrade")==0) {
 		map[m].flag.notrade=state;
 	}
+	else if (strcmpi(w3,"novending")==0) {
+		map[m].flag.novending=state;
+	}
 	else if (strcmpi(w3,"nodrop")==0) {
 		map[m].flag.nodrop=state;
 	}

+ 7 - 1
src/map/script.c

@@ -6860,7 +6860,7 @@ enum {  MF_NOMEMO,MF_NOTELEPORT,MF_NOSAVE,MF_NOBRANCH,MF_NOPENALTY,MF_NOZENYPENA
 	MF_NOWARP,MF_FREE,MF_NOICEWALL,MF_SNOW,MF_FOG,MF_SAKURA,MF_LEAVES,MF_RAIN,
 	MF_INDOORS,MF_NOGO,MF_CLOUDS,MF_CLOUDS2,MF_FIREWORKS,MF_GVG_CASTLE,MF_GVG_DUNGEON,MF_NIGHTENABLED,
 	MF_NOBASEEXP, MF_NOJOBEXP, MF_NOMOBLOOT, MF_NOMVPLOOT, MF_NORETURN, MF_NOWARPTO, MF_NIGHTMAREDROP,
-	MF_RESTRICTED, MF_NOCOMMAND, MF_NODROP, MF_JEXP, MF_BEXP };
+	MF_RESTRICTED, MF_NOCOMMAND, MF_NODROP, MF_JEXP, MF_BEXP, MF_NOVENDING };
 
 int buildin_setmapflagnosave(struct script_state *st)
 {
@@ -7016,6 +7016,9 @@ int buildin_setmapflag(struct script_state *st)
 			case MF_BEXP:
 				map[m].bexp = (!val || atoi(val) < 0) ? 100 : atoi(val);
 				break;
+			case MF_NOVENDING:
+				map[m].flag.novending=1;
+				break;
 		}
 	}
 
@@ -7152,6 +7155,9 @@ int buildin_removemapflag(struct script_state *st)
 			case MF_BEXP:
 				map[m].bexp=100;
 				break;
+			case MF_NOVENDING:
+				map[m].flag.novending=0;
+				break;
 		}
 	}
 

+ 4 - 0
src/map/vending.c

@@ -205,6 +205,10 @@ void vending_openvending(struct map_session_data *sd,int len,char *message,int f
 	int vending_skill_lvl;
 	nullpo_retv(sd);
 
+	if (map[sd->bl.m].flag.novending) {
+		clif_displaymessage (sd->fd, msg_txt(276));
+		return; //Can't vend in novending mapflag maps.
+	}
 	//check shopname len
 	if(message[0] == '\0')
 		return;