Crossfire Server, Trunk
CFInsulter.py
Go to the documentation of this file.
1 # CFInsulter.py (formerly shakeinsult.py)
2 # This is an adaptation of Nick Hodges' Shakspearean Insult Generator in python.
3 #
4 # "This is available under a BSD style license. Once I said I would never
5 # write any non-GPL stuff for fun. Oh well. Just let me know if you use it."
6 # http://www.zope.org/Members/tfarrell/shakeinsult
7 #
8 #
9 # Adapted for use in Crossfire by Todd Mitchell
10 #
11 # Please help by adding new styles of insults to this fine script.
12 
13 import Crossfire
14 from random import choice
15 
16 def Insult(style):
17 
18 
19 
20  if style == "shakespear":
21  adj1 = ['artless', 'bawdy', 'beslubbering', 'bootless', 'churlish', 'cockered', 'clouted', 'craven', 'currish', 'dankish', 'dissembling', 'droning', 'errant', 'fawning', 'fobbing', 'froward', 'frothy', 'gleeking', 'goatish', 'gorbellied', 'impertinent', 'infectious', 'jarring', 'loggerheaded', 'lumpish', 'mammering', 'mangled', 'mewling', 'paunchy', 'pribbling', 'puking', 'puny', 'qualling', 'rank', 'reeky', 'roguish', 'ruttish', 'saucy', 'spleeny', 'spongy', 'surly', 'tottering', 'unmuzzled', 'vain', 'venomed', 'villainous', 'warped', 'wayward', 'weedy', 'yeasty', 'vomiting', 'vulturous', 'contemptuous', 'groping', 'miniscule', 'quivering', 'shivering', 'trembling', 'miserable', 'licentious', 'cowering', 'sulking', 'gloating', 'murmuring', 'audacious', 'befouling', 'insolent', 'murky', 'pitiable', 'wretched', 'dolorous', 'lamentable', 'inadequate', 'contemptible', 'paltry', 'measly', 'meager', 'paltry', 'inadequate', 'insignificant', 'empty', 'inferior', 'pathetic', 'atrocious', 'execrable', 'damnable', 'repugnant', 'repulsive', 'revolting', 'repellent', 'offensive', 'disgusting', 'horrid', 'horrible', 'obscene', 'beastly', 'vile', 'abominable', 'pitiful', 'wrangled', 'whoring']
22  adj2 = ['base-court', 'bat-fowling', 'beef-witted', 'beetle-headed', 'boil-brained', 'clapper-clawed','clay-brained', 'common-kissing', 'crook-pated', 'dismal-dreaming', 'dizzy-eyed', 'doghearted', 'dread-bolted', 'earth-vexing', 'elf-skinned', 'fat-kidneyed', 'fen-sucked', 'flap-mouthed', 'fly-bitten', 'folly-fallen', 'fool-born', 'full-gorged', 'guts-griping', 'half-faced', 'hasty-witted', 'hedge-born', 'hell-hated', 'idle-headed', 'ill-breeding', 'ill-nurtured', 'knotty-pated', 'milk-livered', 'motley-minded', 'onion-eyed', 'plume-plucked', 'pottle-deep', 'pox-marked', 'reeling-ripe', 'rough-hewn', 'rude-growing', 'rump-fed', 'shard-borne', 'sheep-biting', 'spur-galled', 'swag-bellied', 'tardy-gaited', 'tickle-brained', 'toad-spotted', 'unchin-snouted', 'weather-bitten', 'weather-beaten', 'mutton-eating', 'coffee-nosed', 'malodorous']
23  noun = ['apple-john', 'baggage', 'barnacle', 'bladder', 'boar-pig', 'bugbear', 'bum-bailey', 'canker-blossom', 'clack-dish', 'clotpole', 'coxcomb', 'codpiece', 'death-token', 'dewberry', 'flap-dragon', 'flax-wench', 'flirt-gill', 'foot-licker', 'fustilarian', 'giglet', 'gudgeon', 'haggard', 'harpy', 'hedge-pig', 'horn-beast', 'hugger-mugger', 'joithead', 'lewdster', 'lout', 'maggot-pie', 'malt-worm', 'mammet', 'measle', 'minnow', 'miscreant', 'moldwarp', 'mumble-news', 'nut-hook', 'pigeon-egg', 'pignut', 'puttock', 'pumpion', 'ratsbane', 'scut', 'skainsmate', 'strumpet', 'varlet', 'vassal', 'whey-face', 'wagtail', 'phlegm-barrel', 'numb-skull', 'lip-infection', 'blood-clot', 'boar-tick', 'pervert']
24  prefixA = ['Thou art a','Thy Mother is a', 'Thou']
25  prefixAn = ['Thou art an', 'Thy Mother is an', 'Thou']
26 
27 
28 
29  elif style == "texas":
30  adj1 = ['stewpid', 'uglee', 'pea brained', 'dung-headed', 'beady-eyed', 'hatless', 'witless', 'dumb']
31  adj2 = ['horse-knappin', 'hog-lickin', 'knock-kneed', 'jug-eared', 'pie-headed', 'snaggle-toothed', 'brown-nosed', 'lilly-livered' ]
32  noun = ['dipshit', 'city-slicker', 'root-head', 'cow-pie', 'greenhorn', 'idgit']
33  prefixA = ['Yer a','Yer Mama\'s a', 'Yew']
34  prefixAn = ['Yer an', 'Yer Mama\'s an', 'Yew']
35 
36 
37 
38  elif style == "dwarf":
39  adj1 = ['beardless', 'puny', 'shaven']
40  adj2 = ['elf-footed', 'dull-axed', 'tin-shielded' ]
41  noun = ['orc-lover', 'gobiln-kisser', 'tree-embracer']
42  prefixA = ['You are a','Your Matron\'s a', 'You']
43  prefixAn = ['You are an', 'Your Matron\'s an', 'You']
44 
45 
46  else:
47  return "No such style stupid."
48 
49  vowels = ['a', 'e', 'i', 'o', 'u']
50  isvowel = 0
51 
52  rnoun = choice(noun)
53  radj1 = choice(adj1)
54  radj2 = choice(adj2)
55 
56  for letter in vowels:
57  if (radj1[0] == letter):
58  rprefix = choice(prefixAn)
59  isvowel = 1
60  if (isvowel == 0):
61  rprefix = choice(prefixA)
62  insult = "%s %s %s %s!" % (rprefix, radj1, radj2, rnoun)
63  return insult
64 
65 
66 activator=Crossfire.WhoIsActivator()
67 whoami=Crossfire.WhoAmI()
68 #style of insult desired to hurl in event options
69 style = Crossfire.ScriptParameters() # 1 is apply event
70 
71 activator.Write(Insult(style))
CFInsulter.Insult
def Insult(style)
Definition: CFInsulter.py:16