Changeset 999


Ignore:
Timestamp:
04/16/09 07:20:06 (3 years ago)
Author:
james
Message:

improve replicate plugin

File:
1 edited

Legend:

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

    r973 r999  
    1616 
    1717proc bMotion_plugin_complex_replicate { nick host handle channel text } { 
    18   global botnicks 
     18        global botnicks 
    1919 
    2020  regexp -nocase "^${botnicks}:?,? (please )?(replicate|create|send|make|turn) (.+)" $text matches bot please action details 
    2121 
    22   #make it so 
    23   if [regexp -nocase "^it so$" $details] {  
    24     bMotionDoAction $channel $nick "/makes it so for %%" 
    25     bMotion_plugins_settings_set "system" "lastdonefor" $channel "" $nick 
    26     return 1 
    27   } 
     22        #make it so 
     23        if [regexp -nocase "^it so$" $details] {  
     24                bMotionDoAction $channel $nick "/makes it so for %%" 
     25                bMotion_plugins_settings_set "system" "lastdonefor" $channel "" $nick 
     26                return 1 
     27        } 
    2828 
    29   # make it something 
    30   if [regexp -nocase "^it (.+)$" $details ming details2] { 
    31     bMotionDoAction $channel $nick "/makes it $details2 for %%" 
    32     bMotion_plugins_settings_set "system" "lastdonefor" $channel "" $nick 
    33     return 1 
    34   } 
     29        # make it something 
     30        if [regexp -nocase "^it (.+)$" $details ming details2] { 
     31                bMotionDoAction $channel $nick "/makes it $details2 for %%" 
     32                bMotion_plugins_settings_set "system" "lastdonefor" $channel "" $nick 
     33                return 1 
     34        } 
    3535 
    36   # actually replicate 
    37   set who [string trim [string range $details 0 [string first " " $details]]] 
    38   set item [string range $details [expr [string first " " $details] + 1] [string length $details]] 
    39   set whom "" 
    40   if {$who == ""} { 
    41     bMotionDoAction $channel $nick "Idiot. Try pressing Alt-F4 for help, %%" 
    42     return 1 
    43   } 
    44   if {$who == "me"} { set whom $nick } 
    45   if {[regexp -nocase "(yourself|you)" $who]} { set whom [getPronoun] } 
    46   if {$whom == ""} { set whom $who } 
     36        # actually replicate 
     37        set who [string trim [string range $details 0 [string first " " $details]]] 
     38        set item [string range $details [expr [string first " " $details] + 1] [string length $details]] 
     39        set whom "" 
     40        if {$who == ""} { 
     41                bMotionDoAction $channel $nick "Idiot. Try pressing Alt-F4 for help, %%" 
     42                return 1 
     43        } 
     44        if {$who == "me"} { set whom [bMotionGetRealName $nick] } 
     45        if {[regexp -nocase "(yourself|you)" $who]} { set whom [getPronoun] } 
     46        if {$whom == ""} { set whom $who } 
    4747  if {[string tolower $action] == "make" || [string tolower $action] == "turn" } { 
    48     if {($whom == [getPronoun]) && [regexp -nocase "(come|cum|ejaculate|squirt)" $item]} { 
    49       cum $channel $nick 
    50       return 1 
    51     } 
    52     if {[rand 4] == 0 || [regexp -nocase "into" $item]} { 
    53       set whom "$whom is" 
    54       if {$who == "me"} { set whom "you are" } 
    55       if {[regexp -nocase "(yourself|you)" $who]} { set whom "I am" } 
    56       if [regexp -nocase "into" $item] { 
    57         set item [string range $item [expr [string first "into" $item] + 5] end] 
    58       } 
    59       set hisHers [getHisHers] 
    60       bMotionDoAction $channel $hisHers "%VAR{wands}" 
    61       bMotionDoAction $channel $whom "*PING* ... %% $item" 
    62       if [rand 2] { bMotionDoAction $channel $whom "I AM THE WIZARD%colen" } 
    63       bMotionGetHappy 
    64       bMotionGetUnLonely 
    65       bMotion_putloglev d * "bMotion: Turned someone into $item :P" 
    66       return 1 
    67     } 
    68   } 
    69   bMotionDoAction $channel $whom "/replicates $item and hands it to %%" 
    70   bMotionGetUnLonely 
    71   bMotion_plugins_settings_set "system" "lastdonefor" $channel "" $nick 
    72   return 1 
     48                if {($whom == [getPronoun]) && [regexp -nocase "(come|cum|ejaculate|squirt)" $item]} { 
     49                        cum $channel $nick 
     50                        return 1 
     51                } 
     52                if {[rand 4] == 0 || [regexp -nocase "into" $item]} { 
     53                        set whom "$whom is" 
     54                        if {$who == "me"} { set whom "you are" } 
     55                        if {[regexp -nocase "(yourself|you)" $who]} { set whom "I am" } 
     56                        if [regexp -nocase "into" $item] { 
     57                                set item [string range $item [expr [string first "into" $item] + 5] end] 
     58                        } 
     59                        set hisHers [getHisHers] 
     60                        bMotionDoAction $channel $hisHers "%VAR{wands}" 
     61                        bMotionDoAction $channel $whom "*PING* ... %% $item" 
     62                        if [rand 2] { bMotionDoAction $channel $whom "I AM THE WIZARD%colen" } 
     63                        bMotionGetHappy 
     64                        bMotionGetUnLonely 
     65                        bMotion_putloglev d * "bMotion: Turned someone into $item :P" 
     66                        return 1 
     67                } 
     68        } 
     69        bMotionDoAction $channel $whom "%VAR{makes}" $item 
     70        bMotionGetUnLonely 
     71        bMotion_plugins_settings_set "system" "lastdonefor" $channel "" $nick 
     72        return 1 
    7373} 
    7474 
     75proc bMotion_plugin_complex_replicate2 { nick host handle channel text } { 
     76        global botnicks botnick 
     77        regexp -nocase "^${botnicks}:?,? (please )?(replicate|create|send|make) (.+?)( for| to) (.+)" $text matches bot please action details f who 
    7578 
    76 proc bMotion_plugin_complex_replicate2 { nick host handle channel text } { 
    77   global botnicks botnick 
    78   regexp -nocase "^${botnicks}:?,? (please )?(replicate|create|send|make) (.+?)( for| to) (.+)" $text matches bot please action details f who 
     79        bMotion_plugin_complex_replicate $nick $host $handle $channel "$botnick $action $who $details" 
     80        return 1 
     81} 
    7982 
    80   bMotion_plugin_complex_replicate $nick $host $handle $channel "$botnick $action $who $details" 
    81   return 1 
     83bMotion_abstract_register "makes" { 
     84        "/replicates %2 and hands it to %%" 
     85        "/replicates %2 for %%" 
     86        "/lovingly crafts %2 out of %VAR{sillyThings:strip} for %%" 
    8287} 
     88 
     89bMotion_abstract_register "makes_female" { 
     90        "/pulls %2 out of her magic box for %%" 
     91} 
Note: See TracChangeset for help on using the changeset viewer.