! Arrest script ! By AbyssDragon ! abyssdragon@juno.com ! http://www.geocities.com/TimesSquare/2795 ! Copyright (c)1998 AbyssWare ! ! YOU CAN USE/MODIFY/ABUSE THIS SCRIPT IN ANY WAY YOU ! PLEASE, AS LONG AS YOU GIVE ME CREDIT. ! ! Want the player to be arrested by guards? Who doesn't? Any paper and pencil ! GM knows how much fun it is to throw players in prison and watch them ! attempt to escape. Well, this script does 2 things. One - the player is put ! in jail (which is escapable in my game - but you don't have to do that), or ! the guard can just attack you. ! :@1 ! Entry Point 1, randomly choose an action if random(5) = 4 goto GUARDFIGHT; ! 1 in 5 chance the guard fights you :@2 ! Entry Point 2, Throw in jail :JAIL ! Start the jail routine - take weapons, place in jail, yell at you foreach player do ! The guards take your weapons so you can't do anything player.weapon.count = 0; player.weapon.name = ""; player.weapon.damage = 0; player.weapon.block = 0; player.weapon.type = 0; player.weapon.class = 0; endfor; teleport(IMMEDIATE, 65, 0); ! Put you in the cell, change 65 to the # for the ! world that you want to be the jail, and 2 to ! the door # you enter through view_pcx( "ANYFRAME.PCX" ); set_frame( "ANYFRAME.PCX", 10, 10, 10, 10, 0 ); L0 = random(5); ! The guard says random stuff that means nothing if L0 = 0 then pwriteln("GUARD: You'll learn to stay out of trouble from now on, won't you?"); elsif L0 = 1 then pwriteln("GUARD: Get in the cell."); elsif L0 = 2 then pwriteln("GUARD: Get used to your cell, you're gonna be there for a while."); elsif L0 = 3 then pwriteln("GUARD: *Laughs*"); elsif L0 = 4 then pwriteln("GUARD: Welcome to your new home."); endif; pause; paint(window); STOP; :@3 ! Entry Point 3, Fight! :GUARDFIGHT ! Just like the Soldier in monsters.scr new(npc); npc.type = MONSTER; npc.name = "City Guard"; npc.block = 534; npc.v2 = 2; npc.hp = 10; npc.mhp = 10; npc.man = 0; npc.mman = 0; npc.str = 5; npc.mstr = 5; npc.dex = 5; npc.mdex = 5; npc.int = 3; npc.mint = 3; npc.weapon.count = 2; npc.weapon.damage = 3; npc.ac = 2; npc.mac = 2; npc.exp = 5; npc.value = 10; RUNSCRIPT( "CONTROL", 7 ); STOP;