Changeset 934
- Timestamp:
- 30/06/2008 15:57:51 (2 months ago)
- Location:
- trunk/plugins/en
- Files:
-
- 2 modified
-
action_complex_failsafe.tcl (modified) (5 diffs)
-
complex_questions.tcl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/en/action_complex_failsafe.tcl
r806 r934 28 28 #try to figure out something geneal about this action 29 29 if [regexp -nocase {(hug(gle)?|p[ae]t|rub|like|<3|sniff|smell|nibble|tickle)s?} $verb] { 30 bMotionDoAction $channel $nick "%VAR{failsafe_nice}" 30 bMotionDoAction $channel $nick "%VAR{failsafe_nice}" $verb 31 31 bMotionGetHappy 32 32 driftFriendship $nick 1 … … 41 41 } 42 42 43 if [regexp -nocase "(eyes|looks|stares)" $verb] { 44 bMotionDoAction $channel $nick "%VAR{whats}" 43 if [regexp "(dance|sing|play|bop|doof)s?" $verb] { 44 bMotionDoAction $channel $nick "%VAR{failsafe_niceactions}" 45 bMotionGetHappy 46 driftFriendship $nick 10 47 return 1 48 } 49 50 if [regexp "(cum|come|jizze|spurt)s?" $verb] { 51 bMotionDoAction $channel $nick "%VAR{failsafe_wtfs}" 52 bMotionGetHappy 53 bMotionGetHorny 54 driftFriendship $nick 10 55 } 56 57 58 if [regexp "(look|stare|eye|frown)s?" $verb] { 59 bMotionDoAction $channel $nick "%VAR{failsafe_lookback}" 60 bMotionGetHappy 61 driftFriendship $nick 10 45 62 return 1 46 63 } … … 49 66 50 67 if {$whee > 5} { 51 bMotionDoAction $channel $nick "%VAR{failsafes_a}" 68 bMotionDoAction $channel $nick "%VAR{failsafes_a}" $verb 52 69 } else { 53 70 bMotionDoAction $channel $verb "%VAR{failsafes_b}" $dir … … 94 111 95 112 bMotion_abstract_register "failsafe_nice" 96 bMotion_abstract_batchadd "failsafe_nice" [list "mmm" "%VAR{smiles}" "%VAR{smiles}%|/gives %% %VAR{sillyThings}" ]113 bMotion_abstract_batchadd "failsafe_nice" [list "mmm" "%VAR{smiles}" "%VAR{smiles}%|/gives %% %VAR{sillyThings}" "i do love a good %2ing"] 97 114 98 115 99 116 bMotion_abstract_register "failsafes_a" 100 bMotion_abstract_batchadd "failsafes_a" [list "%VAR{rarrs}" "%REPEAT{3:7:m}" "%VAR{thanks}" "what" "/loves it" "/passes it on to %ruser" "/. o O ( ? )" ]117 bMotion_abstract_batchadd "failsafes_a" [list "%VAR{rarrs}" "%REPEAT{3:7:m}" "%VAR{thanks}" "what" "/loves it" "/passes it on to %ruser" "/. o O ( ? )" "i do love a good %%ing"] 101 118 102 119 bMotion_abstract_register "failsafes_b" 103 bMotion_abstract_batchadd "failsafes_b" [list "/%% %2 %SETTING{complex:failsafe:last:nick:moo} back with %VAR{sillyThings}" "/%% %2 %SETTING{complex:failsafe:last:nick:moo}" "/%VERB{%VAR{sillyThings}{strip}} %2 %SETTING{complex:failsafe:last:nick:moo} in return" ]120 bMotion_abstract_batchadd "failsafes_b" [list "/%% %2 %SETTING{complex:failsafe:last:nick:moo} back with %VAR{sillyThings}" "/%% %2 %SETTING{complex:failsafe:last:nick:moo}" "/%VERB{%VAR{sillyThings}{strip}} %2 %SETTING{complex:failsafe:last:nick:moo} in return" "i do love a good %%ing"] 104 121 105 122 bMotion_abstract_register "squeezeds" … … 108 125 bMotion_abstract_register "whats" 109 126 bMotion_abstract_batchadd "whats" [list "what?" "hmm?" "hello? yes?" "er... they did it%|/points at %ruser" "/stares back"] 127 128 bMotion_abstract_register "failsafe_lookback" 129 bMotion_abstract_batchadd "failsafe_lookback" [list "/stares at %%" "hello, yes?" "i can still see you..." "/poses" "/bounces away" "%VAR{smiles}" "/looks at %%" ] 130 131 bMotion_abstract_register "failsafe_wtfs" 132 bMotion_abstract_batchadd "failsafe_wtfs" [list "%VAR{satOns}" "%VAR{shocked}" ] 133 134 bMotion_abstract_register "failsafe_niceactions" 135 bMotion_abstract_batchadd "failsafe_niceactions" [list "wh%REPEAT{3:7:e} %VAR{smiles}" "%VAR{smiles}" "/bounces around" "*drool*" ] 136 137 -
trunk/plugins/en/complex_questions.tcl
r794 r934 94 94 bMotion_putloglev 3 * "Checking question for 'want'" 95 95 ## Want question targetted at me 96 if { [regexp -nocase "^$botnicks,?:? do you (need|want) (a|these|this|some|the|those|that)" $text] || 97 [regexp -nocase "^do you (want|need) (a|these|this|some|the|those|that) .* $botnicks ?\\?" $text] || 98 [regexp -nocase "^$botnicks,?:? would you like" $text] || 99 [regexp -nocase "^would you like .+ $botnicks" $text] || 100 [regexp -nocase "^$botnicks,?:? (do )?((yo)?u )?wanna" $text] || 101 [regexp -nocase "^(do )?((yo)?u )?wanna .+ $botnicks" $text] } { 102 bMotion_plugin_complex_question_want $nick $channel $host 96 set item "" 97 if { [regexp -nocase "^$botnicks,?:? do you (need|want) (a|these|this|some|the|those|that) (.+)" $text matches a b c item] || 98 [regexp -nocase "^do you (want|need) (a|these|this|some|the|those|that) (.*) $botnicks ?\\?" $text matches a b item] || 99 [regexp -nocase "^$botnicks,?:? would you like (.+)" $text matches a item] || 100 [regexp -nocase "^(do|would) you like (.+) $botnicks" $text matches item] || 101 [regexp -nocase "^$botnicks,?:? (do )?((yo)?u )?wanna (.+)" $text matches item] || 102 [regexp -nocase "^(do )?((yo)?u )?wanna (.+) $botnicks" $text matches item] } { 103 bMotion_plugin_complex_question_want $nick $channel $host $item 103 104 return 1 104 105 } … … 357 358 } 358 359 359 proc bMotion_plugin_complex_question_want { nick channel host } {360 proc bMotion_plugin_complex_question_want { nick channel host { item "" } } { 360 361 bMotion_putloglev 2 * "$nick Want/need question" 361 bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{question_want_reply_wrapper}" 362 363 if {$item != ""} { 364 # let's try to figure out if this is an item proper or something like "to go home" etc 365 if {[regexp -nocase "^(to)" $item]} { 366 # TODO: scope for improvement --^ 367 bMotion_putloglev 3 * "item actually looks like an action, using generic answer for now" 368 bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{question_want_reply_wrapper}" 369 return 1 370 } 371 372 # TODO: check if it's a user 373 # TODO: factorise this code? 374 # TODO: other tests? 375 376 bMotion_putloglev 3 * "item looks like an item!" 377 set original_item $item 378 set item [string tolower [bMotion_strip_article $item]] 379 regsub {\?} $item "" item 380 regsub "s$" $item "" item 381 382 if [bMotion_abstract_contains "_bmotion_like" $item] { 383 bMotionDoAction $channel $original_item "%VAR{want_item_like}" $nick 384 return 1 385 } 386 387 if [bMotion_abstract_contains "_bmotion_dislike" $item] { 388 bMotionDoAction $channel $original_item "%VAR{want_item_dislike}" $nick 389 return 1 390 } 391 392 if {[rand 100] > 80} { 393 bMotionDoAction $channel $original_item "%VAR{want_item_dislike}" $nick 394 bMotion_abstract_add "_bmotion_dislike" $item 395 } else { 396 bMotionDoAction $channel $original_item "%VAR{want_item_like}" $nick 397 bMotion_abstract_add "_bmotion_like" $item 398 } 399 return 1 400 } 401 402 if {$item == ""} { 403 bMotion_putloglev 3 * "item is blank, using generic want answer" 404 bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{question_want_reply_wrapper}" 405 } 406 362 407 return 1 363 408 } … … 439 484 440 485 proc bMotion_plugin_complex_question_doyou { nick channel host } { 441 bMotion_putloglev 2 * "$nick do you question"486 bMotion_putloglev 2 * "$nick do you question" 442 487 bMotionDoAction $channel [bMotionGetRealName $nick $host] "%VAR{answerDoyous}" 443 488 return 1 … … 516 561 "%VAR{colours}" 517 562 } 563 564 bMotion_abstract_register "want_item_like" { 565 "ooh yes please" 566 "%REPEAT{3:7:m} %%" 567 "yes please %2" 568 "/<3 %%" 569 "yes" 570 "affirmative" 571 "r" 572 "r %VAR{smiles}" 573 "wh%REPEAT{4:10:e}%|%% == best" 574 "%% <3" 575 "%%++" 576 } 577 578 bMotion_abstract_register "want_item_dislike" { 579 "e%REPEAT{2:5:w} no thanks" 580 "barf" 581 "bleh" 582 "nnk" 583 "do not want" 584 "blah horrible" 585 "no" 586 "no thanks" 587 "negative" 588 "god no" 589 "not a chance" 590 }
