UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

black ops 2 bank (carry points between games) v1.1

HOT
broken avatar :(
Created 8 years ago
by death_reaper0
0 Members and 1 Guest are viewing this topic.
10,281 views
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
respect the dead

donates greatly appreciated :) paypal.me/F3ARxReaper666
discord server:
https://discord.gg/tsGHW99
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
this is my script for a black ops 2 styled bank system and behaves like it, including carrying points between each game!

v1.1 update:
script shortened
less delay between usage



https://www.youtube.com/watch?v=obPD2AAPkFU

part 1

first you will need to get this prefab and place it in your map. if you do not wish to do this move to step 1b, if you do want to, skip part 1b.

the prefab can be found here
https://mega.co.nz/#!2JhDCLxA!f6O06I2d45UVErRZPU4-GF7Q6JkAZRnc8-ro0rVo6zs
or here
http://www.mediafire.com/download/05bmhh8ub2361zw/F3ARxReaper666%27s+bank+system.zip

part 1b

use this if you do not want to use my prefab

make a trigger use by right clicking in radient on the 2d view, then go to trigger then trigger use. place it where you want and while its selected press N to bring up the KVPs
in the top text box at the bottom insert

Code Snippet
Plaintext
targetname

and in the bottom place

Code Snippet
Plaintext
bank_withdraw

press enter and it should appear with the other KVPs
this is where you can withdraw points

copy this by pressing space and give this one

Code Snippet
Plaintext
bank_deposit

instead of

Code Snippet
Plaintext
bank_withdraw

this is where you need to go to deposit your points

part 2

now you will need to go to waw root/raw/maps and find your MAPNAME.gsc and open it up

under

Code Snippet
Plaintext
	level thread DLC3_threadCalls2();

place

Code Snippet
Plaintext
	thread bank_begin();

then at the very bottom place this function

Code Snippet
Plaintext
bank_begin()
{
players = getplayers();
for(i=0; i<players.size; i++)
{
players[i].stored_points = players[i] GetStat(3005);
if (!(players[i].stored_points >= 0  || players[i].stored_points < 251))
{
players[i].stored_points = 0;
players[i] SetStat(3005,players[i].stored_points);
}
}
self thread bank_withdraw();
self thread bank_depostit();
}

bank_withdraw()
{
user = undefined;
bank_withdraw = getEnt("bank_withdraw", "targetname");
    bank_withdraw setHintString( "press & hold &&1 to withdraw 1000 points [cost: 100]" );
bank_withdraw setCursorHint("HINT_NOICON");
while(1)
{
bank_withdraw waittill( "trigger", user );
    if( is_player_valid(user) && user.stored_points >0 && user.score >= 100)
{
user maps\_zombiemode_score::add_to_player_score( -100 );
  user playlocalsound("cha_ching");
wait 0.1;
user maps\_zombiemode_score::add_to_player_score( 1000 );
user.stored_points -=1;
user SetStat(3005,user.stored_points);
}
}
}

bank_depostit()
{
user = undefined;
bank_deposit = getEnt("bank_deposit", "targetname");
    bank_deposit setHintString( "press & hold &&1 to deposit 1000 points" );
bank_deposit setCursorHint("HINT_NOICON");
while(1)
{
  bank_deposit waittill( "trigger", user );
if( is_player_valid(user) && user.score >= 1000 && user.stored_points < 250)
{
  user playlocalsound("cha_ching");
user maps\_zombiemode_score::add_to_player_score( -1000 );
user.stored_points +=1;
user SetStat(3005,user.stored_points);
wait 0.1;
}
}
}

i would like to thank Ray1235 for helping with carrying on variables between games  :nyan:

that should be it, have fun with your new script (please credit if used)
Last Edit: December 12, 2015, 07:38:20 pm by death_reaper0
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 27 January 2015
Last active: 7 years ago
Posts
337
Respect
Forum Rank
Perk Hacker
Primary Group
Member
Signature
×
liamsa669's Groups
liamsa669's Contact & Social Links
wow... slow clap here... first person in a while to not use dvars to carry information :D
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 6 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
  • SetStatBit
    • Paramters: int, int/double, int/double
    • Values allowed: 0-3499, <>, <>
  • SetStat
    • Parameters: int, int
    • Values allowed: 0-3499, 0-255
    [li]
[/li]
[li]GetStat
  • Parameters: int
  • Values allowed: 0 - 3499
  • At 3498 and on it sends 0.
  • Between 2000-3497 it sends the value that's stored in the client.
[/li]
[/list]
cbf to fix deal with it
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 7 March 2014
Last active: 2 months ago
Posts
1,191
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Site Moderator
My Groups
More
My Contact & Social Links
More
×
MZslayer11's Groups
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
If this actually works, you will be my god.
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
A side note, the game first checked if player has 100 points or more, then takes it and gives back 1000.
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
A side note, the game first checked if player has 100 points or more, then takes it and gives back 1000.
Code Snippet
Plaintext
	{
user maps\_zombiemode_score::add_to_player_score( 1000 );

  user playlocalsound("cha_ching");

wait 0.2;

user maps\_zombiemode_score::add_to_player_score( -100 );
    that shouldn't happen since the code first gives the points then takes 100 .2 seconds later. also i noticed i used the wrong thing for taking points xD

Double Post Merge: December 11, 2015, 06:44:04 pm
  • SetStatBit
    • Paramters: int, int/double, int/double
    • Values allowed: 0-3499, <>, <>
  • SetStat
    • Parameters: int, int
    • Values allowed: 0-3499, 0-255
    [li]
[/li]
[li]GetStat
  • Parameters: int
  • Values allowed: 0 - 3499
  • At 3498 and on it sends 0.
  • Between 2000-3497 it sends the value that's stored in the client.
[/li]
[/list]
cbf to fix deal with it
what do you mean?
Last Edit: December 11, 2015, 06:44:04 pm by death_reaper0
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 9 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
My preferred name is "xSanchez78".
Check me out here: www.steamcommunity.com/id/xSanchez78
×
alaurenc9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
Code Snippet
Plaintext
	{
user maps\_zombiemode_score::add_to_player_score( 1000 );

  user playlocalsound("cha_ching");

wait 0.2;

user maps\_zombiemode_score::add_to_player_score( -100 );
that shouldn't happen since the code first gives the points then takes 100 .2 seconds later. also i noticed i used the wrong thing for taking points xD

yeah but he means u need to have 100 points before u can withdrawl 1000.

Code Snippet
Plaintext
if( is_player_valid(user) && user.stored_points >0 && user.score >= 100 )
{
user maps\_zombiemode_score::minus_to_player_score( 100 );
wait 0.1;
user maps\_zombiemode_score::add_to_player_score( 1000 );
  user playlocalsound("cha_ching");
user.stored_points -=1;
user SetStat(3005,user.stored_points);
}
}
Last Edit: December 12, 2015, 02:00:44 pm by alaurenc9
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
yeah but he means u need to have 100 points before u can withdrawl 1000.

Code Snippet
Plaintext
if( is_player_valid(user) && user.stored_points >0 && user.score >= 100 )
{
user maps\_zombiemode_score::minus_to_player_score( 100 );
wait 0.1;
user maps\_zombiemode_score::add_to_player_score( 1000 );
  user playlocalsound("cha_ching");
user.stored_points -=1;
user SetStat(3005,user.stored_points);
}
}
why? it gives 1000 then takes 100 from that, pretty much it gives you 900. thats how the black ops 2 one works i think
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
no, in bo2 unless you are "already" holding 100, you cant use it
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
no, in bo2 unless you are "already" holding 100, you cant use it
i just looked this up, you guys are right, i'll update this in a minute
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
i just looked this up, you guys are right, i'll update this in a minute
you expect any less from us? lol ;)

dont call us nerds for nothin  8)
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
you expect any less from us? lol ;)

dont call us nerds for nothin  8)
well when it comes to black ops 2 i usually hang on origins and MOTD which dont have the bank and weapon locker, but thankfully the community is nice enough to correct my many mistakes  ;D
broken avatar :(
  • spawnpoint
  • Deleted Member
×
broken avatar :(
spawnpoint
This user is deleted :(
My mod is giving this following problem when I put the script that you provided on my mapname.gsc

Last Edit: May 08, 2016, 08:00:16 am by HitmanVere
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
My mod is giving this following problem when I put the script that you provided on my mapname.gsc

(Image removed from quote.)
make sure you placed everything in the correct spots, this error is most likely on your end
broken avatar :(
  • spawnpoint
  • Deleted Member
×
broken avatar :(
spawnpoint
This user is deleted :(
make sure you placed everything in the correct spots, this error is most likely on your end

from what I understand in your explanation, so would be the placement of the scripts, right?

(I not speak english so much)


 
Loading ...