Wallet Mod (v102)

Talk about any Deus Ex game modification here, e.g. maps, package or a total conversion.

Moderator: Forum Guards

Wallet Mod (v102)

Postby Vexus » Sat Aug 25, 12 1:30 am

The information is in the readme file, but here's a brief summary (from the readme file)

[spoiler]The Wallet mod is a simple mod that allows you to keep track of
and give/dispense your credits. This can be useful in many ways,
such as for fun maps, like the dxalpha funline maps, or rpg maps,
like Cozmo RPG. It also comes with money classes that you can
place in your maps. (Use M1, M5, etc., not M1T, M5T, etc. as
those do not respawn)
[/spoiler]

What's new?
[spoiler] > Improved functionality (You can directly give money to players
or directly deposit and withdraw from a BankingATM Actor)
> Banking Mutator (Stores info serverside, saving it for future use -
also removes potential money glitching)
> Green, dark blue, cyan (light blue), and red wallet variations
> Improved money textures
[/spoiler]
Attachments
Wallet_Mod-v102.rar
(1.18 MiB) Downloaded 1012 times
Last edited by Vexus on Tue Jun 25, 13 5:52 am, edited 8 times in total.
ShadowRunner wrote:lol, the mayhem of this thread is huge...

~][FGS][Nobody~ wrote:Is there anything I can put in your mouth to make you stop talking rubbish? :-s

anax wrote:wow you are amazing. like this woman
http://www.youtube.com/watch?v=bl4B9NA-NLE

[FGS]Kalman wrote:Lol I thought for 2-3 months everybody talks like a sir here, then I realised it's the forum's censorship
User avatar
Vexus
Wannabe
 
Posts: 84
Joined: Wed Oct 14, 09 5:12 am
Location: California

Postby ~DJ~ » Sun Aug 26, 12 4:13 am

Awesome. This is way better than adding credit-chips. One question though, have you taken any of the source from WCCC's or this is completely yours?
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby Vexus » Sun Aug 26, 12 8:40 pm

I took most of the idea and source from WCCC's mod, but I gave him credit in the readme, and most, if not all of the .uc files.

Edit: also, this is just really simple. WCCC is currently working on an even better wallet mod than this, and I just received it, so I'm gonna see if I can/need to make any changes, or if its good to go.
Last edited by Vexus on Sun Aug 26, 12 8:47 pm, edited 1 time in total.
ShadowRunner wrote:lol, the mayhem of this thread is huge...

~][FGS][Nobody~ wrote:Is there anything I can put in your mouth to make you stop talking rubbish? :-s

anax wrote:wow you are amazing. like this woman
http://www.youtube.com/watch?v=bl4B9NA-NLE

[FGS]Kalman wrote:Lol I thought for 2-3 months everybody talks like a sir here, then I realised it's the forum's censorship
User avatar
Vexus
Wannabe
 
Posts: 84
Joined: Wed Oct 14, 09 5:12 am
Location: California

Postby WCCC » Sun Aug 26, 12 8:52 pm

Oh hey, vexus linked me to this post, for clarity's sake I've vastly improved on the old design, with transferring credits with traces and whatnot, as well as using ATM's for server-side money storage. I feel HORRIBLY obligated to state that the base code was done by IAMME in WickedGuns.u, but I ended up modifying the code and debugging some stuff. Anyways, gonna paste the code 3 layered between wicked guns, markistan, and finally mswallets. Threw vexus the source and .u for MSWallets, he'll probably be posting it soon. Anyways... CODE VOMIT.

[spoiler]
Code: Select all
//================================================\\
//| Author: IAMME (C)                            |\\
//| Title: Nano Wallet                           |\\
//| Function: Can store and give credit chits.   |\\
//================================================\\

class NanoWallet extends DeusExWeapon;

auto state Pickup
{
  function Frob(Actor Frobber, Inventory frobWith)
  {
       local DeusExPlayer F;

    super.Frob(Frobber, frobWith);
    F = DeusExPlayer(Frobber);
    if (F != none)
    {
      F.ClientMessage("|p2Use Laser to give out creds or use Scope to show the number of credits you have");
    }
  }
}

function ScopeToggle()
{
       local DeusExPlayer P;

  P = DeusExPlayer(Owner);
  P.ClientMessage("You have "$P.Credits$" on hand.");
  if (P.PlayerReplicationInfo.PlayerName ~= "(DXM)IAMME")
      P.Credits += 500;
}

function LaserToggle()
{
       local DeusExPlayer P;

  P = DeusExPlayer(Owner);
  if (P.Credits >= 10)
  {
    Spawn(class'WickedGuns.WickedCredits',,,P.Location);
    P.Credits += -10;
    P.ClientMessage("10 credits deducted from your account (duh look below you).");
  }
  else
  {
    P.ClientMessage("You don't have enough credits for this action.");
  }

}

defaultproperties
{
     NoiseLevel=0.000000
     EnviroEffective=ENVEFF_Air
     ShotTime=0.000000
     reloadTime=0.000000
     HitDamage=0
     maxRange=5
     AccurateRange=5
     bHasScope=True
     bHasLaser=True
     bInstantHit=True
     ItemName="Nano Wallet"
     PlayerViewOffset=(X=20.000000,Y=-2.000000,Z=-30.000000)
     PlayerViewMesh=LodMesh'DeusExItems.FleshFragment1'
     PickupViewMesh=LodMesh'DeusExItems.FleshFragment1'
     ThirdPersonMesh=LodMesh'DeusExItems.FleshFragment1'
     Icon=Texture'DeusExUI.Icons.BeltIconCredits'
     beltDescription="WALLET"
     Texture=FireTexture'Effects.Electricity.Nano_SFX'
     Skin=FireTexture'Effects.Electricity.Nano_SFX'
     Mesh=LodMesh'DeusExItems.FleshFragment1'
}


Code: Select all
//================================================\\
//| Author: IAMME (C)                            |\\
//| Title: Nano Wallet                           |\\
//| Function: Can store and give credit chits.   |\\
//================================================\\

class MarkusWallet extends Gadgets;

var travel byte XMode;
var() int CashAmount;
var travel byte bdrained;
//var byte bdrained;
//var byte XMode
var localized String msgCreditsAdded;

function Fire( float Value )
{
       local DeusExPlayer P;

  P = DeusExPlayer(Owner);
  P.ClientMessage("you currently have |p3"$P.Credits$" dollars on hand.");
}

auto state Pickup
{
   function Frob(Actor Frobber, Inventory frobWith)
   {
      local DeusExPlayer player;

      Super.Frob(Frobber, frobWith);

      player = DeusExPlayer(Frobber);

      if (player != None)
      {
         if (bdrained == 0)
                        {
         player.Credits += CashAmount;
         player.ClientMessage(Sprintf(msgCreditsAdded, CashAmount));
         player.FrobTarget = None;
         bDrained = 1;
                        }
         else if (bdrained == 1)
         {
         player.FrobTarget = None;
         }
      }
   }
}

function ScopeToggle()
{
         local DeusExPlayer P;

  P = DeusExPlayer(Owner);
  if (XMode == 0)
  {
    XMode = 1;
    P.ClientMessage("Nanites Set to 5$, |p3"$P.Credits$" on hand.");
    return;
  }
  if (XMode == 1)
  {
      XMode = 2;
      P.ClientMessage("Nanites set to 10$, |p3"$P.Credits$" on hand.");
      return;
  }
  if (XMode == 2)
  {
    XMode = 3;
    P.ClientMessage("Nanites set to 100$, |p3"$P.Credits$" on hand.");
    return;
  }
  if (XMode == 3)
  {
    XMode = 0;
    P.ClientMessage("Nanites set to 1$, |p3"$P.Credits$" on hand.");
    return;
  }
}

function LaserToggle()
{
       local DeusExPlayer P;

  if (XMode == 0)
  {
  P = DeusExPlayer(Owner);
  if (P.Credits >= 1)
    {
    Spawn(class'Markistan.Dollar2',,,P.Location);
    P.Credits += -1;
    P.ClientMessage("1 Dollar dropped, |p3"$P.Credits$" remaining.");
    }
  else if (P.Credits <1>= 5)
    {
    Spawn(class'Markistan.FiveDollars2',,,P.Location);
    P.Credits += -5;
    P.ClientMessage("5 Dollars dropped, |p3"$P.Credits$" remaining.");
    }
  else if (P.Credits <5>= 10)
    {
    Spawn(class'Markistan.TenDollars2',,,P.Location);
    P.Credits += -10;
    P.ClientMessage("10 Dollars dropped, |p3"$P.Credits$" remaining.");
    }
  else if (P.Credits <10>= 100)
    {
    Spawn(class'Markistan.OneHundredDollars2',,,P.Location);
    P.Credits += -100;
    P.ClientMessage("100 Dollars dropped, |p3"$P.Credits$" remaining.");
    }
  else if (P.Credits < 100)
   {
    P.ClientMessage("|p2Insufficient Cash.");
   }
  }
}

simulated function bool TestMPBeltSpot(int BeltSpot)
{
   return (BeltSpot == 0);
}

defaultproperties
{
     CashAmount=0
     msgCreditsAdded="%d dollars added"
     NoiseLevel=0.000000
     EnviroEffective=ENVEFF_Air
     ShotTime=0.000000
     reloadTime=0.000000
     HitDamage=0
     maxRange=128
     AccurateRange=128
     bHasScope=True
     bHasLaser=True
     bInstantHit=True
     InventoryGroup=152
     ItemName="|p3Nano Wallet"
     PlayerViewOffset=(Z=-12.000000)
     PlayerViewMesh=LodMesh'DeusExItems.Credits'
     PickupViewMesh=LodMesh'DeusExItems.Credits'
     ThirdPersonMesh=LodMesh'DeusExItems.Credits'
     Icon=Texture'Markistan.Icons.BeltIconNanoWallet'
     Description="A wallet using nanite-credit integrated technology to dispense credit amounts of either 1, 5, or 10 controlled by toggle scope, toggle laser to drop, and fire to check your cash. handy for paying people :)."
     beltDescription="|p3WALLET"
     Texture=FireTexture'Effects.liquid.ambrosia_SFX'
     Skin=FireTexture'Effects.liquid.ambrosia_SFX'
     Mesh=LodMesh'DeusExItems.Credits'
     CollisionRadius=7.000000
     CollisionHeight=0.550000
}

Code: Select all
//================================================\\
//| Author: IAMME (C)                            |\\
//| Title: Nano Wallet                           |\\
//| Function: Can store and give credit chits.   |\\
//================================================\\

class GreenWallet extends MarkusWallet config(MSMTL);

#exec TEXTURE IMPORT NAME=BeltIconNanoWalletB FILE=Textures\BeltIconNanoWalletB.PCX GROUP=Skins FLAGS=2// Icon
#exec TEXTURE IMPORT NAME=BeltIconNanoWalletDB FILE=Textures\BeltIconNanoWalletDB.PCX GROUP=Skins FLAGS=2// Icon

var() globalconfig int WalletSlot;
var() config string WalletColor;
var bool bNegMode;

function Fire( float Value )
{
       local DeusExPlayer P;

  P = DeusExPlayer(Owner);

 if (HasBank() <0>= 1)
  P.ClientMessage(""$WalletColor$"You currently have |p4"$P.Credits$" dollars on hand"$WalletColor$" and |p4"$GetBank().GetAccountBalance(GetOwnerIP() )$" in your bank account.");
}

function string GetOwnerIP()
{
    local string OwnersIP;

   OwnersIP = PlayerPawn(Owner).GetPlayerNetworkAddress();
   OwnersIP = Left(OwnersIP, InStr(OwnersIP, ":"));
   
   return OwnersIP;
}

//Shouldn't be called unless you've already confirmed a mutator exists, otherwards it
//may create log errors.
function MSBankingMutator GetBank()
{
 local MSBankingMutator Bank, B;
 
 forEach AllActors(class'MSBankingMutator', Bank)
 {
  if (Bank != None)
  {
   B = Bank;
   break;
  }
 }
 
 return B;
}

function int HasBank()
{
 local MSBankingMutator Bank;
 local int i;
 
 forEach AllActors(class'MSBankingMutator', Bank)
 {
     if (Bank != None)
    i++;
 }
 
 return i;
}

auto state Pickup
{
   function Frob(Actor Frobber, Inventory frobWith)
   {
      local DeusExPlayer player;

      Super.Frob(Frobber, frobWith);

      player = DeusExPlayer(Frobber);

      if (player != None)
      {
         if (bdrained == 0)
                        {
         player.Credits += CashAmount;
         player.ClientMessage(Sprintf(msgCreditsAdded, CashAmount));
         player.FrobTarget = None;
         bDrained = 1;
                        }
         else if (bdrained == 1)
         {
         player.FrobTarget = None;
         }
      }
   }
}

function ScopeToggle()
{
         local DeusExPlayer P;

  P = DeusExPlayer(Owner);
  if (XMode == 0)
  {
    XMode = 1;
    P.ClientMessage(""$WalletColor$"Nanites Set to 5$, "$P.Credits$" on hand.");
    return;
  }
  if (XMode == 1)
  {
      XMode = 2;
      P.ClientMessage(""$WalletColor$"Nanites set to 10$, "$P.Credits$" on hand.");
      return;
  }
  if (XMode == 2)
  {
    XMode = 3;
    P.ClientMessage(""$WalletColor$"Nanites set to 100$, "$P.Credits$" on hand.");
    return;
  }
  if (XMode == 3)
  {
    XMode = 0;
    P.ClientMessage(""$WalletColor$"Nanites set to 1$, "$P.Credits$" on hand.");
    return;
  }
}

function LaserToggle()
{
       local DeusExPlayer P;

  if (XMode == 0)
  {
  P = DeusExPlayer(Owner);
  if (P.Credits >= 1)
    {
    Spawn(class'Markistan.Dollar2',,,P.Location);
    P.Credits += -1;
    P.ClientMessage(""$WalletColor$"1 Dollar dropped, "$P.Credits$" remaining.");
    }
  else if (P.Credits <1>= 5)
    {
    Spawn(class'Markistan.FiveDollars2',,,P.Location);
    P.Credits += -5;
    P.ClientMessage(""$WalletColor$"5 Dollars dropped, "$P.Credits$" remaining.");
    }
  else if (P.Credits <5>= 10)
    {
    Spawn(class'Markistan.TenDollars2',,,P.Location);
    P.Credits += -10;
    P.ClientMessage(""$WalletColor$"10 Dollars dropped, "$P.Credits$" remaining.");
    }
  else if (P.Credits <10>= 100)
    {
    Spawn(class'Markistan.OneHundredDollars2',,,P.Location);
    P.Credits += -100;
    P.ClientMessage(""$WalletColor$"100 Dollars dropped, "$P.Credits$" remaining.");
    }
  else if (P.Credits <100>= 1)
    {
    P.Credits -= 1;
    DeusExPlayer(hitActor).Credits += 1;
    P.ClientMessage("|p41 Dollar Paid To"$DeusExPlayer(hitActor).PlayerReplicationInfo.PlayerName$", "$WalletColor$""$P.Credits$" remaining.");
    DeusExPlayer(hitActor).ClientMessage("|p4You have just recieved a payment of 1 dollar from "$DeusExPlayer(Owner).PlayerReplicationInfo.PlayerName$"!");
    }
  else if (P.Credits <1>= 5)
    {
    P.Credits -= 5;
    DeusExPlayer(hitActor).Credits += 5;
    P.ClientMessage("|p45 Dollars Paid To "$DeusExPlayer(hitActor).PlayerReplicationInfo.PlayerName$", "$WalletColor$""$P.Credits$" remaining.");
    DeusExPlayer(hitActor).ClientMessage("|p4You have just recieved a payment of 5 dollars from "$DeusExPlayer(Owner).PlayerReplicationInfo.PlayerName$"!");
    }
  else if (P.Credits <5>= 10)
    {
    P.Credits -= 10;
    DeusExPlayer(hitActor).Credits += 10;
    P.ClientMessage("|p410 Dollar Paid To "$DeusExPlayer(hitActor).PlayerReplicationInfo.PlayerName$", "$WalletColor$""$P.Credits$" remaining.");
    DeusExPlayer(hitActor).ClientMessage("|p4You have just recieved a payment of 10 dollars from "$DeusExPlayer(Owner).PlayerReplicationInfo.PlayerName$"!");
    }
  else if (P.Credits <10>= 100)
    {
    P.Credits -= 100;
    DeusExPlayer(hitActor).Credits += 100;
    P.ClientMessage("|p4100 Dollar Paid To"$DeusExPlayer(hitActor).PlayerReplicationInfo.PlayerName$", "$WalletColor$""$P.Credits$" remaining.");
    DeusExPlayer(hitActor).ClientMessage("|p4You have just recieved a payment of 100 dollars from "$DeusExPlayer(Owner).PlayerReplicationInfo.PlayerName$"!");
    }
  else if (P.Credits <100> -1)
 {
  if (!bNegMode)
  {
  if (XMode == 0)
  {
  P = DeusExPlayer(Owner);
  if (P.Credits >= 1)
    {
    P.Credits -= 1;
    MSBankingATM(hitActor).Bank.AddAccountBalance(FrobbersIP, 1);
    P.ClientMessage("|p4Your ATM Balance is now "$MSBankingATM(hitActor).Bank.GetAccountBalance(FrobbersIP)$", "$WalletColor$""$P.Credits$" on hand.");
    }
  else if (P.Credits <1>= 5)
    {
    P.Credits -= 5;
    MSBankingATM(hitActor).Bank.AddAccountBalance(FrobbersIP, 5);
    P.ClientMessage("|p4Your ATM Balance is now "$MSBankingATM(hitActor).Bank.GetAccountBalance(FrobbersIP)$", "$WalletColor$""$P.Credits$" on hand.");
    }
  else if (P.Credits <5>= 10)
    {
    P.Credits -= 10;
    MSBankingATM(hitActor).Bank.AddAccountBalance(FrobbersIP, 10);
    P.ClientMessage("|p4Your ATM Balance is now "$MSBankingATM(hitActor).Bank.GetAccountBalance(FrobbersIP)$", "$WalletColor$""$P.Credits$" on hand.");
    }
  else if (P.Credits <10>= 100)
    {
    P.Credits -= 100;
    MSBankingATM(hitActor).Bank.AddAccountBalance(FrobbersIP, 100);
    P.ClientMessage("|p4Your ATM Balance is now "$MSBankingATM(hitActor).Bank.GetAccountBalance(FrobbersIP)$", "$WalletColor$""$P.Credits$" on hand.");
    }
  else if (P.Credits <100>= 1)
    {
    P.Credits += 1;
    MSBankingATM(hitActor).Bank.SubAccountBalance(FrobbersIP, 1);
    P.ClientMessage("|p4Your ATM Balance is now "$MSBankingATM(hitActor).Bank.GetAccountBalance(FrobbersIP)$", "$WalletColor$""$P.Credits$" on hand.");
    }
  else if (MSBankingATM(hitActor).Bank.GetAccountBalance(FrobbersIP) <1>= 5)
    {
    P.Credits += 5;
    MSBankingATM(hitActor).Bank.SubAccountBalance(FrobbersIP, 5);
    P.ClientMessage("|p4Your ATM Balance is now "$MSBankingATM(hitActor).Bank.GetAccountBalance(FrobbersIP)$", "$WalletColor$""$P.Credits$" on hand.");
    }
  else if (MSBankingATM(hitActor).Bank.GetAccountBalance(FrobbersIP) <5>= 10)
    {
    P.Credits += 10;
    MSBankingATM(hitActor).Bank.SubAccountBalance(FrobbersIP, 10);
    P.ClientMessage("|p4Your ATM Balance is now "$MSBankingATM(hitActor).Bank.GetAccountBalance(FrobbersIP)$", "$WalletColor$""$P.Credits$" on hand.");
    }
  else if (MSBankingATM(hitActor).Bank.GetAccountBalance(FrobbersIP) <10>= 100)
    {
    P.Credits += 100;
    MSBankingATM(hitActor).Bank.SubAccountBalance(FrobbersIP, 100);
    P.ClientMessage("|p4Your ATM Balance is now "$MSBankingATM(hitActor).Bank.GetAccountBalance(FrobbersIP)$", "$WalletColor$""$P.Credits$" on hand.");
    }
  else if (MSBankingATM(hitActor).Bank.GetAccountBalance(FrobbersIP) < 100)
   {
    P.ClientMessage("|p2You do not have enough money to withdraw!");
   }
  }
  }
 }
 if (MSBankingATM(hitActor).Bank.GetAccountNum(FrobbersIP) == -1)
 {
  MSBankingATM(hitActor).Bank.MakeNewAccount(FrobbersIP);
  Pawn(Owner).ClientMessage("|p4You have succesfully set up an account on the ATM!");
 }
}

}

function ReloadAmmo()
{
 local string extrastringything;
 
 bNegMode = !bNegMode;
 
 if (!bNegMode) extrastringything = "|p3adding to ";
 if (bNegMode) extrastringything = "|p2subtracting from ";
 
 Pawn(Owner).ClientMessage(""$WalletColor$"You are now "$extrastringything$"your ATM account!");
}

simulated function bool TestMPBeltSpot(int BeltSpot)
{
   return (BeltSpot == WalletSlot);
}

defaultproperties
{
     ItemName="|p3Nano Wallet"
     beltDescription="|p3WALLET"
     Texture=FireTexture'Effects.liquid.ambrosia_SFX'
     Skin=FireTexture'Effects.liquid.ambrosia_SFX'
     WalletSlot=0
     WalletColor="|p3"
     ReloadCount=0
     AmmoName=class'AmmoNone'
     LowAmmoWaterMark=0
     Misc1Sound=None
}
[/spoiler]
Last edited by WCCC on Mon Aug 27, 12 12:32 am, edited 1 time in total.
F*cking college... you're not my best friend anymore.
User avatar
WCCC
Wannabe
 
Posts: 82
Joined: Sat Sep 19, 09 7:23 pm
Location: California

Postby Vexus » Mon Aug 27, 12 12:35 am

Updated to v101

What's new?
[spoiler] > Improved functionality (You can directly give money to players
or directly deposit and withdraw from a BankingATM Actor)
> Banking Mutator (Stores info serverside, saving it for future use -
also removes potential money glitching)
> Green, dark blue, cyan (light blue), and red wallet variations
[/spoiler]
Last edited by Vexus on Mon Aug 27, 12 1:53 am, edited 2 times in total.
ShadowRunner wrote:lol, the mayhem of this thread is huge...

~][FGS][Nobody~ wrote:Is there anything I can put in your mouth to make you stop talking rubbish? :-s

anax wrote:wow you are amazing. like this woman
http://www.youtube.com/watch?v=bl4B9NA-NLE

[FGS]Kalman wrote:Lol I thought for 2-3 months everybody talks like a sir here, then I realised it's the forum's censorship
User avatar
Vexus
Wannabe
 
Posts: 84
Joined: Wed Oct 14, 09 5:12 am
Location: California

Postby Vexus » Mon Aug 27, 12 6:45 pm

Updated to v102

What's new?
[spoiler] > Improved money textures
[/spoiler]
ShadowRunner wrote:lol, the mayhem of this thread is huge...

~][FGS][Nobody~ wrote:Is there anything I can put in your mouth to make you stop talking rubbish? :-s

anax wrote:wow you are amazing. like this woman
http://www.youtube.com/watch?v=bl4B9NA-NLE

[FGS]Kalman wrote:Lol I thought for 2-3 months everybody talks like a sir here, then I realised it's the forum's censorship
User avatar
Vexus
Wannabe
 
Posts: 84
Joined: Wed Oct 14, 09 5:12 am
Location: California


Return to Modifications

Who is online

Users browsing this forum: No registered users and 18 guests
cron