Changeset 1123
- Timestamp:
- 12/15/11 10:01:57 (5 months ago)
- Location:
- trunk/plugins/en
- Files:
-
- 2 edited
-
action_complex_cracker.tcl (modified) (4 diffs)
-
complex_questions.tcl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/en/action_complex_cracker.tcl
r1105 r1123 24 24 25 25 bMotionDoAction $channel $nick "%VAR{cracker_boom}" 26 set hats [bMotion_plugins_settings_get "cracker" "hats" $channel ""] 27 if {$hats == ""} { 28 set hats 0 29 } 26 30 27 31 if [rand 2] { … … 30 34 if [rand 2] { 31 35 bMotionDoAction $channel $nick "%VAR{cracker_win_hat}" 36 incr hats 37 bMotion_plugins_settings_set "cracker" "hats" $channel "" $hats 38 if [rand 4] { 39 if {$hats > 1} { 40 bMotionDoAction $channel $nick "%VAR{cracker_hats}" $hats 41 } 42 } 32 43 } 33 44 return 1 … … 37 48 if [rand 2] { 38 49 bMotionDoAction $channel $nick "%VAR{cracker_lose_hat}" 50 if {$handle != "*"} { 51 set hats [bMotion_plugins_settings_get "cracker" "hats" $channel $handle] 52 if {$hats == ""} { 53 set hats 0 54 } 55 incr hats 56 bMotion_plugins_settings_set "cracker" "hats" $channel $handle $hats 57 if [rand 4] { 58 if {$hats > 1} { 59 bMotionDoAction $channel $nick "%VAR{cracker_your_hats}" $hats 60 } 61 } 62 } 39 63 } 40 64 return 1 … … 93 117 "a %VAR{scrap_silly_qualities} %VAR{scrap_silly_adjectives} %VAR{scrap_silly_construction}" 94 118 } 119 120 bMotion_abstract_register "cracker_hats" { 121 "/is now wearing %2 hats" 122 "/has %s hats on" 123 } 124 bMotion_abstract_add_filter "cracker_hats" "SETTING" 125 126 bMotion_abstract_register "cracker_your_hats" { 127 "You're now wearing %2 hats." 128 "Woo, %2 hats for you %SMILEY{smile}" 129 } 130 131 bMotion_abstract_register "cracker_hats_current" { 132 "/is wearing %2 hats" 133 "/has %2 hats on" 134 } 135 136 bMotion_abstract_register "cracker_your_hats_current" { 137 "You've got %2 hats on!" 138 "%2, silly" 139 "%2, silly%|can't you tell?" 140 "%2 hats and %VAR{sillyThings}" 141 } 142 143 bMotion_abstract_register "cracker_hats_current" { 144 "%% has %2 hats on" 145 "%2 hats" 146 } -
trunk/plugins/en/complex_questions.tcl
r1108 r1123 136 136 if { [regexp -nocase "^$botnicks,?:? how ?many" $text] || 137 137 [regexp -nocase "^how ?many .* $botnicks ?\\?" $text] } { 138 bMotion_plugin_complex_question_many $nick $channel $host 138 bMotion_plugin_complex_question_many $nick $channel $host $text 139 139 return 1 140 140 } … … 432 432 # } 433 433 434 proc bMotion_plugin_complex_question_many { nick channel host } {434 proc bMotion_plugin_complex_question_many { nick channel host line } { 435 435 bMotion_putloglev 2 * "$nick how many question" 436 set handle [nick2hand $nick] 437 if [regexp -nocase "how many (xmas |cracker |christmas )?hats (am|are|do|is) (.+) " $line matches 1 2 3] { 438 if {$3 == "you"} { 439 set hats [bMotion_plugins_settings_get "cracker" "hats" $channel ""] 440 if {($hats == "") || ($hats == 0)} { 441 bMotionDoAction $channel "" "No hats for me %SMILEY{sad}" 442 return 1 443 } 444 if {$hats == 1} { 445 bMotionDoAction $channel "" "One hat only" 446 return 1 447 } 448 bMotionDoAction $channel "" "%VAR{cracker_hats_current}" $hats 449 return 1 450 } 451 452 if {$3 == "i"} { 453 set hats [bMotion_plugins_settings_get "cracker" "hats" $channel $handle] 454 if {($hats == "") || ($hats == 0)} { 455 bMotionDoAction $channel "" "No hats for you %SMILEY{sad}" 456 return 1 457 } 458 if {$hats == 1} { 459 bMotionDoAction $channel "" "One hat only" 460 return 1 461 } 462 bMotionDoAction $channel "" "%VAR{cracker_your_hats_current}" 463 return 1 464 } 465 466 set handle [nick2hand $3] 467 if {$handle == "*"} { 468 bMotionDoAction $channel "" "No idea" 469 return 1 470 } 471 set hats [bMotion_plugins_settings_get "cracker" "hats" $channel $handle] 472 if {($hats == "") || ($hats == 0)} { 473 bMotionDoAction $channel $handle "No hats for %% %SMILEY{sad}" 474 return 1 475 } 476 if {$hats == 1} { 477 bMotionDoAction $channel "" "One hat only" 478 return 1 479 } 480 bMotionDoAction $channel $handle "%VAR{cracker_handle_hats_current}" 481 return 1 482 483 } 436 484 bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{answerHowmanys}" 437 485 return 1
Note: See TracChangeset
for help on using the changeset viewer.
