====== Evol script commands ====== *chatjoin chatId [, char [,password]] Force player to join chat with id chatId. Example: chatjoin .chat; --------------------------------------- *setcamnpc [npcName [, x, y]] Enable camera moving mode in client and move camera to npc with name "npcName" and move relative from it in x and y pixels. If "npcName" is missing, using attached npc. If x and y missing, it count as 0. Example: setcamnpc 32, 0; setcamnpc "npc1"; --------------------------------------- *setcam x, y Move camera to absolute position x,y in pixels. Example: setcam 0, 0; setcam 2000, 512; --------------------------------------- *movecam x, y Enable camera moving mode in client and move camera relative to player position by x and y pixels. Example: movecam 10, 20; --------------------------------------- *restorecam Disable camera moving mode in client and set camera to default position. Example: restorecam; --------------------------------------- *npctalk3 text Send chat message from current npc, visible only for attached player. Npc name will be translated. Example: npctalk3 "hello"; --------------------------------------- *closedialog Will close npc dialog in client. If npc script will continue after this command, dialog can be opened again. Example: closedialog; --------------------------------------- *shop npcName Open if exists for attached player npc shop from npc with name "npcName" Example: shop "bag"; --------------------------------------- *getitemlink itemName [, cardName1 [, cardName2 [, cardName3 [, cardName4]]]] *getitemlink itemId [, cardName1 [, cardName2 [, cardName3 [, cardName4]]]] Return link for item id "itemId" or name "itemName" with cards. This link after can be used in mes or other commands what show messages in npc dialog. Example: mes "Acorn link: " + getitemlink(Acorn); mes getitemlink(VneckJumper, MintCashmereDye); --------------------------------------- *getinvindexlink index Return link to item by player inventory index. Also return cards in link. This link after can be used in mes or other commands what show messages in npc dialog. 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;