Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Commit

Permalink
Update Markdown of OSS. (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
Booster1212 committed Jan 17, 2022
1 parent bb02c89 commit 29931f1
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 67 deletions.
92 changes: 87 additions & 5 deletions plugins/derlord/AthenaFarmController.md
Expand Up @@ -13,14 +13,96 @@ discord: 'Der Lord!#6021'

![Fichier 39mdpi](https://user-images.githubusercontent.com/82890183/148942562-124cf72b-2aca-4a9d-9693-d6f5be7e35c0.png)

Welcome to the Athena Open Source Farm Controller!

Big Thanks especially to deeMace & Borgi.

# Features
- Tools with durability (Build your own)
- Tools with decreasing durability (Build your own)
- Build Custom Routes with custom item returns
- Random item returns so each time you farm you'll get another item maybe
- Build different spots
- Random item returns so each time you farm you'll get another item maybe, can be based on Tools Rarity.
- Build different spots, required tools.
- Anti "E-KEY" Macro
- Random farming times
- Optional Blips, Markers, Particles, Animations & Attachables.
- Synced Tool Objects.
- Userfriendly Usage per Toolbar
- Integrate Fishing System! : )

# Example Route ->
```typescript
// Type IFarming is located here -> athena-os-farming/src/interfaces/IFarming.ts
// import * as alt from 'alt-server';
// import { miningLocations } from '../farmingRoutes/miningRoute/miningLocations';

export const farmRegistry: Array<IFarming> = [
// MINING ROUTE
{
routeName: 'Mining Route',
requiredTool: [
'Mining-Drill', // Uncommon
'Mining-Drill 2', // Common
'Mining-Drill 3', // Rare
'Mining-Drill 4', // Very Rare
'Mining-Drill 5', // Legendary
'Mining-Drill 6', // Unique
],
isAnimation: true,
farmDuration: 10000,
blip: {
text: 'Miners Place',
color: 40,
sprite: 88,
scale: 1,
isBlip: true,
position: { x: 2912.41748046875, y: 2778.765380859375, z: 44.96366882324219 - 1 } as alt.Vector3,
},
marker: {
type: 2,
color: {
r: 10,
g: 156,
b: 0,
a: 255,
},
bobUpAndDown: true,
rotate: true,
isMarker: true,
},
animation: {
dict: 'amb@world_human_const_drill@male@drill@base',
name: 'base',
flags: ANIMATION_FLAGS.REPEAT,
},
attacheable: {
bone: 60309,
model: 'prop_tool_jackham',
pos: { x: 0, y: 0, z: 0 } as alt.Vector3,
rot: { x: 0, y: 0, z: 0 } as alt.Vector3,
},
spots: {
positions: miningLocations,
},
outcome: {
common: ['Iron Ore', 'Cooper Ore'],
rare: ['Silver Ore'],
epic: ['Gold Ore', 'Titanium Ore'],
},
},
];

export const miningLocations: Array<alt.Vector3> = [
{ x: 2975.733154296875, y: 2791.59716796875, z: 40.515140533447266 - 1 } as alt.Vector3,
{ x: 2966.3916015625, y: 2775.824462890625, z: 38.95657730102539 - 1 } as alt.Vector3,
{ x: 2951.238037109375, y: 2770.526611328125, z: 38.99069595336914 - 1 } as alt.Vector3,
{ x: 2937.0654296875, y: 2778.3662109375, z: 39.21839141845703 - 1 } as alt.Vector3,
{ x: 2927.2353515625, y: 2794.62744140625, z: 40.72378921508789 - 1 } as alt.Vector3,
{ x: 2932.526611328125, y: 2813.072021484375, z: 43.69724655151367 - 1 } as alt.Vector3,
{ x: 2947.60986328125, y: 2817.997802734375, z: 42.51972579956055 - 1 } as alt.Vector3,
{ x: 2966.80712890625, y: 2806.69384765625, z: 42.09012222290039 - 1 } as alt.Vector3,
{ x: 2953.723876953125, y: 2789.539794921875, z: 41.44651794433594 - 1 } as alt.Vector3,
];
```

# Setup
- This is an Serverside plugin, so it has to be located at src/core/server-plugins/athena-os-farming
- Import it by import './athena-os-farming/index'; and you are good to go.
- Import it by import './athena-os-farming/index'; and you are good to go.
125 changes: 63 additions & 62 deletions plugins/derlord/OSS.md
@@ -1,14 +1,19 @@
---
layout: ../../../../layouts/Main.astro
title: 'Open Source Shop'
title: "Open Source Shop"
description: "Bringing Shops to the Athena Framework, absolute free and open source! Licensed under MIT"
author: 'Der Lord!'
version: '3.0.4+'
images: ['https://user-images.githubusercontent.com/82890183/148626519-5dc1ced7-a4d9-4f86-a349-26e58729cea8.png', 'https://user-images.githubusercontent.com/82890183/148910952-470985fe-5fed-41ed-8b87-08c9977f71c2.png']
keywords: ['free', 'player', 'server', 'client', 'interface', 'system', 'item']
url: 'https://github.com/Booster1212/OpenSourceShop'
discord: 'Der Lord!#6021'
author: "Der Lord!"
version: "3.0.4+"
images:
[
"https://user-images.githubusercontent.com/82890183/148626519-5dc1ced7-a4d9-4f86-a349-26e58729cea8.png",
"https://user-images.githubusercontent.com/82890183/148910952-470985fe-5fed-41ed-8b87-08c9977f71c2.png",
]
keywords: ["free", "player", "server", "client", "interface", "system", "item"]
url: "https://github.com/Booster1212/OpenSourceShop"
discord: "Der Lord!#6021"
---

# OpenSourceShop

<img src="https://user-images.githubusercontent.com/82890183/148142146-ba173e98-4c11-47d9-95da-6d83de2608af.png" width="650" />
Expand Down Expand Up @@ -36,71 +41,67 @@ So feel free to do whatever you want!
- Drop server/client files into athena-oss -> src/core/client-plugins, client stuff here -> src/core/server-plugins -> server stuff here.

```typescript
Imports (Client) ->
import './OSS/view';
import './OSS/src/client-events';
- Imports (Client) ->
- import './athena-oss/view';
- import './athena-oss/src/client-events';

Imports (Server) ->
import './OSS/index';

// src-webviews/pages/components.ts ->
import ShopUI from './shopUI/ShopUI.vue';
ShopUI: shallowRef(ShopUI)
```
# Setup (Buying Shop - 24/7)
```typescript
export const BUYERS: alt.Vector3[] = [
{ x: 25.980966567993164, y: -1345.6417236328125, z: 28.497024536132812 } as alt.Vector3, // Index 0
];

// Used to give all the shops are different blip, just copy the line as often as you need it.
export const buyerBlips = [
{ sprite: 59, color: 2, text: '24/7 Shop', scale: 1 }, // Index 0
];

// In OSS each Shop can hold individual items or you can add the same list to a few more stores over and over again.
// Default List for all 24/7 & LTD Stores.
const shopList = [
{ name: 'Bread', dbName: 'bread', price: 75, image: 'crate' },
{ name: 'Hotdog', dbName: 'Shophotdog', price: 375, image: 'crate' },
{ name: 'Waterbottle', dbName: 'Shopwater', price: 250, image: 'crate' },
{ name: 'Cola', dbName: 'Shopcola', price: 250, image: 'crate'},
{ name: 'Energy Drink', dbName: 'Shopenergy', price: 300, image: 'crate'}
];
- import './OSS/index';

export const buyLists = [
shopList,
]; // ADD YOUR LISTS HERE!
src-webviews/pages/components.ts ->
- import ShopUI from './shopUI/ShopUI.vue';
- ShopUI: shallowRef(ShopUI)
```

# Setup (Drugsellers)
# Setup (Shops / TYPE)
```typescript
import * as alt from 'alt-server';

// Shops are based on the index of arrays so -> First index -> First sellList
export const SELLERS: alt.Vector3[] = [
{ x: 1163.400634765625, y: -323.938232421875, z: 68.20509338378906 } as alt.Vector3 // SELLER (SHOP-POS) INDEX -> 0
// { Add stuff yourself } Just another seller, INDEX 1 -> The secoond list will get into this position.
];

// Used to give all the shops are different blip, just copy the line as often as you need it.
export const sellersBlips = [
{ sprite: 52, color: 1, text: 'Seller Example - Index 0', scale: 1 }, // Index 0
// IShopLocation & IShop can be imported from "server/athena-oss/src/interfaces"
export const coreShopLocations: IShopLocation[] = [
{ x: 25.980966567993164, y: -1345.6417236328125, z: 28.497024536132812, isBlip: true },
{ x: 374.3475341796875, y: 328.112060546875, z: 102.56637573242188, isBlip: true },
{ x: -3041.32763671875, y: 585.155029296875, z: 6.908928871154785, isBlip: true },
{ x: -3243.743408203125, y: 1001.3903198242188, z: 11.830706596374512, isBlip: true },
{ x: 548.0447387695312, y: 2669.48876953125, z: 41.156490325927734, isBlip: true },
{ x: 1960.2322998046875, y: 3742.317138671875, z: 31.343746185302734, isBlip: true },
{ x: 1730.01171875, y: 6416.22021484375, z: 34.03722381591797, isBlip: true },
{ x: 2555.4609375, y: 382.1643371582031, z: 107.62295532226562, isBlip: true },
];

const burgerBuyer = [
{ name: 'Burger', dbName: 'burger', price: 330, image: 'crate' }, // SellList INDEX -> 0
// { Add stuff yourself. } Second Items for SELLERS Index -> 0
];
const anotherExampleList = [
// { Fill me! } -> Index 1
export const ShopRegistry: IShop[] = [
// BUY SHOP
{
name: '24/7 Shop',
dbName: '24-7-Shop',
blipSprite: 59,
blipColor: 2,
blipScale: 1,
data: {
items: [
{ dbName: 'bread', price: 75 },
{ dbName: 'Shophotdog', price: 375 },
{ dbName: 'Shopwater', price: 250 },
{ dbName: 'Shopcola', price: 250 },
{ dbName: 'Shopenergy', price: 300 },
],
},
locations: coreShopLocations,
},
// SELL SHOP
{
name: 'Seller Example',
dbName: 'SellerExample',
shopType: shopType.SELL,
blipSprite: 52,
blipColor: 1,
blipScale: 1,
data: {
items: [{ dbName: 'burger', price: 330 }],
},
locations: sellerExampleLocations,
},
];

export const sellLists = [burgerBuyer, /*anotherExampleList*/]; // Dont forget to add custom item lists here

```

<img src="https://user-images.githubusercontent.com/82890183/148910952-470985fe-5fed-41ed-8b87-08c9977f71c2.png" width="500"/>
<img src="https://user-images.githubusercontent.com/82890183/148910952-470985fe-5fed-41ed-8b87-08c9977f71c2.png" width="650"/>

![image](https://user-images.githubusercontent.com/82890183/148634183-00270cd2-ba69-4a46-94ba-58434967c890.png)

Expand Down

0 comments on commit 29931f1

Please sign in to comment.