forked from Simnation/Main
ed
This commit is contained in:
parent
369af59fc9
commit
664fa04d1a
40 changed files with 0 additions and 7379 deletions
2
resources/[notify]/okokNotify/.gitattributes
vendored
2
resources/[notify]/okokNotify/.gitattributes
vendored
|
@ -1,2 +0,0 @@
|
||||||
# Auto detect text files and perform LF normalization
|
|
||||||
* text=auto
|
|
|
@ -1,62 +0,0 @@
|
||||||
Hi, thank you for buying my script, I'm very grateful!
|
|
||||||
|
|
||||||
To display a notification you should call it like below:
|
|
||||||
|
|
||||||
# Client side
|
|
||||||
|
|
||||||
exports['okokNotify']:Alert("Title", "Message", Time, 'type')
|
|
||||||
|
|
||||||
# Server side
|
|
||||||
|
|
||||||
TriggerClientEvent('okokNotify:Alert', source, "Title", "Message", Time, 'type')
|
|
||||||
|
|
||||||
|
|
||||||
[Time] - 1000 = 1 second | 5000 = 5 seconds
|
|
||||||
|
|
||||||
Types:
|
|
||||||
- success (green)
|
|
||||||
- info (blue)
|
|
||||||
- warning (yellow)
|
|
||||||
- error (red)
|
|
||||||
- phone (orange)
|
|
||||||
- neutral (grey)
|
|
||||||
|
|
||||||
How to add new colors:
|
|
||||||
|
|
||||||
1. Open styles.css and add the following to the last line.
|
|
||||||
|
|
||||||
/* Example Notification */
|
|
||||||
|
|
||||||
.example-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f11c";
|
|
||||||
color: #color_code;
|
|
||||||
}
|
|
||||||
|
|
||||||
.example {
|
|
||||||
background-color: rgba(20, 20, 20, 0.85);
|
|
||||||
color: #color_code;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.example-border {
|
|
||||||
border-left: 4px solid #color_code;
|
|
||||||
}
|
|
||||||
|
|
||||||
To know the content code navigate to https://fontawesome.com/v5.15/icons?d=gallery&p=2, select an icon and copy it's code.
|
|
||||||
|
|
||||||
2. Open scripts.js and add the following to the line 76.
|
|
||||||
|
|
||||||
else if (event.data.type == 'type') {
|
|
||||||
$(`.title-${number}`).html(event.data.title).css({
|
|
||||||
"font-size": "16px",
|
|
||||||
"font-weight": "600"
|
|
||||||
})
|
|
||||||
$(`.notification_main-${number}`).addClass('type-icon')
|
|
||||||
$(`.wrapper-${number}`).addClass('type type-border')
|
|
||||||
sound.play();
|
|
||||||
}
|
|
||||||
|
|
||||||
Don't forget to change the type to the same name as you choose for "example".
|
|
||||||
|
|
||||||
If you need help contact me on discord: https://discord.gg/Knw8UyqxbQ
|
|
|
@ -1,40 +0,0 @@
|
||||||
function Alert(title, message, time, type)
|
|
||||||
SendNUIMessage({
|
|
||||||
action = 'open',
|
|
||||||
title = title,
|
|
||||||
type = type,
|
|
||||||
message = message,
|
|
||||||
time = time,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
RegisterNetEvent('okokNotify:Alert')
|
|
||||||
AddEventHandler('okokNotify:Alert', function(title, message, time, type)
|
|
||||||
Alert(title, message, time, type)
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Example Commands - Delete them
|
|
||||||
|
|
||||||
RegisterCommand('success', function()
|
|
||||||
exports['okokNotify']:Alert("SUCCESS", "You have sent <span style='color:#47cf73'>420€</span> to Tommy!", 5000, 'success')
|
|
||||||
end)
|
|
||||||
|
|
||||||
RegisterCommand('info', function()
|
|
||||||
exports['okokNotify']:Alert("INFO", "The Casino has opened!", 5000, 'info')
|
|
||||||
end)
|
|
||||||
|
|
||||||
RegisterCommand('error', function()
|
|
||||||
exports['okokNotify']:Alert("ERROR", "Please try again later!", 5000, 'error')
|
|
||||||
end)
|
|
||||||
|
|
||||||
RegisterCommand('warning', function()
|
|
||||||
exports['okokNotify']:Alert("WARNING", "You are getting nervous!", 5000, 'warning')
|
|
||||||
end)
|
|
||||||
|
|
||||||
RegisterCommand('phone', function()
|
|
||||||
exports['okokNotify']:Alert("SMS", "<span style='color:#f38847'>Tommy: </span> Where are you?", 5000, 'phonemessage')
|
|
||||||
end)
|
|
||||||
|
|
||||||
RegisterCommand('longtext', function()
|
|
||||||
exports['okokNotify']:Alert("LONG MESSAGE", "Lorem ipsum dolor sit amet, consectetur adipiscing elit e pluribus unum.", 5000, 'neutral')
|
|
||||||
end)
|
|
|
@ -1,19 +0,0 @@
|
||||||
fx_version 'adamant'
|
|
||||||
|
|
||||||
game 'gta5'
|
|
||||||
|
|
||||||
author 'okok' -- Discord: okok#3488
|
|
||||||
description 'okokNotify'
|
|
||||||
version '1.0'
|
|
||||||
|
|
||||||
ui_page 'html/ui.html'
|
|
||||||
|
|
||||||
client_scripts {
|
|
||||||
'client.lua',
|
|
||||||
}
|
|
||||||
|
|
||||||
files {
|
|
||||||
'html/*.*'
|
|
||||||
}
|
|
||||||
|
|
||||||
export 'Alert'
|
|
|
@ -1,94 +0,0 @@
|
||||||
$(function () {
|
|
||||||
var sound = new Audio('sound.mp3');
|
|
||||||
sound.volume = 0.2;
|
|
||||||
window.addEventListener('message', function (event) {
|
|
||||||
if (event.data.action == 'open') {
|
|
||||||
var number = Math.floor((Math.random() * 1000) + 1);
|
|
||||||
$('.toast').append(`
|
|
||||||
<div class="wrapper-${number}">
|
|
||||||
<div class="notification_main-${number}">
|
|
||||||
<div class="title-${number}"></div>
|
|
||||||
<div class="text-${number}">
|
|
||||||
${event.data.message}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>`)
|
|
||||||
$(`.wrapper-${number}`).css({
|
|
||||||
"margin-bottom": "10px",
|
|
||||||
"width": "275px",
|
|
||||||
"margin": "0 0 8px -180px",
|
|
||||||
"border-radius": "10px"
|
|
||||||
})
|
|
||||||
$('.notification_main-'+number).addClass('main')
|
|
||||||
$('.text-'+number).css({
|
|
||||||
"font-size": "14px"
|
|
||||||
})
|
|
||||||
|
|
||||||
if (event.data.type == 'success') {
|
|
||||||
$(`.title-${number}`).html(event.data.title).css({
|
|
||||||
"font-size": "16px",
|
|
||||||
"font-weight": "600"
|
|
||||||
})
|
|
||||||
$(`.notification_main-${number}`).addClass('success-icon')
|
|
||||||
$(`.wrapper-${number}`).addClass('success success-border')
|
|
||||||
|
|
||||||
} else if (event.data.type == 'info') {
|
|
||||||
$(`.title-${number}`).html(event.data.title).css({
|
|
||||||
"font-size": "16px",
|
|
||||||
"font-weight": "600"
|
|
||||||
})
|
|
||||||
$(`.notification_main-${number}`).addClass('info-icon')
|
|
||||||
$(`.wrapper-${number}`).addClass('info info-border')
|
|
||||||
} else if (event.data.type == 'error') {
|
|
||||||
$(`.title-${number}`).html(event.data.title).css({
|
|
||||||
"font-size": "16px",
|
|
||||||
"font-weight": "600"
|
|
||||||
})
|
|
||||||
$(`.notification_main-${number}`).addClass('error-icon')
|
|
||||||
$(`.wrapper-${number}`).addClass('error error-border')
|
|
||||||
sound.play();
|
|
||||||
|
|
||||||
} else if (event.data.type == 'warning') {
|
|
||||||
$(`.title-${number}`).html(event.data.title).css({
|
|
||||||
"font-size": "16px",
|
|
||||||
"font-weight": "600"
|
|
||||||
})
|
|
||||||
$(`.notification_main-${number}`).addClass('warning-icon')
|
|
||||||
$(`.wrapper-${number}`).addClass('warning warning-border')
|
|
||||||
sound.play();
|
|
||||||
} else if (event.data.type == 'phonemessage') {
|
|
||||||
$(`.title-${number}`).html(event.data.title).css({
|
|
||||||
"font-size": "16px",
|
|
||||||
"font-weight": "600"
|
|
||||||
})
|
|
||||||
$(`.notification_main-${number}`).addClass('phonemessage-icon')
|
|
||||||
$(`.wrapper-${number}`).addClass('phonemessage phonemessage-border')
|
|
||||||
} else if (event.data.type == 'neutral') {
|
|
||||||
$(`.title-${number}`).html(event.data.title).css({
|
|
||||||
"font-size": "16px",
|
|
||||||
"font-weight": "600"
|
|
||||||
})
|
|
||||||
$(`.notification_main-${number}`).addClass('neutral-icon')
|
|
||||||
$(`.wrapper-${number}`).addClass('neutral neutral-border')
|
|
||||||
|
|
||||||
}
|
|
||||||
anime({
|
|
||||||
targets: `.wrapper-${number}`,
|
|
||||||
translateX: -50,
|
|
||||||
duration: 750,
|
|
||||||
easing: 'spring(1, 70, 100, 10)',
|
|
||||||
})
|
|
||||||
setTimeout(function () {
|
|
||||||
anime({
|
|
||||||
targets: `.wrapper-${number}`,
|
|
||||||
translateX: 500,
|
|
||||||
duration: 750,
|
|
||||||
easing: 'spring(1, 80, 100, 0)'
|
|
||||||
})
|
|
||||||
setTimeout(function () {
|
|
||||||
$(`.wrapper-${number}`).remove()
|
|
||||||
}, 750)
|
|
||||||
}, event.data.time)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
Binary file not shown.
|
@ -1,139 +0,0 @@
|
||||||
body {
|
|
||||||
margin-top: 100px;
|
|
||||||
font-family: 'Roboto', sans-serif;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast {
|
|
||||||
width: 100px;
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wrapper {
|
|
||||||
width: 100px;
|
|
||||||
height: auto;
|
|
||||||
background-color: #1e1e1e;
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main {
|
|
||||||
margin: 12px 16px 12px 56px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main::before {
|
|
||||||
font-size: 24px;
|
|
||||||
top: calc(50% - 12px);
|
|
||||||
left: -40px;
|
|
||||||
line-height: 24px;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Success Notification*/
|
|
||||||
|
|
||||||
.success-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f058";
|
|
||||||
color: #47cf73;
|
|
||||||
}
|
|
||||||
|
|
||||||
.success {
|
|
||||||
background-color: rgba(20, 20, 20, 0.85);
|
|
||||||
color: #fff;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.success-border {
|
|
||||||
border-left: 4px solid #47cf73;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Info Notification*/
|
|
||||||
|
|
||||||
.info-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f05a";
|
|
||||||
color: #2f83ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info {
|
|
||||||
background-color: rgba(20, 20, 20, 0.85);
|
|
||||||
color: #fff;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-border {
|
|
||||||
border-left: 4px solid #2f83ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Warning Notification */
|
|
||||||
|
|
||||||
.warning-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f071";
|
|
||||||
color: #ffc107;
|
|
||||||
}
|
|
||||||
|
|
||||||
.warning {
|
|
||||||
background-color: rgba(20, 20, 20, 0.85);
|
|
||||||
color: #fff;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.warning-border {
|
|
||||||
border-left: 4px solid #ffc107;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Error Notification */
|
|
||||||
|
|
||||||
|
|
||||||
.error-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f06a";
|
|
||||||
color: #dc3545;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error {
|
|
||||||
background-color: rgba(20, 20, 20, 0.85);
|
|
||||||
color: #fff;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error-border {
|
|
||||||
border-left: 4px solid #dc3545;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* SMS Notification */
|
|
||||||
|
|
||||||
.phonemessage-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f7cd";
|
|
||||||
color: #f38847;
|
|
||||||
}
|
|
||||||
|
|
||||||
.phonemessage {
|
|
||||||
background-color: rgba(20, 20, 20, 0.85);
|
|
||||||
color: #fff;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.phonemessage-border {
|
|
||||||
border-left: 4px solid #f38847;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Long Text Notification */
|
|
||||||
|
|
||||||
.neutral-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f11c";
|
|
||||||
color: #6c757d;
|
|
||||||
}
|
|
||||||
|
|
||||||
.neutral {
|
|
||||||
background-color: rgba(20, 20, 20, 0.85);
|
|
||||||
color: #fff;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.neutral-border {
|
|
||||||
border-left: 4px solid #6c757d;
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" integrity="sha512-jQqzj2vHVxA/yCojT8pVZjKGOe9UmoYvnOuM/2sQ110vxiajBU+4WkyRs1ODMmd4AfntwUEV4J+VfM6DkfjLRg==" crossorigin="anonymous">
|
|
||||||
<link rel="stylesheet" href="styles.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="toast"></div>
|
|
||||||
|
|
||||||
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js"></script>
|
|
||||||
<script src="scripts.js" type="text/javascript"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,166 +0,0 @@
|
||||||
Hi, thank you for buying my script, I'm very grateful!
|
|
||||||
|
|
||||||
If you need help contact me on discord: okok#3488
|
|
||||||
Discord server: https://discord.gg/FauTgGRUku
|
|
||||||
|
|
||||||
# To display a text UI
|
|
||||||
|
|
||||||
exports['okokTextUI']:Open('[Key] Message', 'color', 'position')
|
|
||||||
|
|
||||||
Colors:
|
|
||||||
- lightblue;
|
|
||||||
- lightgreen;
|
|
||||||
- lightred;
|
|
||||||
- lightgrey;
|
|
||||||
- darkblue;
|
|
||||||
- darkgreen;
|
|
||||||
- darkred;
|
|
||||||
- darkgrey.
|
|
||||||
|
|
||||||
Positions:
|
|
||||||
- right;
|
|
||||||
- left.
|
|
||||||
|
|
||||||
To make the text bold: exports['okokTextUI']:Open('<b>[Key] Message</b>', 'color', 'position')
|
|
||||||
To insert multiple lines/commands in a text UI: exports['okokTextUI']:Open('[Key] Message 1<br>[Key] Message 2', 'color', 'position')
|
|
||||||
|
|
||||||
NOTE: 'color' and 'position' should be placed between ''
|
|
||||||
|
|
||||||
# To hide a text UI
|
|
||||||
|
|
||||||
exports['okokTextUI']:Close()
|
|
||||||
|
|
||||||
How to add new colors:
|
|
||||||
|
|
||||||
1. Open styles.css and add the following to the last line.
|
|
||||||
|
|
||||||
/* Example Notification */
|
|
||||||
|
|
||||||
.example-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f11c";
|
|
||||||
color: #color_code;
|
|
||||||
}
|
|
||||||
|
|
||||||
.example {
|
|
||||||
background-color: rgba(20, 20, 20, 0.85);
|
|
||||||
color: #color_code;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.example-border {
|
|
||||||
border-left: 4px solid #color_code;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Example */
|
|
||||||
|
|
||||||
.examplecolor-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f05a";
|
|
||||||
color: #color_code;
|
|
||||||
font-size: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.examplecolor {
|
|
||||||
background-color: rgba(240, 240, 240, 0.85);
|
|
||||||
color: #fff;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.examplecolor-border {
|
|
||||||
border-left: 4px solid #color_code;
|
|
||||||
}
|
|
||||||
|
|
||||||
If you want to set if the background color is light or dark, simply change the background-color on .examplecolor:
|
|
||||||
- background-color: rgba(240, 240, 240, 1); /* LIGHT BACKGROUND */
|
|
||||||
- background-color: rgba(20, 20, 20, 1); /* DARK BACKGROUND */
|
|
||||||
|
|
||||||
|
|
||||||
2. Open scripts.js and add the following to the line 64.
|
|
||||||
|
|
||||||
else if (event.data.color == 'examplecolor') { // Example Color
|
|
||||||
removeClass();
|
|
||||||
$('#main').addClass('examplecolor-icon');
|
|
||||||
$('#wrapper').addClass('examplecolor examplecolor-border');
|
|
||||||
}
|
|
||||||
|
|
||||||
3. In order to make esx_doorlock functional change the code of the function started in the line 69 (client.lua) and do the following:
|
|
||||||
|
|
||||||
```
|
|
||||||
Citizen.CreateThread(function()
|
|
||||||
local inZone = false
|
|
||||||
local locked = true
|
|
||||||
local hasAuth = false
|
|
||||||
local shown = false
|
|
||||||
local size, displayText = 1, _U('unlocked')
|
|
||||||
local color
|
|
||||||
|
|
||||||
while true do
|
|
||||||
Citizen.Wait(0)
|
|
||||||
local letSleep = true
|
|
||||||
inZone = false
|
|
||||||
for k,v in ipairs(Config.DoorList) do
|
|
||||||
if v.distanceToPlayer and v.distanceToPlayer < 50 then
|
|
||||||
letSleep = false
|
|
||||||
|
|
||||||
if v.doors then
|
|
||||||
for k2,v2 in ipairs(v.doors) do
|
|
||||||
FreezeEntityPosition(v2.object, v.locked)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
FreezeEntityPosition(v.object, v.locked)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if v.distanceToPlayer and v.distanceToPlayer < v.maxDistance then
|
|
||||||
inZone = true
|
|
||||||
|
|
||||||
|
|
||||||
if v.size then
|
|
||||||
size = v.size
|
|
||||||
end
|
|
||||||
if v.locked then
|
|
||||||
locked = true
|
|
||||||
else
|
|
||||||
locked = false
|
|
||||||
end
|
|
||||||
if v.isAuthorized then
|
|
||||||
hasAuth = true
|
|
||||||
elseif not v.isAuthorized then
|
|
||||||
hasAuth = false
|
|
||||||
end
|
|
||||||
|
|
||||||
if IsControlJustReleased(0, 38) then
|
|
||||||
if v.isAuthorized then
|
|
||||||
v.locked = not v.locked
|
|
||||||
locked = v.locked
|
|
||||||
TriggerServerEvent('esx_doorlock:updateState', k, v.locked) -- broadcast new state of the door to everyone
|
|
||||||
shown = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if inZone and not shown then
|
|
||||||
shown = true
|
|
||||||
if locked and hasAuth then
|
|
||||||
exports['okokTextUI']:Open('[E] Locked', 'lightred', 'left')
|
|
||||||
elseif not locked and hasAuth then
|
|
||||||
exports['okokTextUI']:Open('[E] Unlocked', 'lightgreen', 'left')
|
|
||||||
elseif locked then
|
|
||||||
exports['okokTextUI']:Open('Locked', 'lightred', 'left')
|
|
||||||
else
|
|
||||||
exports['okokTextUI']:Open('Unlocked', 'lightgreen', 'left')
|
|
||||||
end
|
|
||||||
elseif not inZone and shown then
|
|
||||||
exports['okokTextUI']:Close()
|
|
||||||
shown = false
|
|
||||||
end
|
|
||||||
|
|
||||||
if letSleep then
|
|
||||||
Citizen.Wait(500)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
```
|
|
|
@ -1,31 +0,0 @@
|
||||||
function Open(message, color, position)
|
|
||||||
SendNUIMessage({
|
|
||||||
action = 'open',
|
|
||||||
message = message,
|
|
||||||
color = color,
|
|
||||||
position = position,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
function Close()
|
|
||||||
SendNUIMessage({
|
|
||||||
action = 'close'
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
RegisterNetEvent('okokTextUI:Open')
|
|
||||||
AddEventHandler('okokTextUI:Open', function(message, color, position)
|
|
||||||
SendNUIMessage({
|
|
||||||
action = 'open',
|
|
||||||
message = message,
|
|
||||||
color = color,
|
|
||||||
position = position,
|
|
||||||
})
|
|
||||||
end)
|
|
||||||
|
|
||||||
RegisterNetEvent('okokTextUI:Close')
|
|
||||||
AddEventHandler('okokTextUI:Close', function()
|
|
||||||
SendNUIMessage({
|
|
||||||
action = 'close'
|
|
||||||
})
|
|
||||||
end)
|
|
|
@ -1,20 +0,0 @@
|
||||||
fx_version 'adamant'
|
|
||||||
|
|
||||||
game 'gta5'
|
|
||||||
|
|
||||||
author 'okok' -- Discord: okok#3488
|
|
||||||
description 'okokTextUI'
|
|
||||||
version '1.0'
|
|
||||||
|
|
||||||
ui_page 'web/ui.html'
|
|
||||||
|
|
||||||
client_scripts {
|
|
||||||
'client.lua',
|
|
||||||
}
|
|
||||||
|
|
||||||
files {
|
|
||||||
'web/*.*'
|
|
||||||
}
|
|
||||||
|
|
||||||
export 'Open'
|
|
||||||
export 'Close'
|
|
|
@ -1,89 +0,0 @@
|
||||||
played_sound = false
|
|
||||||
position = ''
|
|
||||||
|
|
||||||
function removeClass() {
|
|
||||||
$("#main").removeClass();
|
|
||||||
$("#wrapper").removeClass();
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener('message', function(event) {
|
|
||||||
var sound = new Audio('sound.mp3');
|
|
||||||
sound.volume = 0.2;
|
|
||||||
|
|
||||||
if (event.data.action == 'open') {
|
|
||||||
position = event.data.position;
|
|
||||||
message = event.data.message;
|
|
||||||
|
|
||||||
$('#message').html(message);
|
|
||||||
|
|
||||||
if (position == 'right') {
|
|
||||||
$('#ui').css('left', '');
|
|
||||||
$('#ui').css('right', '1%');
|
|
||||||
$('#ui').removeClass('hideright');
|
|
||||||
$('#ui').addClass('showright');
|
|
||||||
}
|
|
||||||
if (position == 'left') {
|
|
||||||
$('#ui').css('right', '');
|
|
||||||
$('#ui').css('left', '1%');
|
|
||||||
$('#ui').removeClass('hideleft');
|
|
||||||
$('#ui').addClass('showleft');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (event.data.color == 'lightblue') { // Light Blue
|
|
||||||
removeClass();
|
|
||||||
$('#main').addClass('lightblue-icon');
|
|
||||||
$('#wrapper').addClass('lightblue lightblue-border');
|
|
||||||
} else if (event.data.color == 'lightgreen') { // Light Green
|
|
||||||
removeClass();
|
|
||||||
$('#main').addClass('lightgreen-icon');
|
|
||||||
$('#wrapper').addClass('lightgreen lightgreen-border');
|
|
||||||
} else if (event.data.color == 'lightred') { // Light Red
|
|
||||||
removeClass();
|
|
||||||
$('#main').addClass('lightred-icon');
|
|
||||||
$('#wrapper').addClass('lightred lightred-border');
|
|
||||||
} else if (event.data.color == 'lightgrey') { // Light Red
|
|
||||||
removeClass();
|
|
||||||
$('#main').addClass('lightgrey-icon');
|
|
||||||
$('#wrapper').addClass('lightgrey lightgrey-border');
|
|
||||||
} else if (event.data.color == 'darkblue') { // Dark Blue
|
|
||||||
removeClass();
|
|
||||||
$('#main').addClass('darkblue-icon');
|
|
||||||
$('#wrapper').addClass('darkblue darkblue-border');
|
|
||||||
} else if (event.data.color == 'darkgreen') { // Dark Green
|
|
||||||
removeClass();
|
|
||||||
$('#main').addClass('darkgreen-icon');
|
|
||||||
$('#wrapper').addClass('darkgreen darkgreen-border');
|
|
||||||
} else if (event.data.color == 'darkred') { // Dark Red
|
|
||||||
removeClass();
|
|
||||||
$('#main').addClass('darkred-icon');
|
|
||||||
$('#wrapper').addClass('darkred darkred-border');
|
|
||||||
} else if (event.data.color == 'darkgrey') { // Dark Grey
|
|
||||||
removeClass();
|
|
||||||
$('#main').addClass('darkgrey-icon');
|
|
||||||
$('#wrapper').addClass('darkgrey darkgrey-border');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (played_sound == false) {
|
|
||||||
played_sound = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (event.data.action == 'close') {
|
|
||||||
|
|
||||||
if (position == 'right') {
|
|
||||||
$('#ui').removeClass('hideleft');
|
|
||||||
$('#ui').removeClass('showleft');
|
|
||||||
$('#ui').removeClass('showright');
|
|
||||||
$('#ui').addClass('hideright');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (position == 'left') {
|
|
||||||
$('#ui').removeClass('hideright');
|
|
||||||
$('#ui').removeClass('showright');
|
|
||||||
$('#ui').removeClass('showleft');
|
|
||||||
$('#ui').addClass('hideleft');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
played_sound = false;
|
|
||||||
})
|
|
||||||
|
|
Binary file not shown.
|
@ -1,268 +0,0 @@
|
||||||
@import url('https://fonts.googleapis.com/css?family=Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i&subset=devanagari,latin-ext');
|
|
||||||
|
|
||||||
html, body{
|
|
||||||
font-family: 'Poppins', sans-serif;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes showright {
|
|
||||||
0% {
|
|
||||||
transform: translateX(100%);
|
|
||||||
}
|
|
||||||
40% {
|
|
||||||
transform: translateX(0%);
|
|
||||||
}
|
|
||||||
80%, 100% {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateX(0px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.showright {
|
|
||||||
animation: showright 1s ease forwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes hideright {
|
|
||||||
0% {
|
|
||||||
transform: translateX(0px);
|
|
||||||
}
|
|
||||||
40% {
|
|
||||||
transform: translateX(-5%);
|
|
||||||
}
|
|
||||||
80%, 100% {
|
|
||||||
opacity: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
transform: translateX(100%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.hideright {
|
|
||||||
animation: hideright 1s ease forwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes showleft {
|
|
||||||
0% {
|
|
||||||
transform: translateX(-100%);
|
|
||||||
}
|
|
||||||
40% {
|
|
||||||
transform: translateX(0%);
|
|
||||||
}
|
|
||||||
80%, 100% {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateX(0px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.showleft {
|
|
||||||
animation: showleft 1s ease forwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes hideleft {
|
|
||||||
0% {
|
|
||||||
transform: translateX(0px);
|
|
||||||
}
|
|
||||||
40% {
|
|
||||||
transform: translateX(5%);
|
|
||||||
}
|
|
||||||
80%, 100% {
|
|
||||||
opacity: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
transform: translateX(-100%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.hideleft {
|
|
||||||
animation: hideleft 1s ease forwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ui {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#wrapper {
|
|
||||||
height: auto;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
min-width: 275px;
|
|
||||||
margin: 0 0 8px 0;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#main {
|
|
||||||
margin: 12px 16px 12px 56px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
#main::before {
|
|
||||||
font-size: 24px;
|
|
||||||
top: calc(50% - 12px);
|
|
||||||
left: -40px;
|
|
||||||
line-height: 24px;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
#message {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Light Blue */
|
|
||||||
|
|
||||||
.lightblue-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f05a";
|
|
||||||
color: #234799;
|
|
||||||
font-size: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lightblue {
|
|
||||||
background-color: rgba(240, 240, 240, 0.85);
|
|
||||||
color: #234799;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lightblue-border {
|
|
||||||
border-left: 4px solid #234799;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Light Green */
|
|
||||||
|
|
||||||
.lightgreen-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f05a";
|
|
||||||
color: #20ab4d;
|
|
||||||
font-size: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lightgreen {
|
|
||||||
background-color: rgba(240, 240, 240, 0.85);
|
|
||||||
color: #20ab4d;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lightgreen-border {
|
|
||||||
border-left: 4px solid #20ab4d;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Light Red */
|
|
||||||
|
|
||||||
.lightred-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f05a";
|
|
||||||
color: #dc3545;
|
|
||||||
font-size: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lightred {
|
|
||||||
background-color: rgba(240, 240, 240, 0.85);
|
|
||||||
color: #dc3545;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lightred-border {
|
|
||||||
border-left: 4px solid #dc3545;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Light Grey */
|
|
||||||
|
|
||||||
.lightgrey-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f05a";
|
|
||||||
color: #646464;
|
|
||||||
font-size: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lightgrey {
|
|
||||||
background-color: rgba(240, 240, 240, 0.85);
|
|
||||||
color: #646464;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lightgrey-border {
|
|
||||||
border-left: 4px solid #646464;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dark Blue */
|
|
||||||
|
|
||||||
.darkblue-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f05a";
|
|
||||||
color: #2f83ff;
|
|
||||||
font-size: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.darkblue {
|
|
||||||
background-color: rgba(20, 20, 20, 0.85);
|
|
||||||
color: #fff;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.darkblue-border {
|
|
||||||
border-left: 4px solid #2f83ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dark Green */
|
|
||||||
|
|
||||||
.darkgreen-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f05a";
|
|
||||||
color: #47cf73;
|
|
||||||
font-size: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.darkgreen {
|
|
||||||
background-color: rgba(20, 20, 20, 0.85);
|
|
||||||
color: #fff;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.darkgreen-border {
|
|
||||||
border-left: 4px solid #47cf73;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dark Red */
|
|
||||||
|
|
||||||
.darkred-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f05a";
|
|
||||||
color: #dc3545;
|
|
||||||
font-size: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.darkred {
|
|
||||||
background-color: rgba(20, 20, 20, 0.85);
|
|
||||||
color: #fff;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.darkred-border {
|
|
||||||
border-left: 4px solid #dc3545;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dark Grey */
|
|
||||||
|
|
||||||
.darkgrey-icon::before {
|
|
||||||
font-family: "Font Awesome 5 Free";
|
|
||||||
content: "\f05a";
|
|
||||||
color: #969696;
|
|
||||||
font-size: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.darkgrey {
|
|
||||||
background-color: rgba(20, 20, 20, 0.85);
|
|
||||||
color: #fff;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.darkgrey-border {
|
|
||||||
border-left: 4px solid #969696;
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" integrity="sha512-jQqzj2vHVxA/yCojT8pVZjKGOe9UmoYvnOuM/2sQ110vxiajBU+4WkyRs1ODMmd4AfntwUEV4J+VfM6DkfjLRg==" crossorigin="anonymous">
|
|
||||||
<link rel="stylesheet" href="styles.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div id="ui">
|
|
||||||
<div id="wrapper">
|
|
||||||
<div id="main">
|
|
||||||
<div id="message"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js"></script>
|
|
||||||
<script src="scripts.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Binary file not shown.
|
@ -1,7 +0,0 @@
|
||||||
Hi, thank you for buying okokChat! :)
|
|
||||||
|
|
||||||
If you need help contact me on discord: okok#3488
|
|
||||||
Discord server: https://discord.gg/okok
|
|
||||||
Docs: https://docs.okokscripts.io/
|
|
||||||
|
|
||||||
-> Installation Guide: https://docs.okokscripts.io/scripts/okokchat
|
|
|
@ -1,225 +0,0 @@
|
||||||
local players = {}
|
|
||||||
local defaultScale = 0.7 -- Text scale
|
|
||||||
local displayTime = 3500 -- Duration to display the text (in ms)
|
|
||||||
local distToDraw = 250 -- Min. distance to draw
|
|
||||||
|
|
||||||
local pedDisplaying = {}
|
|
||||||
|
|
||||||
local function DrawText3D(coords, text, color)
|
|
||||||
local camCoords = GetGameplayCamCoord()
|
|
||||||
local dist = #(coords - camCoords)
|
|
||||||
local scale = 200 / (GetGameplayCamFov() * dist)
|
|
||||||
SetTextColour(color.r, color.g, color.b, color.a)
|
|
||||||
SetTextScale(0.0, defaultScale * scale)
|
|
||||||
SetTextDropshadow(0, 0, 0, 0, 55)
|
|
||||||
SetTextDropShadow()
|
|
||||||
SetTextFont(6)
|
|
||||||
SetTextCentre(true)
|
|
||||||
BeginTextCommandDisplayText("STRING")
|
|
||||||
AddTextComponentSubstringPlayerName(text)
|
|
||||||
SetDrawOrigin(coords, 0)
|
|
||||||
EndTextCommandDisplayText(0.0, 0.0)
|
|
||||||
ClearDrawOrigin()
|
|
||||||
end
|
|
||||||
|
|
||||||
local function Display(ped, text, color)
|
|
||||||
local playerPed = PlayerPedId()
|
|
||||||
local playerCoords = GetEntityCoords(playerPed)
|
|
||||||
local pedCoords = GetEntityCoords(ped)
|
|
||||||
local dist = #(playerCoords - pedCoords)
|
|
||||||
if dist <= distToDraw then
|
|
||||||
pedDisplaying[ped] = (pedDisplaying[ped] or 1) + 1
|
|
||||||
local display = true
|
|
||||||
Citizen.CreateThread(function()
|
|
||||||
Wait(displayTime)
|
|
||||||
display = false
|
|
||||||
end)
|
|
||||||
local offset = 0.7 + pedDisplaying[ped] * 0.15
|
|
||||||
while display do
|
|
||||||
if HasEntityClearLosToEntity(playerPed, ped, 17 ) then
|
|
||||||
local x, y, z = table.unpack(GetEntityCoords(ped))
|
|
||||||
z = z + offset
|
|
||||||
DrawText3D(vector3(x, y, z), text, color)
|
|
||||||
end
|
|
||||||
Wait(0)
|
|
||||||
end
|
|
||||||
pedDisplaying[ped] = pedDisplaying[ped] - 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- For 3dme:
|
|
||||||
RegisterNetEvent('okokChat:3dme')
|
|
||||||
AddEventHandler('okokChat:3dme', function(text, serverId)
|
|
||||||
local player = GetPlayerFromServerId(serverId)
|
|
||||||
if player ~= -1 then
|
|
||||||
local ped = GetPlayerPed(player)
|
|
||||||
local color = { r = 0, g = 0, b = 255, a = 255 } -- blue color
|
|
||||||
Display(ped, text, color)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- For 3ddo:
|
|
||||||
RegisterNetEvent('okokChat:3ddo')
|
|
||||||
AddEventHandler('okokChat:3ddo', function(text, serverId)
|
|
||||||
local player = GetPlayerFromServerId(serverId)
|
|
||||||
if player ~= -1 then
|
|
||||||
local ped = GetPlayerPed(player)
|
|
||||||
local color = { r = 222, g = 255, b = 0, a = 255 } -- yellow color
|
|
||||||
Display(ped, text, color)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
exports('Message', function(background, color, icon, title, playername, message, target, image)
|
|
||||||
TriggerServerEvent('okokChat:ServerMessage', background, color, icon, title, playername, message, target, image)
|
|
||||||
end)
|
|
||||||
|
|
||||||
AddEventHandler('playerSpawned', function()
|
|
||||||
TriggerServerEvent('okokChat:onPlayerSpawn')
|
|
||||||
end)
|
|
||||||
|
|
||||||
RegisterNetEvent("okokChat:getAllPlayers")
|
|
||||||
AddEventHandler("okokChat:getAllPlayers", function()
|
|
||||||
local coords = GetEntityCoords(PlayerPedId())
|
|
||||||
local closePlayers = {}
|
|
||||||
local allPlayers = GetActivePlayers()
|
|
||||||
local playerCount = 1
|
|
||||||
local pedID = PlayerPedId()
|
|
||||||
|
|
||||||
for i = 1, #allPlayers do
|
|
||||||
local playerId = allPlayers[i]
|
|
||||||
local playerPed = GetPlayerPed(playerId)
|
|
||||||
local playerCoords = GetEntityCoords(playerPed)
|
|
||||||
|
|
||||||
table.insert(closePlayers, GetPlayerServerId(playerId))
|
|
||||||
playerCount += 1
|
|
||||||
end
|
|
||||||
|
|
||||||
TriggerServerEvent("okokChat:SetClosePlayers", closePlayers)
|
|
||||||
end)
|
|
||||||
|
|
||||||
RegisterNetEvent("okokChat:checkDeathStatus")
|
|
||||||
AddEventHandler("okokChat:checkDeathStatus", function()
|
|
||||||
local ped = GetPlayerPed(-1)
|
|
||||||
TriggerServerEvent('okokChat:deathStatus', IsEntityDead(ped))
|
|
||||||
end)
|
|
||||||
|
|
||||||
RegisterNetEvent("okokChat:Notification")
|
|
||||||
AddEventHandler("okokChat:Notification", function(info, text)
|
|
||||||
exports['okokNotify']:Alert(info.title, text, info.time, info.type)
|
|
||||||
end)
|
|
||||||
|
|
||||||
Citizen.CreateThread(function()
|
|
||||||
|
|
||||||
if Config.JobChat then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.JobCommand, 'JOB message', {
|
|
||||||
{ name="message", help="message to send" },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.EnableOOC then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.OOCCommand, 'OOC message', {
|
|
||||||
{ name="message", help="message to send" },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.AllowPlayersToClearTheirChat then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.ClearChatCommand, 'Clear chat', {})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.EnableHideChat then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.HideChatCommand, 'Hide chat', {})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.EnableStaffCommand then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.StaffCommand, 'Send a message as staff', {
|
|
||||||
{ name="message", help="message to send" },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.AllowStaffsToClearEveryonesChat then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.ClearEveryonesChatCommand, "Clear everyone's chat", {})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.EnableStaffOnlyCommand then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.StaffOnlyCommand, 'Staff only chat', {
|
|
||||||
{ name="message", help="message to send" },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.EnableAdvertisementCommand then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.AdvertisementCommand, 'Make an advertisement', {
|
|
||||||
{ name="ad", help="advertisement message" },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.EnableAnonymousCommand then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.AnonymousCommand, 'Send an anonymous message', {
|
|
||||||
{ name="message", help="message to send" },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.EnableTwitchCommand then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.TwitchCommand, 'Twitch message', {
|
|
||||||
{ name="message", help="message to send" },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.EnableYoutubeCommand then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.YoutubeCommand, 'YouTube message', {
|
|
||||||
{ name="message", help="message to send" },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.EnableTwitterCommand then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.TwitterCommand, 'Twitter message', {
|
|
||||||
{ name="message", help="message to send" },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.EnablePoliceCommand then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.PoliceCommand, 'Police message', {
|
|
||||||
{ name="message", help="message to send" },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.EnableAmbulanceCommand then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.AmbulanceCommand, 'Ambulance message', {
|
|
||||||
{ name="message", help="message to send" },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.TimeOutPlayers then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.TimeOutCommand, 'Mute player', {
|
|
||||||
{ name="id", help="id of the player to mute" },
|
|
||||||
{ name="time", help="time in minutes" }
|
|
||||||
})
|
|
||||||
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.RemoveTimeOutCommand, 'Unmute player', {
|
|
||||||
{ name="id", help="id of the player to unmute" }
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.EnableMe then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.MeCommand, 'Send a me message', {
|
|
||||||
{ name="action", help="me action" }
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.EnableTry then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.TryCommand, 'Send a try message', {
|
|
||||||
{ name="action", help="try action" }
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.EnableDo then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.DoCommand, 'Send a do message', {
|
|
||||||
{ name="action", help="do action" }
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.EnableDocCommand then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.DocCommand, 'Send a do message', {
|
|
||||||
{ name="number", help="number countdown" }
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end)
|
|
|
@ -1,349 +0,0 @@
|
||||||
Config = {}
|
|
||||||
|
|
||||||
Config.QBPermissionsUpdate = true -- set it to true if you have the latest Permissions update
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Discord Logs]
|
|
||||||
|
|
||||||
Config.EnableDiscordLogs = true
|
|
||||||
|
|
||||||
Config.IconURL = ""
|
|
||||||
|
|
||||||
Config.ServerName = ""
|
|
||||||
|
|
||||||
-- To change a webhook color you need to set the decimal value of a color, you can use this website to do that - https://www.mathsisfun.com/hexadecimal-decimal-colors.html
|
|
||||||
|
|
||||||
Config.WebhookColor = "16741888"
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Staff Groups]
|
|
||||||
|
|
||||||
Config.StaffGroups = { -- Groups that can access the different staff chats (/staff, /staffo, /sa)
|
|
||||||
'god',
|
|
||||||
'admin',
|
|
||||||
'mod'
|
|
||||||
}
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [General]
|
|
||||||
|
|
||||||
Config.AllowPlayersToClearTheirChat = true
|
|
||||||
|
|
||||||
Config.ClearChatCommand = 'clear'
|
|
||||||
|
|
||||||
Config.EnableHideChat = true
|
|
||||||
|
|
||||||
Config.HideChatCommand = 'hide'
|
|
||||||
|
|
||||||
Config.ShowIDOnMessage = true -- Shows the player ID on every message that is sent
|
|
||||||
|
|
||||||
Config.ShowIDOnMessageForEveryone = false -- true: shows the player ID for everyone | false: shows it only for staffs
|
|
||||||
|
|
||||||
Config.ClearChatMessageTitle = 'SYSTEM'
|
|
||||||
|
|
||||||
Config.ClearChatMessage = 'Chat ist Sauber!'
|
|
||||||
|
|
||||||
-- [Date Format]
|
|
||||||
|
|
||||||
Config.DateFormat = '%H:%M' -- To change the date format check this website - https://www.lua.org/pil/22.1.html
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Time Out]
|
|
||||||
|
|
||||||
Config.TimeOutPlayers = false
|
|
||||||
|
|
||||||
Config.TimeOutCommand = "mute"
|
|
||||||
|
|
||||||
Config.RemoveTimeOutCommand = "unmute"
|
|
||||||
|
|
||||||
Config.ShowTimeOutMessageForEveryone = false
|
|
||||||
|
|
||||||
Config.TimeOutIcon = 'fas fa-gavel'
|
|
||||||
|
|
||||||
Config.MessageTitle = 'SERVER'
|
|
||||||
|
|
||||||
Config.TimeOutMessages = {
|
|
||||||
['muted_for'] = '<b>{3}</b> has been muted for <b>{1}</b> minutes',
|
|
||||||
['you_muted_for'] = 'You muted <b>{3}</b> for <b>{1}</b> minutes',
|
|
||||||
['been_muted_for'] = 'You have been muted for <b>{0}</b> minutes',
|
|
||||||
|
|
||||||
['you_unmuted'] = 'You unmuted <b>{2}</b>',
|
|
||||||
['been_unmuted'] = 'You have been unmuted',
|
|
||||||
|
|
||||||
['muted_message'] = 'You are muted for <b>{0}</b>',
|
|
||||||
['seconds'] = ' seconds',
|
|
||||||
['minutes'] = ' minutes',
|
|
||||||
['hours'] = ' hours',
|
|
||||||
}
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Job]
|
|
||||||
|
|
||||||
Config.JobChat = false
|
|
||||||
|
|
||||||
Config.JobCommand = 'jobc'
|
|
||||||
|
|
||||||
Config.JobIcon = 'fas fa-briefcase'
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Private Message]
|
|
||||||
|
|
||||||
Config.EnablePM = true
|
|
||||||
|
|
||||||
Config.PMCommand = 'pm'
|
|
||||||
|
|
||||||
Config.PMIcon = 'fas fa-comment pm-icon'
|
|
||||||
|
|
||||||
Config.PMMessageTitle = "PM"
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [OOC/Me/Do/Try]
|
|
||||||
|
|
||||||
Config.Distance = 20.0
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [OOC]
|
|
||||||
|
|
||||||
Config.EnableOOC = false
|
|
||||||
|
|
||||||
Config.OOCCommand = 'ooc'
|
|
||||||
|
|
||||||
Config.OOCIcon = 'fas fa-door-open'
|
|
||||||
|
|
||||||
Config.OOCMessageTitle = 'OOC'
|
|
||||||
|
|
||||||
Config.OOCMessageWithoutCommand = false -- true: sends OOC message without command (/ooc) | false: doesn't send any message without it being a command
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Me]
|
|
||||||
|
|
||||||
Config.EnableMeCommand = true
|
|
||||||
|
|
||||||
Config.Enable3DMe = true
|
|
||||||
|
|
||||||
Config.MeCommand = 'me'
|
|
||||||
|
|
||||||
Config.MeIcon = 'fas fa-comment me-icon'
|
|
||||||
|
|
||||||
Config.MeMessageTitle = 'ME'
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Do]
|
|
||||||
|
|
||||||
Config.EnableDoCommand = false
|
|
||||||
|
|
||||||
Config.Enable3DDo = false
|
|
||||||
|
|
||||||
Config.DoCommand = 'do'
|
|
||||||
|
|
||||||
Config.DoIcon = 'fas fa-comment do-icon'
|
|
||||||
|
|
||||||
Config.DoMessageTitle = 'DO'
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Try]
|
|
||||||
|
|
||||||
Config.EnableTryCommand = false
|
|
||||||
|
|
||||||
Config.TryCommand = 'try'
|
|
||||||
|
|
||||||
Config.TryIcon = 'fas fa-comment try-icon'
|
|
||||||
|
|
||||||
Config.TryMessageTitle = 'TRY'
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Staff]
|
|
||||||
|
|
||||||
Config.EnableStaffCommand = false
|
|
||||||
|
|
||||||
Config.StaffCommand = 'staff'
|
|
||||||
|
|
||||||
Config.StaffMessageTitle = 'STAFF'
|
|
||||||
|
|
||||||
Config.StaffIcon = 'fas fa-shield-alt'
|
|
||||||
|
|
||||||
Config.AllowStaffsToClearEveryonesChat = false
|
|
||||||
|
|
||||||
Config.ClearEveryonesChatCommand = 'clearall'
|
|
||||||
|
|
||||||
Config.StaffSteamName = false
|
|
||||||
|
|
||||||
-- [Staff Only]
|
|
||||||
|
|
||||||
Config.EnableStaffOnlyCommand = false
|
|
||||||
|
|
||||||
Config.StaffOnlyCommand = 'staffo'
|
|
||||||
|
|
||||||
Config.StaffOnlyMessageTitle = 'STAFF ONLY'
|
|
||||||
|
|
||||||
Config.StaffOnlyIcon = 'fas fa-eye-slash'
|
|
||||||
|
|
||||||
Config.StaffOnlySteamName = false
|
|
||||||
|
|
||||||
-- [Server Announcement]
|
|
||||||
|
|
||||||
Config.EnableServerAnnouncement = true
|
|
||||||
|
|
||||||
Config.ServerAnnouncementCommand = 'sa'
|
|
||||||
|
|
||||||
Config.AnnouncementIcon = 'fas fa-exclamation-circle'
|
|
||||||
|
|
||||||
Config.AnnouncementMessageTitle = 'Regierung'
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Advertisements]
|
|
||||||
|
|
||||||
Config.EnableAdvertisementCommand = true
|
|
||||||
|
|
||||||
Config.AdvertisementCommand = 'ad'
|
|
||||||
|
|
||||||
Config.AdvertisementPrice = 1000
|
|
||||||
|
|
||||||
Config.AdvertisementCooldown = 5 -- in minutes
|
|
||||||
|
|
||||||
Config.AdvertisementIcon = 'fas fa-ad'
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Anonymous/Dark]
|
|
||||||
|
|
||||||
Config.EnableAnonymousCommand = false
|
|
||||||
|
|
||||||
Config.AnonymousCommand = 'anon'
|
|
||||||
|
|
||||||
Config.AnonymousPrice = 1000
|
|
||||||
|
|
||||||
Config.AnonymousCooldown = 5 -- in minutes
|
|
||||||
|
|
||||||
Config.WhatJobsCantSeeAnonymousChat = {
|
|
||||||
'police',
|
|
||||||
'ambulance',
|
|
||||||
}
|
|
||||||
|
|
||||||
Config.AnonymousIcon = 'fas fa-mask'
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Twitch]
|
|
||||||
|
|
||||||
Config.EnableTwitchCommand = false
|
|
||||||
|
|
||||||
Config.TwitchCommand = 'twitch'
|
|
||||||
|
|
||||||
-- Types of identifiers: steam: | license: | xbl: | live: | discord: | fivem: | ip:
|
|
||||||
Config.TwitchList = {
|
|
||||||
'steam:110000118a12j8a', -- Example, change this
|
|
||||||
}
|
|
||||||
|
|
||||||
Config.TwitchIcon = 'fab fa-twitch'
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Youtube]
|
|
||||||
|
|
||||||
Config.EnableYoutubeCommand = false
|
|
||||||
|
|
||||||
Config.YoutubeCommand = 'youtube'
|
|
||||||
|
|
||||||
-- Types of identifiers: steam: | license: | xbl: | live: | discord: | fivem: | ip:
|
|
||||||
Config.YoutubeList = {
|
|
||||||
'steam:110000118a12j8a', -- Example, change this
|
|
||||||
}
|
|
||||||
|
|
||||||
Config.YoutubeIcon = 'fab fa-youtube'
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Twitter]
|
|
||||||
|
|
||||||
Config.EnableTwitterCommand = false
|
|
||||||
|
|
||||||
Config.TwitterCommand = 'twitter'
|
|
||||||
|
|
||||||
Config.TwitterIcon = 'fab fa-twitter'
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Police]
|
|
||||||
|
|
||||||
Config.EnablePoliceCommand = false
|
|
||||||
|
|
||||||
Config.PoliceCommand = 'police'
|
|
||||||
|
|
||||||
Config.PoliceJobName = 'police'
|
|
||||||
|
|
||||||
Config.PoliceIcon = 'fas fa-bullhorn'
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Ambulance]
|
|
||||||
|
|
||||||
Config.EnableAmbulanceCommand = false
|
|
||||||
|
|
||||||
Config.AmbulanceCommand = 'ambulance'
|
|
||||||
|
|
||||||
Config.AmbulanceJobName = 'ambulance'
|
|
||||||
|
|
||||||
Config.AmbulanceIcon = 'fas fa-ambulance'
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [DOC Countdown]
|
|
||||||
|
|
||||||
Config.EnableDocCommand = false
|
|
||||||
|
|
||||||
Config.DocCommand = 'doc'
|
|
||||||
|
|
||||||
Config.DocIcon = 'fas fa-clock'
|
|
||||||
|
|
||||||
Config.DocMessageTitle = 'DOC'
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Auto Message]
|
|
||||||
|
|
||||||
Config.EnableAutoMessage = false
|
|
||||||
|
|
||||||
Config.AutoMessageTime = 30 -- (in minutes) will send messages every x minutes
|
|
||||||
|
|
||||||
Config.AutoMessages = {
|
|
||||||
"CLOSED BETA // Bei Fragen oder Problemen die euer RP stören, per /support melden!",
|
|
||||||
"CLOSED BETA // Allgemeine Bugs unter #ClosedBeta >> Bug Reports"
|
|
||||||
}
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- [Notifications]
|
|
||||||
|
|
||||||
Config.NotificationsText = {
|
|
||||||
['disable_chat'] = { title = 'SYSTEM', message = 'You disabled the chat', time = 5000, type = 'info'},
|
|
||||||
['enable_chat'] = { title = 'SYSTEM', message = 'You enabled the chat', time = 5000, type = 'info'},
|
|
||||||
['ad_success'] = { title = 'ADVERTISEMENT', message = 'Advertisement successfully made for ${price}€', time = 5000, type = 'success'},
|
|
||||||
['ad_no_money'] = { title = 'ADVERTISEMENT', message = "You don't have enough money to make an advertisement", time = 5000, type = 'error'},
|
|
||||||
['ad_too_quick'] = { title = 'ADVERTISEMENT', message = "You can't advertise so quickly", time = 5000, type = 'info'},
|
|
||||||
['mute_not_adm'] = { title = 'SYSTEM', message = 'You are not an admin', time = 5000, type = 'error'},
|
|
||||||
['mute_id_inv'] = { title = 'SYSTEM', message = 'The id is invalid', time = 5000, type = 'error'},
|
|
||||||
['mute_time_inv'] = { title = 'SYSTEM', message = 'The mute time is invalid', time = 5000, type = 'error'},
|
|
||||||
['alr_muted'] = { title = 'SYSTEM', message = 'This person is already muted', time = 5000, type = 'error'},
|
|
||||||
['alr_unmuted'] = { title = 'SYSTEM', message = 'This person is already unmuted', time = 5000, type = 'error'},
|
|
||||||
['an_success'] = { title = 'ANONYMOUS', message = 'Advertisement successfully made for price€', time = 5000, type = 'success'},
|
|
||||||
['an_no_money'] = { title = 'ANONYMOUS', message = "You don't have enough money to make an advertisement", time = 5000, type = 'error'},
|
|
||||||
['an_too_quick'] = { title = 'ANONYMOUS', message = "You can't advertise so quickly", time = 5000, type = 'error'},
|
|
||||||
['an_not_allowed'] = { title = 'ANONYMOUS', message = "You are not allowed to send messages in the anonymous chat", time = 5000, type = 'error'},
|
|
||||||
['is_muted'] = { title = 'ANONYMOUS', message = "This player is muted", time = 5000, type = 'error'},
|
|
||||||
}
|
|
||||||
|
|
||||||
Config.WebhookText = {
|
|
||||||
['clear_all'] = 'Cleared all chats',
|
|
||||||
['staff_msg'] = 'Staff message',
|
|
||||||
['staff_chat_msg'] = 'Staff chat message',
|
|
||||||
['sv_an'] = 'Server announcement',
|
|
||||||
['ad'] = 'Advertisement',
|
|
||||||
['twitch'] = 'Twitch',
|
|
||||||
['youtube'] = 'Youtube',
|
|
||||||
['twitter'] = 'Twitter',
|
|
||||||
['police'] = 'Police',
|
|
||||||
['ambulance'] = 'Ambulance',
|
|
||||||
['job_chat'] = 'Job chat [${job}]',
|
|
||||||
['pm_chat'] = 'Private Message to ${name} [${id}]',
|
|
||||||
['ooc'] = 'OOC',
|
|
||||||
['me'] = 'ME',
|
|
||||||
['do'] = 'DO',
|
|
||||||
['try'] = 'TRY',
|
|
||||||
['muted'] = 'Muted [${id}]',
|
|
||||||
['muted_for'] = 'For ${muteTime} minutes',
|
|
||||||
['unmuted'] = 'Unmuted [${id}]',
|
|
||||||
['p_unmuted'] = 'Player has been unmuted',
|
|
||||||
['anon'] = 'Anonymous',
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
fx_version 'cerulean'
|
|
||||||
|
|
||||||
game 'gta5'
|
|
||||||
|
|
||||||
author 'okok#3488'
|
|
||||||
description 'okokChatV2'
|
|
||||||
|
|
||||||
files {
|
|
||||||
'web/*.*'
|
|
||||||
}
|
|
||||||
|
|
||||||
shared_script 'config.lua'
|
|
||||||
|
|
||||||
client_scripts {
|
|
||||||
'client.lua'
|
|
||||||
}
|
|
||||||
|
|
||||||
server_scripts {
|
|
||||||
'@oxmysql/lib/MySQL.lua',
|
|
||||||
'server.lua'
|
|
||||||
}
|
|
||||||
|
|
||||||
chat_theme 'gtao' {
|
|
||||||
styleSheet = 'web/styles.css',
|
|
||||||
msgTemplates = {
|
|
||||||
default = '<b>{0}</b><span>{1}</span>'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lua54 'yes'
|
|
||||||
|
|
||||||
escrow_ignore {
|
|
||||||
'config.lua',
|
|
||||||
'client.lua',
|
|
||||||
'server.lua'
|
|
||||||
}
|
|
||||||
dependency '/assetpacks'
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,410 +0,0 @@
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@200;300;400;500;700;800;900&display=swap');
|
|
||||||
@import url('https://use.fontawesome.com/releases/v5.15.4/css/all.css');
|
|
||||||
|
|
||||||
* {
|
|
||||||
font-family: 'Tajawal', sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-window {
|
|
||||||
position: absolute;
|
|
||||||
top: 2.5%;
|
|
||||||
left: 2.055%;
|
|
||||||
width: 38%;
|
|
||||||
height: 33.3% !important;
|
|
||||||
max-width: 27.5%;
|
|
||||||
background-color: rgba(0, 0, 0, 0.0) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.msg {
|
|
||||||
font-family: 'Tajawal', sans-serif;
|
|
||||||
color: #fff;
|
|
||||||
font-size: calc(1.8vh);
|
|
||||||
filter: url(#svgDropShadowFilter);
|
|
||||||
line-height: calc(2.7vh * 1.2);
|
|
||||||
margin-bottom: 0.9%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-messages {
|
|
||||||
margin: 0;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-message {
|
|
||||||
display: block !important;
|
|
||||||
padding: 0.6vw;
|
|
||||||
padding-top: 0.6vw;
|
|
||||||
padding-bottom: 0.7vw;
|
|
||||||
border-radius: 0.625rem;
|
|
||||||
width: 75.6%;
|
|
||||||
overflow: hidden;
|
|
||||||
word-break: break-word;
|
|
||||||
box-sizing: border-box;
|
|
||||||
box-shadow: 0rem 0rem 0.625rem -0.3125rem rgba(0, 0, 0, 1);
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-message div {
|
|
||||||
line-height: 1 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.message {
|
|
||||||
margin-top: 0.9%;
|
|
||||||
font-weight: 300;
|
|
||||||
}
|
|
||||||
|
|
||||||
.time {
|
|
||||||
font-size: 0.875rem;
|
|
||||||
font-size: calc(1.3vh);
|
|
||||||
color: #e1e1e1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.msg > span > span > b {
|
|
||||||
font-family: 'Tajawal', sans-serif;
|
|
||||||
font-weight: normal;
|
|
||||||
vertical-align: baseline;
|
|
||||||
padding-right: 0.6875rem;
|
|
||||||
line-height: 1;
|
|
||||||
font-size: calc(2.7vh);
|
|
||||||
}
|
|
||||||
|
|
||||||
.msg > span > span > span {
|
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.msg i:first-of-type {
|
|
||||||
font-style: normal;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-input {
|
|
||||||
font-size: 1.65vh;
|
|
||||||
position: absolute;
|
|
||||||
top: 37%;
|
|
||||||
left: 2.055%;
|
|
||||||
width: 38%;
|
|
||||||
max-width: 20.8%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-input > div.input {
|
|
||||||
background-color: rgba(27, 29, 32, 0.95);
|
|
||||||
border-radius: 0.625rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chat-input .prefix {
|
|
||||||
height: 100%;
|
|
||||||
vertical-align: middle;
|
|
||||||
padding-left: 0.5vh;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-weight: bold;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input {
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.prefix {
|
|
||||||
line-height: 3.80vh !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.suggestions {
|
|
||||||
margin-top: 0.9%;
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0.9%;
|
|
||||||
padding-left: 6.54%;
|
|
||||||
font-size: calc(1.7vh);
|
|
||||||
box-sizing: border-box;
|
|
||||||
color: white;
|
|
||||||
background-color: rgba(31, 94, 255, 0.9);
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 0.625rem;
|
|
||||||
border: none;
|
|
||||||
box-shadow: 0rem 0rem 0.625rem -0.3125rem rgba(0, 0, 0, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.suggestion {
|
|
||||||
font-size: calc(1.8vh);
|
|
||||||
margin-bottom: 0.03125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
resize: none;
|
|
||||||
font-size: calc(2vh);
|
|
||||||
color: #fff;
|
|
||||||
line-height: 1.85vh !important;
|
|
||||||
padding-top: 3%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.multiline {
|
|
||||||
margin-left: 0;
|
|
||||||
text-indent: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fas {
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* START STAFF */
|
|
||||||
|
|
||||||
.staff {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(19, 138, 70, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-shield-alt {
|
|
||||||
color: rgba(42, 42, 42, 0.9);
|
|
||||||
background-color: #1ebc62;
|
|
||||||
padding: 0.3125rem;
|
|
||||||
border-radius: 0.3125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END STAFF */
|
|
||||||
|
|
||||||
/* START ONLY STAFF */
|
|
||||||
|
|
||||||
.staffonly {
|
|
||||||
background: rgba(42, 42, 42, 0.9);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-eye-slash {
|
|
||||||
color: rgba(42, 42, 42, 0.9);
|
|
||||||
background-color: #1ebc62;
|
|
||||||
padding: 0.3125rem;
|
|
||||||
border-radius: 0.3125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END ONLY STAFF */
|
|
||||||
|
|
||||||
/* START SERVER ANNOUNCEMENT */
|
|
||||||
|
|
||||||
.server-msg {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(204, 61, 61, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-exclamation-circle {
|
|
||||||
color: rgba(42, 42, 42, 0.9);
|
|
||||||
background-color: #cc3d3d;
|
|
||||||
padding: 0.3125rem;
|
|
||||||
border-radius: 0.3125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END SERVER ANNOUNCEMENT */
|
|
||||||
|
|
||||||
/* START TWITCH */
|
|
||||||
|
|
||||||
.twitch {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(96, 67, 139, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-twitch {
|
|
||||||
color: rgba(42, 42, 42, 0.9);
|
|
||||||
background-color: #9c70de;
|
|
||||||
padding: 0.3125rem;
|
|
||||||
border-radius: 0.3125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END TWITCH */
|
|
||||||
|
|
||||||
/* START YOUTUBE */
|
|
||||||
|
|
||||||
.youtube {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(101, 0, 0, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-youtube {
|
|
||||||
color: rgba(42, 42, 42, 0.9);
|
|
||||||
background-color: #ff0000;
|
|
||||||
padding: 0.3125rem;
|
|
||||||
border-radius: 0.3125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END YOUTUBE */
|
|
||||||
|
|
||||||
/* START TWITTER */
|
|
||||||
|
|
||||||
.twitter {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(25, 107, 143, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-twitter {
|
|
||||||
color: rgba(42, 42, 42, 0.9);
|
|
||||||
background-color: #2aa9e0;
|
|
||||||
padding: 0.3125rem;
|
|
||||||
border-radius: 0.3125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END TWITTER */
|
|
||||||
|
|
||||||
/* START SYSTEM */
|
|
||||||
|
|
||||||
.system {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(134, 84, 23, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-cog {
|
|
||||||
color: rgba(42, 42, 42, 0.9);
|
|
||||||
background-color: #df7b00;
|
|
||||||
padding: 0.3125rem;
|
|
||||||
border-radius: 0.3125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END SYSTEM */
|
|
||||||
|
|
||||||
/* START ADVERTISEMENT */
|
|
||||||
|
|
||||||
.advertisement {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(84, 150, 38, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-ad {
|
|
||||||
color: rgba(42, 42, 42, 0.9);
|
|
||||||
background-color: #81db44;
|
|
||||||
padding: 0.3125rem;
|
|
||||||
border-radius: 0.3125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END ADVERTISEMENT */
|
|
||||||
|
|
||||||
/* START POLICE */
|
|
||||||
|
|
||||||
.police {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(40, 55, 116, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-bullhorn {
|
|
||||||
color: rgba(42, 42, 42, 0.9);
|
|
||||||
background-color: #4a6cfd;
|
|
||||||
padding: 0.3125rem;
|
|
||||||
border-radius: 0.3125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END POLICE */
|
|
||||||
|
|
||||||
/* START AMBULANCE */
|
|
||||||
|
|
||||||
.ambulance {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(152, 113, 22, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-ambulance {
|
|
||||||
color: rgba(42, 42, 42, 0.9);
|
|
||||||
background-color: #e3a71b;
|
|
||||||
padding: 0.3125rem;
|
|
||||||
border-radius: 0.3125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END AMBULANCE */
|
|
||||||
|
|
||||||
/* START OOC */
|
|
||||||
|
|
||||||
.ooc {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(125, 125, 125, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-door-open {
|
|
||||||
color: rgba(42, 42, 42, 0.9);
|
|
||||||
background-color: #ababab;
|
|
||||||
padding: 0.3125rem;
|
|
||||||
border-radius: 0.3125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END OOC */
|
|
||||||
|
|
||||||
/* START ME */
|
|
||||||
|
|
||||||
.me {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(121, 184, 250, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.me-icon {
|
|
||||||
background-color: #79b8fa;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END ME */
|
|
||||||
|
|
||||||
/* START DO */
|
|
||||||
|
|
||||||
.do {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(121, 250, 164, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.do-icon {
|
|
||||||
background-color: #79faa4;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END DO */
|
|
||||||
|
|
||||||
/* START TRY */
|
|
||||||
|
|
||||||
.try {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(243, 73, 113, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.try-icon {
|
|
||||||
background-color: #f34971;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END TRY */
|
|
||||||
|
|
||||||
/* START ANONYMOUS */
|
|
||||||
|
|
||||||
.anonymous {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(9, 78, 33, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-mask {
|
|
||||||
color: rgba(42, 42, 42, 0.9);
|
|
||||||
background-color: #2e874d;
|
|
||||||
padding: 0.3125rem;
|
|
||||||
border-radius: 0.3125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END ANONYMOUS */
|
|
||||||
|
|
||||||
/* START JOBS */
|
|
||||||
|
|
||||||
.jobchat {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(53, 219, 194, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-briefcase {
|
|
||||||
color: rgba(42, 42, 42, 0.9);
|
|
||||||
background-color: #35dbc2;
|
|
||||||
padding: 0.3125rem;
|
|
||||||
border-radius: 0.3125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END JOBS */
|
|
||||||
|
|
||||||
/* START TIMEOUT */
|
|
||||||
|
|
||||||
.muted {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(223, 123, 0, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-gavel {
|
|
||||||
color: rgba(42, 42, 42, 0.9);
|
|
||||||
background-color: #df7b00;
|
|
||||||
padding: 0.3125rem;
|
|
||||||
border-radius: 0.3125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END TIMEOUT */
|
|
||||||
|
|
||||||
/* START PM */
|
|
||||||
|
|
||||||
.pm {
|
|
||||||
background: linear-gradient(90deg, rgba(42, 42, 42, 0.9) 0%, rgba(113, 81, 156, 0.9) 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.fa-comment {
|
|
||||||
color: rgba(42, 42, 42, 0.9);
|
|
||||||
padding: 0.3125rem;
|
|
||||||
border-radius: 0.3125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pm-icon {
|
|
||||||
background-color: #71519c;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* END PM */
|
|
Binary file not shown.
|
@ -1,7 +0,0 @@
|
||||||
Hi, thank you for buying okokCrafting! :)
|
|
||||||
|
|
||||||
If you need help contact me on discord: okok#3488
|
|
||||||
Discord server: https://discord.gg/okok
|
|
||||||
Docs: https://docs.okokscripts.io/
|
|
||||||
|
|
||||||
-> Installation Guide: https://docs.okokscripts.io/scripts/okokcrafting
|
|
|
@ -1,249 +0,0 @@
|
||||||
QBCore = exports[Config.qbPrefix.."-core"]:GetCoreObject()
|
|
||||||
|
|
||||||
RegisterNetEvent(Config.EventPrefix..":notification")
|
|
||||||
AddEventHandler(Config.EventPrefix..":notification", function(title, text, time, type)
|
|
||||||
exports['okokNotify']:Alert(title, text, time, type)
|
|
||||||
end)
|
|
||||||
|
|
||||||
RegisterNetEvent(Config.EventPrefix..":openTextUI")
|
|
||||||
AddEventHandler(Config.EventPrefix..":openTextUI", function(text)
|
|
||||||
exports['qb-core']:DrawText(text, 'left')
|
|
||||||
end)
|
|
||||||
|
|
||||||
RegisterNetEvent(Config.EventPrefix..":closeTextUI")
|
|
||||||
AddEventHandler(Config.EventPrefix..":closeTextUI", function()
|
|
||||||
exports['qb-core']:HideText()
|
|
||||||
end)
|
|
||||||
|
|
||||||
function onOpenMenu()
|
|
||||||
-- Executed when the menu is opened
|
|
||||||
end
|
|
||||||
|
|
||||||
function onCloseMenu()
|
|
||||||
-- Executed when the menu is closed
|
|
||||||
end
|
|
||||||
|
|
||||||
function claimAll(workbench, CraftQueues)
|
|
||||||
TriggerServerEvent(Config.EventPrefix..':claimAll', workbench, CraftQueues)
|
|
||||||
end
|
|
||||||
|
|
||||||
Citizen.CreateThread(function()
|
|
||||||
if Config.UseXP then
|
|
||||||
if Config.SameLevelForAllTables then
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.SetXPCommand, _L('suggestion_xp').maintext, {
|
|
||||||
{ name=_L('suggestion_xp').id, help=_L('suggestion_xp').idtext },
|
|
||||||
{ name=_L('suggestion_xp').xp, help=_L('suggestion_xp').xptext },
|
|
||||||
})
|
|
||||||
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.SetLevelCommand, _L('suggestion_level').maintext, {
|
|
||||||
{ name=_L('suggestion_level').id, help=_L('suggestion_level').idtext },
|
|
||||||
{ name=_L('suggestion_level').level, help=_L('suggestion_level').leveltext },
|
|
||||||
})
|
|
||||||
else
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.SetXPCommand, _L('suggestion_xp').maintext, {
|
|
||||||
{ name=_L('suggestion_xp').id, help=_L('suggestion_xp').idtext },
|
|
||||||
{ name=_L('suggestion_xp').xp, help=_L('suggestion_xp').xptext },
|
|
||||||
{ name=_L('suggestion_xp').workbench, help=_L('suggestion_xp').workbenchtext },
|
|
||||||
})
|
|
||||||
|
|
||||||
TriggerEvent('chat:addSuggestion', '/'..Config.SetLevelCommand, _L('suggestion_level').maintext, {
|
|
||||||
{ name=_L('suggestion_level').id, help=_L('suggestion_level').idtext },
|
|
||||||
{ name=_L('suggestion_level').level, help=_L('suggestion_level').leveltext },
|
|
||||||
{ name=_L('suggestion_level').workbench, help=_L('suggestion_level').workbenchtext },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
Citizen.CreateThread(function()
|
|
||||||
while PlayerData == nil do
|
|
||||||
PlayerData = QBCore.Functions.GetPlayerData()
|
|
||||||
Citizen.Wait(10)
|
|
||||||
end
|
|
||||||
while PlayerData.job == nil do
|
|
||||||
PlayerData.job = QBCore.Functions.GetPlayerData().job
|
|
||||||
Citizen.Wait(10)
|
|
||||||
end
|
|
||||||
while PlayerData.gang == nil do
|
|
||||||
PlayerData.gang = QBCore.Functions.GetPlayerData().gang
|
|
||||||
Citizen.Wait(10)
|
|
||||||
end
|
|
||||||
local inZone = false
|
|
||||||
local num = 0
|
|
||||||
local nearZone = false
|
|
||||||
local enteredRange = false
|
|
||||||
local inWideRange = false
|
|
||||||
local ped = PlayerPedId()
|
|
||||||
|
|
||||||
while true do
|
|
||||||
Citizen.Wait(0)
|
|
||||||
local playerExists = false
|
|
||||||
|
|
||||||
if not playerExists then
|
|
||||||
if DoesEntityExist(ped) then
|
|
||||||
playerExists = true
|
|
||||||
else
|
|
||||||
ped = PlayerPedId()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local playerCoords = GetEntityCoords(ped)
|
|
||||||
|
|
||||||
nearZone = false
|
|
||||||
inZone = false
|
|
||||||
|
|
||||||
for k,v in pairs(Config.Crafting) do
|
|
||||||
if v.jobs['all'] ~= nil or checkJob(v.jobs) or checkGang(v.jobs) then
|
|
||||||
local distance = #(vector3(v.coordinates[1], v.coordinates[2], v.coordinates[3]) - playerCoords)
|
|
||||||
|
|
||||||
if distance < Config.CraftRadius then
|
|
||||||
if closeWorkbench ~= v.tableID then
|
|
||||||
closeWorkbench = v.tableID
|
|
||||||
workbenchCoords = v.coordinates
|
|
||||||
end
|
|
||||||
|
|
||||||
if not gotQueue then
|
|
||||||
gotQueue = true
|
|
||||||
QBCore.Functions.TriggerCallback(Config.EventPrefix..":getQueue", function(queue, queues)
|
|
||||||
CraftQueues = queues
|
|
||||||
WorkbenchCraft = queue
|
|
||||||
end, v.tableID)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if distance < v.radius + 2 then
|
|
||||||
local zDistance = playerCoords.z - v.coordinates[3]
|
|
||||||
nearZone = true
|
|
||||||
if waitMore and not isCraftOpen then
|
|
||||||
waitMore = false
|
|
||||||
end
|
|
||||||
if not Config.NotInterectableTables then
|
|
||||||
if distance < v.radius and zDistance < 3 and zDistance > -3 then
|
|
||||||
inZone = true
|
|
||||||
|
|
||||||
if IsControlJustReleased(0, Config.Key) and not IsEntityDead(ped) then
|
|
||||||
if GetVehiclePedIsUsing(ped) == 0 then
|
|
||||||
waitMore = true
|
|
||||||
if not isCraftOpen then
|
|
||||||
TriggerEvent(Config.EventPrefix..':openWorkbench', k)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
TriggerEvent(Config.EventPrefix..':notification', _L('inside_vehicle').title, _L('inside_vehicle').text, _L('inside_vehicle').time, _L('inside_vehicle').type)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
elseif not waitMore and not inWideRange then
|
|
||||||
waitMore = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if nearZone and not enteredRange then
|
|
||||||
enteredRange = true
|
|
||||||
inWideRange = true
|
|
||||||
elseif not nearZone and enteredRange then
|
|
||||||
enteredRange = false
|
|
||||||
inWideRange = false
|
|
||||||
end
|
|
||||||
|
|
||||||
if inZone and not hasEntered then
|
|
||||||
if Config.UseOkokTextUI then
|
|
||||||
exports['okokTextUI']:Open(_L('textUI').text, _L('textUI').color, _L('textUI').side)
|
|
||||||
else
|
|
||||||
TriggerEvent(Config.EventPrefix..':openTextUI', _L('textUI').text)
|
|
||||||
end
|
|
||||||
hasEntered = true
|
|
||||||
elseif not inZone and hasEntered then
|
|
||||||
if Config.UseOkokTextUI then
|
|
||||||
exports['okokTextUI']:Close()
|
|
||||||
else
|
|
||||||
TriggerEvent(Config.EventPrefix..':closeTextUI')
|
|
||||||
end
|
|
||||||
hasEntered = false
|
|
||||||
end
|
|
||||||
|
|
||||||
if waitMore then
|
|
||||||
Citizen.Wait(1000)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
Citizen.CreateThread(function()
|
|
||||||
while true do
|
|
||||||
local canCraft = false
|
|
||||||
local queue = CraftQueues[closeWorkbench]
|
|
||||||
if CraftQueues[closeWorkbench] ~= nil and closeWorkbench ~= "" and workbenchCoords ~= nil then
|
|
||||||
local playerCoords = GetEntityCoords(PlayerPedId())
|
|
||||||
local distance = #(vector3(workbenchCoords[1], workbenchCoords[2], workbenchCoords[3]) - playerCoords)
|
|
||||||
local zDistance = playerCoords.z - workbenchCoords[3]
|
|
||||||
|
|
||||||
if distance < Config.CraftRadius then
|
|
||||||
local craftingItemID = 1
|
|
||||||
for k,v in ipairs(CraftQueues[closeWorkbench]) do
|
|
||||||
if v.time >= 0 and not v.isDone then
|
|
||||||
craftingItemID = k
|
|
||||||
canCraft = true
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if canCraft then
|
|
||||||
if not updateTable then
|
|
||||||
updateTable = true
|
|
||||||
end
|
|
||||||
local craftTime = CraftQueues[closeWorkbench][craftingItemID].time
|
|
||||||
CraftQueues[closeWorkbench][craftingItemID].isPending = false
|
|
||||||
SendNUIMessage({
|
|
||||||
action = "ShowCraftCount",
|
|
||||||
time = CraftQueues[closeWorkbench][craftingItemID].time,
|
|
||||||
name = CraftQueues[closeWorkbench][craftingItemID].itemName,
|
|
||||||
})
|
|
||||||
|
|
||||||
if CraftQueues[closeWorkbench][craftingItemID].time <= 0 then
|
|
||||||
CraftQueues[closeWorkbench][craftingItemID].time = 0
|
|
||||||
CraftQueues[closeWorkbench][craftingItemID].isDone = true
|
|
||||||
local randomNum = math.random(1, 100)
|
|
||||||
if randomNum <= tonumber(CraftQueues[closeWorkbench][craftingItemID].sucPC) then
|
|
||||||
SendNUIMessage({
|
|
||||||
action = "CompleteCraftCount",
|
|
||||||
name = CraftQueues[closeWorkbench][craftingItemID].itemName,
|
|
||||||
})
|
|
||||||
else
|
|
||||||
CraftQueues[closeWorkbench][craftingItemID].suc = false
|
|
||||||
SendNUIMessage({
|
|
||||||
action = "FailedCraftCount",
|
|
||||||
name = CraftQueues[closeWorkbench][craftingItemID].itemName,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
SendNUIMessage({
|
|
||||||
action = "updateCraftingItems",
|
|
||||||
queue = CraftQueues[closeWorkbench],
|
|
||||||
})
|
|
||||||
SendNUIMessage({
|
|
||||||
action = "HideCraftCount",
|
|
||||||
})
|
|
||||||
Citizen.Wait(500)
|
|
||||||
else
|
|
||||||
SendNUIMessage({
|
|
||||||
action = "updateCraftingItems",
|
|
||||||
queue = CraftQueues[closeWorkbench],
|
|
||||||
})
|
|
||||||
CraftQueues[closeWorkbench][craftingItemID].time = craftTime - 1
|
|
||||||
Citizen.Wait(1000)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if updateTable then
|
|
||||||
updateTable = false
|
|
||||||
QBCore.Functions.TriggerCallback(Config.EventPrefix..":updateQueue", function(cb)
|
|
||||||
|
|
||||||
end, CraftQueues)
|
|
||||||
end
|
|
||||||
Citizen.Wait(2000)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
Citizen.Wait(3000)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
Citizen.Wait(5000)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
Binary file not shown.
|
@ -1,595 +0,0 @@
|
||||||
Config, Locales = {}, {}
|
|
||||||
|
|
||||||
Config.Debug = false
|
|
||||||
Config.DoubleXP = false
|
|
||||||
Config.EventPrefix = 'okokCrafting'
|
|
||||||
Config.xpColumnsName = 'xp'
|
|
||||||
Config.craftQueryColumnName = 'okokcrafts'
|
|
||||||
Config.qbPrefix = 'qb'
|
|
||||||
Config.QBCorePrefix = 'QBCore'
|
|
||||||
Config.Locale = 'de' -- en / pt / gr / fr / de
|
|
||||||
Config.UseOkokTextUI = true
|
|
||||||
Config.Key = 38
|
|
||||||
Config.HideMinimap = true
|
|
||||||
Config.ShowBlips = true
|
|
||||||
Config.ShowFloorBlips = true
|
|
||||||
Config.ShowAllCrafts = true
|
|
||||||
Config.UseXP = false
|
|
||||||
Config.SameLevelForAllTables = false
|
|
||||||
Config.MaxLevel = 20
|
|
||||||
Config.StartXP = 0
|
|
||||||
Config.LevelMultiplier = 1.05
|
|
||||||
Config.GiveXPOnCraftFailed = true
|
|
||||||
Config.SetXPCommand = 'setcraftxp'
|
|
||||||
Config.SetLevelCommand = 'setcraftlevel'
|
|
||||||
Config.CraftRadius = 5
|
|
||||||
Config.MaxCraftsPerWorkbench = 10
|
|
||||||
Config.UseCategories = true
|
|
||||||
Config.InventoryDirectory = 'qs-inventory/html/images'
|
|
||||||
Config.UseOx_inventory = false
|
|
||||||
Config.NotInterectableTables = false
|
|
||||||
|
|
||||||
Config.AdminGroups = {
|
|
||||||
'god',
|
|
||||||
'admin',
|
|
||||||
'mod'
|
|
||||||
}
|
|
||||||
|
|
||||||
Config.itemNames = {
|
|
||||||
metalscrap = 'Metal Scrap',
|
|
||||||
weapon_assaultrifle = 'Assault Rifle',
|
|
||||||
iron = 'Iron',
|
|
||||||
bandage = 'Bandage',
|
|
||||||
firstaid = 'First Aid',
|
|
||||||
['10kgoldchain'] = '10kgoldchain',
|
|
||||||
plastic = 'Plastic',
|
|
||||||
aluminum = 'Aluminum',
|
|
||||||
cash = 'Money',
|
|
||||||
-- Zusätzliche Waffenkomponenten
|
|
||||||
shortened_gunbarrel = 'Verkuerzter Waffenlauf',
|
|
||||||
shaft = 'Schaft',
|
|
||||||
trigger_unit = 'Abzugseinheit',
|
|
||||||
revolver_barrel = 'Revolverlauf',
|
|
||||||
drum_mechanism = 'Trommelmechanismus',
|
|
||||||
weapon_handle = 'Griff',
|
|
||||||
pistol_barrel = 'Pistolenlauf',
|
|
||||||
weapon_sled = 'Schlitten (Upper Slide)',
|
|
||||||
gun_handle = 'Griffstueck',
|
|
||||||
ceramic_barrel = 'Keramiklauf',
|
|
||||||
small_triggersystem = 'Kleines Abzugssystem',
|
|
||||||
weapon_batton = 'Waffenlauf Lang',
|
|
||||||
--- Zubehör Nahkampfwaffen
|
|
||||||
dagger_blade = 'Dolchklinge',
|
|
||||||
machete_blade = 'Macheteklinge',
|
|
||||||
handle = 'Holzgriff',
|
|
||||||
switchblade_mechanism = 'Mechanismus für Springmesser',
|
|
||||||
small_blade = 'kleine Klinge',
|
|
||||||
axe_head = 'Axtkopf',
|
|
||||||
reinforced_handle = 'verstärkter Griff',
|
|
||||||
-- Drogenherstellung
|
|
||||||
opium_poppy = 'Schlafmohn',
|
|
||||||
opium = 'Opium',
|
|
||||||
acetic = 'Essiganhydrid',
|
|
||||||
injection = 'Spritze',
|
|
||||||
codeine_syrup = 'Codein-Sirup',
|
|
||||||
campers_fuel = 'Campers Fuel',
|
|
||||||
sweets_candies = 'Süßigkeiten',
|
|
||||||
ephedrin = 'Ephedrin',
|
|
||||||
chemical_set = 'Chemikalien-Set',
|
|
||||||
meth_pipe = 'Pipe',
|
|
||||||
magic_mushroom = 'Mutterkorn',
|
|
||||||
lysergic_acid = 'Lysergsäure',
|
|
||||||
blotter_paper = 'Blotterpapier',
|
|
||||||
---- Drogen
|
|
||||||
lsd_papers = 'LSD-Papes',
|
|
||||||
ready_methpipe = 'Meth Pipe',
|
|
||||||
lean = 'Lean',
|
|
||||||
heroin_injection = 'Heroin in Spritze',
|
|
||||||
-- Ausrüstung
|
|
||||||
armor = 'Weste',
|
|
||||||
-- Waffen
|
|
||||||
weapon_ceramicpistol = 'Ceramic Pistol',
|
|
||||||
weapon_navyrevolver = 'Navy Revolver',
|
|
||||||
weapon_pistol50 = 'Tropical Eagle',
|
|
||||||
weapon_assaultrifle = 'AK 75',
|
|
||||||
weapon_dbshotgun = 'Double-barrel Shotgun',
|
|
||||||
weapon_microsmg = 'Micro SMG',
|
|
||||||
weapon_minismg = 'Mini SMG',
|
|
||||||
weapon_bullpuprifle = 'QBX-92-3',
|
|
||||||
weapon_marksmanpistol = 'Marksman Pistol',
|
|
||||||
weapon_gusenberg = 'Gusenberg Sweeper',
|
|
||||||
-- Nahkampfwaffen
|
|
||||||
weapon_dagger = 'Dagger',
|
|
||||||
weapon_machete = 'Machete',
|
|
||||||
weapon_switchblade = 'Switchblade',
|
|
||||||
weapon_hatchet = 'Hatchet',
|
|
||||||
-- Ressourcen
|
|
||||||
gunpowder = 'Schwarzpulver',
|
|
||||||
armaid_plant = 'Aramid Fasern',
|
|
||||||
steel_ingots = 'Stahlbarren',
|
|
||||||
copper = 'Kupfer',
|
|
||||||
log = 'Holzscheit',
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Config.Crafting = {
|
|
||||||
{
|
|
||||||
coordinates = vector3(-1802.27, 3089.12, 32.84),
|
|
||||||
radius = 1,
|
|
||||||
showMapBlip = false,
|
|
||||||
marker = {type = 20, r = 255, g = 165, b = 0, a = 155, bobUpAndDown = 0, faceCamera = 0, rotate = 1, textureDict = 0, textureName = 0, drawOnEnts = 0},
|
|
||||||
showBlipRadius = 50,
|
|
||||||
blip = {blipId = 402, blipColor = 7, blipScale = 0.9, blipText = 'Waffenkomponenten'},
|
|
||||||
tableName = 'Waffenkomponenten',
|
|
||||||
tableID = 'components1',
|
|
||||||
crafts = {
|
|
||||||
'shortened_gunbarrel',
|
|
||||||
'shaft',
|
|
||||||
'trigger_unit',
|
|
||||||
'revolver_barrel',
|
|
||||||
'drum_mechanism',
|
|
||||||
'weapon_handle',
|
|
||||||
'pistol_barrel',
|
|
||||||
'weapon_sled',
|
|
||||||
'gun_handle',
|
|
||||||
'ceramic_barrel',
|
|
||||||
'small_triggersystem',
|
|
||||||
'weapon_batton',
|
|
||||||
},
|
|
||||||
jobs = {['all'] = true},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
coordinates = vector4(3092.46, -4713.06, 15.26, 37.66),
|
|
||||||
radius = 2,
|
|
||||||
showMapBlip = false,
|
|
||||||
marker = {type = 20, r = 0, g = 200, b = 255, a = 150, bobUpAndDown = 0, faceCamera = 0, rotate = 1, textureDict = 0, textureName = 0, drawOnEnts = 0},
|
|
||||||
showBlipRadius = 50,
|
|
||||||
blip = {blipId = 566, blipColor = 5, blipScale = 0.8, blipText = 'Waffenherstellung'},
|
|
||||||
tableName = 'Waffenherstellung',
|
|
||||||
tableID = 'weapon_crafting_1',
|
|
||||||
crafts = {
|
|
||||||
'weapon_ceramicpistol',
|
|
||||||
'weapon_navyrevolver',
|
|
||||||
'weapon_pistol50',
|
|
||||||
'weapon_assaultrifle',
|
|
||||||
'weapon_dbshotgun',
|
|
||||||
'weapon_microsmg',
|
|
||||||
'weapon_minismg',
|
|
||||||
'weapon_bullpuprifle',
|
|
||||||
'weapon_marksmanpistol',
|
|
||||||
'weapon_gusenberg',
|
|
||||||
},
|
|
||||||
jobs = {['all'] = true},
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Config.Crafts = {
|
|
||||||
['shortened_gunbarrel'] = {
|
|
||||||
item = 'shortened_gunbarrel',
|
|
||||||
amount = 1,
|
|
||||||
maxCraft = 5,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
isItem = true,
|
|
||||||
isDisassemble = false,
|
|
||||||
time = 3,
|
|
||||||
levelNeeded = 0,
|
|
||||||
xpPerCraft = 10,
|
|
||||||
recipe = {
|
|
||||||
{ 'steel_ingots', 2, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenkomponenten',
|
|
||||||
},
|
|
||||||
['shaft'] = {
|
|
||||||
item = 'shaft',
|
|
||||||
amount = 1,
|
|
||||||
maxCraft = 5,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
isItem = true,
|
|
||||||
isDisassemble = false,
|
|
||||||
time = 3,
|
|
||||||
levelNeeded = 0,
|
|
||||||
xpPerCraft = 10,
|
|
||||||
recipe = {
|
|
||||||
{ 'steel_ingots', 2, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenkomponenten',
|
|
||||||
},
|
|
||||||
['trigger_unit'] = {
|
|
||||||
item = 'trigger_unit',
|
|
||||||
amount = 1,
|
|
||||||
maxCraft = 5,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
isItem = true,
|
|
||||||
isDisassemble = false,
|
|
||||||
time = 3,
|
|
||||||
levelNeeded = 0,
|
|
||||||
xpPerCraft = 10,
|
|
||||||
recipe = {
|
|
||||||
{ 'steel_ingots', 2, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenkomponenten',
|
|
||||||
},
|
|
||||||
['revolver_barrel'] = {
|
|
||||||
item = 'revolver_barrel',
|
|
||||||
amount = 1,
|
|
||||||
maxCraft = 5,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
isItem = true,
|
|
||||||
isDisassemble = false,
|
|
||||||
time = 3,
|
|
||||||
levelNeeded = 0,
|
|
||||||
xpPerCraft = 10,
|
|
||||||
recipe = {
|
|
||||||
{ 'steel_ingots', 3, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenkomponenten',
|
|
||||||
},
|
|
||||||
['drum_mechanism'] = {
|
|
||||||
item = 'drum_mechanism',
|
|
||||||
amount = 1,
|
|
||||||
maxCraft = 5,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
isItem = true,
|
|
||||||
isDisassemble = false,
|
|
||||||
time = 3,
|
|
||||||
levelNeeded = 0,
|
|
||||||
xpPerCraft = 10,
|
|
||||||
recipe = {
|
|
||||||
{ 'steel_ingots', 3, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenkomponenten',
|
|
||||||
},
|
|
||||||
['weapon_handle'] = {
|
|
||||||
item = 'weapon_handle',
|
|
||||||
amount = 1,
|
|
||||||
maxCraft = 5,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
isItem = true,
|
|
||||||
isDisassemble = false,
|
|
||||||
time = 3,
|
|
||||||
levelNeeded = 0,
|
|
||||||
xpPerCraft = 10,
|
|
||||||
recipe = {
|
|
||||||
{ 'steel_ingots', 2, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenkomponenten',
|
|
||||||
},
|
|
||||||
['pistol_barrel'] = {
|
|
||||||
item = 'pistol_barrel',
|
|
||||||
amount = 1,
|
|
||||||
maxCraft = 5,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
isItem = true,
|
|
||||||
isDisassemble = false,
|
|
||||||
time = 3,
|
|
||||||
levelNeeded = 0,
|
|
||||||
xpPerCraft = 10,
|
|
||||||
recipe = {
|
|
||||||
{ 'steel_ingots', 2, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenkomponenten',
|
|
||||||
},
|
|
||||||
['weapon_sled'] = {
|
|
||||||
item = 'weapon_sled',
|
|
||||||
amount = 1,
|
|
||||||
maxCraft = 5,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
isItem = true,
|
|
||||||
isDisassemble = false,
|
|
||||||
time = 3,
|
|
||||||
levelNeeded = 0,
|
|
||||||
xpPerCraft = 10,
|
|
||||||
recipe = {
|
|
||||||
{ 'steel_ingots', 2, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenkomponenten',
|
|
||||||
},
|
|
||||||
['gun_handle'] = {
|
|
||||||
item = 'gun_handle',
|
|
||||||
amount = 1,
|
|
||||||
maxCraft = 5,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
isItem = true,
|
|
||||||
isDisassemble = false,
|
|
||||||
time = 3,
|
|
||||||
levelNeeded = 0,
|
|
||||||
xpPerCraft = 10,
|
|
||||||
recipe = {
|
|
||||||
{ 'steel_ingots', 1, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenkomponenten',
|
|
||||||
},
|
|
||||||
['ceramic_barrel'] = {
|
|
||||||
item = 'ceramic_barrel',
|
|
||||||
amount = 1,
|
|
||||||
maxCraft = 5,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
isItem = true,
|
|
||||||
isDisassemble = false,
|
|
||||||
time = 3,
|
|
||||||
levelNeeded = 0,
|
|
||||||
xpPerCraft = 10,
|
|
||||||
recipe = {
|
|
||||||
{ 'steel_ingots', 2, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenkomponenten',
|
|
||||||
},
|
|
||||||
['small_triggersystem'] = {
|
|
||||||
item = 'small_triggersystem',
|
|
||||||
amount = 1,
|
|
||||||
maxCraft = 5,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
isItem = true,
|
|
||||||
isDisassemble = false,
|
|
||||||
time = 3,
|
|
||||||
levelNeeded = 0,
|
|
||||||
xpPerCraft = 10,
|
|
||||||
recipe = {
|
|
||||||
{ 'steel_ingots', 1, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenkomponenten',
|
|
||||||
},
|
|
||||||
['weapon_batton'] = {
|
|
||||||
item = 'weapon_batton',
|
|
||||||
amount = 1,
|
|
||||||
maxCraft = 5,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
isItem = true,
|
|
||||||
isDisassemble = false,
|
|
||||||
time = 3,
|
|
||||||
levelNeeded = 0,
|
|
||||||
xpPerCraft = 10,
|
|
||||||
recipe = {
|
|
||||||
{ 'steel_ingots', 2, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenkomponenten',
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
-- Neue Crafting-Rezepte für Waffenherstellung
|
|
||||||
|
|
||||||
['weapon_ceramicpistol'] = {
|
|
||||||
item = 'weapon_ceramicpistol',
|
|
||||||
amount = 1,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
time = 5,
|
|
||||||
levelNeeded = 1,
|
|
||||||
xpPerCraft = 20,
|
|
||||||
recipe = {
|
|
||||||
{ 'ceramic_barrel', 1, true, false },
|
|
||||||
{ 'gun_handle', 1, true, false },
|
|
||||||
{ 'small_triggersystem', 1, true, false },
|
|
||||||
{ 'shaft', 1, true, false },
|
|
||||||
{ 'pistol_barrel', 1, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenherstellung',
|
|
||||||
},
|
|
||||||
|
|
||||||
['weapon_navyrevolver'] = {
|
|
||||||
item = 'weapon_navyrevolver',
|
|
||||||
amount = 1,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
time = 5,
|
|
||||||
levelNeeded = 1,
|
|
||||||
xpPerCraft = 20,
|
|
||||||
recipe = {
|
|
||||||
{ 'weapon_handle', 1, true, false },
|
|
||||||
{ 'revolver_barrel', 1, true, false },
|
|
||||||
{ 'small_triggersystem', 1, true, false },
|
|
||||||
{ 'drum_mechanism', 1, true, false },
|
|
||||||
{ 'shaft', 1, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenherstellung',
|
|
||||||
},
|
|
||||||
|
|
||||||
['weapon_pistol50'] = {
|
|
||||||
item = 'weapon_pistol50',
|
|
||||||
amount = 1,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
time = 5,
|
|
||||||
levelNeeded = 1,
|
|
||||||
xpPerCraft = 20,
|
|
||||||
recipe = {
|
|
||||||
{ 'shaft', 1, true, false },
|
|
||||||
{ 'small_triggersystem', 1, true, false },
|
|
||||||
{ 'gun_handle', 1, true, false },
|
|
||||||
{ 'pistol_barrel', 1, true, false },
|
|
||||||
{ 'weapon_sled', 1, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenherstellung',
|
|
||||||
},
|
|
||||||
|
|
||||||
['weapon_assaultrifle'] = {
|
|
||||||
item = 'weapon_assaultrifle',
|
|
||||||
amount = 1,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
time = 5,
|
|
||||||
levelNeeded = 2,
|
|
||||||
xpPerCraft = 30,
|
|
||||||
recipe = {
|
|
||||||
{ 'gun_handle', 1, true, false },
|
|
||||||
{ 'trigger_unit', 1, true, false },
|
|
||||||
{ 'weapon_batton', 1, true, false },
|
|
||||||
{ 'shaft', 1, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenherstellung',
|
|
||||||
},
|
|
||||||
|
|
||||||
['weapon_dbshotgun'] = {
|
|
||||||
item = 'weapon_dbshotgun',
|
|
||||||
amount = 1,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
time = 5,
|
|
||||||
levelNeeded = 2,
|
|
||||||
xpPerCraft = 30,
|
|
||||||
recipe = {
|
|
||||||
{ 'shortened_gunbarrel', 2, true, false },
|
|
||||||
{ 'shaft', 1, true, false },
|
|
||||||
{ 'trigger_unit', 1, true, false },
|
|
||||||
{ 'gun_handle', 1, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenherstellung',
|
|
||||||
},
|
|
||||||
|
|
||||||
['weapon_microsmg'] = {
|
|
||||||
item = 'weapon_microsmg',
|
|
||||||
amount = 1,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
time = 5,
|
|
||||||
levelNeeded = 2,
|
|
||||||
xpPerCraft = 30,
|
|
||||||
recipe = {
|
|
||||||
{ 'shaft', 1, true, false },
|
|
||||||
{ 'trigger_unit', 1, true, false },
|
|
||||||
{ 'gun_handle', 1, true, false },
|
|
||||||
{ 'pistol_barrel', 1, true, false },
|
|
||||||
{ 'weapon_sled', 1, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenherstellung',
|
|
||||||
},
|
|
||||||
|
|
||||||
['weapon_minismg'] = {
|
|
||||||
item = 'weapon_minismg',
|
|
||||||
amount = 1,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
time = 5,
|
|
||||||
levelNeeded = 2,
|
|
||||||
xpPerCraft = 30,
|
|
||||||
recipe = {
|
|
||||||
{ 'shaft', 1, true, false },
|
|
||||||
{ 'trigger_unit', 1, true, false },
|
|
||||||
{ 'gun_handle', 1, true, false },
|
|
||||||
{ 'pistol_barrel', 1, true, false },
|
|
||||||
{ 'weapon_sled', 1, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenherstellung',
|
|
||||||
},
|
|
||||||
|
|
||||||
['weapon_bullpuprifle'] = {
|
|
||||||
item = 'weapon_bullpuprifle',
|
|
||||||
amount = 1,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
time = 5,
|
|
||||||
levelNeeded = 3,
|
|
||||||
xpPerCraft = 40,
|
|
||||||
recipe = {
|
|
||||||
{ 'gun_handle', 1, true, false },
|
|
||||||
{ 'trigger_unit', 1, true, false },
|
|
||||||
{ 'weapon_batton', 1, true, false },
|
|
||||||
{ 'shaft', 1, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenherstellung',
|
|
||||||
},
|
|
||||||
|
|
||||||
['weapon_marksmanpistol'] = {
|
|
||||||
item = 'weapon_marksmanpistol',
|
|
||||||
amount = 1,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
time = 5,
|
|
||||||
levelNeeded = 1,
|
|
||||||
xpPerCraft = 20,
|
|
||||||
recipe = {
|
|
||||||
{ 'shaft', 1, true, false },
|
|
||||||
{ 'small_triggersystem', 1, true, false },
|
|
||||||
{ 'gun_handle', 1, true, false },
|
|
||||||
{ 'pistol_barrel', 1, true, false },
|
|
||||||
{ 'weapon_sled', 1, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenherstellung',
|
|
||||||
},
|
|
||||||
|
|
||||||
['weapon_gusenberg'] = {
|
|
||||||
item = 'weapon_gusenberg',
|
|
||||||
amount = 1,
|
|
||||||
successCraftPercentage = 100,
|
|
||||||
time = 5,
|
|
||||||
levelNeeded = 3,
|
|
||||||
xpPerCraft = 40,
|
|
||||||
recipe = {
|
|
||||||
{ 'gun_handle', 1, true, false },
|
|
||||||
{ 'trigger_unit', 1, true, false },
|
|
||||||
{ 'weapon_batton', 1, true, false },
|
|
||||||
{ 'shaft', 1, true, false }
|
|
||||||
},
|
|
||||||
job = { '' },
|
|
||||||
data = {},
|
|
||||||
category = 'Waffenherstellung',
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
-------------------------- DISCORD LOGS
|
|
||||||
|
|
||||||
-- To set your Discord Webhook URL go to server.lua, line 3
|
|
||||||
|
|
||||||
Config.BotName = 'ServerName' -- Write the desired bot name
|
|
||||||
|
|
||||||
Config.ServerName = 'ServerName' -- Write your server's name
|
|
||||||
|
|
||||||
Config.IconURL = '' -- Insert your desired image link
|
|
||||||
|
|
||||||
Config.DateFormat = '%d/%m/%Y [%X]' -- To change the date format check this website - https://www.lua.org/pil/22.1.html
|
|
||||||
|
|
||||||
-- To change a webhook color you need to set the decimal value of a color, you can use this website to do that - https://www.mathsisfun.com/hexadecimal-decimal-colors.html
|
|
||||||
|
|
||||||
Config.StartCraftWebhookColor = '16127'
|
|
||||||
|
|
||||||
Config.CancelWebhookColor = '16776960'
|
|
||||||
|
|
||||||
Config.ClaimCraftWebhookColor = '65352'
|
|
||||||
|
|
||||||
Config.FailedCraftWebhookColor = '16711680'
|
|
||||||
|
|
||||||
-------------------------- LOCALES (DON'T TOUCH)
|
|
||||||
|
|
||||||
function _L(id)
|
|
||||||
if Locales[Config.Locale][id] then
|
|
||||||
return Locales[Config.Locale][id]
|
|
||||||
else
|
|
||||||
print('Locale '..id..' doesn\'t exist')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--
|
|
|
@ -1,42 +0,0 @@
|
||||||
fx_version 'cerulean'
|
|
||||||
|
|
||||||
game 'gta5'
|
|
||||||
|
|
||||||
author 'okok#3488'
|
|
||||||
description 'okokCrafting'
|
|
||||||
version '1.1.0'
|
|
||||||
|
|
||||||
ui_page 'web/ui.html'
|
|
||||||
|
|
||||||
files {
|
|
||||||
'web/*.*',
|
|
||||||
}
|
|
||||||
|
|
||||||
shared_script 'config.lua'
|
|
||||||
|
|
||||||
client_scripts {
|
|
||||||
'locales/*.lua',
|
|
||||||
'cl_utils.lua',
|
|
||||||
'client.lua',
|
|
||||||
}
|
|
||||||
|
|
||||||
server_scripts {
|
|
||||||
'@oxmysql/lib/MySQL.lua',
|
|
||||||
'locales/*.lua',
|
|
||||||
'sv_utils.lua',
|
|
||||||
'server.lua'
|
|
||||||
}
|
|
||||||
|
|
||||||
lua54 'yes'
|
|
||||||
|
|
||||||
escrow_ignore {
|
|
||||||
'config.lua',
|
|
||||||
'cl_utils.lua',
|
|
||||||
'sv_utils.lua',
|
|
||||||
'locales/*.lua',
|
|
||||||
}
|
|
||||||
|
|
||||||
server_exports {
|
|
||||||
'SetLevel'
|
|
||||||
}
|
|
||||||
dependency '/assetpacks'
|
|
|
@ -1,133 +0,0 @@
|
||||||
Locales['de'] = {
|
|
||||||
|
|
||||||
-- Notifications
|
|
||||||
['user_xp_set'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = 'Deine Erfahrungspunkte wurden auf ${s1} gesetzt',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_xp_set'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = 'Du hast erfolgreich die Erfahrungspunkte von ${s1} zu ${s2} geändert',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['user_xp_set_workbench'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = 'Deine Erfahrungspunkte wurden in der Werkbank ${s2} auf ${s1} gesetzt',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_xp_set_workbench'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = 'Du hast erfolgreich die Erfahrungspunkte von ${s1}, in der Werkbank ${s3}, auf ${s2} gesetzt',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['user_level_set'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = 'Dein Level wurde auf ${s1} geändert',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_level_set'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = 'Du hast erfolgreich das Level von ${s1} auf ${s2} geändert',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['user_level_set_workbench'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = 'Dein Level wurde in der Werkbank ${s2} auf ${s1} geändert',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_level_set_workbench'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = 'Du hast erfolgreich das Level von ${s1}, in der Werkbank ${s3}, auf ${s2} geändert',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['admin_level_no_exist'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = 'Dieses Level existiert nicht',
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['cant_carry'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = "Du kannst diesen Gegenstand nicht bei dir tragen",
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['added_to_queue'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = '${s1} wurde zur Warteschlange hinzugefügt',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['cant_craft'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = "Du kannst ${s1} nicht herstellen",
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['inside_vehicle'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = "Du kannst nichts in einem Fahrzeug herstellen",
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['queue_limit'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = 'Die Warteschlange ist bereits voll',
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['claimed_item'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = 'Du hast ${s1} bekommen',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['claimed_all_items'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = 'Du hast alle Gegenstände bekommen',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['cancel_item'] = {
|
|
||||||
title = 'WERKBANK',
|
|
||||||
text = 'Du hast die Herstellung von ${s1} abgebrochen',
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Chat suggestions
|
|
||||||
['suggestion_xp'] = {
|
|
||||||
maintext = 'Ändere das XP eines Spieler',
|
|
||||||
id = 'ID',
|
|
||||||
idtext = "Ziel ID",
|
|
||||||
xp = 'XP',
|
|
||||||
xptext = 'XP menge',
|
|
||||||
workbench = 'Werkbank',
|
|
||||||
workbenchtext = "ID der Werkbank",
|
|
||||||
},
|
|
||||||
['suggestion_level'] = {
|
|
||||||
maintext = 'Ändere das Level eines Spielers',
|
|
||||||
id = 'ID',
|
|
||||||
idtext = "Ziel ID",
|
|
||||||
level = 'Level',
|
|
||||||
leveltext = 'Level',
|
|
||||||
workbench = 'Werkbank',
|
|
||||||
workbenchtext = "ID der Werkbank",
|
|
||||||
},
|
|
||||||
|
|
||||||
-- okokTextUI
|
|
||||||
['textUI'] = {
|
|
||||||
text = '[E] Werkbank zu öffnen',
|
|
||||||
color = 'darkblue',
|
|
||||||
side = 'left'
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,133 +0,0 @@
|
||||||
Locales['en'] = {
|
|
||||||
|
|
||||||
-- Notifications
|
|
||||||
['user_xp_set'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Your XP was set to ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_xp_set'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'You set the XP of ${s1} to ${s2} successfully',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['user_xp_set_workbench'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Your XP was set to ${s1} in ${s2}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_xp_set_workbench'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'You set the XP of ${s1} to ${s2} in ${s3} successfully',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['user_level_set'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Your level was set to ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_level_set'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'You set the level of ${s1} to ${s2} successfully',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['user_level_set_workbench'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Your level was set to ${s1} in ${s2}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_level_set_workbench'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'You set the level of ${s1} to ${s2} in ${s3} successfully',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['admin_level_no_exist'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'That level does not exist',
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['cant_carry'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = "You can't carry this item",
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['added_to_queue'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = '${s1} added to the crafting queue',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['cant_craft'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = "You can't craft ${s1}",
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['inside_vehicle'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = "You can't craft inside a vehicle",
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['queue_limit'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'You have reached the queue limit',
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['claimed_item'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'You have claimed ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['claimed_all_items'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'You have claimed all items',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['cancel_item'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'You canceled a crafting of ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Chat suggestions
|
|
||||||
['suggestion_xp'] = {
|
|
||||||
maintext = 'Set a players crafting XP',
|
|
||||||
id = 'id',
|
|
||||||
idtext = "Target's id",
|
|
||||||
xp = 'XP',
|
|
||||||
xptext = 'XP amount',
|
|
||||||
workbench = 'workbench',
|
|
||||||
workbenchtext = "Workbenche's id",
|
|
||||||
},
|
|
||||||
['suggestion_level'] = {
|
|
||||||
maintext = 'Set a players crafting Level',
|
|
||||||
id = 'id',
|
|
||||||
idtext = "Target's id",
|
|
||||||
level = 'Level',
|
|
||||||
leveltext = 'Level',
|
|
||||||
workbench = 'workbench',
|
|
||||||
workbenchtext = "Workbenche's id",
|
|
||||||
},
|
|
||||||
|
|
||||||
-- okokTextUI
|
|
||||||
['textUI'] = {
|
|
||||||
text = '[E] Open crafting table',
|
|
||||||
color = 'darkblue',
|
|
||||||
side = 'left'
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,133 +0,0 @@
|
||||||
Locales['fr'] = {
|
|
||||||
|
|
||||||
-- Notifications
|
|
||||||
['user_xp_set'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Votre XP a été défini sur ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_xp_set'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Vous avez défini XP de ${s1} sur ${s2} avec succès',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['user_xp_set_workbench'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Votre XP a été défini de ${s1} en ${s2}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_xp_set_workbench'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Vous avez défini XP de ${s1} sur ${s2} en ${s3} avec succès',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['user_level_set'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Votre niveau a été défini sur ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_level_set'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Vous avez défini le niveau de ${s1} sur ${s2} avec succès',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['user_level_set_workbench'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Votre niveau a été défini sur ${s1} en ${s2}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_level_set_workbench'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Vous avez défini le niveau de ${s1} sur ${s2} en ${s3} avec succès',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['admin_level_no_exist'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Ce niveau n\'existe pas',
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['cant_carry'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = "Cet objet est trop lourd ! Impossible de le porter",
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['added_to_queue'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = '${s1} ajouté à la file de fabrication',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['cant_craft'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = "Vous ne pouvez pas fabriquer ${s1}",
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['inside_vehicle'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = "Vous ne pouvez pas fabriquer à l\'intérieur d'un véhicule",
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['queue_limit'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Vous avez atteint la limite de la file de fabrication',
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['claimed_item'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Vous avez reçu ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['claimed_all_items'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Vous avez tout reçu',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['cancel_item'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Vous avez annulé la fabrication de ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Chat suggestions
|
|
||||||
['suggestion_xp'] = {
|
|
||||||
maintext = 'Définissez un joueur fabriquant de l\'XP',
|
|
||||||
id = 'id',
|
|
||||||
idtext = "ID de la cible",
|
|
||||||
xp = 'XP',
|
|
||||||
xptext = 'Montant d\'XP',
|
|
||||||
workbench = 'workbench',
|
|
||||||
workbenchtext = "ID des établis",
|
|
||||||
},
|
|
||||||
['suggestion_level'] = {
|
|
||||||
maintext = 'Définissez le niveau de craft des joueurs',
|
|
||||||
id = 'id',
|
|
||||||
idtext = "ID de la cible",
|
|
||||||
level = 'Level',
|
|
||||||
leveltext = 'Niveau',
|
|
||||||
workbench = 'workbench',
|
|
||||||
workbenchtext = "ID des établis",
|
|
||||||
},
|
|
||||||
|
|
||||||
-- okokTextUI
|
|
||||||
['textUI'] = {
|
|
||||||
text = '[E] Ouvrir l\'établi',
|
|
||||||
color = 'darkblue',
|
|
||||||
side = 'left'
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,133 +0,0 @@
|
||||||
Locales['gr'] = {
|
|
||||||
|
|
||||||
-- Notifications
|
|
||||||
['user_xp_set'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = 'Το XP σας ορίστηκε σε ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_xp_set'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = 'Ρυθμίζετε το XP του ${s1} σε ${s2} με επιτυχία',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['user_xp_set_workbench'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = 'Το XP σας ορίστηκε σε ${s1} σε ${s2}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_xp_set_workbench'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = 'Ρυθμίζετε το XP του ${s1} προς ${s2} σε ${s3} με επιτυχία',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['user_level_set'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = 'Το επίπεδό σας ορίστηκε σε ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_level_set'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = 'Ρυθμίσετε το επίπεδο του ${s1} προς ${s2} με επιτυχία',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['user_level_set_workbench'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = 'Το επίπεδό σας ορίστηκε σε ${s1} in ${s2}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_level_set_workbench'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = 'Ρυθμίσετε το επίπεδο του ${s1} προς ${s2} σε ${s3} με επιτυχία',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['admin_level_no_exist'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = 'Αυτό το επίπεδο δεν υπάρχει',
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['cant_carry'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = "Δεν μπορείτε να μεταφέρετε αυτό το αντικείμενο",
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['added_to_queue'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = '${s1} προστέθηκε στην ουρά χειροτεχνίας',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['cant_craft'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = "Δεν μπορείς να χειροτεχνήσεις ${s1}",
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['inside_vehicle'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = "Δεν μπορείτε να κάνετε χειροτεχνία μέσα σε ένα όχημα",
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['queue_limit'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = 'Έχετε φτάσει το όριο της ουράς',
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['claimed_item'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = 'Έχετε διεκδικήσει ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['claimed_all_items'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = 'Έχετε διεκδικήσει όλα τα στοιχεία',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['cancel_item'] = {
|
|
||||||
title = 'ΚΑΤΑΣΚΕΥΗ',
|
|
||||||
text = 'Ακυρώσατε μια δημιουργία του ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Chat suggestions
|
|
||||||
['suggestion_xp'] = {
|
|
||||||
maintext = 'Ρυθμίσετε το επίπεδο του παίκτη',
|
|
||||||
id = 'ταυτότητα',
|
|
||||||
idtext = "Ταυτότητα στόχου",
|
|
||||||
xp = 'XP',
|
|
||||||
xptext = 'XP ποσό',
|
|
||||||
workbench = 'πάγκος εργασίας',
|
|
||||||
workbenchtext = "Ταυτότητα πάγκων εργασίας",
|
|
||||||
},
|
|
||||||
['suggestion_level'] = {
|
|
||||||
maintext = 'Ρυθμίσετε το επίπεδο του παίκτη',
|
|
||||||
id = 'ταυτότητα',
|
|
||||||
idtext = "Ταυτότητα στόχου",
|
|
||||||
level = 'Επίπεδο',
|
|
||||||
leveltext = 'Επίπεδο',
|
|
||||||
workbench = 'πάγκος εργασίας',
|
|
||||||
workbenchtext = "Ταυτότητα πάγκων εργασίας",
|
|
||||||
},
|
|
||||||
|
|
||||||
-- okokTextUI
|
|
||||||
['textUI'] = {
|
|
||||||
text = '[E] Να ανοίξω το τραπέζι χειροτεχνίας',
|
|
||||||
color = 'darkblue',
|
|
||||||
side = 'left'
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,133 +0,0 @@
|
||||||
Locales['pt'] = {
|
|
||||||
|
|
||||||
-- Notifications
|
|
||||||
['user_xp_set'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'A tua XP foi alterada para ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_xp_set'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Alteraste a XP de ${s1} para ${s2} com sucesso',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['user_xp_set_workbench'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'A tua XP foi alterada para ${s1} em ${s2}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_xp_set_workbench'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Alteraste a XP de ${s1} para ${s2} em ${s3} com sucesso',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['user_level_set'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'O teu nível foi alterado para ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_level_set'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Alteraste o nível de ${s1} em ${s2} com sucesso',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['user_level_set_workbench'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'O teu nível foi alterado para ${s1} em ${s2}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'info'
|
|
||||||
},
|
|
||||||
['admin_level_set_workbench'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Alteraste o nível de ${s1} para ${s2} em ${s3} com sucesso',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['admin_level_no_exist'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Esse nível não existe',
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['cant_carry'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = "Não tens espaço suficiente para carregar o item",
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['added_to_queue'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = '${s1} foi adicionado à queue',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['cant_craft'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = "Não podes craftar ${s1}",
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['inside_vehicle'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = "Não podes craftar dentro de um veículo",
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['queue_limit'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Atingiste o limite da queue',
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
['claimed_item'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Resgataste ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['claimed_all_items'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Regataste todos os itens',
|
|
||||||
time = 5000,
|
|
||||||
type = 'success'
|
|
||||||
},
|
|
||||||
['cancel_item'] = {
|
|
||||||
title = 'CRAFTING',
|
|
||||||
text = 'Cancelaste o craft de ${s1}',
|
|
||||||
time = 5000,
|
|
||||||
type = 'error'
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Chat suggestions
|
|
||||||
['suggestion_xp'] = {
|
|
||||||
maintext = 'Define o XP de craft de um jogador',
|
|
||||||
id = 'id',
|
|
||||||
idtext = "ID do jogador",
|
|
||||||
xp = 'XP',
|
|
||||||
xptext = 'Quantidade de XP',
|
|
||||||
workbench = 'workbench',
|
|
||||||
workbenchtext = "ID da workbench",
|
|
||||||
},
|
|
||||||
['suggestion_level'] = {
|
|
||||||
maintext = 'Define o nível de craft de um jogador',
|
|
||||||
id = 'id',
|
|
||||||
idtext = "ID do jogador",
|
|
||||||
level = 'Nível',
|
|
||||||
leveltext = 'Nível',
|
|
||||||
workbench = 'workbench',
|
|
||||||
workbenchtext = "ID da workbench",
|
|
||||||
},
|
|
||||||
|
|
||||||
-- okokTextUI
|
|
||||||
['textUI'] = {
|
|
||||||
text = '[E] Abrir crafting table',
|
|
||||||
color = 'darkblue',
|
|
||||||
side = 'left'
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
ALTER TABLE players ADD COLUMN xp LONGTEXT NULL;
|
|
||||||
ALTER TABLE players ADD COLUMN okokcrafts LONGTEXT NULL;
|
|
Binary file not shown.
|
@ -1,590 +0,0 @@
|
||||||
QBCore = exports[Config.qbPrefix.."-core"]:GetCoreObject()
|
|
||||||
|
|
||||||
Webhook = ''
|
|
||||||
|
|
||||||
function getMoney(type, xPlayer)
|
|
||||||
local moneyCount = 0
|
|
||||||
if type == "cash" then
|
|
||||||
moneyCount = xPlayer.PlayerData.money.cash
|
|
||||||
else
|
|
||||||
moneyCount = xPlayer.PlayerData.money.bank
|
|
||||||
end
|
|
||||||
|
|
||||||
return moneyCount
|
|
||||||
end
|
|
||||||
|
|
||||||
function addMoney(type, value, xPlayer)
|
|
||||||
xPlayer.Functions.AddMoney(type, value)
|
|
||||||
end
|
|
||||||
|
|
||||||
function removeMoney(type, value, xPlayer)
|
|
||||||
xPlayer.Functions.RemoveMoney(type, value)
|
|
||||||
end
|
|
||||||
|
|
||||||
function addItem(xPlayer, item, amount, data)
|
|
||||||
xPlayer.Functions.AddItem(item, tonumber(amount))
|
|
||||||
end
|
|
||||||
|
|
||||||
function removeItem(xPlayer, item, amount)
|
|
||||||
xPlayer.Functions.RemoveItem(item, tonumber(amount))
|
|
||||||
end
|
|
||||||
|
|
||||||
function canCarryIt(item, amount, xPlayer)
|
|
||||||
if Config.UseOx_inventory then
|
|
||||||
return exports.ox_inventory:CanCarryItem(xPlayer.PlayerData.source, item, amount)
|
|
||||||
end
|
|
||||||
|
|
||||||
local totalWeight = QBCore.Player.GetTotalWeight(xPlayer.PlayerData.items)
|
|
||||||
local itemInfo = QBCore.Shared.Items[item:lower()]
|
|
||||||
if not itemInfo then
|
|
||||||
TriggerClientEvent('QBCore:Notify', xPlayer.PlayerData.source, 'This item doesn\'t exits', 'error')
|
|
||||||
return
|
|
||||||
end
|
|
||||||
amount = tonumber(amount)
|
|
||||||
if (totalWeight + (itemInfo['weight'] * amount)) <= 120000 then
|
|
||||||
return true
|
|
||||||
else
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function hasPermission(source)
|
|
||||||
local staff = false
|
|
||||||
for k,v in ipairs(Config.AdminGroups) do
|
|
||||||
if QBCore.Functions.HasPermission(source, v) then
|
|
||||||
staff = true
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return staff
|
|
||||||
end
|
|
||||||
|
|
||||||
function MySQLexecute(query, values, func)
|
|
||||||
return MySQL.query(query, values, func)
|
|
||||||
end
|
|
||||||
|
|
||||||
function MySQLfetchAll(query, values, func)
|
|
||||||
return MySQL.query(query, values, func)
|
|
||||||
end
|
|
||||||
|
|
||||||
function giveXP(xPlayer, xp, workbench)
|
|
||||||
if Config.SameLevelForAllTables then
|
|
||||||
MySQLexecute('UPDATE players SET '..Config.xpColumnsName..' = xp+@xp WHERE citizenid = @identifier', {
|
|
||||||
['@identifier'] = xPlayer.PlayerData.citizenid,
|
|
||||||
['@xp'] = Config.DoubleXP and xp*2 or xp,
|
|
||||||
}, function (result)
|
|
||||||
TriggerClientEvent(Config.EventPrefix..':updateXP', xPlayer.PlayerData.source)
|
|
||||||
end)
|
|
||||||
else
|
|
||||||
MySQLexecute('UPDATE players SET '..Config.xpColumnsName..' = JSON_SET(xp, @table, JSON_EXTRACT(xp, @table) + @xp) WHERE citizenid = @identifier', {
|
|
||||||
['@identifier'] = xPlayer.PlayerData.citizenid,
|
|
||||||
['@xp'] = Config.DoubleXP and xp*2 or xp,
|
|
||||||
['@table'] = "$."..workbench,
|
|
||||||
}, function (result)
|
|
||||||
TriggerClientEvent(Config.EventPrefix..':updateXP', xPlayer.PlayerData.source)
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
QBCore.Functions.CreateCallback(Config.EventPrefix..":inv2", function(source, cb, item, isMoney)
|
|
||||||
local xPlayer = QBCore.Functions.GetPlayer(source)
|
|
||||||
local itemS = {}
|
|
||||||
if isMoney == "false" then
|
|
||||||
isMoney = false
|
|
||||||
elseif isMoney == "true" then
|
|
||||||
isMoney = true
|
|
||||||
end
|
|
||||||
|
|
||||||
if isMoney then
|
|
||||||
local playerMoney = getMoney(item, xPlayer)
|
|
||||||
itemS.name = item
|
|
||||||
itemS.amount = playerMoney
|
|
||||||
else
|
|
||||||
itemS = xPlayer.Functions.GetItemByName(item)
|
|
||||||
if itemS == nil then
|
|
||||||
itemS = {
|
|
||||||
name = item,
|
|
||||||
amount = 0
|
|
||||||
}
|
|
||||||
end
|
|
||||||
if itemS.count ~= nil then
|
|
||||||
itemS.amount = itemS.count
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
cb(itemS)
|
|
||||||
end)
|
|
||||||
|
|
||||||
QBCore.Functions.CreateCallback(Config.EventPrefix..":maxCraft", function(source, cb, recipe, maxCraftAmount, isDisassemble, itemC, itmNeeded)
|
|
||||||
local _source = source
|
|
||||||
local xPlayer = QBCore.Functions.GetPlayer(_source)
|
|
||||||
local maxCraft = maxCraftAmount
|
|
||||||
local itemAmt = 0
|
|
||||||
|
|
||||||
if not isDisassemble then
|
|
||||||
for k,v in ipairs(recipe) do
|
|
||||||
local item = {}
|
|
||||||
local itemCount = 0
|
|
||||||
|
|
||||||
if v[4] then
|
|
||||||
itemCount = getMoney(v[1], xPlayer)
|
|
||||||
else
|
|
||||||
item = xPlayer.Functions.GetItemByName(v[1])
|
|
||||||
if item == nil then
|
|
||||||
item = {
|
|
||||||
name = v[1],
|
|
||||||
amount = 0
|
|
||||||
}
|
|
||||||
end
|
|
||||||
if item.count ~= nil then
|
|
||||||
item.amount = item.count
|
|
||||||
end
|
|
||||||
itemCount = item.amount
|
|
||||||
end
|
|
||||||
|
|
||||||
if itemCount > 0 then
|
|
||||||
local possibleToCraft = itemCount/tonumber(v[2])
|
|
||||||
if possibleToCraft > 0 then
|
|
||||||
if maxCraft > possibleToCraft then
|
|
||||||
maxCraft = possibleToCraft
|
|
||||||
end
|
|
||||||
else
|
|
||||||
maxCraft = 0
|
|
||||||
break
|
|
||||||
end
|
|
||||||
else
|
|
||||||
maxCraft = 0
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
local item = xPlayer.Functions.GetItemByName(itemC)
|
|
||||||
if item == nil then
|
|
||||||
item = {
|
|
||||||
name = itemC,
|
|
||||||
amount = 0
|
|
||||||
}
|
|
||||||
end
|
|
||||||
if item.count ~= nil then
|
|
||||||
item.amount = item.count
|
|
||||||
end
|
|
||||||
itemAmt = item.amount
|
|
||||||
|
|
||||||
if itemAmt > 0 then
|
|
||||||
local possibleToCraft = itemAmt/tonumber(itmNeeded)
|
|
||||||
if possibleToCraft > 0 then
|
|
||||||
if maxCraft > possibleToCraft then
|
|
||||||
maxCraft = possibleToCraft
|
|
||||||
end
|
|
||||||
else
|
|
||||||
maxCraft = 0
|
|
||||||
end
|
|
||||||
else
|
|
||||||
maxCraft = 0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
cb(math.floor(maxCraft), itemAmt)
|
|
||||||
end)
|
|
||||||
|
|
||||||
local function normalizeRecipe(recipe)
|
|
||||||
local normalized = {}
|
|
||||||
for _, item in ipairs(recipe) do
|
|
||||||
local normalizedItem = { item[1], tonumber(item[2]), item[3] == "true" or item[3] == true, item[4] == "true" or item[4] == true }
|
|
||||||
table.insert(normalized, normalizedItem)
|
|
||||||
end
|
|
||||||
return normalized
|
|
||||||
end
|
|
||||||
|
|
||||||
local function compareRecipes(recipe1, recipe2)
|
|
||||||
if #recipe1 ~= #recipe2 then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
for i, item1 in ipairs(recipe1) do
|
|
||||||
local item2 = recipe2[i]
|
|
||||||
if item1[1] ~= item2[1] and item1[2] <= item2[2] then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
function craftExistsInWorkbench(workbenchID, itemID, recipe)
|
|
||||||
for _, workbench in pairs(Config.Crafting) do
|
|
||||||
if workbench.tableID == workbenchID then
|
|
||||||
for _, craft in pairs(workbench.crafts) do
|
|
||||||
if Config.Crafts[craft] == nil then
|
|
||||||
print("Craft "..craft.." does not exist in Config.Crafts")
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
if Config.Crafts[craft].item == itemID then
|
|
||||||
local normalizedCraftRecipe = normalizeRecipe(Config.Crafts[craft].recipe)
|
|
||||||
local normalizedInputRecipe = normalizeRecipe(recipe)
|
|
||||||
if compareRecipes(normalizedCraftRecipe, normalizedInputRecipe) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
QBCore.Functions.CreateCallback(Config.EventPrefix..":CanCraftItem", function(source, cb, itemID, recipe, itemName, amount, isItem, workbench, timeCraft, CraftQueues, xp, pc, isDis, itemData)
|
|
||||||
local xPlayer = QBCore.Functions.GetPlayer(source)
|
|
||||||
local canCraft = true
|
|
||||||
if not craftExistsInWorkbench(workbench, itemID, recipe) then
|
|
||||||
canCraft = false
|
|
||||||
end
|
|
||||||
|
|
||||||
if not isDis then
|
|
||||||
for k,v in pairs(recipe) do
|
|
||||||
if v[4] == "false" then
|
|
||||||
local item = xPlayer.Functions.GetItemByName(v[1])
|
|
||||||
if item == nil then
|
|
||||||
item = {
|
|
||||||
name = v[1],
|
|
||||||
amount = 0
|
|
||||||
}
|
|
||||||
end
|
|
||||||
if item.count ~= nil then
|
|
||||||
item.amount = item.count
|
|
||||||
end
|
|
||||||
if item.amount < v[2] then
|
|
||||||
canCraft = false
|
|
||||||
end
|
|
||||||
else
|
|
||||||
local playerMoney = getMoney(v[1], xPlayer)
|
|
||||||
if playerMoney < v[2] then
|
|
||||||
canCraft = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
local item = xPlayer.Functions.GetItemByName(itemID)
|
|
||||||
if item == nil then
|
|
||||||
item = {
|
|
||||||
name = itemID,
|
|
||||||
amount = 0
|
|
||||||
}
|
|
||||||
end
|
|
||||||
if item.count ~= nil then
|
|
||||||
item.amount = item.count
|
|
||||||
end
|
|
||||||
if tonumber(item.amount) < tonumber(amount) then
|
|
||||||
canCraft = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if canCraft then
|
|
||||||
if not isDis then
|
|
||||||
for k,v in pairs(recipe) do
|
|
||||||
if v[3] == "true" then
|
|
||||||
if v[4] == "true" then
|
|
||||||
removeMoney(v[1], v[2], xPlayer)
|
|
||||||
else
|
|
||||||
removeItem(xPlayer, v[1], v[2])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
removeItem(xPlayer, itemID, tonumber(amount))
|
|
||||||
end
|
|
||||||
|
|
||||||
local queue = CraftQueues
|
|
||||||
if queue ~= nil and queue[workbench] ~= nil then
|
|
||||||
queue[workbench][#queue[workbench]+1] = {
|
|
||||||
item = itemID,
|
|
||||||
recipe = recipe,
|
|
||||||
amount = amount,
|
|
||||||
isItem = isItem,
|
|
||||||
time = timeCraft,
|
|
||||||
itemName = itemName[itemID],
|
|
||||||
isDone = false,
|
|
||||||
isPending = true,
|
|
||||||
randomID = math.random(100000000, 999999999),
|
|
||||||
xp = xp,
|
|
||||||
sucPC = pc,
|
|
||||||
suc = true,
|
|
||||||
isDis = isDis,
|
|
||||||
data = itemData
|
|
||||||
}
|
|
||||||
|
|
||||||
MySQLexecute('UPDATE players SET '..Config.craftQueryColumnName..' = @okokcrafts WHERE citizenid = @identifier', {
|
|
||||||
['@identifier'] = xPlayer.PlayerData.citizenid,
|
|
||||||
['@okokcrafts'] = json.encode(queue),
|
|
||||||
}, function (result)
|
|
||||||
TriggerClientEvent(Config.EventPrefix..':notification', xPlayer.PlayerData.source, _L('added_to_queue').title, interp(_L('added_to_queue').text, {s1 = itemName[itemID]}), _L('added_to_queue').time, _L('added_to_queue').type)
|
|
||||||
|
|
||||||
if Webhook ~= "" then
|
|
||||||
data = {
|
|
||||||
playerid = xPlayer.PlayerData.source,
|
|
||||||
type = "start-craft",
|
|
||||||
item = itemName[itemID],
|
|
||||||
amount = amount,
|
|
||||||
}
|
|
||||||
|
|
||||||
discordWebhook(data)
|
|
||||||
end
|
|
||||||
|
|
||||||
cb(queue)
|
|
||||||
end)
|
|
||||||
else
|
|
||||||
if queue == nil then
|
|
||||||
queue = {}
|
|
||||||
end
|
|
||||||
queue[workbench] = {}
|
|
||||||
queue[workbench] = {
|
|
||||||
[1] = {
|
|
||||||
item = itemID,
|
|
||||||
recipe = recipe,
|
|
||||||
amount = amount,
|
|
||||||
isItem = isItem,
|
|
||||||
time = timeCraft,
|
|
||||||
itemName = itemName[itemID],
|
|
||||||
isDone = false,
|
|
||||||
isPending = true,
|
|
||||||
randomID = math.random(100000000, 999999999),
|
|
||||||
xp = xp,
|
|
||||||
sucPC = pc,
|
|
||||||
suc = true,
|
|
||||||
isDis = isDis,
|
|
||||||
data = itemData
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MySQLexecute('UPDATE players SET '..Config.craftQueryColumnName..' = @okokcrafts WHERE citizenid = @identifier', {
|
|
||||||
['@identifier'] = xPlayer.PlayerData.citizenid,
|
|
||||||
['@okokcrafts'] = json.encode(queue),
|
|
||||||
}, function (result)
|
|
||||||
TriggerClientEvent(Config.EventPrefix..':notification', xPlayer.PlayerData.source, _L('added_to_queue').title, interp(_L('added_to_queue').text, {s1 = itemName[itemID]}), _L('added_to_queue').time, _L('added_to_queue').type)
|
|
||||||
|
|
||||||
if Webhook ~= "" then
|
|
||||||
data = {
|
|
||||||
playerid = xPlayer.PlayerData.source,
|
|
||||||
type = "start-craft",
|
|
||||||
item = itemName[itemID],
|
|
||||||
amount = amount,
|
|
||||||
}
|
|
||||||
discordWebhook(data)
|
|
||||||
end
|
|
||||||
|
|
||||||
cb(queue)
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
TriggerClientEvent(Config.EventPrefix..':notification', xPlayer.PlayerData.source, _L('cant_craft').title, interp(_L('cant_craft').text, {s1 = itemName[itemID]}), _L('cant_craft').time, _L('cant_craft').type)
|
|
||||||
cb(false)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
RegisterServerEvent(Config.EventPrefix..':claimAll')
|
|
||||||
AddEventHandler(Config.EventPrefix..':claimAll', function(workbench, AllQueues)
|
|
||||||
local xPlayer = QBCore.Functions.GetPlayer(source)
|
|
||||||
local gotQueue = false
|
|
||||||
local CraftsQueue = {}
|
|
||||||
|
|
||||||
MySQLfetchAll('SELECT okokcrafts FROM players WHERE citizenid = @identifier', {
|
|
||||||
['@identifier'] = xPlayer.PlayerData.citizenid,
|
|
||||||
}, function (result)
|
|
||||||
if result[1] ~= nil then
|
|
||||||
local data = json.decode(result[1].okokcrafts)
|
|
||||||
if data ~= nil then
|
|
||||||
CraftsQueue = data
|
|
||||||
gotQueue = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
while not gotQueue do
|
|
||||||
Citizen.Wait(100)
|
|
||||||
end
|
|
||||||
|
|
||||||
local queue = CraftsQueue[workbench]
|
|
||||||
local v = queue[1]
|
|
||||||
|
|
||||||
if v ~= nil then
|
|
||||||
if v.isDone then
|
|
||||||
if v.suc then
|
|
||||||
if not v.isDis then
|
|
||||||
local canCarry = false
|
|
||||||
if v.isItem then
|
|
||||||
if canCarryIt(v.item, v.amount, xPlayer) then
|
|
||||||
addItem(xPlayer, v.item, v.amount, v.data)
|
|
||||||
canCarry = true
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if canCarryIt(v.item, v.amount, xPlayer) then
|
|
||||||
addItem(xPlayer, v.item, v.amount)
|
|
||||||
canCarry = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if canCarry then
|
|
||||||
if Webhook ~= "" then
|
|
||||||
data = {
|
|
||||||
playerid = xPlayer.PlayerData.source,
|
|
||||||
type = "claim-craft",
|
|
||||||
item = v.itemName,
|
|
||||||
amount = v.amount,
|
|
||||||
}
|
|
||||||
|
|
||||||
discordWebhook(data)
|
|
||||||
end
|
|
||||||
|
|
||||||
if Config.UseXP then
|
|
||||||
giveXP(xPlayer, v.xp, workbench)
|
|
||||||
end
|
|
||||||
TriggerClientEvent(Config.EventPrefix..':removeItemsFromQueue', xPlayer.PlayerData.source, 1, workbench)
|
|
||||||
else
|
|
||||||
TriggerClientEvent(Config.EventPrefix..':notification', xPlayer.PlayerData.source, _L('cant_carry').title, _L('cant_carry').text, _L('cant_carry').time, _L('cant_carry').type)
|
|
||||||
TriggerClientEvent(Config.EventPrefix..':notification', xPlayer.PlayerData.source, _L('claimed_all_items').title, _L('claimed_all_items').text, _L('claimed_all_items').time, _L('claimed_all_items').type)
|
|
||||||
TriggerClientEvent(Config.EventPrefix..':resetClaimAllButton', xPlayer.PlayerData.source)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
local canCarry = true
|
|
||||||
for k2,v2 in ipairs(v.recipe) do
|
|
||||||
if v2[4] == "false" or v2[4] == false then
|
|
||||||
if not canCarryIt(v2[1], v2[2], xPlayer) then
|
|
||||||
canCarry = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if canCarry then
|
|
||||||
for k2,v2 in ipairs(v.recipe) do
|
|
||||||
if v2[4] == "true" or v2[4] == true then
|
|
||||||
addMoney(v2[1], v2[2], xPlayer)
|
|
||||||
else
|
|
||||||
addItem(xPlayer, v2[1], v2[2])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if Webhook ~= "" then
|
|
||||||
data = {
|
|
||||||
playerid = xPlayer.PlayerData.source,
|
|
||||||
type = "claim-craft",
|
|
||||||
item = v.itemName,
|
|
||||||
amount = v.amount,
|
|
||||||
}
|
|
||||||
|
|
||||||
discordWebhook(data)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
if Config.UseXP then
|
|
||||||
giveXP(xPlayer, v.xp, workbench)
|
|
||||||
end
|
|
||||||
TriggerClientEvent(Config.EventPrefix..':removeItemsFromQueue', xPlayer.PlayerData.source, 1, workbench)
|
|
||||||
else
|
|
||||||
TriggerClientEvent(Config.EventPrefix..':notification', xPlayer.PlayerData.source, _L('cant_carry').title, _L('cant_carry').text, _L('cant_carry').time, _L('cant_carry').type)
|
|
||||||
TriggerClientEvent(Config.EventPrefix..':notification', xPlayer.PlayerData.source, _L('claimed_all_items').title, _L('claimed_all_items').text, _L('claimed_all_items').time, _L('claimed_all_items').type)
|
|
||||||
TriggerClientEvent(Config.EventPrefix..':resetClaimAllButton', xPlayer.PlayerData.source)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if Webhook ~= "" then
|
|
||||||
data = {
|
|
||||||
playerid = xPlayer.PlayerData.source,
|
|
||||||
type = "failed-craft",
|
|
||||||
item = v.itemName,
|
|
||||||
amount = v.amount,
|
|
||||||
}
|
|
||||||
|
|
||||||
discordWebhook(data)
|
|
||||||
end
|
|
||||||
if Config.GiveXPOnCraftFailed and Config.UseXP then
|
|
||||||
if Config.UseXP then
|
|
||||||
giveXP(xPlayer, v.xp, workbench)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
TriggerClientEvent(Config.EventPrefix..':removeItemsFromQueue', xPlayer.PlayerData.source, 1, workbench)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
-------------------------- IDENTIFIERS
|
|
||||||
|
|
||||||
function ExtractIdentifiers(id)
|
|
||||||
local identifiers = {
|
|
||||||
steam = "",
|
|
||||||
ip = "",
|
|
||||||
discord = "",
|
|
||||||
license = "",
|
|
||||||
xbl = "",
|
|
||||||
live = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
for i = 0, GetNumPlayerIdentifiers(id) - 1 do
|
|
||||||
local playerID = GetPlayerIdentifier(id, i)
|
|
||||||
|
|
||||||
if string.find(playerID, "steam") then
|
|
||||||
identifiers.steam = playerID
|
|
||||||
elseif string.find(playerID, "ip") then
|
|
||||||
identifiers.ip = playerID
|
|
||||||
elseif string.find(playerID, "discord") then
|
|
||||||
identifiers.discord = playerID
|
|
||||||
elseif string.find(playerID, "license") then
|
|
||||||
identifiers.license = playerID
|
|
||||||
elseif string.find(playerID, "xbl") then
|
|
||||||
identifiers.xbl = playerID
|
|
||||||
elseif string.find(playerID, "live") then
|
|
||||||
identifiers.live = playerID
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return identifiers
|
|
||||||
end
|
|
||||||
|
|
||||||
-------------------------- WEBHOOK
|
|
||||||
|
|
||||||
function discordWebhook(data)
|
|
||||||
local color = '65352'
|
|
||||||
local category = 'default'
|
|
||||||
local item = ''
|
|
||||||
local amount = ''
|
|
||||||
local identifierlist = ExtractIdentifiers(data.playerid)
|
|
||||||
local identifier = identifierlist.license:gsub("license2:", "")
|
|
||||||
local discord = "<@"..identifierlist.discord:gsub("discord:", "")..">"
|
|
||||||
|
|
||||||
if data.type == 'start-craft' then
|
|
||||||
color = Config.StartCraftWebhookColor
|
|
||||||
category = 'Started a craft'
|
|
||||||
item = data.item
|
|
||||||
amount = data.amount
|
|
||||||
elseif data.type == 'cancel-craft' then
|
|
||||||
color = Config.CancelWebhookColor
|
|
||||||
category = 'Canceled a craft'
|
|
||||||
item = data.item
|
|
||||||
amount = data.amount
|
|
||||||
elseif data.type == 'claim-craft' then
|
|
||||||
color = Config.ClaimCraftWebhookColor
|
|
||||||
category = 'Claimed'
|
|
||||||
item = data.item
|
|
||||||
amount = data.amount
|
|
||||||
elseif data.type == 'failed-craft' then
|
|
||||||
color = Config.FailedCraftWebhookColor
|
|
||||||
category = 'Failed a craft'
|
|
||||||
item = data.item
|
|
||||||
amount = data.amount
|
|
||||||
end
|
|
||||||
|
|
||||||
local information = {
|
|
||||||
{
|
|
||||||
["color"] = color,
|
|
||||||
["author"] = {
|
|
||||||
["icon_url"] = Config.IconURL,
|
|
||||||
["name"] = Config.ServerName..' - Logs',
|
|
||||||
},
|
|
||||||
["title"] = 'CRAFTING',
|
|
||||||
["description"] = '**Action:** '..category..'\n**Item:** '..item..'\n**Amount:** '..amount..'\n\n**ID:** '..data.playerid..'\n**Identifier:** '..identifier..'\n**Discord:** '..discord,
|
|
||||||
["footer"] = {
|
|
||||||
["text"] = os.date(Config.DateFormat),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
PerformHttpRequest(Webhook, function(err, text, headers) end, 'POST', json.encode({username = Config.BotName, embeds = information}), {['Content-Type'] = 'application/json'})
|
|
||||||
end
|
|
Binary file not shown.
|
@ -1,998 +0,0 @@
|
||||||
function addStr(str, index, stringToAdd){
|
|
||||||
return str.substring(0, index) + stringToAdd + str.substring(index, str.length);
|
|
||||||
}
|
|
||||||
|
|
||||||
var isTimerOn = false;
|
|
||||||
var lastTime;
|
|
||||||
var categories = [];
|
|
||||||
var selectedCategory = "general_cat";
|
|
||||||
var craft2;
|
|
||||||
var job2;
|
|
||||||
var gang;
|
|
||||||
var craftData;
|
|
||||||
var sideCraftMenu;
|
|
||||||
var itemClaiming = 0;
|
|
||||||
var CraftQueue = [];
|
|
||||||
var maxCraft = 10;
|
|
||||||
var canCraftItem = true;
|
|
||||||
var showAllCrafts = false;
|
|
||||||
var canClaimAll = true;
|
|
||||||
|
|
||||||
var canClaimItem = true;
|
|
||||||
var canOpenSideCraft = true;
|
|
||||||
|
|
||||||
let Inventory = '';
|
|
||||||
|
|
||||||
window.addEventListener('message', function(event) {
|
|
||||||
switch (event.data.action) {
|
|
||||||
case 'openCraft':
|
|
||||||
selectedCategory = "general_cat";
|
|
||||||
canOpenSideCraft = true;
|
|
||||||
canClaimItem = true;
|
|
||||||
itemClaiming = 0;
|
|
||||||
showAllCrafts = event.data.showAllCrafts;
|
|
||||||
Inventory = event.data.inventory;
|
|
||||||
var queue = event.data.queue;
|
|
||||||
craftData = event.data;
|
|
||||||
categories = event.data.categories;
|
|
||||||
var craft = event.data.craft;
|
|
||||||
craft2 = craft;
|
|
||||||
var num = craft.length;
|
|
||||||
var paragraph = '';
|
|
||||||
var row = '<div class="row">';
|
|
||||||
var lastRowNum = 0;
|
|
||||||
var job = event.data.job;
|
|
||||||
job2 = event.data.job;
|
|
||||||
gang = event.data.gang;
|
|
||||||
var added = 0;
|
|
||||||
var useCategories = event.data.useCategories;
|
|
||||||
var categoriesButtonsHTML = `
|
|
||||||
<input type="radio" class="btn-check cat_tab" name="category" value="general_cat" id="general_cat" checked>
|
|
||||||
<label class="btn btn-category first-category" for="general_cat">General</label>
|
|
||||||
`;
|
|
||||||
document.querySelector('#claimall-button').disabled = false;
|
|
||||||
if(useCategories){
|
|
||||||
for(let i = 0; i < categories.length; i++){
|
|
||||||
categoriesButtonsHTML += `
|
|
||||||
<input type="radio" class="btn-check cat_tab" name="category" value="${categories[i]}" id="${categories[i]}">
|
|
||||||
<label class="btn btn-category last-category" for="${categories[i]}">${categories[i]}</label>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
$('#categories_btns').html(categoriesButtonsHTML);
|
|
||||||
$('#categories_box').show();
|
|
||||||
} else {
|
|
||||||
$('#categories_box').hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(num >= 13){
|
|
||||||
$('.itemslist_window').css('padding', '0.3125rem 0.55rem 0.3125rem 0.625rem');
|
|
||||||
} else {
|
|
||||||
$('.itemslist_window').css('padding', '0.3125rem 1.05rem 0.3125rem 0.625rem');
|
|
||||||
}
|
|
||||||
|
|
||||||
for(var i = 0; i < num; i++) {
|
|
||||||
for(var i1 = 0; i1 < craft[i].job.length; i1++){
|
|
||||||
if(selectedCategory == "general_cat" || craft[i].category == selectedCategory){
|
|
||||||
if(craft[i].job[i1] == job || craft[i].job[i1] == gang || craft[i].job[i1] == ''){
|
|
||||||
if(!event.data.UseXP){
|
|
||||||
var itemName = event.data.itemNames;
|
|
||||||
var itemId = craft[i].item;
|
|
||||||
var index = i;
|
|
||||||
added++
|
|
||||||
row += `
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="card item_card" id="${itemId}wb_${event.data.wb}wb_${index}">
|
|
||||||
<div class="card-body item_card-body d-flex justify-content-center align-items-center" style="background-color: rgba(220, 220, 220, 0.20)" id="selected${itemId}wb_${event.data.wb}wb_${index}">
|
|
||||||
<span class="item-title text-center">${itemName[itemId]}</span>
|
|
||||||
<img src="nui://${Inventory}/${itemId}.png" class="image">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
var myEle = document.getElementById(itemId+"wb_"+event.data.wb+"wb_"+index);
|
|
||||||
if(!myEle) {
|
|
||||||
$(document).on('click', "#"+itemId+"wb_"+event.data.wb+"wb_"+index, function() {
|
|
||||||
if(canOpenSideCraft) {
|
|
||||||
canOpenSideCraft = false;
|
|
||||||
allID = this.id;
|
|
||||||
id = allID.substring(0, allID.indexOf('wb_'));
|
|
||||||
index2 = allID.split("wb_");
|
|
||||||
$('.item_card-body').css('background-color', 'rgba(220, 220, 220, 0.20)');
|
|
||||||
$('#selected'+this.id).css('background-color', 'rgba(31, 94, 255, 1)');
|
|
||||||
var sound = new Audio('click.mp3');
|
|
||||||
sound.volume = 0.3;
|
|
||||||
sound.play();
|
|
||||||
$.post('https://okokCrafting/action', JSON.stringify({
|
|
||||||
action: "craft",
|
|
||||||
item: id,
|
|
||||||
crafts: craft,
|
|
||||||
itemName: itemName,
|
|
||||||
index: index2[2],
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((added) % 4 === 0) {
|
|
||||||
row = addStr(row, row.length, `</div><div class="row itemslist_row-h">`);
|
|
||||||
lastRowNum = row.length+6;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(craft[i].levelNeeded <= event.data.level || showAllCrafts){
|
|
||||||
var itemName = event.data.itemNames;
|
|
||||||
var itemId = craft[i].item;
|
|
||||||
var index = i;
|
|
||||||
added++
|
|
||||||
row += `
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="card item_card" id="${itemId}wb_${event.data.wb}wb_${index}">
|
|
||||||
<div class="card-body item_card-body d-flex justify-content-center align-items-center" style="background-color: rgba(220, 220, 220, 0.20)" id="selected${itemId}wb_${event.data.wb}wb_${index}">
|
|
||||||
<span class="item-title text-center">${itemName[itemId]}</span>
|
|
||||||
<img src="nui://${Inventory}/${itemId}.png" class="image">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
var myEle = document.getElementById(itemId+"wb_"+event.data.wb+"wb_"+index);
|
|
||||||
if(!myEle) {
|
|
||||||
$(document).on('click', "#"+itemId+"wb_"+event.data.wb+"wb_"+index, function() {
|
|
||||||
if(canOpenSideCraft) {
|
|
||||||
canOpenSideCraft = false;
|
|
||||||
allID = this.id;
|
|
||||||
id = allID.substring(0, allID.indexOf('wb_'));
|
|
||||||
index2 = allID.split("wb_");
|
|
||||||
$('.item_card-body').css('background-color', 'rgba(220, 220, 220, 0.20)');
|
|
||||||
$('#selected'+this.id).css('background-color', 'rgba(31, 94, 255, 1)');
|
|
||||||
var sound = new Audio('click.mp3');
|
|
||||||
sound.volume = 0.3;
|
|
||||||
sound.play();
|
|
||||||
$.post('https://okokCrafting/action', JSON.stringify({
|
|
||||||
action: "craft",
|
|
||||||
item: id,
|
|
||||||
crafts: craft,
|
|
||||||
itemName: itemName,
|
|
||||||
index: index2[2],
|
|
||||||
level: event.data.level,
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((added) % 4 === 0) {
|
|
||||||
row = addStr(row, row.length, `</div><div class="row itemslist_row-h">`);
|
|
||||||
lastRowNum = row.length+6;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
row += `</div>`;
|
|
||||||
|
|
||||||
if(event.data.UseXP) {
|
|
||||||
$('#currentlevel').html(event.data.level);
|
|
||||||
document.documentElement.style.setProperty('--percentage-width', event.data.percentage+"%");
|
|
||||||
$('.xpbar-col').css('margin-top', '-1.8rem');
|
|
||||||
} else {
|
|
||||||
$('.xpbar').hide();
|
|
||||||
$('.xpbar-col').css('margin-top', '5.05rem');
|
|
||||||
}
|
|
||||||
|
|
||||||
var queueRow = '';
|
|
||||||
CraftQueue = queue;
|
|
||||||
if(queue.length > 0){
|
|
||||||
if(queue.length >= 6){
|
|
||||||
$('.craftingq_window').css('padding-right', '0.35rem');
|
|
||||||
} else {
|
|
||||||
$('.craftingq_window').css('padding-right', '0rem');
|
|
||||||
}
|
|
||||||
for (var i = 0; i < queue.length; i++) {
|
|
||||||
if(queue[i].isDone == true) {
|
|
||||||
if(queue[i].suc){
|
|
||||||
if(queue[i].isDis){
|
|
||||||
queueRow += `
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item-concluded mt-2">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="nui://${Inventory}/${queue[i].item}.png" class="image_components">
|
|
||||||
<div class="ms-2">
|
|
||||||
<div class="queue-itemname">${queue[i].itemName} x${queue[i].amount}</div>
|
|
||||||
<div class="queue-itemstate">Concluded</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-claimbutton"><div class="d-flex justify-content-center align-items-center queue-claimbutton-bg" data-id="${i}" onclick="cancel(this)"><i class="fas fa-check"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
} else {
|
|
||||||
queueRow += `
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item-concluded mt-2">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="nui://${Inventory}/${queue[i].item}.png" class="image_components">
|
|
||||||
<div class="ms-2">
|
|
||||||
<div class="queue-itemname">${queue[i].itemName} x${queue[i].amount}</div>
|
|
||||||
<div class="queue-itemstate">Concluded</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-claimbutton"><div class="d-flex justify-content-center align-items-center queue-claimbutton-bg" data-id="${i}" onclick="claim(this)"><i class="fas fa-check"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
queueRow += `
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item-failed mt-2">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="nui://${Inventory}/${queue[i].item}.png" class="image_components">
|
|
||||||
<div class="ms-2">
|
|
||||||
<div class="queue-itemname">${queue[i].itemName} x${queue[i].amount}</div>
|
|
||||||
<div class="queue-itemstate">Failed to craft</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-claimbutton"><div class="d-flex justify-content-center align-items-center queue-failbutton-bg" data-id="${i}" onclick="claimFail(this)"><i class="fas fa-check"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(queue[i].isPending){
|
|
||||||
if(queue[i].isDis){
|
|
||||||
queueRow += `
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item mt-2">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="nui://${Inventory}/${queue[i].item}.png" class="image_components">
|
|
||||||
<div class="ms-2">
|
|
||||||
<div class="queue-itemname">${queue[i].itemName} x${queue[i].amount}</div>
|
|
||||||
<div class="queue-itemstate">Pending</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-cancelbutton"><div class="d-flex justify-content-center align-items-center queue-cancelbutton-bg" data-id="${i}" onclick="claim(this)"><i class="fas fa-times"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
} else {
|
|
||||||
queueRow += `
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item mt-2">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="nui://${Inventory}/${queue[i].item}.png" class="image_components">
|
|
||||||
<div class="ms-2">
|
|
||||||
<div class="queue-itemname">${queue[i].itemName} x${queue[i].amount}</div>
|
|
||||||
<div class="queue-itemstate">Pending</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-cancelbutton"><div class="d-flex justify-content-center align-items-center queue-cancelbutton-bg" data-id="${i}" onclick="cancel(this)"><i class="fas fa-times"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(queue[i].isDis){
|
|
||||||
queueRow += `
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item mt-2">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="nui://${Inventory}/${queue[i].item}.png" class="image_components">
|
|
||||||
<div class="ms-2">
|
|
||||||
<div class="queue-itemname">${queue[i].itemName} x${queue[i].amount}</div>
|
|
||||||
<div class="queue-itemstate">Time left: ${queue[i].time}s</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-cancelbutton"><div class="d-flex justify-content-center align-items-center queue-cancelbutton-bg" data-id="${i}" onclick="claim(this)"><i class="fas fa-times"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
} else {
|
|
||||||
queueRow += `
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item mt-2">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="nui://${Inventory}/${queue[i].item}.png" class="image_components">
|
|
||||||
<div class="ms-2">
|
|
||||||
<div class="queue-itemname">${queue[i].itemName} x${queue[i].amount}</div>
|
|
||||||
<div class="queue-itemstate">Time left: ${queue[i].time}s</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-cancelbutton"><div class="d-flex justify-content-center align-items-center queue-cancelbutton-bg" data-id="${i}" onclick="cancel(this)"><i class="fas fa-times"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
queueRow = `<div class="d-flex justify-content-center noitq">The crafting queue is empty</div>`
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.craftingq_window').html(queueRow);
|
|
||||||
$('#craft-table').html(row);
|
|
||||||
$('.title-name').html(event.data.name);
|
|
||||||
|
|
||||||
$('.title').fadeIn();
|
|
||||||
$('.itemslist').fadeIn();
|
|
||||||
$('.crafting-body').fadeIn();
|
|
||||||
break
|
|
||||||
case 'openSideCraft':
|
|
||||||
sideCraftMenu = event.data;
|
|
||||||
canOpenSideCraft = true;
|
|
||||||
var useLevels = false;
|
|
||||||
if(sideCraftMenu.level != undefined){
|
|
||||||
var levelNeeded = sideCraftMenu.crafts[sideCraftMenu.index].levelNeeded;
|
|
||||||
var level = sideCraftMenu.level;
|
|
||||||
useLevels = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
var isLevel = false;
|
|
||||||
$('#quantity').val(1);
|
|
||||||
maxCraft = sideCraftMenu.maxCraft;
|
|
||||||
if(canCraftItem == false){
|
|
||||||
canCraftItem = true;
|
|
||||||
document.querySelector('#craft-button').disabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var canCraft = true;
|
|
||||||
var isAvailable = false;
|
|
||||||
var num = event.data.recipe.length;
|
|
||||||
var recipe = ``;
|
|
||||||
var img = `
|
|
||||||
<img src="nui://${Inventory}/${event.data.itemNameID}.png" class="image_itemselected">
|
|
||||||
<span style="color: #fff; font-weight: 600; font-size: 20px;" class="ms-2">${event.data.itemName} x${event.data.itemAmount}</span>
|
|
||||||
`;
|
|
||||||
|
|
||||||
if(sideCraftMenu.isDis){
|
|
||||||
$('#top_text').html(`Requirements`);
|
|
||||||
$('#bot_text').html(`You will receive`);
|
|
||||||
img = `
|
|
||||||
<img src="nui://${Inventory}/${event.data.itemNameID}.png" class="image_itemselected">
|
|
||||||
<span style="color: #fff; font-weight: 600; font-size: 20px;" class="ms-2">${event.data.itemName} x${event.data.itemAmount} (${event.data.isDisItemAmt})</span>
|
|
||||||
`;
|
|
||||||
} else {
|
|
||||||
$('#top_text').html(`You will receive`);
|
|
||||||
$('#bot_text').html(`Requirements`);
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#side-image').html(img);
|
|
||||||
$('#craft-time').html(event.data.time);
|
|
||||||
|
|
||||||
if(useLevels){
|
|
||||||
if(level >= levelNeeded){
|
|
||||||
canCraft = true;
|
|
||||||
isAvailable = true;
|
|
||||||
isLevel = true;
|
|
||||||
} else {
|
|
||||||
isAvailable = false;
|
|
||||||
canCraft = false;
|
|
||||||
isLevel = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(var i = 0; i < num; i++){
|
|
||||||
var idName = event.data.recipe[i][0];
|
|
||||||
if(sideCraftMenu.isDis){
|
|
||||||
recipe += `
|
|
||||||
<div class="d-flex align-items-center mx-1">
|
|
||||||
<img src="nui://${Inventory}/${event.data.recipe[i][0]}.png" class="image_components">
|
|
||||||
<span style="color: #fff; font-weight: 600; font-size: 20px;" class="ms-2">${event.data.itemNames[idName]} x${event.data.recipe[i][1]}</span>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
if(event.data.itemAmount > event.data.isDisItemAmt){
|
|
||||||
canCraft = false
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
recipe += `
|
|
||||||
<div class="d-flex align-items-center mx-1">
|
|
||||||
<img src="nui://${Inventory}/${event.data.recipe[i][0]}.png" class="image_components">
|
|
||||||
<span style="color: #fff; font-weight: 600; font-size: 20px;" class="ms-2">${event.data.itemNames[idName]} x${event.data.recipe[i][1]} (${event.data.inventory[i].key})</span>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
if(event.data.recipe[i][1] > event.data.inventory[i].key){
|
|
||||||
canCraft = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$('#craft-button-div').html(`
|
|
||||||
<button type="button" id="craft-button" data-item="${event.data.itemNameID}" data-recipe="${event.data.recipe}" data-amount="${event.data.itemAmount}" data-xp="${event.data.xp}" data-isDis="${event.data.isDis}" data-index="${sideCraftMenu.index}" data-level="${sideCraftMenu.level}" onclick="craft(this)" class="btn btn-blue flex-grow-1">CRAFT</button>
|
|
||||||
`);
|
|
||||||
|
|
||||||
if(canCraft) {
|
|
||||||
$('#craft-buttons-info').fadeIn();
|
|
||||||
$('#craft-button-div').fadeIn();
|
|
||||||
$('#craft-buttons-info-level').hide();
|
|
||||||
} else {
|
|
||||||
$('#craft-buttons-info').hide();
|
|
||||||
$('#craft-buttons-info-level').hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(useLevels){
|
|
||||||
if(!isAvailable && isLevel){
|
|
||||||
$('#craft-button-div-level').html(`
|
|
||||||
<span class="btn-blue-level"><i class="fa-solid fa-lock"></i> LEVEL REQUIRED: ${levelNeeded}</span>
|
|
||||||
`);
|
|
||||||
$('#craft-buttons-info-level').fadeIn();
|
|
||||||
$('#craft-button-div-level').fadeIn();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#craft-percentage').html(event.data.percentage);
|
|
||||||
$('.components_window').html(recipe);
|
|
||||||
|
|
||||||
$('.itemrequirements').fadeIn();
|
|
||||||
break
|
|
||||||
case 'ShowCraftCount':
|
|
||||||
var time = event.data.time;
|
|
||||||
var itemName = event.data.name;
|
|
||||||
|
|
||||||
$('#crafting-text').html(`Crafting`);
|
|
||||||
$('#item-name').html(`${itemName}`);
|
|
||||||
$('#item-timer').html(`${time}s`);
|
|
||||||
if(time == lastTime) {
|
|
||||||
$('#cog').removeClass('fa-spin');
|
|
||||||
} else {
|
|
||||||
$('#cog').addClass('fa-spin');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(!isTimerOn){
|
|
||||||
isTimerOn = true;
|
|
||||||
$('.timer').fadeIn();
|
|
||||||
}
|
|
||||||
lastTime = time
|
|
||||||
break
|
|
||||||
case 'CompleteCraftCount':
|
|
||||||
var itemName = event.data.name;
|
|
||||||
|
|
||||||
$('.timer_card-body').css('background-color', '#1fa34a');
|
|
||||||
$('#crafting-text').html(`Crafted`);
|
|
||||||
$('#item-name').html(`${itemName}`);
|
|
||||||
$('#item-timer').html(`0s`);
|
|
||||||
|
|
||||||
$('#cog').removeClass('fa-spin');
|
|
||||||
$('#cog').removeClass('fa-cog');
|
|
||||||
|
|
||||||
$('#cog').addClass('fa-check');
|
|
||||||
|
|
||||||
break
|
|
||||||
case 'FailedCraftCount':
|
|
||||||
var itemName = event.data.name;
|
|
||||||
|
|
||||||
$('.timer_card-body').css('background-color', '#990b0b');
|
|
||||||
$('#crafting-text').html(`Failed to craft`);
|
|
||||||
$('#item-name').html(`${itemName}`);
|
|
||||||
$('#item-timer').html(`0s`);
|
|
||||||
|
|
||||||
$('#cog').removeClass('fa-spin');
|
|
||||||
$('#cog').removeClass('fa-cog');
|
|
||||||
|
|
||||||
$('#cog').addClass('fa-times');
|
|
||||||
|
|
||||||
break
|
|
||||||
case 'HideCraftCount':
|
|
||||||
isTimerOn = false;
|
|
||||||
$('.timer').fadeOut();
|
|
||||||
setTimeout(function(){
|
|
||||||
$('#cog').removeClass('fa-times');
|
|
||||||
$('#cog').removeClass('fa-check');
|
|
||||||
$('#cog').addClass('fa-spin');
|
|
||||||
$('#cog').addClass('fa-cog');
|
|
||||||
|
|
||||||
$('.timer_card-body').css('background-color', 'rgba(31, 94, 255, 1)');
|
|
||||||
}, 400);
|
|
||||||
break
|
|
||||||
case 'updateCraftingItems':
|
|
||||||
canClaimItem = true;
|
|
||||||
if(selectedCategory != ""){
|
|
||||||
var queue = event.data.queue;
|
|
||||||
var queueRow = '';
|
|
||||||
CraftQueue = queue;
|
|
||||||
if(queue.length > 0){
|
|
||||||
if(queue.length >= 6){
|
|
||||||
$('.craftingq_window').css('padding-right', '0.35rem');
|
|
||||||
} else {
|
|
||||||
$('.craftingq_window').css('padding-right', '0rem');
|
|
||||||
}
|
|
||||||
for (var i = 0; i < queue.length; i++) {
|
|
||||||
if(queue[i].isDone == true) {
|
|
||||||
if(queue[i].suc){
|
|
||||||
if(queue[i].isDis){
|
|
||||||
queueRow += `
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item-concluded mt-2">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="nui://${Inventory}/${queue[i].item}.png" class="image_components">
|
|
||||||
<div class="ms-2">
|
|
||||||
<div class="queue-itemname">${queue[i].itemName} x${queue[i].amount}</div>
|
|
||||||
<div class="queue-itemstate">Concluded</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-claimbutton"><div class="d-flex justify-content-center align-items-center queue-claimbutton-bg" data-id="${i}" onclick="cancel(this)"><i class="fas fa-check"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
} else {
|
|
||||||
queueRow += `
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item-concluded mt-2">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="nui://${Inventory}/${queue[i].item}.png" class="image_components">
|
|
||||||
<div class="ms-2">
|
|
||||||
<div class="queue-itemname">${queue[i].itemName} x${queue[i].amount}</div>
|
|
||||||
<div class="queue-itemstate">Concluded</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-claimbutton"><div class="d-flex justify-content-center align-items-center queue-claimbutton-bg" data-id="${i}" onclick="claim(this)"><i class="fas fa-check"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
queueRow += `
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item-failed mt-2">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="nui://${Inventory}/${queue[i].item}.png" class="image_components">
|
|
||||||
<div class="ms-2">
|
|
||||||
<div class="queue-itemname">${queue[i].itemName} x${queue[i].amount}</div>
|
|
||||||
<div class="queue-itemstate">Failed to craft</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-claimbutton"><div class="d-flex justify-content-center align-items-center queue-failbutton-bg" data-id="${i}" onclick="claimFail(this)"><i class="fas fa-check"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(queue[i].isPending){
|
|
||||||
if(queue[i].isDis){
|
|
||||||
queueRow += `
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item mt-2">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="nui://${Inventory}/${queue[i].item}.png" class="image_components">
|
|
||||||
<div class="ms-2">
|
|
||||||
<div class="queue-itemname">${queue[i].itemName} x${queue[i].amount}</div>
|
|
||||||
<div class="queue-itemstate">Pending</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-cancelbutton"><div class="d-flex justify-content-center align-items-center queue-cancelbutton-bg" data-id="${i}" onclick="claim(this)"><i class="fas fa-times"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
} else {
|
|
||||||
queueRow += `
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item mt-2">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="nui://${Inventory}/${queue[i].item}.png" class="image_components">
|
|
||||||
<div class="ms-2">
|
|
||||||
<div class="queue-itemname">${queue[i].itemName} x${queue[i].amount}</div>
|
|
||||||
<div class="queue-itemstate">Pending</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-cancelbutton"><div class="d-flex justify-content-center align-items-center queue-cancelbutton-bg" data-id="${i}" onclick="cancel(this)"><i class="fas fa-times"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(queue[i].isDis){
|
|
||||||
queueRow += `
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item mt-2">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="nui://${Inventory}/${queue[i].item}.png" class="image_components">
|
|
||||||
<div class="ms-2">
|
|
||||||
<div class="queue-itemname">${queue[i].itemName} x${queue[i].amount}</div>
|
|
||||||
<div class="queue-itemstate">Time left: ${queue[i].time}s</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-cancelbutton"><div class="d-flex justify-content-center align-items-center queue-cancelbutton-bg" data-id="${i}" onclick="claim(this)"><i class="fas fa-times"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
} else {
|
|
||||||
queueRow += `
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item mt-2">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="nui://${Inventory}/${queue[i].item}.png" class="image_components">
|
|
||||||
<div class="ms-2">
|
|
||||||
<div class="queue-itemname">${queue[i].itemName} x${queue[i].amount}</div>
|
|
||||||
<div class="queue-itemstate">Time left: ${queue[i].time}s</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-cancelbutton"><div class="d-flex justify-content-center align-items-center queue-cancelbutton-bg" data-id="${i}" onclick="cancel(this)"><i class="fas fa-times"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
queueRow = `<div class="d-flex justify-content-center noitq">The crafting queue is empty</div>`
|
|
||||||
}
|
|
||||||
$('.craftingq_window').html(queueRow);
|
|
||||||
}
|
|
||||||
break
|
|
||||||
case 'resetItemNumber':
|
|
||||||
itemClaiming = 0;
|
|
||||||
break
|
|
||||||
case 'resetButton':
|
|
||||||
if(canCraftItem == false){
|
|
||||||
canCraftItem = true;
|
|
||||||
document.querySelector('#craft-button').disabled = false;
|
|
||||||
}
|
|
||||||
break
|
|
||||||
case 'canClaimAll':
|
|
||||||
document.querySelector('#claimall-button').disabled = false;
|
|
||||||
break
|
|
||||||
case 'closeMenu':
|
|
||||||
closeMenu();
|
|
||||||
break
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on('click', ".cat_tab", function() {
|
|
||||||
selectedCategory = $("input[name='category']:checked").val();
|
|
||||||
var num = craft2.length;
|
|
||||||
var paragraph = '';
|
|
||||||
var row = '<div class="row">';
|
|
||||||
var lastRowNum = 0;
|
|
||||||
var added = 0
|
|
||||||
for(var i = 0; i < num; i++) {
|
|
||||||
for(var i1 = 0; i1 < craft2[i].job.length; i1++){
|
|
||||||
if(selectedCategory == "general_cat" || craft2[i].category == selectedCategory){
|
|
||||||
if(craft2[i].job[i1] == job2 || craft2[i].job[i1] == gang || craft2[i].job[i1] == ''){
|
|
||||||
if(!craftData.UseXP){
|
|
||||||
var itemName = craftData.itemNames;
|
|
||||||
var itemId = craft2[i].item;
|
|
||||||
var index = i;
|
|
||||||
added++
|
|
||||||
row += `
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="card item_card" id="${itemId}wb_${craftData.wb}wb_${index}">
|
|
||||||
<div class="card-body item_card-body d-flex justify-content-center align-items-center" style="background-color: rgba(220, 220, 220, 0.20)" id="selected${itemId}wb_${craftData.wb}wb_${index}">
|
|
||||||
<span class="item-title text-center">${itemName[itemId]}</span>
|
|
||||||
<img src="nui://${Inventory}/${itemId}.png" class="image">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
if ((added) % 4 === 0) {
|
|
||||||
row = addStr(row, row.length, `</div><div class="row itemslist_row-h">`);
|
|
||||||
lastRowNum = row.length+6;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(craft2[i].levelNeeded <= craftData.level || showAllCrafts){
|
|
||||||
var itemName = craftData.itemNames;
|
|
||||||
var itemId = craft2[i].item;
|
|
||||||
var index = i;
|
|
||||||
added++
|
|
||||||
row += `
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="card item_card" id="${itemId}wb_${craftData.wb}wb_${index}">
|
|
||||||
<div class="card-body item_card-body d-flex justify-content-center align-items-center" style="background-color: rgba(220, 220, 220, 0.20)" id="selected${itemId}wb_${craftData.wb}wb_${index}">
|
|
||||||
<span class="item-title text-center">${itemName[itemId]}</span>
|
|
||||||
<img src="nui://${Inventory}/${itemId}.png" class="image">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
if ((added) % 4 === 0) {
|
|
||||||
row = addStr(row, row.length, `</div><div class="row itemslist_row-h">`);
|
|
||||||
lastRowNum = row.length+6;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
row += `</div>`;
|
|
||||||
|
|
||||||
if(craftData.UseXP) {
|
|
||||||
$('#currentlevel').html(craftData.level);
|
|
||||||
document.documentElement.style.setProperty('--percentage-width', craftData.percentage+"%");
|
|
||||||
$('.xpbar-col').css('margin-top', '-1.8rem');
|
|
||||||
} else {
|
|
||||||
$('.xpbar').hide();
|
|
||||||
$('.xpbar-col').css('margin-top', '5.05rem');
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#craft-table').html(row);
|
|
||||||
$('.title-name').html(craftData.name);
|
|
||||||
|
|
||||||
$('.title').fadeIn();
|
|
||||||
$('.itemslist').fadeIn();
|
|
||||||
$('.crafting-body').fadeIn();
|
|
||||||
});
|
|
||||||
|
|
||||||
function restartCrafts(){
|
|
||||||
selectedCategory = 'general_cat';
|
|
||||||
var num = craft2.length;
|
|
||||||
var paragraph = '';
|
|
||||||
var row = '<div class="row">';
|
|
||||||
var lastRowNum = 0;
|
|
||||||
var added = 0
|
|
||||||
for(var i = 0; i < num; i++) {
|
|
||||||
for(var i1 = 0; i1 < craft2[i].job.length; i1++){
|
|
||||||
if(selectedCategory == "general_cat" || craft2[i].category == selectedCategory){
|
|
||||||
if(craft2[i].job[i1] == job2 || craft2[i].job[i1] == gang || craft2[i].job[i1] == ''){
|
|
||||||
if(!craftData.UseXP){
|
|
||||||
var itemName = craftData.itemNames;
|
|
||||||
var itemId = craft2[i].item;
|
|
||||||
var index = i;
|
|
||||||
added++
|
|
||||||
row += `
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="card item_card" id="${itemId}wb_${craftData.wb}wb_${index}">
|
|
||||||
<div class="card-body item_card-body d-flex justify-content-center align-items-center" style="background-color: rgba(220, 220, 220, 0.20)" id="selected${itemId}wb_${craftData.wb}wb_${index}">
|
|
||||||
<span class="item-title text-center">${itemName[itemId]}</span>
|
|
||||||
<img src="nui://${Inventory}/${itemId}.png" class="image">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
if ((added) % 4 === 0) {
|
|
||||||
row = addStr(row, row.length, `</div><div class="row itemslist_row-h">`);
|
|
||||||
lastRowNum = row.length+6;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(craft2[i].levelNeeded <= craftData.level || showAllCrafts){
|
|
||||||
var itemName = craftData.itemNames;
|
|
||||||
var itemId = craft2[i].item;
|
|
||||||
var index = i;
|
|
||||||
added++
|
|
||||||
row += `
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="card item_card" id="${itemId}wb_${craftData.wb}wb_${index}">
|
|
||||||
<div class="card-body item_card-body d-flex justify-content-center align-items-center" style="background-color: rgba(220, 220, 220, 0.20)" id="selected${itemId}wb_${craftData.wb}wb_${index}">
|
|
||||||
<span class="item-title text-center">${itemName[itemId]}</span>
|
|
||||||
<img src="nui://${Inventory}/${itemId}.png" class="image">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
if ((added) % 4 === 0) {
|
|
||||||
row = addStr(row, row.length, `</div><div class="row itemslist_row-h">`);
|
|
||||||
lastRowNum = row.length+6;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
row += `</div>`;
|
|
||||||
|
|
||||||
if(craftData.UseXP) {
|
|
||||||
$('#currentlevel').html(craftData.level);
|
|
||||||
document.documentElement.style.setProperty('--percentage-width', craftData.percentage+"%");
|
|
||||||
$('.xpbar-col').css('margin-top', '-1.8rem');
|
|
||||||
} else {
|
|
||||||
$('.xpbar').hide();
|
|
||||||
$('.xpbar-col').css('margin-top', '5.05rem');
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#craft-table').html(row);
|
|
||||||
$('.title-name').html(craftData.name);
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
|
||||||
document.onkeyup = function(data) {
|
|
||||||
if (data.which == 27) {
|
|
||||||
closeMenu();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).ready(function(){
|
|
||||||
$('#plus').click(function(e) {
|
|
||||||
var quantity = parseInt($('#quantity').val());
|
|
||||||
if(quantity < maxCraft){
|
|
||||||
$('#quantity').val(quantity + 1);
|
|
||||||
updateSideMenu(quantity + 1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#minus').click(function(e) {
|
|
||||||
var quantity = parseInt($('#quantity').val());
|
|
||||||
|
|
||||||
if(quantity > maxCraft){
|
|
||||||
$('#quantity').val(maxCraft);
|
|
||||||
updateSideMenu(maxCraft);
|
|
||||||
} else {
|
|
||||||
if(quantity > 1) {
|
|
||||||
$('#quantity').val(quantity - 1);
|
|
||||||
updateSideMenu(quantity - 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('#max').click(function(e) {
|
|
||||||
var quantity = parseInt($('#quantity').val());
|
|
||||||
|
|
||||||
if(quantity != maxCraft){
|
|
||||||
$('#quantity').val(maxCraft);
|
|
||||||
updateSideMenu(maxCraft);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function quantity_change(t) {
|
|
||||||
var quantity = parseInt($('#quantity').val());
|
|
||||||
|
|
||||||
if(quantity > maxCraft){
|
|
||||||
$('#quantity').val(maxCraft);
|
|
||||||
updateSideMenu(maxCraft);
|
|
||||||
} else if(quantity < 1) {
|
|
||||||
$('#quantity').val(1);
|
|
||||||
updateSideMenu(1);
|
|
||||||
} else {
|
|
||||||
updateSideMenu(quantity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function craft(t) {
|
|
||||||
if(canCraftItem){
|
|
||||||
canCraftItem = false;
|
|
||||||
document.querySelector('#craft-button').disabled = true;
|
|
||||||
var itemId = t.dataset.item;
|
|
||||||
var recipe = t.dataset.recipe;
|
|
||||||
var amount = t.dataset.amount;
|
|
||||||
var xp = t.dataset.xp;
|
|
||||||
var isDis = t.dataset.isDis;
|
|
||||||
var index = t.dataset.index;
|
|
||||||
var level = t.dataset.level;
|
|
||||||
var quantity = document.getElementById("quantity").value;
|
|
||||||
if(quantity > maxCraft){
|
|
||||||
quantity = maxCraft;
|
|
||||||
$('#quantity').val(quantity - 1);
|
|
||||||
updateSideMenu(quantity - 1);
|
|
||||||
}
|
|
||||||
$.post('https://okokCrafting/action', JSON.stringify({
|
|
||||||
action: "craft-button",
|
|
||||||
itemID: itemId,
|
|
||||||
recipe: recipe,
|
|
||||||
amount: amount,
|
|
||||||
xp: xp,
|
|
||||||
quantity: quantity,
|
|
||||||
isDis: isDis,
|
|
||||||
index: index,
|
|
||||||
level: level,
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function claim(t) {
|
|
||||||
var index = parseInt(t.dataset.id)+1;
|
|
||||||
var itemRndID = parseInt(CraftQueue[index-1].randomID);
|
|
||||||
if(itemClaiming != itemRndID && canClaimItem){
|
|
||||||
canClaimItem = false;
|
|
||||||
itemClaiming = itemRndID;
|
|
||||||
$.post('https://okokCrafting/action', JSON.stringify({
|
|
||||||
action: "claim-item",
|
|
||||||
index: index,
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function claimall(t) {
|
|
||||||
if(CraftQueue[0] != undefined && CraftQueue[0].isDone && canClaimItem){
|
|
||||||
canClaimItem = false;
|
|
||||||
document.querySelector('#claimall-button').disabled = true;
|
|
||||||
$.post('https://okokCrafting/action', JSON.stringify({
|
|
||||||
action: "claim-all",
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function claimFail(t) {
|
|
||||||
var index = parseInt(t.dataset.id)+1;
|
|
||||||
var itemRndID = parseInt(CraftQueue[index-1].randomID);
|
|
||||||
if(itemClaiming != itemRndID && canClaimItem){
|
|
||||||
canClaimItem = false;
|
|
||||||
itemClaiming = itemRndID;
|
|
||||||
$.post('https://okokCrafting/action', JSON.stringify({
|
|
||||||
action: "fail-item",
|
|
||||||
index: index,
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function cancel(t) {
|
|
||||||
var index = parseInt(t.dataset.id)+1;
|
|
||||||
var itemRndID = parseInt(CraftQueue[index-1].randomID);
|
|
||||||
if(itemClaiming != itemRndID && canClaimItem){
|
|
||||||
canClaimItem = false;
|
|
||||||
itemClaiming = itemRndID;
|
|
||||||
$.post('https://okokCrafting/action', JSON.stringify({
|
|
||||||
action: "cancel-item",
|
|
||||||
index: index,
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateSideMenu(quantity){
|
|
||||||
var canCraft = true
|
|
||||||
var num = sideCraftMenu.recipe.length;
|
|
||||||
var recipe = ``;
|
|
||||||
var img = `
|
|
||||||
<img src="nui://${Inventory}/${sideCraftMenu.itemNameID}.png" class="image_itemselected">
|
|
||||||
<span style="color: #fff; font-weight: 600; font-size: 20px;" class="ms-2">${sideCraftMenu.itemName} x${sideCraftMenu.itemAmount*quantity}</span>
|
|
||||||
`;
|
|
||||||
|
|
||||||
if(sideCraftMenu.isDis){
|
|
||||||
img = `
|
|
||||||
<img src="nui://${Inventory}/${sideCraftMenu.itemNameID}.png" class="image_itemselected">
|
|
||||||
<span style="color: #fff; font-weight: 600; font-size: 20px;" class="ms-2">${sideCraftMenu.itemName} x${sideCraftMenu.itemAmount*quantity} (${sideCraftMenu.isDisItemAmt})</span>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#side-image').html(img);
|
|
||||||
$('#craft-time').html(sideCraftMenu.time*quantity);
|
|
||||||
|
|
||||||
for(var i = 0; i < num; i++){
|
|
||||||
var idName = sideCraftMenu.recipe[i][0];
|
|
||||||
if(sideCraftMenu.isDis){
|
|
||||||
recipe += `
|
|
||||||
<div class="d-flex align-items-center mx-1">
|
|
||||||
<img src="nui://${Inventory}/${sideCraftMenu.recipe[i][0]}.png" class="image_components">
|
|
||||||
<span style="color: #fff; font-weight: 600; font-size: 20px;" class="ms-2">${sideCraftMenu.itemNames[idName]} x${sideCraftMenu.recipe[i][1]*quantity}</span>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
if(sideCraftMenu.itemAmount > sideCraftMenu.isDisItemAmt){
|
|
||||||
canCraft = false
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
recipe += `
|
|
||||||
<div class="d-flex align-items-center mx-1">
|
|
||||||
<img src="nui://${Inventory}/${sideCraftMenu.recipe[i][0]}.png" class="image_components">
|
|
||||||
<span style="color: #fff; font-weight: 600; font-size: 20px;" class="ms-2">${sideCraftMenu.itemNames[idName]} x${sideCraftMenu.recipe[i][1]*quantity} (${sideCraftMenu.inventory[i].key})</span>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
if(sideCraftMenu.recipe[i][1] > sideCraftMenu.inventory[i].key){
|
|
||||||
canCraft = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#craft-button-div').html(`
|
|
||||||
<button type="button" id="craft-button" data-item="${sideCraftMenu.itemNameID}" data-recipe="${sideCraftMenu.recipe}" data-amount="${sideCraftMenu.itemAmount}" data-xp="${sideCraftMenu.xp}" data-isDis="${sideCraftMenu.isDis}" data-index="${sideCraftMenu.index}" data-level="${sideCraftMenu.level}" onclick="craft(this)" class="btn btn-blue flex-grow-1">CRAFT</button>
|
|
||||||
`);
|
|
||||||
|
|
||||||
if(canCraft) {
|
|
||||||
$('#craft-button-div').fadeIn();
|
|
||||||
} else {
|
|
||||||
$('#craft-button-div').hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#craft-percentage').html(sideCraftMenu.percentage);
|
|
||||||
$('.components_window').html(recipe);
|
|
||||||
|
|
||||||
$('.itemrequirements').fadeIn();
|
|
||||||
}
|
|
||||||
|
|
||||||
function closeMenu(){
|
|
||||||
itemClaiming = 0;
|
|
||||||
selectedCategory = "";
|
|
||||||
$('.crafting-body').fadeOut();
|
|
||||||
$('.title').fadeOut();
|
|
||||||
$('.itemslist').fadeOut();
|
|
||||||
$('.itemrequirements').fadeOut();
|
|
||||||
setTimeout(function(){
|
|
||||||
restartCrafts();
|
|
||||||
}, 400);
|
|
||||||
$.post('https://okokCrafting/action', JSON.stringify({
|
|
||||||
action: "close",
|
|
||||||
}));
|
|
||||||
}
|
|
|
@ -1,589 +0,0 @@
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@200;300;400;500;700;800;900&display=swap');
|
|
||||||
|
|
||||||
*,*:focus,*:hover{
|
|
||||||
outline:none;
|
|
||||||
}
|
|
||||||
|
|
||||||
html, body {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
|
||||||
font-size: calc(16 / 19.2 * 1vw);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-aspect-ratio: 16 / 9) {
|
|
||||||
html {
|
|
||||||
font-size: calc(16 / 10.8 * 1vh);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: 'Tajawal', sans-serif;
|
|
||||||
background: none;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
flex-direction: column;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.crafting-body {
|
|
||||||
display: none;
|
|
||||||
height: 48rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-main {
|
|
||||||
margin-top: -3.05rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
color: #fff;
|
|
||||||
font-size: 3.75rem;
|
|
||||||
line-height: 1;
|
|
||||||
text-transform: uppercase;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-name {
|
|
||||||
font-weight: 300;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-name2 {
|
|
||||||
font-weight: 600;
|
|
||||||
margin-left: 0.938rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
border: none;
|
|
||||||
border-radius: 1.25rem;
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-body {
|
|
||||||
background-color: #ffffff;
|
|
||||||
font-size: 0.938rem;
|
|
||||||
font-weight: 500;
|
|
||||||
border-radius: 1.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemslist {
|
|
||||||
display: none;
|
|
||||||
margin-top: 2.9rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemrequirements {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xpbar-col {
|
|
||||||
margin-top: -1.8rem;
|
|
||||||
margin-left: -0.3rem;
|
|
||||||
width: 24.65rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xpbar {
|
|
||||||
margin-bottom: 1.35rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemslist_card {
|
|
||||||
width: 50rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemslist_card-body {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemslist_window {
|
|
||||||
overflow-x: hidden;
|
|
||||||
height: 35.2rem;
|
|
||||||
padding: 0.3125rem 1.05rem 0.3125rem 0.625rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item_card {
|
|
||||||
width: 10.625rem;
|
|
||||||
height: 10.625rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item_card:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item_card-body {
|
|
||||||
width: 10.625rem;
|
|
||||||
height: 10.625rem;
|
|
||||||
box-shadow: 0rem 0rem 0.313rem 0rem rgba(10, 10, 10, 0.3);
|
|
||||||
transition: 0.25s;
|
|
||||||
background-color: rgba(220, 220, 220, 0.20);
|
|
||||||
}
|
|
||||||
|
|
||||||
.item_card-body:hover {
|
|
||||||
background-color: rgba(31, 94, 255, 1) !important;
|
|
||||||
transition: 0.25s;
|
|
||||||
transform: scale(1.030);
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-title {
|
|
||||||
color: #fff;
|
|
||||||
font-weight: 600;
|
|
||||||
position: absolute;
|
|
||||||
top: 8%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image {
|
|
||||||
height: 7.5rem;
|
|
||||||
position: absolute;
|
|
||||||
top: 22.5%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image_itemselected {
|
|
||||||
height: 5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text_itemselected {
|
|
||||||
color: #fff;
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 1.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image_components {
|
|
||||||
height: 3.75rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
width: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar-track {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar-thumb {
|
|
||||||
background-color: #1f5eff;
|
|
||||||
border-radius: 0.625rem;
|
|
||||||
transition: .25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar-thumb:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
background-color: #0a4df9;
|
|
||||||
transition: .25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.timer {
|
|
||||||
position: fixed;
|
|
||||||
right: 2rem;
|
|
||||||
bottom: 4rem;
|
|
||||||
font-size: 3.125rem;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.timer_card {
|
|
||||||
height: 1.875rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.timer_card-body {
|
|
||||||
background-color: rgba(31, 94, 255, 1);
|
|
||||||
font-weight: 600 !important;
|
|
||||||
color: #fff !important;
|
|
||||||
font-size: 1.25rem !important;
|
|
||||||
box-shadow: 0rem 0rem 0.313rem 0rem rgba(10, 10, 10, 0.3);
|
|
||||||
padding-right: 4.375rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#crafting-text {
|
|
||||||
margin-left: 0.625rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#item-timer {
|
|
||||||
position: absolute;
|
|
||||||
right: 0.938rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#time {
|
|
||||||
position: absolute;
|
|
||||||
top: 0.625rem;
|
|
||||||
right: 0.625rem;
|
|
||||||
color: #fff;
|
|
||||||
background-color: rgba(31, 94, 255, 1);
|
|
||||||
box-shadow: 0rem 0rem 0.313rem 0rem rgba(10, 10, 10, 0.3);
|
|
||||||
border-radius: 0.625rem;
|
|
||||||
padding: 0.313rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#percentage {
|
|
||||||
position: absolute;
|
|
||||||
top: 3.1rem;
|
|
||||||
right: 0.625rem;
|
|
||||||
color: #fff;
|
|
||||||
background-color: rgba(31, 94, 255, 1);
|
|
||||||
box-shadow: 0rem 0rem 0.313rem 0rem rgba(10, 10, 10, 0.3);
|
|
||||||
border-radius: 0.625rem;
|
|
||||||
padding: 0.313rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#level-text {
|
|
||||||
color: #fff;
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.progress {
|
|
||||||
background: rgba(220, 220, 220, 0.20);
|
|
||||||
justify-content: flex-start;
|
|
||||||
border-radius: 1.25rem;
|
|
||||||
align-items: center;
|
|
||||||
position: relative;
|
|
||||||
padding: 0 0.313rem;
|
|
||||||
display: flex;
|
|
||||||
height: 2.5rem;
|
|
||||||
width: 100%;
|
|
||||||
box-shadow: 0rem 0rem 0.313rem 0rem rgba(10, 10, 10, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.progress-value {
|
|
||||||
width: var(--percentage-width);
|
|
||||||
transition: width .5s ease-in-out;
|
|
||||||
border-radius: 6.25rem;
|
|
||||||
background: #1f5eff;
|
|
||||||
height: 1.875rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--percentage-width: 0%;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@keyframes load {
|
|
||||||
0% { width: 0; }
|
|
||||||
100% { width: var(--percentage-width); }
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 1.125rem;
|
|
||||||
padding: 0.8125rem 1.0625rem;
|
|
||||||
border: none;
|
|
||||||
transition: 0.25s;
|
|
||||||
letter-spacing: 0.0125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-blue {
|
|
||||||
background-color: #1f5eff;
|
|
||||||
color: #e6e6e6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-blue:hover {
|
|
||||||
background-color: #0a4df9;
|
|
||||||
color: #e6e6e6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-blue-level {
|
|
||||||
font-size: 1.125rem;
|
|
||||||
padding: 0.8125rem 1.0625rem;
|
|
||||||
letter-spacing: 0.0125rem;
|
|
||||||
display: inline-block;
|
|
||||||
text-align: center;
|
|
||||||
background-color: #1f5eff;
|
|
||||||
color: #e6e6e6;
|
|
||||||
border-radius: 1rem;
|
|
||||||
width: 100%;
|
|
||||||
font-weight: 600;
|
|
||||||
box-shadow: 0rem 0rem 0.313rem 0rem rgb(10 10 10 / 30%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn:focus {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-category {
|
|
||||||
background-color: #1f5eff;
|
|
||||||
border: none !important;
|
|
||||||
outline: none !important;
|
|
||||||
box-shadow: none !important;
|
|
||||||
transition: .25s;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-category:hover {
|
|
||||||
background-color: #0a4df9;
|
|
||||||
color: #fff;
|
|
||||||
transition: .25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn:focus {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-check:active+.btn-category:focus, .btn-check:checked+.btn-category:focus, .btn-category.active:focus, .btn-category:active:focus, .show>.btn-category.dropdown-toggle:focus {
|
|
||||||
box-shadow: none;
|
|
||||||
transition: .25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-check:active+.btn-category, .btn-check:checked+.btn-category, .btn-category.active, .btn-category:active, .show>.btn-category.dropdown-toggle {
|
|
||||||
background-color: #fcfcfc;
|
|
||||||
border-color: none;
|
|
||||||
transition: .25s;
|
|
||||||
color: #1f5eff;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr {
|
|
||||||
opacity: 1;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-item {
|
|
||||||
background-color: #1f5eff;
|
|
||||||
border-radius: 0.625rem;
|
|
||||||
padding: 0.5rem;
|
|
||||||
transition: .25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-item:hover {
|
|
||||||
background-color: #0a4df9;
|
|
||||||
border-radius: 0.625rem;
|
|
||||||
padding: 0.5rem;
|
|
||||||
transition: .25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-item-concluded {
|
|
||||||
background-color: #25ba59;
|
|
||||||
border-radius: 0.625rem;
|
|
||||||
padding: 0.5rem;
|
|
||||||
transition: .25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-item-concluded:hover {
|
|
||||||
background-color: #20ab51;
|
|
||||||
border-radius: 0.625rem;
|
|
||||||
padding: 0.5rem;
|
|
||||||
transition: .25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-item-failed {
|
|
||||||
background-color: #ff2943;
|
|
||||||
border-radius: 0.625rem;
|
|
||||||
padding: 0.5rem;
|
|
||||||
transition: .25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-item-failed:hover {
|
|
||||||
background-color: #cd0032;
|
|
||||||
border-radius: 0.625rem;
|
|
||||||
padding: 0.5rem;
|
|
||||||
transition: .25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-cancelbutton {
|
|
||||||
font-size: 1.75rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-cancelbutton-bg {
|
|
||||||
width: 2.5rem;
|
|
||||||
height: 2.5rem;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 0.625rem;
|
|
||||||
color: #1f5eff;
|
|
||||||
transition: .25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-cancelbutton-bg:hover {
|
|
||||||
background-color: #e1e1e3;
|
|
||||||
transition: .25s;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-claimbutton {
|
|
||||||
font-size: 1.75rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-claimbutton-bg {
|
|
||||||
width: 2.5rem;
|
|
||||||
height: 2.5rem;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 0.625rem;
|
|
||||||
color: #25ba59;
|
|
||||||
transition: .25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-claimbutton-bg:hover {
|
|
||||||
background-color: #e1e1e3;
|
|
||||||
transition: .25s;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-failbutton-bg {
|
|
||||||
width: 2.5rem;
|
|
||||||
height: 2.5rem;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 0.625rem;
|
|
||||||
color: #ff2943;
|
|
||||||
transition: .25s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-failbutton-bg:hover {
|
|
||||||
background-color: #e1e1e3;
|
|
||||||
transition: .25s;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.components_window {
|
|
||||||
max-height: 18.75rem;
|
|
||||||
overflow-x: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.craftingq_window {
|
|
||||||
max-height: 27.3rem;
|
|
||||||
overflow-x: hidden;
|
|
||||||
padding-right: 0.35rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-group {
|
|
||||||
padding: 0.5rem;
|
|
||||||
background-color: rgba(220, 220, 220, 0.20);
|
|
||||||
border-radius: 1.25rem;
|
|
||||||
box-shadow: 0rem 0rem 0.313rem 0rem rgba(10, 10, 10, 0.3);
|
|
||||||
margin-top: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.first-category {
|
|
||||||
border-top-left-radius: 1rem;
|
|
||||||
border-bottom-left-radius: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.last-category {
|
|
||||||
border-top-right-radius: 1rem;
|
|
||||||
border-bottom-right-radius: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#craft-button, #claimall-button {
|
|
||||||
border-radius: 1rem;
|
|
||||||
width: 100%;
|
|
||||||
font-weight: 600;
|
|
||||||
box-shadow: 0rem 0rem 0.313rem 0rem rgba(10, 10, 10, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.component, .noitq {
|
|
||||||
color: #fff;
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 1.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.row-h {
|
|
||||||
height: 43.8rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-itemname {
|
|
||||||
color: #fff;
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 1.25rem;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-itemstate {
|
|
||||||
line-height: 1;
|
|
||||||
color: #ededed;
|
|
||||||
margin-top: 0.2rem;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.queue-item-mr {
|
|
||||||
margin-right: 0.65rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemslist_row-h {
|
|
||||||
margin-top: 1.35rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-title {
|
|
||||||
color: #fff;
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.craftingq_card {
|
|
||||||
width: 23.125rem;
|
|
||||||
box-shadow: 0rem 0rem 0.313rem 0rem rgba(10, 10, 10, 0.3);
|
|
||||||
margin-top: 5.05rem;
|
|
||||||
height: 34.56rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.craftingq_card-body {
|
|
||||||
background-color: rgba(220, 220, 220, 0.20);
|
|
||||||
min-height: 34.5625rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ywr {
|
|
||||||
color: #fff;
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemr_card {
|
|
||||||
height: 34.56rem;
|
|
||||||
box-shadow: 0rem 0rem 0.313rem 0rem rgba(10, 10, 10, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemr_card-body {
|
|
||||||
background-color: rgba(220, 220, 220, 0.20);
|
|
||||||
}
|
|
||||||
|
|
||||||
.craft-tp {
|
|
||||||
color: #fff;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-group>.btn-group:not(:first-child), .btn-group>.btn:not(:first-child) {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-control {
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
padding: 0rem 0.75rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-control:focus {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#minus {
|
|
||||||
border-radius: 0;
|
|
||||||
border-top-left-radius: 1rem;
|
|
||||||
border-bottom-left-radius: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#plus {
|
|
||||||
border-radius: 0;
|
|
||||||
border-top-right-radius: 1rem;
|
|
||||||
border-bottom-right-radius: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#quantity {
|
|
||||||
background-color: rgba(220, 220, 220, 0.20);
|
|
||||||
color: #fff;
|
|
||||||
font-size: 2rem;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
#max {
|
|
||||||
box-shadow: 0rem 0rem 0.313rem 0rem rgb(10 10 10 / 30%);
|
|
||||||
border-radius: 1rem;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mip {
|
|
||||||
box-shadow: 0rem 0rem 0.313rem 0rem rgb(10 10 10 / 30%);
|
|
||||||
border-radius: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
input::-webkit-outer-spin-button,
|
|
||||||
input::-webkit-inner-spin-button {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.crafting {
|
|
||||||
height: 48rem;
|
|
||||||
}
|
|
|
@ -1,125 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<head>
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
|
|
||||||
<link href="styles.css" rel="stylesheet">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div class="crafting-body">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
<div class="card craftingq_card">
|
|
||||||
<div class="card-body craftingq_card-body">
|
|
||||||
<div class="section-title text-center">Crafting Queue</div>
|
|
||||||
<hr>
|
|
||||||
<div class="craftingq_window">
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item-concluded">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="icons/compactrifle.png" class="image_components">
|
|
||||||
<div>
|
|
||||||
<div class="queue-itemname">Compact Rifle x1</div>
|
|
||||||
<div class="queue-itemstate">Concluded</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-claimbutton"><div class="d-flex justify-content-center align-items-center queue-claimbutton-bg"><i class="fas fa-check"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex justify-content-between w-100 queue-item mt-2">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="icons/compactrifle.png" class="image_components">
|
|
||||||
<div>
|
|
||||||
<div class="queue-itemname">Compact Rifle x1</div>
|
|
||||||
<div class="queue-itemstate">Time left: 55s</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-items-center queue-item-mr">
|
|
||||||
<span class="queue-cancelbutton"><div class="d-flex justify-content-center align-items-center queue-cancelbutton-bg"><i class="fas fa-times"></i></div></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="claimall-button-div mt-2">
|
|
||||||
<button type="button" id="claimall-button" class="btn btn-blue" onclick="claimall(this)">CLAIM ALL</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col">
|
|
||||||
<div class="title-main text-center">
|
|
||||||
<div class="title">
|
|
||||||
<span class="title-name"></span><span class="title-name2">Crafting</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="itemslist">
|
|
||||||
<div class="card itemslist_card">
|
|
||||||
<div class="card-body itemslist_card-body justify-content-start">
|
|
||||||
<div class="itemslist_window" id="craft-table"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="text-center" id="categories_box">
|
|
||||||
<div class="btn-group" role="group" id="categories_btns"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col xpbar-col">
|
|
||||||
<div class="xpbar">
|
|
||||||
<div id="level-text" class="text-center">Current Level: <span id="currentlevel">28</span></div>
|
|
||||||
<div class="progress">
|
|
||||||
<div class="progress-value d-flex justify-content-center align-items-center"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="itemrequirements">
|
|
||||||
<div class="card itemr_card mb-2">
|
|
||||||
<div class="card-body itemr_card-body">
|
|
||||||
<span id="time"><i class="fas fa-clock"></i> <span class="craft-tp"><span id="craft-time"></span>s</span></span>
|
|
||||||
<span id="percentage"><i class="fas fa-percentage"></i> <span class="craft-tp"><span id="craft-percentage"></span></span></span>
|
|
||||||
<div class="ywr text-center" id="top_text">You will receive</div>
|
|
||||||
<div class="d-flex align-items-center justify-content-center mx-1" id="side-image">
|
|
||||||
<img src="icons/compactrifle.png" class="image_itemselected">
|
|
||||||
<span class="text_itemselected ms-2"></span>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="section-title text-center mb-2" id="bot_text">Requirements</div>
|
|
||||||
<div class="components_window"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="craft-buttons-info">
|
|
||||||
<div class="d-flex mb-2">
|
|
||||||
<div class="d-flex mip" id="selector">
|
|
||||||
<button type="button" class="btn btn-blue" id="minus"><i class="fa-solid fa-minus"></i></button>
|
|
||||||
<input type="number" id="quantity" onchange="quantity_change(this)" class="form-control text-center" value="1" min="1" max="9999999999">
|
|
||||||
<button type="button" class="btn btn-blue" id="plus"><i class="fa-solid fa-plus"></i></button>
|
|
||||||
</div>
|
|
||||||
<button type="button" class="btn btn-blue ms-2" id="max">MAX</button>
|
|
||||||
</div>
|
|
||||||
<div id="craft-button-div"></div>
|
|
||||||
</div>
|
|
||||||
<div id="craft-buttons-info-level">
|
|
||||||
<div id="craft-button-div-level"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="timer">
|
|
||||||
<div class="card timer_card">
|
|
||||||
<div class="card-body timer_card-body">
|
|
||||||
<span><i id="cog" class="fas fa-cog fa-spin"></i></span><span id="crafting-text"></span> <span id="item-name"></span> <span id="item-timer"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
|
|
||||||
<script src="scripts.js" type="text/javascript"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Add table
Add a link
Reference in a new issue