Jump to content
A Man

[Release] Over9000 Gambling Script

Recommended Posts

Hey guys, this is the release of my Over9000 Gambling Script. If you like to add this feature to your server you can do it now with that offical release.

Go to github and download the files:

Over9000 Gambling Script

Installation:

1. Put the scripts folder from github into your missionfile root folder where your init.sqf is located.

2. Open your fn_selfactions.sqf and search for:

//Towing with tow truck

Add this code lines above:

Spoiler
_isGamble = _cursorTarget isKindOf "Hooker4"; // Define here the trader or the building where you get the gambling dialog
if (_isGamble && {_isAlive}) then {
	_hasCards = "ItemCards" in magazines player;
	if (_hasCards) then {
		if (s_player_gamblefree < 0) then {
			s_player_gamblefree = player addAction [localize "STR_CL_GAMBLE_PriceFree", "scripts\gamble\gamble.sqf",0, 1, false, true];
		};
	};	
	if (s_player_gamble1 < 0) then {
		s_player_gamble1 = player addAction [localize "STR_CL_GAMBLE_Price1x", "scripts\gamble\gamble.sqf",1000, 1, false, true];
	};
	if (s_player_gamble2 < 0) then {
		s_player_gamble2 = player addAction [localize "STR_CL_GAMBLE_Price2x", "scripts\gamble\gamble.sqf",2000, 1, false, true];
	};
	if (s_player_gamble3 < 0) then {
		s_player_gamble3 = player addAction [localize "STR_CL_GAMBLE_Price3x", "scripts\gamble\gamble.sqf",3000, 1, false, true];
	};
} else {
	player removeAction s_player_gamblefree;
	s_player_gamblefree = -1;
	player removeAction s_player_gamble1;
	s_player_gamble1 = -1;
	player removeAction s_player_gamble2;
	s_player_gamble2 = -1;
	player removeAction s_player_gamble3;
	s_player_gamble3 = -1;
};

 

3. In fn_selfactions search for this codeblock:

Spoiler
player removeAction s_player_fuelauto2;
s_player_fuelauto2 = -1;
player removeAction s_player_manageDoor;
s_player_manageDoor = -1;

 

And add behind:

Spoiler
player removeAction s_player_gamblefree;
s_player_gamblefree = -1;
player removeAction s_player_gamble1;
s_player_gamble1 = -1;
player removeAction s_player_gamble2;
s_player_gamble2 = -1;
player removeAction s_player_gamble3;
s_player_gamble3 = -1;

 

4. Open your variables.sqf and search for:

s_player_manageDoor = -1;

And add behind:

Spoiler
s_player_gamblefree = -1;
s_player_gamble1 = -1;
s_player_gamble2 = -1;
s_player_gamble3 = -1;

 

5. Open your description.ext and search for class CfgSounds

Add inside class CfgSounds

Spoiler
class tada
{
	name="tada";
	sound[]={\scripts\gamble\tada.ogg,0.9,1};
	titles[] = {};
};

 

If you have not a class CfgSounds add:

Spoiler
class CfgSounds	{
	sounds[] = {tada};
	
	class tada
	{
		name="tada";
		sound[]={\scripts\gamble\tada.ogg,0.9,1};
		titles[] = {};
	};
};

 

If you get on server start the error class CfgSounds is alreday defined, search your files for class CfgSounds.

6. Go to https://github.com/oiad/communityLocalizations and add the whole stringtable to the root folder of your missionfile where your init.sqf is.

Usage:

Define here in the fn_selfactions the trader or the building where you get the gambling dialog.

_isGamble = _cursorTarget isKindOf "Hooker4";

Go to dayz_server\traders\YourMapName.sqf and add there the coordiantes and the trader you have defined above.

E.G.:

["Hooker4",[6321,7781,0],9]

If you have defined a building, put it in your custom buildings you are loading on server start.

 

If you have cards you get a free gambling try.

You can gamble for 1000, 2000 and 3000 Coins and get the price 1x, 2x and 3x. The script is not optimized but it works out of the box and can be used with overpoch.

Gamble.jpg.bb8ba289daf2d60a5ce2ba2497d6a9e7.jpg

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By Ghostman
      I'm looking for a lottery script in safezone with trader "lottery for 1x, 2x, 3x or 10k, 20k, 30k" NO EVENTS
    • By anap
      Dear friends, I'm on such an issue. Once I saw the foreign server system "Lottery", in what it consists. Stand when traders are induced to them a list of rates (1, 2, and 3 gold), and with some chance you can drop a random loot (equipment or even a pet, and this happens:-)) or do not fall (as is jackpot). How I was not looking for this script, I can not find. Help can someone know where you can get the script or the like.
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...