Author Topic: script_blockytraitors - now open for testing! + update 5/3  (Read 10240 times)

I'm going to stab you all with my yellow sword.

I don't have an issue with that. I could just pick the better of the two.
High detailed sword or dagger? Doesn't seem right, but anyway, you do what you want.

I'm going to stab you all with my yellow sword.
forget you, I'm going to shoot you with a Mac10.

I'm going to stab you all with my yellow sword.
Ahem. Giant-ass Yellow Knife is a better description.


Ahem. Giant-ass Yellow Knife is a better description.
Gold Machete?

Bumpity bump. Now with some of the best rules ever seen on Blockland.

New features I recently added:
-the rules you see below
-typing /newbtgame will give all the players a random role
-when everyone is dead, whichever team won is announced (not sure if works because i had no one to test with :panda:)
-/endbtgame for the friends who want to end a game early (is called at the end of one automatically anyways)
-changed the knife's ui name to "Traitor Knife" from "Knife" so it won't overwrite your precious add-ons.


I'm begging you to release this to public once it's done.

4/30 update
-added a /btwho with either "t" or "w" as args, so you can check who the watchman(s) or traitors are (if you're a traitor)
-added a /bthelp command for those who have no idea what they're doing.
-the game properly ends with a victory for one or the other teams based on who is / isn't dead.

a quick screenie to show how often you'll be a certain role:
« Last Edit: April 30, 2012, 09:11:37 PM by Kaphonaits »

If you release it here you could let us all bugtest instead of keeping it private and hoping it works on release.

If you release it here you could let us all bugtest instead of keeping it private and hoping it works on release.
I might do an open beta tonight if I don't find any other bugs and finish this last major feature (no talking / respawning on death). It's a semi-functional gamemode right now.

Current features:
-traitor, innocent, and watchman roles.
-round beginning and round ending based on conditions:
        traitors killing all innos
        innos killing all traitors

-traitors and watchmen have special weapons to give them an edge.
-fancy stuff like checking who your fellow traitors are and who the watchman is.
-bottom print that shows your role.
-ability to view rules and how to play the game (unfinished)

This may all seem simple, but it took me awhile. :(

The other major feature (that's not talking / respawning) is corpses. This'll be annoying to do. I have to spawn a bot, somehow copy the player's avatar (maybe just set it to all red like Mafia Madness), let people pick it up via right click / jets, and let people fetch information on click.

I think I'll ask Mr. Wallet about it.

EDIT: Added no-talking-on-death and the spectator's camera on death. I'm currently hosting an open beta.

I'm currently hosting the mod.
« Last Edit: April 30, 2012, 10:30:39 PM by Kaphonaits »


package RedMen
{
   function GameConnection::onDeath(%this, %obj, %sourceObject, %sourceClient, %damageType, %damLoc)
   {
      %obj.getDatablock().onTrigger(%obj,4,1);
      parent::onDeath(%this, %obj, %sourceObject, %sourceClient, %damageType, %damLoc);
      %b = new AIPlayer()
      {
         name = %this.name;
         datablock = playerStandardArmor;
         position = %obj.getPosition();
         deadman = 1;
         minigame = %this.minigame;
      };
      %b.playThread(2,death1);
      %b.HideNode("ALL");
      %b.unhideNode("headSkin");
      %b.unHideNode("larm");
      %b.unHideNode("rarm");
      %b.unhideNode("lshoe");
      %b.unHideNode("rshoe");
      %b.unHideNode("chest");
      %b.unhideNode("lhand");
      %b.unhideNode("rhand");
      %b.unHideNode("pants");
      %b.setNodeColor("ALL","1 0 0 1");
      MissionCleanUp.add(%b);
      if(isObject(%obj))
         %obj.delete();
   }
   function Armor::onTrigger(%this, %player, %slot, %val)
    {
       parent::onTrigger(%this,%player,%slot,%val);
       if(%slot == 4 && %val == 1)
       {
          if(%player.isHolding == 0)
          {
             %scale = getWord(%player.getScale(),2);
             %start = %player.getEyePoint();
                %vec = %player.getEyeVector();
                %end = vectorAdd(%start,vectorScale(%vec,2 * %scale));
             %ray = containerRaycast(%start,%end,$TypeMasks::PlayerObjectType,%player);
             %col = firstWord(%ray);         

             if(!isObject(%col) || fileName(%col.getDatablock().shapeFile) !$= "m.dts" || %player.minigame != %col.minigame)
                   return;
                if(%col.beingHeld)
                   return;
                %col.beingHeld = 1;
             %col.setScale("0.6 0.6 0.6");
             %player.mountObject(%col,1);
             %player.playThread(2,armreadyboth);
             messageClient(%player.client,'',"\c3Your now holding " @ %col.name @ "\'s dead body.");
             %player.isHolding = 1;
             %player.holding = %col;
          }
          else
          {
             %throwvec = %player.getEyeVector();
             %player.unMountObject(%player.holding);
             %obj = %player.holding;
             %player.holding = "";
             %player.isHolding = 0;
             %throwvec = vectorScale(%throwvec,10);
             %obj.addVelocity(%throwvec);
             %obj.beingHeld = 0;
             %obj.setScale("1 1 1");
             %player.updateArm();
          }
       }
    }
};activatepackage(RedMen);

ohi

Not really sure who you are, but I'll definitely reference that and construct something similar.

(Copy-pasting in my book = kill yourself)

I'll probably add a credits section and plop you in there along with Mr. Wallet and myself.
« Last Edit: May 01, 2012, 06:19:05 PM by Kaphonaits »

Not really sure who you are, but I'll definitely reference that and construct something similar.

(Copy-pasting in my book = kill yourself)

I'll probably add a credits section and plop you in there along with Mr. Wallet and myself.
I'm the god of reinventing the wheel.

I'm the god of reinventing the wheel.
I wub you very much regardless.