summaryrefslogtreecommitdiff
path: root/server/scripts
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-30 22:15:22 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-30 22:15:22 +0300
commit0f67be9c67b7ccf1b608d6c02f8fd1c0fe1b4b63 (patch)
tree94c10274b9e44bf2cf48dd749b3dd8cfa0dfc277 /server/scripts
parentb4fef367ff152e0804435b039c05f5e0566d4bf1 (diff)
downloaddocs-0f67be9c67b7ccf1b608d6c02f8fd1c0fe1b4b63.tar.gz
docs-0f67be9c67b7ccf1b608d6c02f8fd1c0fe1b4b63.tar.bz2
docs-0f67be9c67b7ccf1b608d6c02f8fd1c0fe1b4b63.tar.xz
docs-0f67be9c67b7ccf1b608d6c02f8fd1c0fe1b4b63.zip
Add some more script commands into evol script commands file.
Diffstat (limited to 'server/scripts')
-rw-r--r--server/scripts/evol_script_commands.txt248
1 files changed, 248 insertions, 0 deletions
diff --git a/server/scripts/evol_script_commands.txt b/server/scripts/evol_script_commands.txt
index b6f1c23..c43f57f 100644
--- a/server/scripts/evol_script_commands.txt
+++ b/server/scripts/evol_script_commands.txt
@@ -100,3 +100,251 @@ Inventory index counted from 0.
Example:
mes "link here: " + getinvindexlink(3);
+
+---------------------------------------
+
+*l text [, param1, ...]
+
+Return translated formatted string.
+Player must be attached.
+
+Example:
+ mes l("test line");
+ mes l("give me @@.", getitemlink(Acorn));
+
+---------------------------------------
+
+*lg femaleText, makeText, [, param1, ...]
+*lg text
+
+Return translated formatted string based on gender.
+Player must be attached.
+Translators will give text with #N.
+
+Example:
+ // translators will get two strings "i went to shop.#0" and "i went to shop.#1"
+ // with #0 for female and #1 for male
+ lg("i went to shop.");
+ lg("call her @@.", "call him @@.", "test");
+
+---------------------------------------
+
+*requestlang
+
+Return selected language in client to server.
+Player must be attached.
+
+Example:
+ .@lang = requestlang();
+
+---------------------------------------
+
+*requestitem
+
+Return selected item id by player. In client player move this item to npc.
+Player must be attached.
+
+Example:
+ .@item = requestitem();
+ mes "You gave me " + getitemlink(.@item);
+
+---------------------------------------
+
+*requestitems [n]
+
+Return n items from player what he moved to npc inventory separated by ";".
+If n missing it mean 1.
+Better not use this command. Better use requestcraft.
+Player must be attached.
+
+Example:
+ .@str$ = requestitems();
+ .@str$ = requestitems(3);
+
+---------------------------------------
+
+*requestitemindex
+
+Return inventory index for selected item by player. In client player move this item to npc.
+Player must be attached.
+
+Example:
+ .@item = requestitemindex();
+
+---------------------------------------
+
+*requestitemsindex [n]
+
+Return inventory indexes for n items from player what he moved to npc inventory separated by ";".
+If n missing it mean 1.
+Player must be attached.
+
+Example:
+ .@str$ = requestitemsindex();
+ .@str$ = requestitemsindex(3);
+
+---------------------------------------
+
+*requestcraft [n]
+
+Request selected craft items in string format.
+n is craft inventory size. If n missing, it mean 1.
+After this string must be validated and converted to craft object
+Player must be attached.
+
+Example:
+ .@str$ = requestcraft(9);
+
+---------------------------------------
+
+*initcraft str
+
+Create craft object based on craft string sent from client.
+Return craft object id. Or -1 on error.
+After using, craft object must be deleted with function deletecraft.
+Player must be attached.
+
+Example:
+ .@str$ = requestcraft(9);
+ .@craft = initcraft(.@str$);
+ deletecraft(.@craft);
+
+---------------------------------------
+
+*dumpcraft id
+
+Dump to server console given craft object with id 'id'.
+Player must be attached.
+
+Example:
+ .@str$ = requestcraft(9);
+ .@craft = initcraft(.@str$);
+ dumpcraft(.@craft);
+ deletecraft(.@craft);
+
+---------------------------------------
+
+*deletecraft id
+
+Delete craft object.
+Player must be attached.
+
+Example:
+ .@str$ = requestcraft(9);
+ .@craft = initcraft(.@str$);
+ deletecraft(.@craft);
+
+---------------------------------------
+
+*findcraftentry id, flag
+
+Search craft entry in craft db for craft object with id 'id' and flag 'flag'.
+Retrun craft entry id what was found. If error happend, return -1.
+Player must be attached.
+
+Example:
+ .@str$ = requestcraft(9);
+ .@craft = initcraft(.@str$);
+ .@entry = findcraftentry(.@craft, 0);
+ deletecraft(.@craft);
+
+---------------------------------------
+
+*usecraft id
+
+This command can be used after checked craft object and found craft entry.
+It apply craft entry. May delete or give items and do other things.
+Player must be attached.
+
+Example:
+ .@str$ = requestcraft(9);
+ .@craft = initcraft(.@str$);
+ .@entry = findcraftentry(.@craft, 0);
+ usecraft .@craft;
+ deletecraft(.@craft);
+
+---------------------------------------
+
+*getcraftcode id
+
+After craft object was used by function usecraft, this function based on craft entry id
+can return special number configured for craft entry in craft db.
+Based on this value script may do additional things.
+Player must be attached.
+
+Example:
+ .@str$ = requestcraft(9);
+ .@craft = initcraft(.@str$);
+ .@entry = findcraftentry(.@craft, 0);
+ usecraft .@craft;
+ .@code = getcraftcode(.@entry);
+ deletecraft(.@craft);
+
+---------------------------------------
+
+*getcraftslotid id, slot
+
+Return item id selected in craft object 'id' and in slot 'slot'.
+On error return 0.
+Player must be attached.
+
+Example:
+ .@str$ = requestcraft(9);
+ .@craft = initcraft(.@str$);
+ .@item = getcraftslotid(.@craft, 0);
+ deletecraft(.@craft);
+
+---------------------------------------
+
+*getcraftslotamount id, slot
+
+Return amount selected in craft object 'id' and in slot 'slot'.
+On error return 0.
+Player must be attached.
+
+Example:
+ .@str$ = requestcraft(9);
+ .@craft = initcraft(.@str$);
+ .@item = getcraftslotid(.@craft, 0);
+ .@amount = getcraftslotamount(.@craft, 0);
+ deletecraft(.@craft);
+
+---------------------------------------
+
+*validatecraft id
+
+Validate craft object and current player inventory.
+It can be used after "next" command between init and use craft.
+Return 0 if craft object now invalid, 1 if craft object can be used for player.
+Player must be attached.
+
+Example:
+ .@str$ = requestcraft(9);
+ .@craft = initcraft(.@str$);
+ next;
+ if (valudatecraft(.@craft) == 0)
+ {
+ deletecraft(.@craft);
+ close;
+ }
+ .@item = getcraftslotid(.@craft, 1);
+ deletecraft(.@craft);
+
+---------------------------------------
+
+*getq quest
+
+Return quest state for attached player.
+
+Example:
+ mes getq(ShipQuests_Julia);
+
+---------------------------------------
+
+*setq quest, value
+
+Set quest state for attached player.
+
+Example:
+ setq ShipQuests_Julia, 1;
+