summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorDastgir <dastgirpojee@rocketmail.com>2015-06-04 18:53:37 +0530
committerDastgir <dastgirpojee@rocketmail.com>2015-06-04 18:53:37 +0530
commit45b443ae81a813b04dcb497ccd6ee963ce048048 (patch)
tree84eeb253b3d6fdfd90e869b71c470b346f92a2b6 /src/map
parent5d83253484c92116580fd400eb77b8fe65f1b1f3 (diff)
downloadhercules-45b443ae81a813b04dcb497ccd6ee963ce048048.tar.gz
hercules-45b443ae81a813b04dcb497ccd6ee963ce048048.tar.bz2
hercules-45b443ae81a813b04dcb497ccd6ee963ce048048.tar.xz
hercules-45b443ae81a813b04dcb497ccd6ee963ce048048.zip
Implemented strcmp Function.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 19bc5262e..724b3b135 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -15490,6 +15490,14 @@ BUILDIN(compare)
return true;
}
+BUILDIN(strcmp)
+{
+ const char *str1 = script_getstr(st,2);
+ const char *str2 = script_getstr(st,3);
+ script_pushint(st,strcmp(str1, str2));
+ return true;
+}
+
// List of mathematics commands --->
BUILDIN(log10)
@@ -20076,6 +20084,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(countstr,"ss?"),
BUILDIN_DEF(setnpcdisplay,"sv??"),
BUILDIN_DEF(compare,"ss"), // Lordalfa - To bring strstr to scripting Engine.
+ BUILDIN_DEF(strcmp,"ss"),
BUILDIN_DEF(getiteminfo,"ii"), //[Lupus] returns Items Buy / sell Price, etc info
BUILDIN_DEF(setiteminfo,"iii"), //[Lupus] set Items Buy / sell Price, etc info
BUILDIN_DEF(getequipcardid,"ii"), //[Lupus] returns CARD ID or other info from CARD slot N of equipped item