lua:scripting:examples:trackingplayers
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| lua:scripting:examples:trackingplayers [2014/12/24 05:25] – vodur | lua:scripting:examples:trackingplayers [2017/02/16 19:50] (current) – vodur | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| Let's make a Nog the Librarian be able track the last thing that any given player has said. | Let's make a Nog the Librarian be able track the last thing that any given player has said. | ||
| - | Nog already has a couple of mprogs, but we add 1 more, a [[: | + | Nog already has a couple of mprogs, but we add 1 more, a [[: |
| - | We will use vnum 10289. | + | |
| < | < | ||
| Line 24: | Line 23: | ||
| tprint(tracker) -- just for debug, will remove this later | tprint(tracker) -- just for debug, will remove this later | ||
| </ | </ | ||
| - | Yes, it's as easy as that! ' | + | |
| + | | ||
| < | < | ||
| You say ' | You say ' | ||
| Line 41: | Line 42: | ||
| ' | ' | ||
| </ | </ | ||
| - | Maybe it's a little ugly but it confirms that things are working like we want them to. | ||
| + | Maybe it's a little ugly but it confirms that things are working like we want them to. | ||
| - | So only one thing is missing now; we need a real way for Nog to tell us what we said (not tprint)! We'll need another trigger and another prog for this. Let's use 10290 on a [[MprogSocial|social]] trigger for the ' | + | So only one thing is missing now; we need a real way for Nog to tell us what we said (not tprint)! We'll need another trigger and another prog for this. Let's use 10290 on a [[: |
| < | < | ||
| Line 58: | Line 59: | ||
| [ 3] 10287 ACT gets a map of bastion | [ 3] 10287 ACT gets a map of bastion | ||
| </ | </ | ||
| - | |||
| <code lua> | <code lua> | ||
| Line 75: | Line 75: | ||
| And remove the tprint line from 10289 | And remove the tprint line from 10289 | ||
| + | |||
| <code lua> | <code lua> | ||
| -- vnum 10289 | -- vnum 10289 | ||
| Line 106: | Line 107: | ||
| Nog says ' | Nog says ' | ||
| - | |||
| </ | </ | ||
| + | |||
lua/scripting/examples/trackingplayers.1419398727.txt.gz · Last modified: 2014/12/24 05:25 by vodur