Language System

@create Language v2

@lock/Basic Language v2==

@lset Language v2/Basic=no_inherit

@set Language v2 = SAFE

@set Language v2 = WIZARD

& Language v2=

& Language v2=

& Language v2=

@DESCRIBE Language v2=The +speak language system v2.0. Please see [ansi(hy,+speak)] for instructions.

@set Language v2/DESCRIBE=no_command visual

&EVEN Language v2=[not(u(odd,v(0)))]

&FORMAT Language v2=[match(" / : ;,[%q1])]

&HELP Language v2=$+speak:th [pemit(%#,[ansi(hm,[repeat(^,78)])]%r[ansi(hy,[center(+speak system v2.0,78)])]%r%r+speak/languages%t%t%t%tThe list of languages%r+speak =" | |...%tStarts with "You say,..."%r+speak =/ | |...%tAn emitted pose%r+speak =: | |...%tA pose with a space after the name%r+speak =; | |...%tA pose without a space after the name%r%r[center( may be a fragment of the language's name.,78)]%r[center(You may have as many and arguments,78)]%r[center(as you want so long as they are alternating and are separated by pipes.,78)]%r[center(For examples%, see +SPEAK/EXAMPLE.,78)]%r%r[center(What's coming in v2.5 (+SPEAK/2.5),78)]%r[center(Comments\, suggestions\, complaints: Chalice@OtherSpace,78)]%r[center(Credits: Vlad@OtherSpace%b%b%bversion 1.0,78)]%r[ansi(hm,[repeat(^,78)])])]

&HELP2 Language v2=$+speak/admin:th [pemit(%#,MAINTAINING +SPEAK%r%rRight now, I have no nifty commands coded up yet for adding languages or words for admin in general, but I have made it easier for wizards to reset the necessary attributes in order to do so as a stop-gap measure. If you wish to add more words to a language, simply find the attribute with the language's name, and then reset it with the new words appended. If you wish to add a language, set a new attribute with the language's name on the language v2 object and add the language to the LIST attribute.%r)]

&LANGUAGE Language v2=[match(v(list),*[%q0]*)]

&LIST Language v2=

&ODD Language v2=[if(eq(mod(v(0),2),1),1,0)]

&PROCESS Language v2=[iter(v(0),[index(v(%q9),,[rand(words(v(%q9)))],1)])]

&ROLL Language v2=[or(gte(getskill(v(0),index(v(list),,%q4,1)),5),gte([add(4df,[getskill(v(0),index(v(list),,%q4,1))])],5))]

(Currently the system uses the getskill function that comes with the Jointhesaga.com FUDGE-based coded skill system, but the ROLL and SPEAK attributes can be modified to work with your system too.)

&SPEAK Language v2=$+speak *=?*:[setq(8,0)][setq(0,%0)][setq(1,%1)][setq(2,edit(%2,\,,\\\,))][setq(3,words(%q2,|))][setq(4,u(language))][setq(5,u(format))][if(eq(%q4,0),[pemit(%#,[ansi(y,There is no language match for '%q0'. See +SPEAK for instructions.)])],[setq(9,index(v(list),,%q4,1))][if(not(u(roll,%#)),[pemit(%#,[ansi(y,You can't pronounce your words right! Try again Obi-Wan!)])],[if(eq(%q5,0),[pemit(%#,[ansi(y,I do not know how you wish your pose to be formatted. See +SPEAK for instructions.)])],[setq(6,u(translate))][switch(%q5,1,[pemit(%#,You say, [ansi(y,"[first(edit(%q2,\\\,,\,),|)])] [iter(rest(edit(%q2,\\\,,\,),|),[if(u(even,%q8),[##%b][setq(8,1)],[ansi(y,##%b)][setq(8,0)])],|,)])][iter(pcon(loc(%#)),[if(not(strmatch(##,%#)),[if(u(roll,##),[pemit(##,In [capstr(%q9)], %N says, [ansi(y,"[first(edit(%q2,\\\,,\,),|)])] [iter(rest(edit(%q2,\\\,,\,),|),[if(u(odd,%q8),[ir(0)]%b[setq(8,0)],[ansi(y,[ir(0)]%b)][setq(8,1)])],|,)])],[pemit(##,%N says, "[first(%q6,|)]" [iter(rest(%q6,|),[if(u(even,[iv(0)]),"[ir(0)]"%b,[ir(0)]%b)],|,)])])])])],2,[pemit(%#,[iter(%q2,[if(u(even,%q8),[##%b][setq(8,1)],[ansi(y,##%b)][setq(8,0)])],|,)])][iter(pcon(loc(%#)),[if(not(strmatch(##,%#)),[if(u(roll,##),[pemit(##,In [capstr(%q9)]: [iter(edit(%q2,\\\,,\,),[if(u(even,%q8),[ir(0)]%b[setq(8,1)],[ansi(y,[ir(0)]%b)][setq(8,0)])],|,)])],[pemit(##,[iter(%q6,[if(u(even,[iv(0)]),"[ir(0)]"%b,[ir(0)]%b)],|,)])])])])],3,[pemit(%#,%N [iter(edit(%q2,\\\,,\,),[if(u(even,%q8),[##%b][setq(8,1)],[ansi(y,##%b)][setq(8,0)])],|,)])][iter(pcon(loc(%#)),[if(not(strmatch(##,%#)),[if(u(roll,##),[pemit(##,In [capstr(%q9)]: %N [iter(edit(%q2,\\\,,\,),[if(u(even,%q8),[ir(0)]%b[setq(8,1)],[ansi(y,[ir(0)]%b)][setq(8,0)])],|,)])],[pemit(##,%N [iter(%q6,[if(u(even,[iv(0)]),"[ir(0)]"%b,[ir(0)]%b)],|,)])])])])],4,[pemit(%#,%N[iter(edit(%q2,\\\,,\,),[if(u(even,%q8),[##%b][setq(8,1)],[ansi(y,##%b)][setq(8,0)])],|,)])][iter(pcon(loc(%#)),[if(not(strmatch(##,%#)),[if(u(roll,##),[pemit(##,In [capstr(%q9)]: %N[iter(edit(%q2,\\\,,\,),[if(u(even,%q8),[ir(0)]%b[setq(8,1)],[ansi(y,[ir(0)]%b)][setq(8,0)])],|,)])],[pemit(##,%N[iter(%q6,[if(u(even,[iv(0)]),"[ir(0)]"%b,[ir(0)]%b)],|,)])])])])],[pemit(%#,[ansi(hy,Error in the +speak system. Please @mail Chalice.)])])])])])]

&SPEAK.EX Language v2=$+speak/example:th [pemit(%#,%r+SPEAK EXAMPLE%r%r> +speak dem="Put your honor where your words lie, and fight me!"|He twitches a whisker before turning to the human. "If you'll excuse us, general, we have some business to take care of."%r%rWhat you see: You say, [ansi(y,"Put your honor where your words lie, and fight me!")] He twitches a whisker before turning to the human. "If you'll excuse us, general, we have some business to take care of."%r%rWhat others who DO NOT have the language see:%rSunblade says, "phuurrr phuurrr Tthhhfft raWll mrrrroowl raWll mralla mralla Grwawwl" He twitches a whisker before turning to the human. "If you'll excuse us, general, we have some business to take care of."%r%rWhat others who DO have the language see:%rIn Demarese, Sunblade says, [ansi(y,"Put your honor where your words lie, and fight me!")] He twitches a whisker before turning to the human. "If you'll excuse us, general, we have some business to take care of."%r%rSee +SPEAK/EXAMPLE2 for more%r)]

&SPEAK.EX2 Language v2=$+speak/example2:th [pemit(%#,%r+SPEAK EXAMPLE2%r%r> +speak dem=/All of a sudden, Sunblade whirls around and stabs an accusatory claw toward her, growling,|"Do not play with me, yearling!"%r%rWhat you see: All of a sudden, Sunblade whirls around and stabs an accusatory claw toward her, growling, [ansi(y,"Do not play with me, yearling!")]%r%rWhat others who DO NOT have the language see:%rAll of a sudden, Sunblade whirls around and stabs an accusatory claw toward her, growling, "phuurrr mrrrroowl Rrawl mrrrroowl m'Mroowll phuurrr"%r%rWhat other who DO have the language see:%rIn Demarese: All of a sudden, Sunblade whirls around and stabs an accusatory claw toward her, growling, [ansi(y,"Do not play with me, yearling!")]%r%rSee +SPEAK/EXAMPLE3 for more%r)]

&SPEAK.EX3 Language v2=$+speak/example3:th [pemit(%#,%r+SPEAK EXAMPLE3%r%r> +speak dem=:yelps as his arm is pecked at by the hulking dribgib.|"Stop that, you fiend!"|he cries out as he smacks it with a palm frond.%r%rWhat you see: Sunblade yelps as his arm is pecked at by the hulking dribgib. [ansi(y,"Stop that, you fiend!")] he cries out as he smacks it with a palm frond.%r%rWhat others who DO NOT have the language see:%rSunblade yelps as his arm is pecked at by the hulking dribgib. "phuurrr mralla PruurRrr Rrawl" he cries out as he smacks it with a palm frond.%r%rWhat others who DO have the language see:%rIn Demarese: Sunblade yelps as his arm is pecked at by the hulking dribgib. [ansi(y,"Stop that\, you fiend!")] he cries out as he smacks it with a palm frond.%r%rSee +SPEAK/EXAMPLE4 for more%r)]

&SPEAK.EX4 Language v2=$+speak/example4:th [pemit(%#,%r+SPEAK EXAMPLE4%r%r> +speak zan=;'s pecking does not relent in the slightest.|"Me no dribgib. You no bash Urf. Urf basheded you. Urf besterer basheder."%r%rWhat you see: Urfkgar's pecking does not relent in the slightest. [ansi(y,"Me no dribgib. You no bash Urf. Urf basheded you. Urf besterer basheder.")]%r%rWhat others who DO NOT have the language see:%Urfkgar's pecking does not relent in the slightest. "hishHssh Iss ssssiiiss cathuth Iss sthacuff chufffff chufffff sthacuff cathuth hitth chufffff"%r%rWhat others who DO have the language see:%rIn Zantra: Urfkgar's pecking does not relent in the slightest. [ansi(y,"Me no dribgib. You no bash Urf. Urf basheded you. Urf besterer basheder.")]%r)]

&SPEAK.LANG Language v2=$+speak/languages:th [pemit(%#,[ansi(hy,The following languages are available:)][iter(sort(v(list)),%r[capstr(##)])])]

&TRANSLATE Language v2=[if(eq([%q5],1),[iter([%q2],[if(u(odd,#@),u(process,##),##)],|,|)],[iter([%q2],[if(u(even,#@),u(process,##),##)],|,|)])]

&VERSION2.5 Language v2=$+speak/2.5:th [pemit(%#,%rIn the near future, I will be working to 'pad' +speak with the following, additional features, if possible:%r%r- The translation of punctuation along with the words in the parts that people who DO NOT have the language see.%r- 'Partial' translations; that is, depending on your skill level, it may be that you mispronounce or substitute the wrong words in places.%r- NOTE: I have decided to use the pipes as delimiters, because it will allow players to mix Terran with other languages in their poses. Simply include the Terran bits in your pose, and make sure you limit your other language bits to the places between the pipes.%r)]