summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-25 16:26:17 +0000
committerLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-25 16:26:17 +0000
commit59b77fd300765595d6fbf5333cc541f40c2f0cae (patch)
tree0df1df80b728f6cb89b16c4763d3a11007130e58
parent173a79cfb2cbba5e7b369e1349c0b1d1618b7ab6 (diff)
downloadhercules-59b77fd300765595d6fbf5333cc541f40c2f0cae.tar.gz
hercules-59b77fd300765595d6fbf5333cc541f40c2f0cae.tar.bz2
hercules-59b77fd300765595d6fbf5333cc541f40c2f0cae.tar.xz
hercules-59b77fd300765595d6fbf5333cc541f40c2f0cae.zip
added noVending mapflag. Tested. + custom Market Place NPC, fixed MSG strings
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6755 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--conf-tmpl/msg_athena.conf8
-rw-r--r--db/const.txt1
-rw-r--r--doc/script_commands.txt4
-rw-r--r--npc/Changelog.txt2
-rw-r--r--npc/custom/market.txt43
-rw-r--r--npc/scripts_custom.conf4
-rw-r--r--src/map/atcommand.c12
-rw-r--r--src/map/map.h1
-rw-r--r--src/map/npc.c3
-rw-r--r--src/map/script.c8
-rw-r--r--src/map/vending.c4
12 files changed, 82 insertions, 12 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 9f25d4bb7..46332b02e 100644
--- a/Changelog-Trunk.txt
+++ b/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
diff --git a/conf-tmpl/msg_athena.conf b/conf-tmpl/msg_athena.conf
index 46de6d187..6b2093486 100644
--- a/conf-tmpl/msg_athena.conf
+++ b/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
diff --git a/db/const.txt b/db/const.txt
index afdbbf1ce..5b41f0376 100644
--- a/db/const.txt
+++ b/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
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index e50adda07..da9a8227c 100644
--- a/doc/script_commands.txt
+++ b/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).
---------------------------------------
diff --git a/npc/Changelog.txt b/npc/Changelog.txt
index c7d23aca5..68f634136 100644
--- a/npc/Changelog.txt
+++ b/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]
diff --git a/npc/custom/market.txt b/npc/custom/market.txt
new file mode 100644
index 000000000..7cf84bb62
--- /dev/null
+++ b/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
diff --git a/npc/scripts_custom.conf b/npc/scripts_custom.conf
index 843e99113..88002b121 100644
--- a/npc/scripts_custom.conf
+++ b/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 \ No newline at end of file
+//npc: npc/custom/quests/lvl99_quest.txt
+// Disable shops in the Prontera streets and open a special market place.
+//npc/custom/market.txt \ No newline at end of file
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 0fd9a0d7f..c5a9baf50 100644
--- a/src/map/atcommand.c
+++ b/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;
}
diff --git a/src/map/map.h b/src/map/map.h
index 1035d014b..66315cadc 100644
--- a/src/map/map.h
+++ b/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];
diff --git a/src/map/npc.c b/src/map/npc.c
index 0d28b9699..37e47585c 100644
--- a/src/map/npc.c
+++ b/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;
}
diff --git a/src/map/script.c b/src/map/script.c
index ae509106d..d167f8230 100644
--- a/src/map/script.c
+++ b/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;
}
}
diff --git a/src/map/vending.c b/src/map/vending.c
index d47fa8ece..607cdc890 100644
--- a/src/map/vending.c
+++ b/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;