scripting:samples:simpletask
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| scripting:samples:simpletask [2023/07/12 19:54] – created mit | scripting:samples:simpletask [2025/05/28 18:58] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| The ' | The ' | ||
| + | |||
| + | < | ||
| + | Event(" | ||
| + | { | ||
| + | *dotask %PLAYER% MakeBread Baking Bread | ||
| + | } | ||
| + | |||
| + | Event( " | ||
| + | { | ||
| + | // Specify that the task will take 30 seconds to complete.. | ||
| + | PlayerTaskStartSetTime( 30 ) | ||
| + | } | ||
| + | |||
| + | Event( " | ||
| + | { | ||
| + | *grantitem %PLAYER% 1 Bread | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | A slightly different variant example shows how using a taskcode rather than a text callback would trigger slightly different events: | ||
| < | < | ||
| Line 9: | Line 30: | ||
| } | } | ||
| - | Event( "CustomTaskStart", "40" ) | + | Event( "TaskStart", "1" ) // Type = 1 means all *dotask events without a callback trigger this |
| { | { | ||
| // Specify that the task will take 30 seconds to complete.. | // Specify that the task will take 30 seconds to complete.. | ||
| Line 15: | Line 36: | ||
| } | } | ||
| - | Event( " | + | Event( " |
| { | { | ||
| *grantitem %PLAYER% 1 Bread | *grantitem %PLAYER% 1 Bread | ||
scripting/samples/simpletask.1689191693.txt.gz · Last modified: (external edit)
