Paste #38232: Untitled Paste

Date: 2016/12/10 08:02:17 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545


############################################
##             GeeksCraft 1.0             ##
############################################

geeekscraft_version:
  type: yaml data
  name: geeekscraft
  description: GeeksCraft Core
  version: 1.1

geeekscraft_events:
  type: world
  debug: false
  events:
    on player quits:
    - flag <player> current_board:!
    on player joins:
    - flag <player> current_board:!
    on player damaged by player:
    - choose <context.damager.item_in_hand>:
      - case "item_tier_1":
        - flag player health:-:5
      - case "item_tier_2":
        - flag player health:-:10

############################################
##             START PROGRAM              ##
############################################    


Stat_start:
  type: world
  events:
    on mmostart command:
    - if <server.flag[mmo_player].is[==].to[1]||true> {
      - narrate "Starting"
      - flag global mmo_player:2
      - flag global Healthbar:5
      - flag global manabar:5
      - run stats_sys
      } else {
        - if <server.flag[mmo_player].is[==].to[2]||true>
        - narrate "Stoping"
        - flag global mmo_player:1
        - flag global Healthbar:0
        - flag global manabar:0
        }

stats_sys:
  type: task
  script:
  - while <server.flag[mmo_player].is[==].to[2]||true> {
    - adjust <player> fake_health:<global.flag[Healthbar].div[64].mul[20].round_up.max[1]||1>|<global.flag[manabar].div[64].mul[20].round_up>
    - run max_hp
    - run regain
    - run death
    - wait 2
    }

max_hp:
  type: task
  script:
  - if <server.flag[Healthbar].is[OR_MORE].than[65]||true> {
    - flag server Healthbar:--
    }

regain:
  type: task
  script:
  - if <server.flag[Healthbar].is[OR_MORE].than[2]||true> {
    - flag server Healthbar:++
    }

death:
  type: task
  script:
  - if <server.flag[Healthbar].is[OR_LESS].than[1]||true> {
    - execute as_player "I died avenge me"
    }

Core_start:
  type: task
  script:
    - execute as_server "say <red>GE-MMO <red>System <red>check <red>started <red>by <blue><player.name>"
    - narrate "Beginning System Tests"
    - narrate "#####################################"
    - narrate "<red>Running: Heath Bar check Please stand by..."
    - flag <player> h_<pl.inventory.quantity[life_force]>:1s
    - narrate "<red>Adjusting Bars"
    - adjust <player> fake_health:1|1
    - adjust <player> fake_health:<pl.inventory.quantity[life_force].div[64].mul[20].round_up.max[1]||1>|<pl.inventory.quantity[magic_force].div[64].mul[20].round_up>
    - if <player.inventory.quantity[life_force].is[OR_LESS].to[0]> {
      - narrate "<red>Error: No Health Force Detected!!"
      - narrate "<red>Correcting <red>Problem..."
      - ^GIVE life_force QTY:64
      - execute as_server "say ERROR: <blue><player.name> NO Health"
      - narrate "<red>Adjusting Bars"
      - adjust <player> fake_health:1|1
      - narrate "<red>Testing <red>Again..."
      - narrate "#####################################"
      - adjust <player> fake_health:<pl.inventory.quantity[life_force].div[64].mul[20].round_up.max[1]||1>
      - execute as_server "say RESOLVED <blue><player.name> <green><pl.inventory.quantity[life_force]> Health Force"
      }
    - narrate "<green>Health Bar Test complete...."
    - narrate "<green>Proceeding to next test"
    - narrate "<red>Running: Magic Bar check Please stand by<magic>###"
    - narrate "#####################################"
    - flag <player> h_<pl.inventory.quantity[life_force]>:1s
    - narrate "<red>Adjusting Bars"
    - adjust <player> fake_health:1|1
    - if <player.inventory.quantity[magic_force].is[OR_LESS].to[0]> {
      - narrate "<red>Error: No Magic Force Detected"
      - narrate "<red>Correcting <red>Problem..."
      - ^GIVE magic_force QTY:64
      - execute as_server "say ERROR: <blue><player.name> <red>NO <red>Health"
      - execute "say <red>Adjusting Bars"
      - adjust <player> fake_health:<pl.inventory.quantity[life_force].div[64].mul[20].round_up.max[1]||1>|1
      - narrate "<red>Testing <red>Again..."
      - adjust <player> fake_health:<pl.inventory.quantity[life_force].div[64].mul[20].round_up.max[1]||1>|<pl.inventory.quantity[magic_force].div[64].mul[20].round_up>
      - execute as_server "say <green>RESOLVED: <blue><player.name>  <green><pl.inventory.quantity[life_force]> Magic Force"
      }
    - narrate "<green>Magic Bar Test complete...."
    - narrate "<green>Proceeding to next test"
    - narrate "<red>Running: Armor check Please stand by"
    - narrate "#####################################"
    - flag <player> h_<pl.inventory.quantity[armor_rating]>:1s
    - narrate "<red>Adjusting Bars"
    - adjust <player> fake_health:1|1
    - if <player.inventory.quantity[armor_rating].is[OR_LESS].to[0]> {
      - narrate "<red>Error: No Armor Detected"
      - narrate "<red>Correcting <red>Problem..."
      - ^GIVE armor_rating QTY:64
      - execute as_server "say ERROR: <blue><player.name> <red>NO <red>Armor"
      - execute "say <red>Adjusting Bars"
      - adjust <player> fake_health:1|1
      - narrate "<red>Testing <red>Again..."
      - adjust <player> fake_health:20|20
      - execute as_server "say <green>RESOLVED: <blue><player.name>  <green><pl.inventory.quantity[armor_rating]> Armor Rating"
      }
    - narrate "<green>Armor Test complete...."
    - narrate "<green>Proceeding to next test"
    - narrate "#####################################"
    - flag <player> h_<pl.inventory.quantity[power_rating]>:1s
    - narrate "<red>Adjusting Bars"
    - adjust <player> fake_health:1|1
    - if <player.inventory.quantity[power_rating].is[OR_LESS].to[0]> {
      - narrate "<red>Error: No Power Detected"
      - narrate "<red>Correcting <red>Problem..."
      - ^GIVE power_rating QTY:64
      - execute as_server "say ERROR: <blue><player.name> <red>NO <red>Power"
      - execute "say <red>Adjusting Bars"
      - adjust <player> fake_health:1|1
      - narrate "<red>Testing <red>Again..."
      - adjust <player> fake_health:20|20
      - execute as_server "say <green>RESOLVED: <blue><player.name>  <green><pl.inventory.quantity[power_rating]> Power Rating"
      }
    - narrate "<green>COMPLETE"
    - narrate "Resetting Stats"
    - adjust <player> fake_health:<pl.inventory.quantity[life_force].div[64].mul[20].round_up.max[1]||1>|<pl.inventory.quantity[magic_force].div[64].mul[20].round_up>
    - narrate "<green>All stats should now be set to correct values!"
    - narrate "<green>Logging you into MMO System"
    - narrate "{========                             }"
    - narrate "{================                     }"
    - narrate "Checking Daily Bonus"
    - if !<player.has_flag[daily_bonus]> {
      - flag <player> daily_bonus:24h
      - ^GIVE daily_coin QTY:1
      - narrate "<player.name> received <gold>Daily Charge"
      }
    - narrate "{======================               }"
    - narrate "<Green>Starting stat tracking"
    - narrate "{============================         }"
    - narrate "{=====================================}"
    - wait 4
    - run welcome_message
    - narrate "<gold>#########<green> LOGGED IN <gold>#########"
    - flag <player> playing_mmo
    - while <player.has_flag[playing_mmo]> {
      - adjust <player> fake_health:<pl.inventory.quantity[life_force].div[64].mul[20].round_up.max[1]||1>|<pl.inventory.quantity[magic_force].div[64].mul[20].round_up>
      - if <player.inventory.quantity[life_force].is[OR_LESS].to[1]> {
        - narrate "you die"
      }
      - if <player.inventory.quantity[life_force].is[OR_LESS].to[0]> {
        - narrate out of mana!
      }
      - wait 2
    }
      }

welcome_message:
  type: task
  script:
    - random 3
    - narrate "<green>Starting the server, Welcome to GeeksCraft MMO"
    - narrate "<green>Taking off our your armor... WOOOO DANCE PARTY"
    - narrate "Taking over the world. Bow to your new computer overload"

############################################
##                 BOARDS                 ##
############################################  

Rules_board:
  debug: false
  type: command
  name: rulesboard
  script:
  - if <player.is_op.not> && <player.has_permission[rulesss.use].not||true> {
    - narrate "<&c>You have already accpted the rules. "
    - queue clear
    }
  - if <player.flag[current_board]||none> == debug {
    - sidebar remove
    - narrate "<&c>Thank you for accepting the rules!"
    - flag <player> current_board:!
    - queue clear
    }
  - flag <player> current_board:debug
  - flag <player> playing_mmo Rules_Y
  - while <player.flag[current_board].is[==].to[debug]||false> {
    - sidebar set "title:<&4>Geeks Rules" "values:<&c>No Griefing<&co><&e>|<&c>No Advertising of any kind<&co><&e>|<&c>No Trolling/Flaming<&co><&e>|<&c>No Asking for OP Ranks or Items<&co><&e>|<&c><&co>Respect all Players<&e>|<&c><&co>Obey Staff There the Law<&e>|<&c><&co>No Racist or Sexist Remarks.<&e>|<&c><&co>No Mods/Hacks<&e>|<&c><&co>No Full Caps Messages<&e>|<&c><&co>No Builds Near Spawn<&e>|<&c><&co>No 1x1 Towers<&e>|<&c><&co>When Trading, only buy and sell legit items<&e>"
    - wait 1s
    }

debugboard:
  debug: false
  type: command
  name: db
  script:
  - if <player.is_op.not> && <player.has_permission[debugboard.use].not||true> {
    - narrate "<&c>You do not have permission to do this!"
    - queue clear
    }
  - if <player.flag[current_board]||none> == debug {
    - sidebar remove
    - narrate "<&c>Disabled  debugboard."
    - flag <player> current_board:!
    - queue clear
    }
  - flag <player> current_board:debug
  - while <player.flag[current_board].is[==].to[debug]||false> {
    - sidebar set "title:<&4>Main Debug Board" "values:<&c>online players<&co><&e> <server.list_online_players.size>|<&c>player ping<&co><&e> <player.ping>|<&c>server TPS<&co><&e> <server.recent_tps.get[1].as_money>|<&c>server RAM<&co><&e> <server.ram_max.sub[<server.ram_free>].div[1048576].round_up>MB/<server.ram_max.div[1048576].round_up>MB|<&c>queues running<&co><&e> <queue.list.size>|<&c>YAML files loaded<&co><&e> <yaml.list.size>|<&c>Entities nearby<&co><&e> <player.location.find.entities.within[50].size||Too many>|<&c>cuboids<&co> <&6><player.location.cuboids.size||0><&e>- <player.location.cuboids.parse[notable_name].separated_by[/]||>|<&c>regions<&co> <&6><player.location.regions.size||0><&e>- <player.location.regions.parse[substring[11]].separated_by[/]||>|<&c>Inventory<&co> <&e><player.open_inventory||none>|<&c>Item in hand<&co> <&e><player.item_in_hand||i@air>|<&c>target<&co> <&e><player.target.name||<player.target.entity_type||<player.location.cursor_on.material>>>|<&c>precise<&co> <&e><player.target||<player.location.cursor_on.simple>>"
    - wait 1s
    } 

############################################
##         CURRENCY   SYSTEM              ##
############################################

daily_coin:

  type: item

  material: i@0385

  display name: <gold>Daily Charge

  lore:
  - <gold>-----------------------
  - <green> Collect 1 Charge per day!
  - <green>  Rewarded to all players!
  - <gold>-----------------------
  - <red>   Visit Reward Merchant
  - <red>  to claim special rewards
  - <gold>-----------------------

ptw_coin:

  type: item

  material: i@slime_ball

  display name: <gold>PTW SLIME

  lore:
  - <gold>-----------------------
  - <gold>       OMG U PTW SCUM!!!
  - <gold> Collect 1 SCUM per day!
  - <gold> Rewarded to all patrons!
  - <gold>-----------------------
  - <red>   Visit Reward Merchant
  - <red>  to claim special rewards
  - <gold>-----------------------

souls:

  type: item

  material: i@0410

  display name: <gold>Soul Shards

  lore:
  - <gold>-----------------------------
  - <gold>           Purified Souls
  - <gold>  The essence of each soul is
  - <gold>collected and turned into shards
  - <gold>-----------------------------
  - <red>      Visit Reward Merchant
  - <red>      to claim special rewards
  - <gold>-----------------------------

'daily_coin_display':
  type: task
  script:
  - narrate "<red><player.name> received <gold>Daily Charge"

'daily_coin_give':
  type: task
  script:
  - narrate "<red><player.name> received <gold>Daily Charge"
  - execute as_op "ex give daily_coin" silent

'ptw_coin_display':
  type: task
  script:
  - narrate "<red><player.name> received <gold>PTW SLIME"

'ptw_coin_give':
  type: task
  script:
  - narrate "<red><player.name> received <gold>PTW SLIME"
  - execute as_op "ex give ptw_coin" silent

'souls_display':
  type: task
  script:
  - narrate "<red><player.name> received <gold>Soul Shards"

'souls_give':
  type: task
  script:
  - narrate "<red><player.name> received <gold>Soul Shards"
  - execute as_op "ex give souls" silent

############################################
##         Instance    Saving             ##
############################################

'instance_save':
  type: task
  script:
  - random 10
  - chat "Don't worry <player.name> you cry baby I'll save you"
  - chat "We will either save your game or take 1000 souls, Lets see what the wheel says <player.name>"
  - chat "See folks at home, told you <player.name> scared, this means death for sure!"
  - chat "<player.name> playing it safe wont get you off my island!"
  - chat "Why should I save your game <player.name>? No appreciates me anyways..."
  - chat "OK <player.name> saving your game, but destroying all the world behind you...."
  - chat "<player.name> has no hope of making it though this next area"
  - chat "What's wrong <player.name> to chicken to play without saving?"
  - chat "Back in my day <player.name> we didn't have these fancy save points, when you died it was game over.."
  - chat "<player.name>'s 1000 Souls will be sent to the victim's of recent creeper attacks and their families"
  - wait 2
  - narrate "Game saving"
  - wait 1
  - random 5
  - narrate "<red>Deducted 1000 Souls from <player.name>'s account...Just kidding.. maybe"
  - narrate "<red>Changing spawn location to Room 1"
  - narrate "<red>ERROR: Your to ugly to save your game"
  - narrate "<red> Crediting 1 million souls to <player.name>'s account ... Dream on loser"
  - narrate "<red>ERROR: World corrupted... The admins wont be happy about this..."
  - narrate "{========                             }"
  - narrate "{================                     }"
  - narrate "{======================               }"
  - narrate "{============================         }"
  - narrate "{=====================================}"
  - execute as_op "mv set spawn" silent
  - random 10
  - narrate "<red>We saved your progress....or did we? Try not to die!"
  - narrate "<red>Your game may or may not have been saved.. we don't know"
  - narrate "<red>Your game was defiantly save... um somewhere... "
  - narrate "<red>There are no admins on to manually save your game.. Deleting progress"
  - narrate "<red>Unfortunately we are experiencing a higher then normal volume of saves, please hold"
  - narrate "<red>ERROR: World corrupt...... Your games saved probably but the worlds corrupt, think about it...."
  - narrate "<red>C:/      C:/dos    run dos run"
  - narrate "<red>Estimated time to complete final save 7y 6d 5h 34m 23s please wait"
  - narrate "<red> System saved your game but will respawn you at stat anyway"
  - narrate "<red>Unknown error: the admins will promise to fix but never get to"

############################################
##              ARMOR UPGRADE             ##
############################################

my_menu:
   type: inventory
   title: Golden Chicken
   size: 27
   slots:
   - "[] [i@my_menu_slot_2] [] [] [] [] [] [] []"
   - "[] [] [] [] [] [] [] [] []"
   - "[] [] [] [] [] [] [] [] []"

my_menu_slot_2:
  type: item
  material: washed_pants
  display name: Upgrade Tier 2

my_menu_handler:
  type: world
  events:

#- inventory open d:in@my_menu
    on player clicks in my_menu:
    - determine cancelled
    on player drags in my_menu:
    - determine cancelled
    on player clicks my_menu_slot_2 in my_menu:
    - flag <player> regrading_in_progress duration:60s
    - run t1-t2_Pants_regrade_check
    - if <player.has_flag[regrading_in_progress]> queue stop

't1-t2_Pants_regrade_check':
  type: task
  script:
  - narrate "<red>Checking for <gold>Regrade Scrap"
  - if <player.inventory.contains[leather_regrade].qty[1]> flag <player> leather_regrade_yes duration:5s
  - narrate "{========                             }"
  - if <player.has_flag[leather_regrade_yes]> inject "t1-t2_Pants_check"
  - if <player.has_flag[leather_regrade_yes]> queue stop
  - wait 2
  - narrate "<red>Rechecking <red>for <gold>Regrade <gold>Scrap..."
  - if <player.inventory.contains[leather_regrade].qty[1]> flag <player> leather_regrade_yes duration:7s
  - narrate "<red>{================                     }"
  - if <player.has_flag[leather_regrade_yes]> inject "t1-t2_Pants_check"
  - if <player.has_flag[leather_regrade_yes]> queue stop
  - wait 2
  - narrate "<red>Rechecking <red>for <gold>Regrade <gold>Scrap..."
  - if <player.inventory.contains[leather_regrade].qty[1]> flag <player> leather_regrade_yes duration:10s
  - if <player.has_flag[leather_regrade_yes]> inject "t1-t2_Pants_check"
  - if <player.has_flag[leather_regrade_yes]> queue stop
  - wait 4
  - narrate "<red>{===============FAILED================}"
  - narrate "<red>The system failed to find the required material"
  - narrate "<red>Regrade failed"
  - wait 2 
  - narrate "<red>Regrade System shutting down..."
  - flag <player> jgs_progress duration:5
  - if <player.has_flag[jgs_progress]> queue stop

't1-t2_Pants_check':
  type: task
  script:
  - narrate "<red>Checking for <white>Stained Pants<red>..."
  - if <player.inventory.contains[newb_pants].qty[1]> flag <player> pants_yes duration:5s
  - narrate "{================                     }"
  - if <player.has_flag[pants_yes]> inject "t1-t2_Pants_success"
  - if <player.has_flag[pants_yes]> queue stop
  - wait 2
  - narrate "<red>Rechecking for <white>Stained Pants<red>..."
  - if <player.inventory.contains[newb_pants].qty[1]> flag <player> pants_yes duration:7s
  - narrate "<red>{====================               }"
  - if <player.has_flag[pants_yes]> inject "t1-t2_Pants_success"
  - if <player.has_flag[pants_yes]> queue stop
  - wait 2
  - narrate "<red>Rechecking for <white>Stained Pants<red>..."
  - if <player.inventory.contains[newb_pants].qty[1]> flag <player> pants_yes duration:10s
  - if <player.has_flag[pants_yes]> inject "t1-t2_Pants_success"
  - if <player.has_flag[pants_yes]> queue stop
  - wait 4
  - narrate "<red>{===============FAILED================}"
  - narrate "<red>The system failed to find the required material"
  - narrate "<red>Regrade failed"
  - wait 2 
  - narrate "<red>Regrade System shutting down..."
  - flag <player> jgs_progress duration:5
  - if <player.has_flag[jgs_progress]> queue stop

't1-t2_Pants_success':
  type: task
  script:
  - narrate "{==========ITEMS CONFIRMED            }"
  - ^TAKE leather_regrade QTY:1
  - wait 2
  - narrate "{======================               }"
  - ^TAKE newb_pants QTY:1
  - wait 2
  - narrate "{============================         }"
  - wait 2
  - run washed_pants_give
  - wait 2
  - execute as_server "say <red><player.name> successfully upgraded to <green>Washed Pants"
  - wait 2
  - narrate "<green>{==============Success================}"
  - narrate "<green>Regrade Success!!"
  - narrate "Enjoy your new item and don't forget to tip the chicken"
  - flag <player> jgs_progress duration:5
  - if <player.has_flag[jgs_progress]> queue stop

############################################
##               COMMON  CHAT             ##
############################################

'npc_takes_damage':
  type: task
  Script:
  - if <player.has_flag[npc_attack]> queue clear
  - flag <player> npc_attack duration:5s
  - Random 21
  - chat "Ow! That hurt, <player.name>!"
  - chat "If you escape, I'll buy you ice-cream..."
  - chat " Do that again and see what happens!"
  - narrate "<red>1000 Souls taken from <player.name>'s account for attack an npc"
  - chat "Stop it #NPCLivesMatter"
  - chat "If you do that again I will destroy you"
  - chat "All quests have been now reset. Don't attack the host"
  - chat "Oh baby that feels so good, do it again"
  - chat "If you do that again, I will attack back"
  - chat "My grandmother hits harder then that"
  - narrate "<red>Reported to the admin team for NPC abuse"
  - narrate "<red>You have been banned for 7 years for NPC abuse"
  - chat "Why you got to do me like that homie?"
  - narrate "<red>madmaty: Buhahhaha I hate that npc anyways, go ahead and kill him"
  - chat "Ewwww stop it, I don't know where those hands have been!"
  - chat "I don't get paid enough for this shit!"
  - chat "Yo WTF is your problem?"
  - narrate "<red>This NPC has rage quit, quest no longer available"
  - chat "I'm telling on you /w admin <player.name> wont stop attacking me, ban please "
  - narrate "<red>You have been banned for life!"
  - narrate "<gold>Please don't attack our NPCs, they work hard."




test:

  type: item

  material: i@leather_leggings

  durability: 45

  display name: <red>GM Item

  lore:
  - <gold>-------------------------
  - <green>   THIS IS A GM TEST ITEM
  - <green>   CURRENT armor + / - 2
  - <gold>-------------------------



###################     ###############################
##Made by Madmaty##     #    Special Thank you        #
##    VER 1.1    ##     # To Everyone in #denizen-dev #                       
###################     ###############################