summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-04 20:23:22 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-04 22:56:41 +0300
commitd6b5551bff867250edcdc36455ef32844ee2b935 (patch)
tree16acaf1c9a81b58ceb21bc4524a087c14f23735f /npc/functions
parent905dada713af49bb610177c4842685628a1c0a97 (diff)
downloadserverdata-d6b5551bff867250edcdc36455ef32844ee2b935.tar.gz
serverdata-d6b5551bff867250edcdc36455ef32844ee2b935.tar.bz2
serverdata-d6b5551bff867250edcdc36455ef32844ee2b935.tar.xz
serverdata-d6b5551bff867250edcdc36455ef32844ee2b935.zip
convert server data for using with hercules.
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/inventoryplace.txt2
-rw-r--r--npc/functions/main.txt44
-rw-r--r--npc/functions/savepoint.txt2
3 files changed, 46 insertions, 2 deletions
diff --git a/npc/functions/inventoryplace.txt b/npc/functions/inventoryplace.txt
index b2bae19c..c2f95c5c 100644
--- a/npc/functions/inventoryplace.txt
+++ b/npc/functions/inventoryplace.txt
@@ -13,7 +13,7 @@
function script InventoryPlace {
getinventorylist;
set @iteminfo, getiteminfo(getarg(0), 2);
- set @countitem, countitem(getarg(0));
+ set @countitem, countitemcolor(getarg(0));
if (checkweight(getarg(0), getarg(1)) == 0) goto L_Warn;
if ((@iteminfo < 4) && (@countitem == 0) && (@inventorylist_count < 100)) return;
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
new file mode 100644
index 00000000..67677d1a
--- /dev/null
+++ b/npc/functions/main.txt
@@ -0,0 +1,44 @@
+// Evol functions.
+// Authors:
+// 4144
+// Description:
+// Build in functions.
+
+function script menuimage {
+ return getarg(0) + "|" + getarg(1);
+}
+
+function script mesn {
+ if (getargcount() > 0)
+ {
+ .@s$ = "[" + getarg(0) + "]";
+ }
+ else
+ {
+ .@s$ = "[" + strnpcinfo(1) + "]";
+ }
+ mes .@s$;
+ return;
+}
+
+function script mesq {
+ mes "\"" + getarg(0)+ "\"";
+ return;
+}
+
+function script g {
+ mes Sex == 0 ? getarg(0) : getarg(1);
+ return;
+}
+
+function script lg {
+ mes Sex == 0 ? l(getarg(0)) : l(getarg(1));
+ return;
+}
+
+function script col {
+ .@color = getarg(1);
+ if (.@color < 0) .@color = 0;
+ if (.@color > 9) .@color = 9;
+ return "##" + .@color + getarg(0) + "##0";
+}
diff --git a/npc/functions/savepoint.txt b/npc/functions/savepoint.txt
index 5e8838fa..20785708 100644
--- a/npc/functions/savepoint.txt
+++ b/npc/functions/savepoint.txt
@@ -13,5 +13,5 @@ function script SavePoint {
message strcharinfo(0), "Your position has been saved.";
savepoint getarg(0), getarg(1), getarg(2);
- misceffect 4, getcharid(3);
+ misceffect2 4, getcharid(3);
}