User Tools

Site Tools


lua:dammessage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
lua:dammessage [2015/11/28 20:49]
vodur created
lua:dammessage [2019/02/15 20:27]
aethyn
Line 1: Line 1:
-<code lua>+dammessage( damage )
  
 +Used to produce damage messages matching regular in game damage messages, being based of the amount of damage.
 +
 +Returns 3 string values: singular verb, plural verb, and punctuation.
 +
 +<code lua>
 local dam=randnum(750,​1250) local dam=randnum(750,​1250)
 local sng,​pl,​pnct=dammessage(dam) local sng,​pl,​pnct=dammessage(dam)
-echoat(ch, "​%s'​s cannon %s you%s",​ +echoat(ch, ​string.format("​%s'​s cannon %s you%s",​ 
-    mob.shortdescr,​ pl, pnct)+    mob.shortdescr,​ pl, pnct))
 damage( ch, dam) damage( ch, dam)
 </​code>​ </​code>​
 +
  
lua/dammessage.txt · Last modified: 2019/02/15 20:27 by aethyn