source: abuse-frabs/trunk/addon/twist/lisp/chat.lsp @ 44

Last change on this file since 44 was 44, checked in by Sam Hocevar, 14 years ago
  • Importing abuse-frabs 2.10.
File size: 9.2 KB
Line 
1(enable_chatting)
2
3(defun chat_input (str)
4  (if (and (> (length str) 0) (equal (elt str 0) #\/))
5      (if (and (search "/nick " str) (> (length str) 6))
6          (chat_print (concatenate 'string "# " (player_name) " is known as "
7                                   (progn (set_player_name (substr 6 (- (length str) 1) str))
8                                          (player_name))))
9        (if (search "/help" str)
10            (if (local_player)
11                (chat_print "Commands : /nick name, /help, /quit, /break"))
12
13        ;; Start Of Cheat
14        ;;1
15        (if (search "/quit" str)
16            (if (local_player)
17                (progn (chat_print "Game Quit")(quit)))
18        ;;2
19        (if (search "/break" str)
20            (if (local_player)
21                (progn (chat_print "Game Break")(break)))
22        ;;3
23        (if (search "/god" str)
24            (if (local_player)
25                (if (eq godmode 0) (progn (setq godmode 1)(chat_print "God Mode On"))
26                                   (progn (setq godmode 0)(chat_print "God Mode Off"))))
27        ;;4
28        (if (search "/notarget" str)
29            (if (local_player)
30                (if (eq enemynotarget 0) (progn (setq enemynotarget 1)
31                                                (chat_print "No Target On"))
32                                         (progn (setq enemynotarget 0)
33                                                (chat_print "No Target Off"))))
34        ;;5
35        (if (search "/noclip" str)
36            (if (local_player)
37                (if (eq noclip 0) (progn (setq noclip 1)(chat_print "No Clipping On"))
38                                  (progn (setq noclip 0)(chat_print "No Clipping Off"))))
39        ;;6
40        (if (search "/jump" str)
41            (if (local_player)
42                (progn  (with_object (bg) (progn (set_x (player_pointer_x))
43                                                 (set_y (player_pointer_y))))
44                        (chat_print (concatenate 'string "Player Jumped To Position"
45                                " X"(digstr (player_pointer_x) 3) " Y" (digstr (player_pointer_y) 3)"."))))
46        ;;7
47        (if (search "/give all" str)
48            (if (local_player)
49                (progn  (give_weapon 0)(give_weapon 1)(give_weapon 2)(give_weapon 3)
50                        (give_weapon 4)(give_weapon 5)(give_weapon 6)(give_weapon 7)
51                        (add_ammo 0 100)(add_ammo 1 100)(add_ammo 2 100)(add_ammo 3 100)
52                        (add_ammo 4 100)(add_ammo 5 100)(add_ammo 6 100)(add_ammo 7 100)
53                        (setq has_compass 1)
54                        (chat_print "Received All")))
55        ;;8
56        (if (search "/give lasergun" str)
57            (if (local_player)
58                (progn (give_weapon 0)(chat_print "Received Laser Gun")))
59        ;;9
60        (if (search "/give grenadelauncher" str)
61            (if (local_player)
62                (progn (give_weapon 1)(chat_print "Received Grenade Launcher")))
63        ;;10
64        (if (search "/give rocketlauncher" str)
65            (if (local_player)
66                (progn (give_weapon 2)(chat_print "Received Rocket Launcher")))
67        ;;11
68        (if (search "/give firebomb" str)
69            (if (local_player)
70                (progn (give_weapon 3)(chat_print "Received Firebomb")))
71        ;;12
72        (if (search "/give plasmagun" str)
73            (if (local_player)
74                (progn (give_weapon 4)(chat_print "Received Plasma Gun")))
75        ;;13
76        (if (search "/give lightsabre" str)
77            (if (local_player)
78                (progn (give_weapon 5)(chat_print "Received Light Sabre")))
79        ;;14
80        (if (search "/give deathfrizbee" str)
81            (if (local_player)
82                (progn (give_weapon 6)(chat_print "Received Death Frizbee")))
83        ;;15
84        (if (search "/give deathray" str)
85            (if (local_player)
86                (progn (give_weapon 7)(chat_print "Received Death Ray")))
87        ;;16
88        (if (search "/give bullets" str)
89            (if (local_player)
90                (progn (add_ammo 0 100)(chat_print "Received Bullets")))
91        ;;17
92        (if (search "/give grenades" str)
93            (if (local_player)
94                (progn (add_ammo 1 100)(chat_print "Received Grenades")))
95        ;;18
96        (if (search "/give rockets" str)
97            (if (local_player)
98                (progn (add_ammo 2 100)(chat_print "Received Rockets")))
99        ;;19
100        (if (search "/give gasoline" str)
101            (if (local_player)
102                (progn (add_ammo 3 100)(chat_print "Received Gasoline")))
103        ;;20
104        (if (search "/give plasmacells" str)
105            (if (local_player)
106                (progn (add_ammo 4 100)(chat_print "Received Plasma Cells")))
107        ;;21
108        (if (search "/give sabrecharger" str)
109            (if (local_player)
110                (progn (add_ammo 5 100)(chat_print "Received Sabre Charger")))
111        ;;22
112        (if (search "/give frizbees" str)
113            (if (local_player)
114                (progn (add_ammo 6 100)(chat_print "Reiceved Frizbees")))
115        ;;23
116        (if (search "/give bfgcells" str)
117            (if (local_player)
118                (progn (add_ammo 7 100)(chat_print "Received BFG Cells")))
119        ;;24
120        (if (search "/give weapons" str)
121            (if (local_player)
122                (progn (give_weapon 0)(give_weapon 1)
123                       (give_weapon 2)(give_weapon 3)
124                       (give_weapon 4)(give_weapon 5)
125                       (give_weapon 6)(give_weapon 7)
126                       (chat_print "Received All Weapons")))
127        ;;25
128        (if (search "/give ammo" str)
129            (if (local_player)
130                (progn (add_ammo 0 100)(add_ammo 1 100)
131                       (add_ammo 2 100)(add_ammo 3 100)
132                       (add_ammo 4 100)(add_ammo 5 100)
133                       (add_ammo 6 100)(add_ammo 7 100)
134                       (chat_print "Received All Ammo")))
135        ;;26
136        (if (search "/give powernone" str)
137            (if (local_player)
138                (progn (with_object(bg)(progn(setq special_power NO_POWER)))(chat_print "Received Power None")))
139        ;;27
140        (if (search "/give powerfast" str)
141            (if (local_player)
142                (progn (with_object(bg)(progn(setq special_power FAST_POWER)))(chat_print "Received Power Fast")))
143        ;;28
144        (if (search "/give powerfly" str)
145            (if (local_player)
146                (progn (with_object(bg)(progn(setq special_power FLY_POWER)))(chat_print "Received Power Fly")))
147        ;;29
148        (if (search "/give powersneaky" str)
149            (if (local_player)
150                (progn (with_object(bg)(progn(setq special_power SNEAKY_POWER)))(chat_print "Received Power Sneaky")))
151        ;;30
152        (if (search "/give powerhealth" str)
153            (if (local_player)
154                (progn (with_object(bg)(progn(setq special_power HEALTH_POWER)))(chat_print "Received Power Health")))
155        ;;31
156        (if (search "/give health" str)
157            (if (local_player)
158                (progn (with_object(bg)(progn(set_hp 100)))(chat_print "Received 100% Health")))
159        ;;32
160        (if (search "/give compass" str)
161                (progn (setq has_compass 1)(chat_print "Received Compass"))
162        ;;33
163        (if (search "/give ant" str)
164            (if (local_player)
165                (progn  (add_object ANT_ROOF (with_object(bg)(x)) (with_object(bg)(-(y)10)) 1)
166                        (chat_print "You want an ANT, you get an ANT!")))
167        ;;34
168        (if (search "/give death" str)
169            (if (local_player)
170                (progn  (with_object (bg) (do_explo 100 400))
171                        (chat_print "You asked for it didn't you?")))
172        ;;35
173        (if (search "/profound's deepest darkest secret" str)
174            (if (local_player)
175                (chat_print "!I LOVE CHERRIE!"))
176        ;;36
177        (if (or (search "/power overwhelming" str) (search "/there is no cow level" str))
178            (if (local_player)
179                (chat_print "Listen dude, this ain't Starcraft."))
180        ;;37
181        (if (or (search "/iddqd" str) (search "/idkfa" str) (search "/idclev" str))
182            (if (local_player)
183                (chat_print "Sorry, wrong game. This is not Doom."))
184        ;;38
185        (if (or (search "/profound" str) (search "/munir" str) (search "/about" str))
186            (if (local_player)
187                (progn
188                (chat_print "TWISTED MINDS addons for ABUSE")
189                (chat_print "Munir Hussin")
190                (chat_print "website: www.profound.8m.com")
191                (chat_print "email: munir@profound.8m.com")))
192        ;;39
193        (if (search "/tip" str)
194            (if (local_player)
195                (progn
196                (if (eq (mod (game_tick) 20) 0) (chat_print "Profound Corp ROCKS!")
197                (if (eq (mod (game_tick) 20) 1) (chat_print "Beware of Ants...duh!")
198                (if (eq (mod (game_tick) 20) 2) (chat_print "Jumping around makes enemies hard to target you.")
199                (if (eq (mod (game_tick) 20) 3) (chat_print "Laser Gun fire faster when you have ammo.")
200                (if (eq (mod (game_tick) 20) 4) (chat_print "Grenades travel in parabolic arc.")
201                (if (eq (mod (game_tick) 20) 5) (chat_print "Rockets will track enemies.")
202                (if (eq (mod (game_tick) 20) 6) (chat_print "Firebomb is affected by gravity.")
203                (if (eq (mod (game_tick) 20) 7) (chat_print "Plasmagun has rapid firing.")
204                (if (eq (mod (game_tick) 20) 8) (chat_print "Light Sabre beams at high rate.")
205                (if (eq (mod (game_tick) 20) 9) (chat_print "Death Frizbee will try to follow mouse cursor.")
206                (if (eq (mod (game_tick) 20) 10)(chat_print "Death Ray is one Big Fraggin Gun.")
207                (if (eq (mod (game_tick) 20) 11)(chat_print "Munir Hussin is a good looking guy.")
208                (if (eq (mod (game_tick) 20) 12)(chat_print "Change your underwear daily.")
209                (if (eq (mod (game_tick) 20) 13)(chat_print "Ants are fearless but stupid.")
210                (if (eq (mod (game_tick) 20) 14)(chat_print "Mario Rules!.")
211                (if (eq (mod (game_tick) 20) 15)(chat_print "Sub-Zero is cool.")
212                (if (eq (mod (game_tick) 20) 16)(chat_print "You can type in cheat codes here.")
213                (if (eq (mod (game_tick) 20) 17)(chat_print "LISP is fun!.")
214                (if (eq (mod (game_tick) 20) 18)(chat_print "Kids, don't shoot lasers at home.")
215                (if (eq (mod (game_tick) 20) 19)(chat_print "Nick is a professional. Don't try imitating him.")
216                ))))) ))))) ))))) )))))
217            ))
218        ;;41
219        (if (search "/save" str)
220            (if (local_player)
221                (progn
222                (chat_print "Request Save")(save_game (concatenate 'string "save" (digstr (get_save_slot) 4) ".spe"))))
223        ;;41
224        (if (and (search "/map " str) (> (length str) 5))
225            (if (local_player)
226                (progn
227                (chat_print (concatenate 'string "Loading Level " (substr 5 (- (length str) 1) str)))
228                (request_level_load (concatenate 'string "addon/twist/levels/" (substr 5 (- (length str) 1) str) ".lvl"))))
229
230        ;; End Of Cheat
231
232
233        (if (local_player)
234            (chat_print (concatenate 'string "unknown command " str)))))
235
236        ;;the brackets below corresponds to the number of cheats
237        ;;10 per row
238        ))))))))))
239        ))))))))))
240        ))))))))))
241        ))))))))))
242        )
243
244    (chat_print (concatenate 'string "<" (player_name) "> " str))))
Note: See TracBrowser for help on using the repository browser.