summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-11 05:01:48 +0000
committerLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-11 05:01:48 +0000
commit22cb0f6ae50bedfe84c8f79f1835b116a9f04660 (patch)
treef4c881d1a5db74709e5f37e3c768d27e4542fea9
parent8675bbad09d98c3470b2fce314e92f9af9ceed93 (diff)
downloadhercules-22cb0f6ae50bedfe84c8f79f1835b116a9f04660.tar.gz
hercules-22cb0f6ae50bedfe84c8f79f1835b116a9f04660.tar.bz2
hercules-22cb0f6ae50bedfe84c8f79f1835b116a9f04660.tar.xz
hercules-22cb0f6ae50bedfe84c8f79f1835b116a9f04660.zip
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8698 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--doc/script_commands.txt4
-rw-r--r--src/map/atcommand.c1
-rw-r--r--src/map/script.c15
4 files changed, 15 insertions, 10 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index d648c91a7..0b259838a 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,11 @@ 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/09/10
+ * Thanks to KarLaeda, added missing function in @showmobs [Lupus]
+ - Script function 'query_sql': In the TXT version it doesn't fill the array
+ and always return -1. Added for scripts compatibility. Your scripts
+ won't crash in TXT version. They can work it around.
+ I suggest we need a function getversion()
* Updated item_db.sql and mob_db.sql [Playtester]
2006/09/09
* Added a crash protection in case mapfreeblock unlock tries to free a null
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index cb91478e0..48b5c591e 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -9,7 +9,7 @@
//= Maeki Rika - A section on general concepts and lots of
//= other updates and additions.
//===== Version ===========================================
-//= 2.7c
+//= 2.8a
//=========================================================
//= 1.0 - First release, filled will as much info as I could
//= remember or figure out, most likely there are errors,
@@ -5031,7 +5031,7 @@ mes "3."+@name$[2]+"("+@fame[2]+")";
mes "4."+@name$[3]+"("+@fame[3]+")";
mes "5."+@name$[4]+"("+@fame[4]+")";
-Note: It is available in SQL version only.
+Note: In the TXT version it doesn't fill the array and always return -1.
Note: Use Text$[] array to recieve all data as text.
---------------------------------------
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index d99f8efd2..57a439885 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -10905,6 +10905,7 @@ void do_init_atcommand() {
users_db = db_alloc(__FILE__,__LINE__,DB_UINT,DB_OPT_BASE,sizeof(int));
duel_count = 0;
malloc_tsetdword(&duel_list[0], 0, sizeof(duel_list));
+ add_timer_func_list(atshowmobs_timer, "atshowmobs_timer");
return;
}
diff --git a/src/map/script.c b/src/map/script.c
index 168cfb857..4bd8d4186 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -85,7 +85,7 @@ static struct dbt *userfunc_db=NULL;
struct dbt* script_get_label_db(){ return scriptlabel_db; }
struct dbt* script_get_userfunc_db(){ return userfunc_db; }
-static char pos[11][100] = {"頭","体","左手","右手","ローブ","靴","アクセサリー1","アクセサリー2","頭2","頭3","装着していない"};
+static char pos[11][100] = {"Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3","Not Equipped"};
struct Script_Config script_config;
static int parse_cmd;
@@ -3526,10 +3526,8 @@ int buildin_equip(struct script_state *st);
int buildin_autoequip(struct script_state *st);
int buildin_setbattleflag(struct script_state *st);
int buildin_getbattleflag(struct script_state *st);
-#ifndef TXT_ONLY
int buildin_query_sql(struct script_state *st);
int buildin_escape_sql(struct script_state *st);
-#endif
int buildin_atoi(struct script_state *st);
int buildin_axtoi(struct script_state *st);
// [zBuffer] List of player cont commands --->
@@ -3867,10 +3865,8 @@ struct script_function buildin_func[] = {
{buildin_undisguise,"undisguise","i"}, //undisguise player. Lupus
{buildin_getmonsterinfo,"getmonsterinfo","ii"}, //Lupus
{buildin_axtoi,"axtoi","s"},
-#ifndef TXT_ONLY
{buildin_query_sql, "query_sql", "s*"},
{buildin_escape_sql, "escape_sql", "s"},
-#endif
{buildin_atoi,"atoi","s"},
// [zBuffer] List of player cont commands --->
{buildin_rid2name,"rid2name","i"},
@@ -11215,8 +11211,8 @@ int buildin_setd(struct script_state *st)
return 0;
}
-#ifndef TXT_ONLY
int buildin_query_sql(struct script_state *st) {
+#ifndef TXT_ONLY
char *name = NULL, *query;
int num, i = 0,j, nb_rows;
struct { char * dst_var_name; char type; } row[32];
@@ -11248,7 +11244,7 @@ int buildin_query_sql(struct script_state *st) {
if (nb_rows > 32)
{
- ShowWarning("buildin_query_sql: too much rows!\n");
+ ShowWarning("buildin_query_sql: too many rows!\n");
push_val(st->stack,C_INT,0);
return 1;
}
@@ -11286,6 +11282,10 @@ int buildin_query_sql(struct script_state *st) {
mysql_free_result(sql_res);
}
push_val(st->stack, C_INT, i);
+#else
+ //for TXT version, we always return -1
+ push_val(st->stack, C_INT, -1);
+#endif
return 0;
}
@@ -11299,7 +11299,6 @@ int buildin_escape_sql(struct script_state *st) {
push_str(st->stack,C_STR,(unsigned char *)t_query);
return 0;
}
-#endif
int buildin_getd (struct script_state *st)
{