Ignore:
Timestamp:
09/25/03 04:20:24 (9 years ago)
Author:
jamesoff
Message:

wasn't returning 1 after triggering

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/en/action_complex_attack.tcl

    r299 r300  
    11## bMotion plugin: attack 
    2 # 
    3 # $Id$ 
     2 
    43# 
    54 
     5# $Id$ 
     6 
     7# 
     8 
     9 
     10 
    611############################################################################### 
     12 
    713# This is a bMotion plugin 
     14 
    815# Copyright (C) James Michael Seward 2000-2002 
     16 
    917# 
     18 
    1019# This program is covered by the GPL, please refer the to LICENCE file in the 
     20 
    1121# distribution; further information can be found in the headers of the scripts 
     22 
    1223# in the modules directory. 
     24 
    1325############################################################################### 
     26 
     27 
    1428 
    1529bMotion_plugin_add_action_complex "attacks" "^attacks (.+) with " 100 bMotion_plugin_complex_action_attack "en" 
    1630 
     31 
     32 
    1733proc 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 
    1937  set damage [rand 1500] 
     38 
    2039  regexp -nocase "^attacks (.+) with (.+)" $text matches who item 
     40 
    2141  set who [bMotionGetRealName $who] 
     42 
    2243  regexp -nocase "(an?|the|some|his|her) (.+)" $item matches blah item 
     44 
    2345  bMotion_plugins_settings_set "complex:attacks" "who" "" "" $who 
     46 
    2447  bMotion_plugins_settings_set "complex:attacks" "item" "" "" $item 
     48 
    2549  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 
    2753} 
    2854 
     55 
     56 
    2957set attack_responses { 
     58 
    3059  "%% attacks %SETTING{complex:attacks:who:_:_} with '%SETTING{complex:attacks:item:_:_}' for %SETTING{complex:attacks:score:_:_} damage." 
     60 
    3161  "%SETTING{complex:attacks:who:_:_} takes %SETTING{complex:attacks:score:_:_} damage from %OWNER{%%} '%SETTING{complex:attacks:item:_:_}'" 
     62 
    3263  "%SETTING{complex:attacks:who:_:_} is tremendously damaged by the %SETTING{complex:attacks:item:_:_} and takes %SETTING{complex:attacks:score:_:_} damage!" 
     64 
    3365  "MISS!" 
     66 
    3467  "%SETTING{complex:attacks:who:_:_} is immune to '%SETTING{complex:attacks:item:_:_}'" 
     68 
    3569  "%SETTING{complex:attacks:who:_:_} absorbs the damage and gains %SETTING{complex:attacks:score:_:_} HP!" 
     70 
    3671} 
    3772bMotion_abstract_register "attack_responses" 
Note: See TracChangeset for help on using the changeset viewer.