Changeset 300 for trunk/plugins/en/action_complex_attack.tcl
- Timestamp:
- 09/25/03 04:20:24 (9 years ago)
- File:
-
- 1 edited
-
trunk/plugins/en/action_complex_attack.tcl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/en/action_complex_attack.tcl
r299 r300 1 1 ## bMotion plugin: attack 2 # 3 # $Id$ 2 4 3 # 5 4 5 # $Id$ 6 7 # 8 9 10 6 11 ############################################################################### 12 7 13 # This is a bMotion plugin 14 8 15 # Copyright (C) James Michael Seward 2000-2002 16 9 17 # 18 10 19 # This program is covered by the GPL, please refer the to LICENCE file in the 20 11 21 # distribution; further information can be found in the headers of the scripts 22 12 23 # in the modules directory. 24 13 25 ############################################################################### 26 27 14 28 15 29 bMotion_plugin_add_action_complex "attacks" "^attacks (.+) with " 100 bMotion_plugin_complex_action_attack "en" 16 30 31 32 17 33 proc bMotion_plugin_complex_action_attack { nick host handle channel text } { 18 if {![bMotion_interbot_me_next $channel]} { return 0 } 34 35 if {![bMotion_interbot_me_next $channel]} { return 1 } 36 19 37 set damage [rand 1500] 38 20 39 regexp -nocase "^attacks (.+) with (.+)" $text matches who item 40 21 41 set who [bMotionGetRealName $who] 42 22 43 regexp -nocase "(an?|the|some|his|her) (.+)" $item matches blah item 44 23 45 bMotion_plugins_settings_set "complex:attacks" "who" "" "" $who 46 24 47 bMotion_plugins_settings_set "complex:attacks" "item" "" "" $item 48 25 49 bMotion_plugins_settings_set "complex:attacks" "score" "" "" $damage 26 bMotionDoAction $channel $nick "%VAR{attack_responses}" 50 51 bMotionDoAction $channel $nick "%VAR{attack_responses}" 52 return 1 27 53 } 28 54 55 56 29 57 set attack_responses { 58 30 59 "%% attacks %SETTING{complex:attacks:who:_:_} with '%SETTING{complex:attacks:item:_:_}' for %SETTING{complex:attacks:score:_:_} damage." 60 31 61 "%SETTING{complex:attacks:who:_:_} takes %SETTING{complex:attacks:score:_:_} damage from %OWNER{%%} '%SETTING{complex:attacks:item:_:_}'" 62 32 63 "%SETTING{complex:attacks:who:_:_} is tremendously damaged by the %SETTING{complex:attacks:item:_:_} and takes %SETTING{complex:attacks:score:_:_} damage!" 64 33 65 "MISS!" 66 34 67 "%SETTING{complex:attacks:who:_:_} is immune to '%SETTING{complex:attacks:item:_:_}'" 68 35 69 "%SETTING{complex:attacks:who:_:_} absorbs the damage and gains %SETTING{complex:attacks:score:_:_} HP!" 70 36 71 } 37 72 bMotion_abstract_register "attack_responses"
Note: See TracChangeset
for help on using the changeset viewer.
