Skip to content

Commit

Permalink
Merged things together and made a version 1.4 of it
Browse files Browse the repository at this point in the history
  • Loading branch information
ole committed Aug 15, 2017
1 parent 880ca8c commit bc09a3d
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 61 deletions.
18 changes: 12 additions & 6 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
{
"version": "0.1.0",
"name": "PBO Task",
"command": "cmd",
"isShellCommand": true,
"showOutput": "always",
"args": ["/C"],
"command": "powershell",
"echoCommand": true,
"args": [
"${workspaceRoot}\\setup.ps1"
],
"tasks": [
{
"taskName": "Pack",
"suppressTaskName": true,
"taskName": "Build",
"isBuildCommand": true,
"args": [ "-Build"]
},
{
"suppressTaskName": true,
"taskName": "Patch Mission",
"args": [
"cpbo -y -p \"${workspaceRoot}\\ExileServerMod\\scratchie_server\" \"${workspaceRoot}\\ExileServerMod\\scratchie_server.pbo\""
"-PatchMission"
]
}
]
Expand Down
Binary file modified @ExileServer/addons/scratchie_server.pbo
Binary file not shown.
32 changes: 18 additions & 14 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,43 +1,47 @@
v1.3
1.4
- improved installation by using patch concept (mission files)
- fixed counter when pressing "Buy" or "Use"

1.3
- "No Luck" notification fixed

v1.2
1.2
- another bugfix in ExileServer_lottery_network_request.sqf, reported by user - thanks

v1.1
1.1
- fixed "toast message" when player has won poptabs

v1.0
1.0
- fixed issues for ExileMod version 0.9.8

v0.9
0.9
- slightly improved the announcement of the winner

v0.8
0.8
- implementation of xm8Apps updated

v0.7
0.7
- new feature: Announce the winner to all players (configurable)
- new feature: add items into crates when player has won a weapon (default 3 items - configurable)
- improved: configurable PrizeType a player can win (default: "VehiclePrize", "PoptabPrize", "WeaponPrize" - all)

v0.6
0.6
- improved the vehicle spawn (pbo update required)
- keep the "old" exile.ini (v0.9.35) in this repository
- updated the exile.ini from ExileMod version 0.9.4 "Lime"

v0.5
0.5
- dynamically add correct magazines into crate
So, no need to change ExileServer_lottery_crate_xtras when adding more weapons

v0.4
0.4
- improved the number generation using its own ExileServer_lottery_generate.sqf
- spawn the crates randomly inside trader zone when player has won

v0.3a
0.3a
- fixed extra "," in config.cpp

v0.3
0.3
- support for poptabs and weapon prizes
- additional configuration settings
- updated database table 'xtra_lottery_winner' to support prize clases
Expand All @@ -47,10 +51,10 @@ v0.3
IMPORTANT: lottery.sql AND exile.ini HAS BEEN UPDATED.
IMPORTANT: No need to update the MissionFile

v0.2
0.2
- separated scratchie fron the exile_server.pbo
- easier installation using scratchie_server.pbo
- use config.cpp from its own pbo file

v0.1
0.1
- initial version
88 changes: 47 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Scratchies (*lottery like* minigame for Exile Mod)
<sub>Version: 1.3 | Author: ole1986 | This extension is licensed under the Arma Public Licence</sub>
<sub>Version: 1.4 | Author: ole1986 | This extension is licensed under the Arma Public Licence</sub>

<p align="center">
<img src="images/buyget.jpg" width="250" title="Buy a scratch, get the prize">
Expand All @@ -13,46 +13,63 @@

Videos: [PART #1](https://www.youtube.com/watch?v=zVPXYhhYrbU) [PART #2](https://www.youtube.com/watch?v=2MC45ycnOkc) - thanks to Rythron

## Installation
## Requirements

This README uses some placeholders
+ Arma 3 Tools (installed through Steam - https://community.bistudio.com/wiki/Arma_3_Tools_Installation)

Placeholder | Description
---------------------- | -------------
&lt;MissionFile&gt; | Exile.&lt;Mapname&gt;.pbo (E.g. Exile.Altis.pbo )
&lt;ExileServerMod&gt; | @ExileServer Exile server mod folder located in game directory.
## Build

### Required Tools
You can either use Visual Studio code or the powershell to build and patch all necessary files

+ PBO Manager (I use cpbo from http://www.kegetys.fi/category/gaming/armamods/)
+ Notepad++ or any other Text Editor (https://notepad-plus-plus.org/)
+ Exile Mod version 0.9.8
Use the below command to build server pbo

### Database setup
```
PS> .\setup.ps1 -Build
```

Use the below command to patch your mission file (a dialog will be prompted to select the mission pbo)

```
PS> .\setup.ps1 -PatchMission
```

## Install

After you have followed the steps from the **Build** chapter, the below files are being generated.
Copy these files to your server into the **correct** destination directory

Location | Destination Folder
---------------------------------------- | ----------------------
@MissionFile\<Your.Mission.pbo> | mpmission
@ExileServer\addons\scratchie_server.pbo | @ExileServer\addons\

+ Import the mysql file `mysql\lottery.sql` into your exile database (through mysql or phpmyadmin for example).
## Database setup

+ Import the mysql file `mysql\lottery.sql` into your exile database (either through mysql or phpmyadmin).
+ Copy and repalce the `mysql\exile.ini` with the file located in `<ExileServerMod>\extDB\sql_custom_v2\exile.ini`

### MissionFile
## Battleye

+ **Unpack** the `<MissionFile>`
When you use Battleye, please amend the below BE files to allow remote calls

+ Copy the folders `MissionFile\overrides` and `MissionFile\addons` into your `<MissionFile>` directory
+ Modify the `<MissionFile>\config.cpp` and add the below line inside `class CfgExileCustomCode`
**scripts.txt**

```
ExileClient_gui_xm8_slide_apps_onOpen = "overrides\ExileClient_gui_xm8_slide_apps_onOpen.sqf";
```
+ add the below to the end of line `7 remoteexec`

+ Modify the `<MissionFile>\description.ext` and add the below line inside `class CfgRemoteExec -> class Functions`
`!="remoteExecCall [\"ExileServer_lottery_network_request\"," !="remoteExecCall ['ExileServer_lottery_network_request',"`

**remoteexec.txt**

```
class ExileServer_lottery_network_request { allowedTargets=2; };
```
+ add the below to the end of line `7 ""`

`!"ExileServer_lottery_network_request"`

## Finish

### Exile Server
After all the below steps are properly done, please RESTART the Arma 3 server and log into the game.
You should see three additional "apps" when opening XM8

+ Copy the `ExileServerMod\scratchie_server.pbo` into your `<ExileServerMod>\addons` directory
## Advanced Setup

### Buy Scratchies from Traders

Expand Down Expand Up @@ -80,20 +97,9 @@ _officeTrader addAction ["<t color='#FFFFFF'>Buy Scratchie(200,-)</t>", { ["buy"
_officeTrader addAction ["<t color='#c72651'>Get Prize!</t>", { ["get",ExileClientSessionId, player, ""] remoteExecCall ["ExileServer_lottery_network_request", 2]; }];
```

### Battleye
### Developer Hints

**scripts.txt**

+ add the below to the end of line `7 addAction` (important for office trade action menu)
This project was developed using Visual Studio Code and uses git to manage the source code.
Feel free to Pull Request your changes.

`!="officeTrader addAction"`

+ add the below to the end of line `7 remoteexec`

`!="remoteExecCall [\"ExileServer_lottery_network_request\"," !="remoteExecCall ['ExileServer_lottery_network_request',"`

**remoteexec.txt**

+ add the below to the end of line `7 ""`

`!"ExileServer_lottery_network_request"`
Thank you

0 comments on commit bc09a3d

Please sign in to comment.