Changeset 300


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

wasn't returning 1 after triggering

Location:
trunk/plugins/en
Files:
2 edited

Legend:

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

    r201 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" 
  • trunk/plugins/en/action_complex_hands.tcl

    r201 r300  
    11## bMotion complex plugin: hands 
     2 
    23# 
     4 
    35# $Id$ 
     6 
    47# 
    58 
     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############################################################################### 
    1426 
     27 
     28 
    1529bMotion_plugin_add_action_complex "hands" "(hands|gives) %botnicks " 100 bMotion_plugin_complex_action_hands "en" 
    1630 
     31 
     32 
    1733proc bMotion_plugin_complex_action_hands { nick host handle channel text } { 
     34 
    1835  global botnicks 
     36 
    1937        if {[regexp -nocase "(hands|gives) $botnicks (a|an|the|some)? (.+)" $text bling act bot preposition item]} { 
     38 
    2039          bMotion_putloglev d * "bMotion: Got handed !$item! by $nick in $channel" 
    2140 
     41 
     42 
    2243    #Coffee 
     44 
    2345                if [regexp -nocase "(cup of )?coffee" $item] { 
     46 
    2447      bMotion_plugin_complex_action_hands_coffee $channel $nick 
    25       return 1 
     48 
     49      return 1 
     50 
    2651                } 
    2752 
     53 
     54 
    2855    #hug 
     56 
    2957    if [regexp -nocase "^hug" $item] { 
     58 
    3059      if [bMotion_plugin_check_depend "action_complex:hugs"] { 
     60 
    3161        bMotion_plugin_complex_action_hugs $nick $host $handle $channel "" 
     62 
    3263        return 1 
     64 
    3365      } 
     66 
    3467    } 
    3568 
     69 
     70 
    3671    # Tissues 
     72 
    3773    if [regexp -nocase "((box of)|a)? tissues?" $item] { 
     74 
    3875      bMotion_plugin_complex_action_hands_tissues $channel $nick 
    39       return 1 
     76 
     77      return 1 
     78 
    4079    } 
    4180 
     81 
     82 
    4283    # Body paint 
     84 
    4385    if [regexp -nocase "(chocolate|strawberry) (sauce|bodypaint|body paint|body-paint)" $item] { 
     86 
    4487      bMotion_plugin_complex_action_hands_bodypaint $channel $nick 
    45       return 1 
     88 
     89      return 1 
     90 
    4691    } 
    4792 
     93 
     94 
    4895    # pie 
     96 
    4997    if [regexp -nocase "pie" $item] { 
     98 
    5099      bMotion_plugin_complex_action_hands_pie $channel $nick 
    51       return 1 
     100 
     101      return 1 
     102 
    52103    } 
    53104 
     105 
     106 
    54107    #spliff 
     108 
    55109    if [regexp -nocase "(spliff|joint|bong|pipe|dope|gear|pot)" $item] { 
     110 
    56111      bMotion_plugin_complex_action_hands_spliff $channel $nick $handle 
    57       return 1 
     112 
     113      return 1 
     114 
    58115    } 
    59116 
     117 
     118 
    60119    #dildo 
     120 
    61121    if [regexp -nocase "(dildo|vibrator|cucumber|banana|flute)" $item bling item2] { 
     122 
    62123      if [bMotion_plugin_check_depend "action_complex:hands_dildo"] { 
     124 
    63125        bMotion_plugin_complex_action_hands_dildo $channel $nick $item $item2 
     126 
    64127      } 
    65       return 1 
     128 
     129      return 1 
     130 
    66131    }  
     132 
    67133    #end of "hands dildo" 
    68134 
     135 
     136 
    69137    #catch everything else 
     138 
    70139    bMotionDoAction $channel $item "%VAR{hand_generic}" 
     140 
    71141     
     142 
    72143    #we'll add it to our random things list for this session too 
     144 
    73145    bMotion_abstract_add "sillyThings" $item 
     146    return 1 
    74147  }  
     148 
    75149  #end of "hands" handler 
    76 } 
     150 
     151} 
     152 
     153 
     154 
    77155 
    78156 
    79157# supporting functions 
    80158 
     159 
     160 
    81161##### COFFEE 
     162 
    82163proc bMotion_plugin_complex_action_hands_coffee { channel nick } { 
     164 
    83165  global got 
     166 
    84167  set coffeeNick [bMotion_plugins_settings_get "complexaction:hands" "coffee_nick"  "" ""] 
     168 
    85169  bMotion_putloglev 1 * "bMotion: ...and it's a cup of coffee... mmmmmmm" 
     170 
    86171  if {$coffeeNick != ""} { 
     172 
    87173    bMotion_putloglev 1 * "bMotion: But I already have one :/" 
     174 
    88175    bMotionDoAction $channel $nick "%%: thanks anyway, but I'm already drinking the one $coffeeNick gave me :)" 
     176 
    89177    return 1 
    90   } 
     178 
     179  } 
     180 
    91181  driftFriendship $nick 2 
     182 
    92183  bMotionDoAction $channel "" "%VAR{thanks}" 
     184 
    93185  bMotionDoAction $channel "" "mmmmm..." 
     186 
    94187  bMotionDoAction $channel "" "/drinks the coffee %VAR{smiles}" 
     188 
    95189  bMotion_plugins_settings_set "complexaction:hands" "coffee_nick" "" "" $nick 
     190 
    96191  bMotion_plugins_settings_set "complexaction:hands" "coffee_channel" "" "" $channel 
     192 
    97193  utimer 45 { bMotion_plugin_complex_action_hands_finishcoffee } 
     194 
    98195  return 1 
    99 } 
     196 
     197} 
     198 
     199 
    100200 
    101201proc bMotion_plugin_complex_action_hands_finishcoffee { } { 
     202 
    102203  global mood 
     204 
    103205  set coffeeChannel [bMotion_plugins_settings_get "complexaction:hands" "coffee_channel" "" ""] 
     206 
    104207        bMotionDoAction $coffeeChannel "" "/finishes the coffee" 
     208 
    105209        bMotionDoAction $coffeeChannel "" "mmmm... thanks :)" 
     210 
    106211  incr mood(happy) 1 
     212 
    107213        bMotion_plugins_settings_set "complexaction:hands" "coffee_nick" "" "" "" 
    108 } 
     214 
     215} 
     216 
     217 
     218 
    109219 
    110220 
    111221##### TISSUES 
    112222 
     223 
     224 
    113225proc bMotion_plugin_complex_action_hands_tissues { channel nick } { 
     226 
    114227  bMotion_putloglev 1 * "bMotion: ...and it's a box of tissues! ~rarr~" 
     228 
    115229  global mood 
     230 
    116231  if {$mood(horny) < -3} { 
     232 
    117233    bMotion_putloglev 1 * "bMotion: But i'm not in the mood" 
     234 
    118235    bMotionDoAction $channel "" "$nick: thanks, but i'm not in the mood for that right now :(" 
    119   } 
     236 
     237  } 
     238 
     239 
    120240 
    121241  set tissuesNick [bMotion_plugins_settings_get "complexaction:hands" "tissues_nick" "" ""] 
     242 
    122243  if {$tissuesNick != ""} { 
     244 
    123245    bMotion_putloglev 1 * "bMotion: But I already have one :/" 
     246 
    124247    bMotionDoAction $channel "" "$nick: thanks anyway, but I'm already using the tissues $tissuesNick gave me :) *uNF*" 
    125   } 
     248 
     249  } 
     250 
     251 
    126252 
    127253  driftFriendship $nick 2 
     254 
    128255  bMotionDoAction $channel "" "%VAR{thanks}" 
     256 
    129257  bMotionDoAction $channel $nick "/locks %himherself in the bathroom" 
     258 
    130259  bMotion_plugins_settings_set "complexaction:hands" "tissues_nick" "" "" $nick 
     260 
    131261  bMotion_plugins_settings_set "complexaction:hands" "tissues_channel" "" "" $channel 
    132262 
     263 
     264 
    133265  #TODO: this mood stuff is OLD 
     266 
    134267  incr mood(lonely) -1 
     268 
    135269  incr mood(horny) -1 
     270 
    136271  incr mood(happy) 2 
    137272 
     273 
     274 
    138275  utimer 90 bMotion_plugin_complex_action_hands_finishtissues 
    139 } 
     276 
     277} 
     278 
     279 
    140280 
    141281proc bMotion_plugin_complex_action_hands_finishtissues { } { 
     282 
    142283  global mood 
     284 
    143285  set tissuesChannel [bMotion_plugins_settings_get "complexaction:hands" "tissues_channel" "" ""] 
     286 
    144287  bMotionDoAction $tissuesChannel "" "uNF *squeaky* *boing* *squirt*" 
     288 
    145289  bMotionDoAction $tissuesChannel "" "/finishes using the tissues" 
     290 
    146291  bMotion_plugins_settings_set "complexaction:hands" "tissues_nick" "" "" "" 
    147292 
     293 
     294 
    148295  #TODO: this mood stuff is OLD 
     296 
    149297  incr mood(happy) 1 
     298 
    150299  incr mood(horny) -2 
    151 } 
     300 
     301} 
     302 
     303 
     304 
    152305 
    153306 
    154307###### BODY PAINT 
    155308 
     309 
     310 
    156311proc bMotion_plugin_complex_action_hands_bodypaint { channel nick } { 
     312 
    157313  bMotion_putloglev 1 *  "bMotion: Ooh ooh body paint!" 
     314 
    158315  if {![bMotionLike $nick]} { 
     316 
    159317    frightened $nick $channel 
     318 
    160319    return 0 
    161   } 
     320 
     321  } 
     322 
     323 
    162324 
    163325  global bMotionInfo 
     326 
    164327  driftFriendship $nick 2 
     328 
    165329  if {$bMotionInfo(gender) == "male"} { 
     330 
    166331    bMotionDoAction $channel $nick "/applies it to %%" 
     332 
    167333    bMotionDoAction $channel $nick "/licks it off" 
     334 
    168335    return 0 
    169   } 
     336 
     337  } 
     338 
     339 
    170340 
    171341  #female 
     342 
    172343  set bodyPaintNick [bMotion_plugins_settings_get "complexaction:hands" "paint_nick" "" ""] 
    173344 
     345 
     346 
    174347  if {$bodyPaintNick != ""} { 
     348 
    175349    bMotion_putloglev 1 * "bMotion: But I'm already wearing some" 
     350 
    176351    bMotionDoAction $channel $bodyPaintNick "Thanks $nick but I'm already waiting for %% to lick some body paint off me" 
     352 
    177353    return 0 
    178   } 
     354 
     355  } 
     356 
     357 
    179358 
    180359  bMotionDoAction $channel $nick "/smears it over herself and waits for %% to come and lick it off" 
     360 
    181361  bMotion_plugins_settings_set "complexaction:hands" "paint_nick" "" "" $nick 
     362 
    182363  bMotion_plugins_settings_set "complexaction:hands" "paint_channel" "" "" $channel 
     364 
    183365  utimer 60 bMotion_plugin_complex_action_hands_finishPaint 
     366 
    184367  return 0 
    185 } 
     368 
     369} 
     370 
     371 
    186372 
    187373proc bMotion_plugin_complex_action_hands_finishPaint { } { 
     374 
    188375  set bodyPaintNick [bMotion_plugins_settings_get "complexaction:hands" "paint_nick" "" ""] 
     376 
    189377  set bodyPaintChannel [bMotion_plugins_settings_get "complexaction:hands" "paint_channel" "" ""] 
     378 
    190379  bMotionDoAction $bodyPaintChannel $bodyPaintNick "/gets bored of waiting for %% and licks the body paint off by herself instead" 
     380 
    191381  bMotion_plugins_settings_set "complexaction:hands" "paint_nick" "" "" "" 
     382 
    192383  bMotionGetHorny 
     384 
    193385  bMotionGetLonely 
    194 } 
     386 
     387} 
     388 
     389 
    195390 
    196391##### PIE 
    197392 
     393 
     394 
    198395proc bMotion_plugin_complex_action_hands_pie { channel nick } { 
     396 
    199397  driftFriendship $nick 1 
     398 
    200399  bMotion_putloglev 1 * "bMotion: ah ha, pie :D" 
     400 
    201401  bMotionGetHappy 
     402 
    202403  bMotionGetUnLonely 
     404 
    203405  bMotionDoAction $channel $nick ":D%|thanks %%%|/eats pie" 
     406 
    204407  return 0 
    205 } 
     408 
     409} 
     410 
     411 
    206412 
    207413##### SPLIFF 
    208414 
     415 
     416 
    209417proc bMotion_plugin_complex_action_hands_spliff { channel nick handle } { 
     418 
    210419  global mood 
    211420 
     421 
    212422  driftFriendship $nick 1 
     423 
    213424  bMotion_putloglev 1 * "bMotion: ... and it's mind-altering drugs! WOOHOO!" 
     425 
    214426  bMotion_putloglev 1 * "bMotion: ...... wheeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...." 
     427 
    215428  incr mood(stoned) 2 
     429 
    216430  checkmood $nick $channel 
     431 
    217432  bMotionDoAction $channel $nick "%VAR{smokes}" 
     433 
    218434  return 0 
    219 } 
     435 
     436} 
     437 
     438 
    220439 
    221440# abstracts 
     441 
    222442set hand_generic { 
     443 
    223444  "%VAR{thanks}" 
     445 
    224446  "%REPEAT{3:6:m} %%" 
     447 
    225448  "Do I want this?" 
     449 
    226450  "Just what I've always wanted %VAR{smiles}" 
    227 } 
     451 
     452} 
Note: See TracChangeset for help on using the changeset viewer.