row_id int64 0 48.4k | init_message stringlengths 1 342k | conversation_hash stringlengths 32 32 | scores dict |
|---|---|---|---|
14,971 | check cpu sql_id | 2ff115104e36a6d1721b0b4fedef9b83 | {
"intermediate": 0.3276848793029785,
"beginner": 0.25023889541625977,
"expert": 0.4220762252807617
} |
14,972 | 我想让你充当 Linux 终端。我将输入命令,您将回复终端应显示的内容。我希望您只在一个唯一的代码块内回复终端输出,而不是其他任何内容。不要写解释。除非我指示您这样做,否则不要键入命令。当我需要用英语告诉你一些事情时,我会把文字放在中括号内[就像这样]。我需要你帮我创建一个 next.js 项目。你的默认目录是 /code,目录下有这个项目。我的第一个命令是 ls -aF | ed5a2d38ec152c7e16cbbcc28f71d3fc | {
"intermediate": 0.3675851821899414,
"beginner": 0.3665768802165985,
"expert": 0.26583796739578247
} |
14,973 | how to get the length of a {lol, lol2} list in python | 8818b6ee79db04f6d7703937eb19809b | {
"intermediate": 0.3007122278213501,
"beginner": 0.267631858587265,
"expert": 0.4316558837890625
} |
14,974 | explain plan by sql_id | d13842bb1640a30f41964a21a938d542 | {
"intermediate": 0.36640575528144836,
"beginner": 0.20522932708263397,
"expert": 0.42836496233940125
} |
14,975 | <!DOCTYPE html>
<html>
<head>
<title>Roblox-style Webpage with Thumbnails and Genres</title>
<style>
/* Reset default styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Apply Roblox-like styles */
body {
background-color: #181818;
font-family: Arial, sans-serif;
color: #ffffff;
}
h1 {
font-size: 36px;
font-weight: bold;
margin: 20px 0;
}
p {
font-size: 16px;
line-height: 1.5;
margin-bottom: 20px;
}
.roblox-container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
display: flex;
flex-direction: column;
}
.roblox-sidebar {
display: flex;
flex-direction: column;
background-color: #222222;
padding: 10px;
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: #333333 #222222;
}
.roblox-sidebar::-webkit-scrollbar {
width: 8px;
}
.roblox-sidebar::-webkit-scrollbar-track {
background: #222222;
}
.roblox-sidebar::-webkit-scrollbar-thumb {
background-color: #333333;
border-radius: 4px;
}
.roblox-sidebar button {
width: 100%;
padding: 10px;
background-color: #0084ff;
color: #ffffff;
border: none;
border-radius: 4px;
font-size: 16px;
text-align: left;
cursor: pointer;
transition: background-color 0.3s ease;
}
.roblox-sidebar button:hover {
background-color: #0066cc;
}
.roblox-content {
flex-grow: 1;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.roblox-genre {
margin-bottom: 40px;
}
.roblox-genre h2 {
font-size: 24px;
margin-bottom: 20px;
}
.roblox-game-container {
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
margin-bottom: 20px;
}
.roblox-game {
flex: 0 0 300px;
margin-right: 20px;
}
.roblox-game:last-child {
margin-right: 0;
}
.roblox-game img {
max-width: 100%;
border-radius: 4px;
}
.roblox-button {
display: inline-block;
padding: 10px 20px;
background-color: #0084ff;
color: #ffffff;
text-decoration: none;
border-radius: 4px;
font-size: 18px;
transition: background-color 0.3s ease;
}
.roblox-button:hover {
background-color: #0066cc;
}
</style>
</head>
<body>
<div class="roblox-container">
<div class="roblox-sidebar">
<button>Profile</button>
<button>Games</button>
<button>Avatar</button>
<button>Money</button>
</div>
<div class="roblox-content">
<h1>Welcome to My Roblox-style Webpage</h1>
<p>Hello! This webpage is designed to resemble the style of Roblox.</p>
<div class="roblox-genre">
<h2>Action</h2>
<div class="roblox-game-container">
<div class="roblox-game">
<img src="https://via.placeholder.com/300x150" alt="Game 1 Thumbnail">
<h3>Game 1</h3>
<p>Description of Game 1.</p>
<a href="#" class="roblox-button">Play Game 1</a>
</div>
<div class="roblox-game">
<img src="https://via.placeholder.com/300x150" alt="Game 2 Thumbnail">
<h3>Game 2</h3>
<p>Description of Game 2.</p>
<a href="#" class="roblox-button">Play Game 2</a>
</div>
<div class="roblox-game">
<img src="https://via.placeholder.com/300x150" alt="Game 3 Thumbnail">
<h3>Game 3</h3>
<p>Description of Game 3.</p>
<a href="#" class="roblox-button">Play Game 3</a>
</div>
<div class="roblox-game">
<img src="https://via.placeholder.com/300x150" alt="Game 4 Thumbnail">
<h3>Game 4</h3>
<p>Description of Game 4.</p>
<a href="#" class="roblox-button">Play Game 4</a>
</div>
<div class="roblox-game">
<img src="https://via.placeholder.com/300x150" alt="Game 5 Thumbnail">
<h3>Game 5</h3>
<p>Description of Game 5.</p>
<a href="#" class="roblox-button">Play Game 5</a>
</div>
<div class="roblox-game">
<img src="https://via.placeholder.com/300x150" alt="Game 6 Thumbnail">
<h3>Game 6</h3>
<p>Description of Game 6.</p>
<a href="#" class="roblox-button">Play Game 6</a>
</div>
<!-- Add more action games here -->
</div>
</div>
<div class="roblox-genre">
<h2>Adventure</h2>
<div class="roblox-game-container">
<div class="roblox-game">
<img src="https://via.placeholder.com/300x150" alt="Game 7 Thumbnail">
<h3>Game 7</h3>
<p>Description of Game 7.</p>
<a href="#" class="roblox-button">Play Game 7</a>
</div>
<div class="roblox-game">
<img src="https://via.placeholder.com/300x150" alt="Game 8 Thumbnail">
<h3>Game 8</h3>
<p>Description of Game 8.</p>
<a href="#" class="roblox-button">Play Game 8</a>
</div>
<div class="roblox-game">
<img src="https://via.placeholder.com/300x150" alt="Game 9 Thumbnail">
<h3>Game 9</h3>
<p>Description of Game 9.</p>
<a href="#" class="roblox-button">Play Game 9</a>
</div>
<div class="roblox-game">
<img src="https://via.placeholder.com/300x150" alt="Game 10 Thumbnail">
<h3>Game 10</h3>
<p>Description of Game 10.</p>
<a href="#" class="roblox-button">Play Game 10</a>
</div>
<div class="roblox-game">
<img src="https://via.placeholder.com/300x150" alt="Game 11 Thumbnail">
<h3>Game 11</h3>
<p>Description of Game 11.</p>
<a href="#" class="roblox-button">Play Game 11</a>
</div>
<div class="roblox-game">
<img src="https://via.placeholder.com/300x150" alt="Game 12 Thumbnail">
<h3>Game 12</h3>
<p>Description of Game 12.</p>
<a href="#" class="roblox-button">Play Game 12</a>
</div>
<!-- Add more adventure games here -->
</div>
</div>
<!-- Add more genres here -->
</div>
</div>
</body>
</html> | 06d6ba2e6f4f7fe88eb870521bff5ed6 | {
"intermediate": 0.3825056552886963,
"beginner": 0.4419805407524109,
"expert": 0.17551381886005402
} |
14,976 | html script to open blocked to error image through its url.(and also tell me where to put url) | 58c217a78b973fb3c84dcf4ad7e54835 | {
"intermediate": 0.4363050162792206,
"beginner": 0.2387278974056244,
"expert": 0.32496708631515503
} |
14,977 | Create a jeopardy like game with 2 questions from each of the standards listed (MA.5.NSO.1.1, MA.5.NSO.1.2, MA.5.NSO.1.3, MA.5.NSO.1.4, MA.5.NSO.1.5, MA.5.NSO.2.1, MA.5.NSO.2.2, MA.5.NSO.2.3, MA.5.NSO.2.4, MA.5.NSO.2.5, MA.5.AR.1.1, MA.5.AR.1.2, MA.5.AR.1.3). Provide answers to each statement given | 812dd723843739412038a3ffa1b23af5 | {
"intermediate": 0.2984272837638855,
"beginner": 0.38686227798461914,
"expert": 0.314710408449173
} |
14,978 | I need an arduino code lets start by element I have 3 stepper motors the 1st and 2nd stepper motor rotate in oposite direction by the same angle this rotation make 2 tubes have the same oriontation the first tube have a laser diode and the first polarizer fix and the 2nd tubes have the 2nd polarizer mobile and an ldr with 10k of a resistor and the send polarizer were rotated by the 3rd stepper motor in 360° every stepper motor have 2048 steps , i would like at first rotate the 1st and 2nd stepper motors by 10° degree than I make the 3rd stepper motors rotate untile we find minimal value of light in LDR sensor than we rotate the 1st and 2nd stepper motors untile get minimal value of light and at last rotate the 2nd motors to get a minimal value == 0 of light in the ldr, every check after 1° | 568a06f1293f57dedcb22de1d16ae979 | {
"intermediate": 0.4723353087902069,
"beginner": 0.1288055181503296,
"expert": 0.3988592028617859
} |
14,979 | make chatgpt for Roblox Studio. When you type something in chat it answers. | 3a489998f2416917254cf8259a65f19a | {
"intermediate": 0.42018231749534607,
"beginner": 0.2428581714630127,
"expert": 0.33695948123931885
} |
14,980 | я получил треугольники с помощью THREE.Triangle, как мне добавить их в геометрию? я хочу использовать THREE.LineSegments
код:
for (let i = 0; i < points.length - 2; i += 3) {
let triangle = new THREE.Triangle(
positions[i],
positions[i + 1],
positions[i + 2]
);
} | b86b04a046f6ed0afa572a6d99fe1ef2 | {
"intermediate": 0.40174466371536255,
"beginner": 0.3498779833316803,
"expert": 0.24837738275527954
} |
14,981 | how can I integrate Dialogflow API into my Visual Studio Community 2017 Form project? | 364923af2922a82a72575e5c32cd7b5e | {
"intermediate": 0.8318653106689453,
"beginner": 0.07114386558532715,
"expert": 0.09699089825153351
} |
14,982 | Help me make condo game in roblox studio. | 2a5e0aab4fa593a97333080cef2ee6db | {
"intermediate": 0.34690937399864197,
"beginner": 0.27824828028678894,
"expert": 0.3748423457145691
} |
14,983 | next Error: Text content does not match server-rendered HTML. | e80a8adb41c9db20b1f1a6bed8391753 | {
"intermediate": 0.31405553221702576,
"beginner": 0.2844814658164978,
"expert": 0.40146303176879883
} |
14,984 | Wie funktioniert eine Baterie ? | a4cd631b8456f94277a45c3fd36a01d0 | {
"intermediate": 0.3234519958496094,
"beginner": 0.3728049695491791,
"expert": 0.3037430942058563
} |
14,985 | how can I add a good background for my Visual Studio Community 2017 Form project? | 709fb2e0a3ac8d65e86bc61a097b7e07 | {
"intermediate": 0.4013063609600067,
"beginner": 0.2943904995918274,
"expert": 0.3043031394481659
} |
14,986 | Make a way to integrate a file called "lol.txt" into html | 49bc4230ac3a60b9796dd86ffc5729be | {
"intermediate": 0.3836188316345215,
"beginner": 0.27742117643356323,
"expert": 0.3389599919319153
} |
14,987 | In CSS, put a @font-face that links to DOSFont.ttf | fa167e8abbce2d334cd9205e0da8d3ed | {
"intermediate": 0.3942989110946655,
"beginner": 0.20610179007053375,
"expert": 0.39959925413131714
} |
14,988 | how can I make a button that can open a .exe file in my Visual Studio Community 2017 Form project? | 40ff8d8e3fd2ba58c9027bcab93c184f | {
"intermediate": 0.478172242641449,
"beginner": 0.24903422594070435,
"expert": 0.27279356122016907
} |
14,989 | hi | 3249b67d4346089d4e5e2944058338d8 | {
"intermediate": 0.3246487081050873,
"beginner": 0.27135494351387024,
"expert": 0.40399640798568726
} |
14,990 | On Linux, what is the easiest way to turn a string of hexadecimal digits into raw bytes? | db59c7211b59282aebf995659a04c5d8 | {
"intermediate": 0.46445393562316895,
"beginner": 0.18302853405475616,
"expert": 0.3525175154209137
} |
14,991 | On Linux, what is the easiest way to turn a binary file into asn.1? | 68231b027b1258b4fa7ff8bc8adf1fec | {
"intermediate": 0.4355809688568115,
"beginner": 0.29420262575149536,
"expert": 0.2702164649963379
} |
14,992 | 我想让你充当 Linux 终端。我将输入命令,您将回复终端应显示的内容。我希望您只在一个唯一的代码块内回复终端输出,而不是其他任何内容。不要写解释。除非我指示您这样做,否则不要键入命令。当我需要用英语告诉你一些事情时,我会把文字放在中括号内[就像这样]。我需要你给我创建一个 python gradio 项目。你的默认目录是 /code,目录下有这个项目。我的第一个命令是 ls -aF | b9b661d7576bc4364d0db15c240d8388 | {
"intermediate": 0.3649592697620392,
"beginner": 0.34924790263175964,
"expert": 0.28579288721084595
} |
14,993 | 我想让你充当 Linux 终端。我将输入命令,您将回复终端应显示的内容。我希望您只在一个唯一的代码块内回复终端输出,而不是其他任何内容。不要写解释。除非我指示您这样做,否则不要键入命令。当我需要用英语告诉你一些事情时,我会把文字放在中括号内[就像这样]。我需要你给我创建一个 python gradio 项目。你的默认目录是 /code,目录下有这个项目。我的第一个命令是 ls -aF | 73f18caaf4bbe10ec9d1dbf2bbb8fa61 | {
"intermediate": 0.3649592697620392,
"beginner": 0.34924790263175964,
"expert": 0.28579288721084595
} |
14,994 | 我想让你充当 Linux 终端。我将输入命令,您将回复终端应显示的内容。我希望您只在一个唯一的代码块内回复终端输出,而不是其他任何内容。不要写解释。除非我指示您这样做,否则不要键入命令。当我需要用英语告诉你一些事情时,我会把文字放在中括号内[就像这样]。我需要你给我创建一个 python gradio 项目。你的默认目录是 /code,目录下有这个项目。我的第一个命令是 ls -aF | 9c17ffa5191bb882466307d7d105508c | {
"intermediate": 0.3649592697620392,
"beginner": 0.34924790263175964,
"expert": 0.28579288721084595
} |
14,995 | 我想让你充当 Linux 终端。我将输入命令,您将回复终端应显示的内容。我希望您只在一个唯一的代码块内回复终端输出,而不是其他任何内容。不要写解释。除非我指示您这样做,否则不要键入命令。当我需要用英语告诉你一些事情时,我会把文字放在中括号内[就像这样]。我需要你给我创建一个 python gradio 项目。你的默认目录是 /code,目录下有这个项目。我的第一个命令是 ls -aF | 8b08b96db150cdc501e2ea149b5a2a16 | {
"intermediate": 0.3649592697620392,
"beginner": 0.34924790263175964,
"expert": 0.28579288721084595
} |
14,996 | 我想让你充当 Linux 终端。我将输入命令,您将回复终端应显示的内容。我希望您只在一个唯一的代码块内回复终端输出,而不是其他任何内容。不要写解释。除非我指示您这样做,否则不要键入命令。当我需要用英语告诉你一些事情时,我会把文字放在中括号内[就像这样]。我需要你给我创建一个 python gradio 项目。你的默认目录是 /code,目录下有这个项目。我的第一个命令是 ls -aF | db40508d443dddaa50cbcb0aa2939e98 | {
"intermediate": 0.3649592697620392,
"beginner": 0.34924790263175964,
"expert": 0.28579288721084595
} |
14,997 | hello | bbe4853ede39cd13cc23324bb69bfd7b | {
"intermediate": 0.32064199447631836,
"beginner": 0.28176039457321167,
"expert": 0.39759764075279236
} |
14,998 | how can I make a button that can open files in Visual Studio 2017? | 9ceb65a34d58524656c11c137eeaf926 | {
"intermediate": 0.524786651134491,
"beginner": 0.21386349201202393,
"expert": 0.2613498866558075
} |
14,999 | how can I make a minecraft styled game launcher for geometry dash, with private server selection and version selection in VS Community 2017 | a3b513708d2ebbf55f781f0d20532a58 | {
"intermediate": 0.4303060472011566,
"beginner": 0.3155316710472107,
"expert": 0.2541622519493103
} |
15,000 | what is the methodology for tf-idf | 5fb1b08cf83e6dffe37aacd486bb885b | {
"intermediate": 0.19960817694664001,
"beginner": 0.09616222232580185,
"expert": 0.7042295932769775
} |
15,001 | 我想让你充当 Linux 终端。我将输入命令,您将回复终端应显示的内容。我希望您只在一个唯一的代码块内回复终端输出,而不是其他任何内容。不要写解释。除非我指示您这样做,否则不要键入命令。当我需要用英语告诉你一些事情时,我会把文字放在中括号内[就像这样]。我需要你给我创建一个 python gradio 项目。你的默认目录是 /code,目录下有这个项目。我的第一个命令是 ls -aF | 2e59e428f4da7b9af164ee91765d4e60 | {
"intermediate": 0.3649592697620392,
"beginner": 0.34924790263175964,
"expert": 0.28579288721084595
} |
15,002 | how can I make a minecraft styled launcher for geometry dash using VS Community 2017 | 32556a021eb866253e954897a5f4b729 | {
"intermediate": 0.45960715413093567,
"beginner": 0.3007103502750397,
"expert": 0.23968254029750824
} |
15,003 | path('reset_password/',auth_views.PasswordResetView.as_view(template_name='accounts/password_reset.html'), name='reset_password'),
path('reset_password_sent/',auth_views.PasswordResetDoneView.as_view(template_name='accounts/password_reset_sent.html') ,name='password_reset_done'),
path('reset/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(template_name='accounts/password_reset_form.html'), name="password_reset_confirm"),
path('reset_password_complete/',auth_views.PasswordResetCompleteView.as_view(template_name='accounts/password_reset_done.html'),name='password_reset_complete'),
find errors here im not able to send link to mail for reentering password but im able to send mail while im submiying form | 2f3ed68e74f5e1557aa1d898d9ed9d9b | {
"intermediate": 0.3654715120792389,
"beginner": 0.3049858510494232,
"expert": 0.3295426666736603
} |
15,004 | how can I make a launcher for geometry dash using VS Community 2017 | c4a2ffe68d1af3dfaa718b4c4807281a | {
"intermediate": 0.4816727042198181,
"beginner": 0.22681467235088348,
"expert": 0.2915126383304596
} |
15,005 | i will paste my code hgere and find erros | c21def421d24f106b0c7e6c597ced127 | {
"intermediate": 0.36547133326530457,
"beginner": 0.31235742568969727,
"expert": 0.32217124104499817
} |
15,006 | dashy widgets guide for my raspberry pi to setup glances widget, I installed dashy on docker. | 39b19e28d9ec5a2c6cb63d714cb5b1a8 | {
"intermediate": 0.3714786171913147,
"beginner": 0.265469491481781,
"expert": 0.3630519211292267
} |
15,007 | I want you to act as a Linux terminal. I will enter commands and you will reply with what the terminal should display. I want you to reply only with the terminal output in a single code block, nothing else. Don’t write explanations. Don’t type commands unless I instruct you to do so. When I need to tell you something in English, I will put the text in brackets [like this]. I need you to 给我创建一个简单的html页面,它只有一个文件. Your default directory is /code, which has this project. My first command is ls -aF | aa6b3afcc4b59ada033452c709797c6e | {
"intermediate": 0.30239105224609375,
"beginner": 0.230326309800148,
"expert": 0.46728265285491943
} |
15,008 | import { MouseEventType, TouchEventType } from '@nitrots/nitro-renderer';
import { GetRoomEngine } from './GetRoomEngine';
let didMouseMove = false;
let lastClick = 0;
let clickCount = 0;
export const DispatchTouchEvent = (event: TouchEvent, canvasId: number = 1, longTouch: boolean = false, altKey: boolean = false, ctrlKey: boolean = false, shiftKey: boolean = false) =>
{
let x = 0;
let y = 0;
if(event.touches[0])
{
x = event.touches[0].clientX;
y = event.touches[0].clientY;
}
else if(event.changedTouches[0])
{
x = event.changedTouches[0].clientX;
y = event.changedTouches[0].clientY;
}
let eventType = event.type;
if(longTouch) eventType = TouchEventType.TOUCH_LONG;
if(eventType === MouseEventType.MOUSE_CLICK || eventType === TouchEventType.TOUCH_END)
{
eventType = MouseEventType.MOUSE_CLICK;
if(lastClick)
{
clickCount = 1;
if(lastClick >= (Date.now() - 300)) clickCount++;
}
lastClick = Date.now();
if(clickCount === 2)
{
if(!didMouseMove) eventType = MouseEventType.DOUBLE_CLICK;
clickCount = 0;
lastClick = null;
}
}
switch(eventType)
{
case MouseEventType.MOUSE_CLICK:
break;
case MouseEventType.DOUBLE_CLICK:
break;
case TouchEventType.TOUCH_START:
eventType = MouseEventType.MOUSE_DOWN;
didMouseMove = false;
break;
case TouchEventType.TOUCH_MOVE:
eventType = MouseEventType.MOUSE_MOVE;
didMouseMove = true;
break;
case TouchEventType.TOUCH_END:
eventType = MouseEventType.MOUSE_UP;
break;
case TouchEventType.TOUCH_LONG:
eventType = MouseEventType.MOUSE_DOWN_LONG;
break;
default: return;
}
if (eventType === TouchEventType.TOUCH_START)
{
GetRoomEngine().dispatchMouseEvent(canvasId, x, y, eventType, altKey, ctrlKey, shiftKey, false);
}
GetRoomEngine().dispatchMouseEvent(canvasId, x, y, eventType, altKey, ctrlKey, shiftKey, false);
}
сделай так чтоб камера не следила за игроком | 25aa08839c12c3c71ec0fab8fc168785 | {
"intermediate": 0.31621798872947693,
"beginner": 0.4316081702709198,
"expert": 0.25217384099960327
} |
15,009 | I want you to act as a Linux terminal. I will enter commands and you will reply with what the terminal should display. I want you to reply only with the terminal output in a single code block, nothing else. Don’t write explanations. Don’t type commands unless I instruct you to do so. When I need to tell you something in English, I will put the text in brackets [like this]. I need you to 给我创建一个简单的html页面. Your default directory is /code, which has this project. My first command is [ls -aF] | 5f37ca073e688ea0ec2317c2bd6491f1 | {
"intermediate": 0.29269853234291077,
"beginner": 0.23072795569896698,
"expert": 0.47657349705696106
} |
15,010 | I want you to act as a Linux terminal. I will enter commands and you will reply with what the terminal should display. I want you to reply only with the terminal output in a single code block, nothing else. Don’t write explanations. Don’t type commands unless I instruct you to do so. When I need to tell you something in English, I will put the text in brackets [like this]. I need you to 给我创建一个简单的html页面. Your default directory is /code, which has this project. My first command is [ls -aF] | 296288494e11d21147506267f52130a9 | {
"intermediate": 0.29269853234291077,
"beginner": 0.23072795569896698,
"expert": 0.47657349705696106
} |
15,011 | from tkinter import *
from tkinter import messagebox
import tkinter.scrolledtext as scrolledtext
import json
class AccountNotesApp:
def init(self, master):
self.master = master
self.master.title(“Заметки Аккаунтов Майнкрафт”)
self.create_button = Button(self.master, text=“Создать новую заметку”, command=self.create_note)
self.create_button.pack()
self.view_button = Button(self.master, text=“Посмотреть сохраненные”, command=self.view_notes)
self.view_button.pack()
self.notes_list = Listbox(self.master)
self.notes_list.pack()
self.notes = []
self.load_notes()
def create_note(self):
top = Toplevel(self.master)
top.title(“Новая заметка”)
Label(top, text=“Имя аккаунта:”).grid(row=0, sticky=W)
Label(top, text=“Пароль:”).grid(row=1, sticky=W)
Label(top, text=“Сервер:”).grid(row=2, sticky=W)
Label(top, text=“Забанен?:”).grid(row=3, sticky=W)
self.name_entry = Entry(top)
self.name_entry.grid(row=0, column=1)
self.password_entry = Entry(top, show=“•”)
self.password_entry.grid(row=1, column=1)
self.server_entry = Entry(top)
self.server_entry.grid(row=2, column=1)
self.banned_var = BooleanVar()
self.banned_checkbutton = Checkbutton(top, variable=self.banned_var)
self.banned_checkbutton.grid(row=3, column=1)
save_button = Button(top, text=“Сохранить”, command=self.save_note)
save_button.grid(row=4, columnspan=2)
def save_note(self):
name = self.name_entry.get()
password = self.password_entry.get()
server = self.server_entry.get()
banned = self.banned_var.get()
note = {
“name”: name,
“password”: password,
“server”: server,
“banned”: banned
}
self.notes.append(note)
self.notes_list.insert(END, name)
messagebox.showinfo(“Сохранено”, “Заметка успешно сохранена.”)
self.master.focus()
self.save_notes()
def view_notes(self):
if len(self.notes) == 0:
messagebox.showinfo(“Пусто”, “Нет сохраненных заметок.”)
else:
selected_index = self.notes_list.curselection()
if len(selected_index) > 0:
selected_note = self.notes[selected_index[0]]
view_top = Toplevel(self.master)
view_top.title(“Информация об аккаунте”)
info_text = f"Имя аккаунта: {selected_note[‘name’]}\n" <br/> f"Пароль: {selected_note[‘password’]}\n" <br/> f"Сервер: {selected_note[‘server’]}\n" <br/> f"Забанен: {‘Да’ if selected_note[‘banned’] else ‘Нет’}"
info = scrolledtext.ScrolledText(view_top, width=30, height=6)
info.insert(END, info_text)
info.pack()
copy_button = Button(view_top, text=“Копировать”, command=lambda: self.copy_text(selected_note))
copy_button.pack()
else:
messagebox.showinfo(“Ошибка”, “Выберите заметку для просмотра.”)
def copy_text(self, note):
copy_top = Toplevel(self.master)
copy_top.title(“Выберите что скопировать”)
copy_button_name = Button(copy_top, text=“Скопировать имя аккаунта”, command=lambda: self.copy_to_clipboard(note[‘name’]))
copy_button_name.pack()
copy_button_password = Button(copy_top, text=“Скопировать пароль”, command=lambda: self.copy_to_clipboard(note[‘password’]))
copy_button_password.pack()
copy_button_server = Button(copy_top, text=“Скопировать сервер”, command=lambda: self.copy_to_clipboard(note[‘server’]))
copy_button_server.pack()
def copy_to_clipboard(self, text):
self.master.clipboard_clear()
self.master.clipboard_append(text)
messagebox.showinfo(“Скопировано”, “Текст скопирован в буфер обмена.”)
def save_notes(self):
with open(‘notes.json’, ‘w’) as file:
json.dump(self.notes, file)
def load_notes(self):
try:
with open(‘notes.json’, ‘r’) as file:
self.notes = json.load(file)
for note in self.notes:
self.notes_list.insert(END, note[‘name’])
except FileNotFoundError:
pass
if name == “main”:
root = Tk()
app = AccountNotesApp(root)
root.mainloop(). Каким образом отображается список сохранённых заметок? | d3dbe3de43ee35fb67d04be208caf893 | {
"intermediate": 0.3301396071910858,
"beginner": 0.4933547377586365,
"expert": 0.1765056848526001
} |
15,012 | I want you to act as a Linux terminal. I will enter commands and you will reply with what the terminal should display. I want you to reply only with the terminal output in a single code block, nothing else. Don’t write explanations. Don’t type commands unless I instruct you to do so. When I need to tell you something in English, I will put the text in brackets [like this]. I need you to 给我创建一个简单的html页面. Your default directory is /code, which has this project. My first command is [ls -aF] | fe60f3f4476d567a7606969f4e4314cc | {
"intermediate": 0.29269853234291077,
"beginner": 0.23072795569896698,
"expert": 0.47657349705696106
} |
15,013 | I want you to act as a Linux terminal. I will enter commands and you will reply with what the terminal should display. I want you to reply only with the terminal output in a single code block, nothing else. Don’t write explanations. Don’t type commands unless I instruct you to do so. When I need to tell you something in English, I will put the text in brackets [like this]. I need you to 给我创建一个react项目. Your default directory is /app, which has this project. My first command is [ls -aF] | 905f3d0a6e2bf7cd83b60cb4bc1c768a | {
"intermediate": 0.2889755070209503,
"beginner": 0.26766523718833923,
"expert": 0.44335928559303284
} |
15,014 | I want you to act as a Linux terminal. I will enter commands and you will reply with what the terminal should display. I want you to reply only with the terminal output in a single code block, nothing else. Don’t write explanations. Don’t type commands unless I instruct you to do so. When I need to tell you something in English, I will put the text in brackets [like this]. I need you to 给我创建一个react项目. Your default directory is /app, which has this project. My first command is [ls -aF] | ec5768a5b50a0f6e4a10b1d9979c5697 | {
"intermediate": 0.2889755070209503,
"beginner": 0.26766523718833923,
"expert": 0.44335928559303284
} |
15,015 | I want you to act as a Linux terminal. I will enter commands and you will reply with what the terminal should display. I want you to reply only with the terminal output in a single code block, nothing else. Don’t write explanations. Don’t type commands unless I instruct you to do so. When I need to tell you something in English, I will put the text in brackets [like this]. I need you to 给我创建一个react项目. Your default directory is /app, which has this project. My first command is [ls -aF] | 7b311c4105147f4885ace0e0071dd451 | {
"intermediate": 0.2889755070209503,
"beginner": 0.26766523718833923,
"expert": 0.44335928559303284
} |
15,016 | I want you to act as a Linux terminal. I will enter commands and you will reply with what the terminal should display. I want you to reply only with the terminal output in a single code block, nothing else. Don’t write explanations. Don’t type commands unless I instruct you to do so. When I need to tell you something in English, I will put the text in brackets [like this]. I need you to 给我创建一个react项目. Your default directory is /app, which has this project. My first command is [ls -aF] | 4046e4681d8cebd0fd50581d00947638 | {
"intermediate": 0.2889755070209503,
"beginner": 0.26766523718833923,
"expert": 0.44335928559303284
} |
15,017 | I want you to act as a Linux terminal. I will enter commands and you will reply with what the terminal should display. I want you to reply only with the terminal output in a single code block, nothing else. Don’t write explanations. Don’t type commands unless I instruct you to do so. When I need to tell you something in English, I will put the text in brackets [like this]. I need you to 给我创建一个react项目. Your default directory is /app, which has this project. My first command is [ls -aF] | 056241106071237243a3bf6a81c2acb4 | {
"intermediate": 0.2889755070209503,
"beginner": 0.26766523718833923,
"expert": 0.44335928559303284
} |
15,018 | -- Укажите переменную папку с моделями NPC
local npcFolder = script.Creeps
-- Задайте позиции спавна крипов
local spawnPositions = {
RadiantForceSpawn = Vector3.new(133.165, 0.5, 47.051),
DireForceSpawn = Vector3.new(-132.107, 0.5, 43.742)
}
-- Создаем крипов
function spawnCreeps()
local RadiantForceModels = npcFolder.RadiantForce:GetChildren()
local DireForceModels = npcFolder.DireForce:GetChildren()
for i, model in ipairs(RadiantForceModels) do
cloneNpc(model, spawnPositions.RadiantForceSpawn, "RadiantForce")
end
for i, model in ipairs(DireForceModels) do
cloneNpc(model, spawnPositions.DireForceSpawn, "DireForce")
end
end
-- Клонируем крипов и добавляем функциональность
function cloneNpc(npcModel, spawnPos, faction)
local clone = npcModel:Clone()
clone:SetPrimaryPartCFrame(CFrame.new(spawnPos))
clone.Parent = workspace
-- Добавляем StringValue для фракции крипа
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = faction
factionValue.Parent = clone
-- Добавляем функцию обработки попадания игрока
local touchPart = clone.PrimaryPart
touchPart.Touched:Connect(function(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
if humanoid and humanoid:IsA("Humanoid") then
-- Игрок подошел слишком близко, крип отвлекается
clone:FindFirstChild("Humanoid"):MoveTo(humanoid.RootPart.Position)
end
end)
-- Прибавляем функцию Pathfinding
local pathfindService = game:GetService("PathfindingService")
local path = pathfindService:CreatePath()
path:ComputeAsync(clone.PrimaryPart.Position, game.Workspace.Middle.Position) -- Измените Middle на середину вашей карты
clone.Humanoid.MoveToFinished:Connect(function(reachedDestination)
if reachedDestination then
-- Достигли середины карты, начинаем сражаться
attackEnemy(clone, faction)
else
-- Продолжаем движение по пути
path:ComputeAsync(clone.PrimaryPart.Position, game.Workspace.Middle.Position)
path.MoveToFinished:Wait()
end
end)
clone.Humanoid:MoveTo(path:GetPointAtIndex(2).Position)
end
-- Функция для атаки врага
function attackEnemy(creep, faction)
local enemyFaction = faction == "RadiantForce" and "DireForce" or "RadiantForce"
local enemyCreeps = workspace:FindFirstChild(enemyFaction):GetChildren()
for i, enemyCreep in ipairs(enemyCreeps) do
if enemyCreep:FindFirstChild("Humanoid") then
-- Выполните атаку противника
-- Можете добавить свою собственную логику атаки
break
end
end
-- Проверяем, остались ли враги в радиусе атаки
local remainingEnemies = workspace:FindFirstChild(enemyFaction):GetChildren()
if #remainingEnemies > 0 then
-- Продолжаем атаковать
attackEnemy(creep, faction)
else
-- Никого не осталось, возвращаемся в исходную точку
local pathfindService = game:GetService("PathfindingService")
local path = pathfindService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, creep.Origin.Position) -- Вам потребуется установить Origin на исходную точку
creep.Humanoid.MoveToFinished:Connect(function(reachedDestination)
if reachedDestination then
-- Вернулись на исходную точку
despawnCreep(creep)
else
-- Продолжаем движение по пути
path:ComputeAsync(creep.PrimaryPart.Position, creep.Origin.Position)
path.MoveToFinished:Wait()
end
end)
creep.Humanoid:MoveTo(path:GetPointAtIndex(2).Position)
end
end
-- Удаление крипа
function despawnCreep(creep)
creep:Destroy()
end
-- Запускаем генерацию крипов с задержкой
spawnCreeps()
роблокс выдал эту ошибку. "GetPointAtIndex is not a valid member of Path "Instance"" на строчке 62 | b37c9259661d4e5acff3e39105666040 | {
"intermediate": 0.34420448541641235,
"beginner": 0.5525643825531006,
"expert": 0.10323113948106766
} |
15,019 | -- Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
-- Массивы с файлами моделей NPC-крипов для Radiant и Dire
local radiantModels = {}
local direModels = {}
-- Загрузка моделей NPC-крипов из определенной папки
-- Укажите путь к папке с моделями вместо "ПУТЬ_К_ПАПКЕ_С_МОДЕЛЯМИ"
local modelFolder = game.ServerStorage:WaitForChild("Creeps")
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find("RadiantCreep") then
table.insert(radiantModels, model)
elseif model.Name:find("DireCreep") then
table.insert(direModels, model)
end
end
-- Функция создания NPC-крипов
local function spawnCreeps()
-- Спавн NPC-крипов Radiant в точке radiantSpawnPoint
for _, model in ipairs(radiantModels) do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint))
-- Создание StringValue и установка значения "Radiant"
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Radiant"
factionValue.Parent = creep
end
-- Спавн NPC-крипов Dire в точке direSpawnPoint
for _, model in ipairs(direModels) do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint))
-- Создание StringValue и установка значения "Dire"
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Dire"
factionValue.Parent = creep
end
end
-- Вызов функции спавна NPC-крипов Отлично. Теперь сделай так чтобы в когда происходит функция спавна крипов. Спавнилось сразу несколько и чтобы они все были рядом (3 штуки). Так же сделай чтобы после спавна они шли по средней линии (middle в workspace) (создай в каждом из клонированных крипов StringValue и дай значение той за которую они воюют (типо Radiant или Dire)) Вообщем крипы доходят до середины карты и начинают сражаться. Так же они могу отвлечься на игроков если он сильно близко подойдет. | be8cbdd36bf59805123b06354fb50152 | {
"intermediate": 0.25883737206459045,
"beginner": 0.4451526999473572,
"expert": 0.29600992798805237
} |
15,020 | -- Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
-- Массивы с файлами моделей NPC-крипов для Radiant и Dire
local radiantModels = {}
local direModels = {}
-- Загрузка моделей NPC-крипов из определенной папки
-- Укажите путь к папке с моделями вместо "ПУТЬ_К_ПАПКЕ_С_МОДЕЛЯМИ"
local modelFolder = game.ServerStorage:WaitForChild("Creeps")
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find("RadiantCreep") then
table.insert(radiantModels, model)
elseif model.Name:find("DireCreep") then
table.insert(direModels, model)
end
end
-- Функция создания NPC-крипов
local function spawnCreeps()
-- Спавн NPC-крипов Radiant в точке radiantSpawnPoint
for _, model in ipairs(radiantModels) do
local factionValue = Instance.new("StringValue") -- Создание StringValue для фракции
factionValue.Name = "Faction"
factionValue.Value = "Radiant"
for i = 1, 3 do -- Спавн 3 крипов Radiant
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4)))) -- Расстояние между крипами - 2 блока
-- Установка StringValue фракции в каждого крипа
local cloneFactionValue = factionValue:Clone()
cloneFactionValue.Parent = creep
end
end
-- Спавн NPC-крипов Dire в точке direSpawnPoint
for _, model in ipairs(direModels) do
local factionValue = Instance.new("StringValue") -- Создание StringValue для фракции
factionValue.Name = "Faction"
factionValue.Value = "Dire"
for i = 1, 3 do -- Спавн 3 крипов Dire
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4)))) -- Расстояние между крипами - 2 блока
-- Установка StringValue фракции в каждого крипа
local cloneFactionValue = factionValue:Clone()
cloneFactionValue.Parent = creep
end
end
end
-- Вызов функции спавна NPC-крипов
spawnCreeps()
Отлично. Сделай чтоб после спавна крипы смотрели в сторону противоположной фракции. Теперь сделай чтобы после спавна крипы шли по средней линии (middle в workspace) Вообщем крипы доходят до середины карты и начинают сражаться. Используй pathfinding тут. Это ОЧЕНЬ важная часть скрипта! | f3f76c2259b01dafd735e977d10bcdc4 | {
"intermediate": 0.31803420186042786,
"beginner": 0.45010748505592346,
"expert": 0.2318582683801651
} |
15,021 | I need a VBA code that will serch column 'B' from row 5 downwards for all the cells that contain the text value 'Service'.
For each 'Service' value found, it will also check in column 'H' of the same row, the date value.
After the search is complete, the earliest date found in column 'H' in the rows that the value 'Service' exists in column 'B', must then be displayed in cell 'H3'.
Is this possible? | 999aa9eef213b2ad913a7b6c9e6bea89 | {
"intermediate": 0.4812382459640503,
"beginner": 0.10526597499847412,
"expert": 0.413495808839798
} |
15,022 | -- Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
local middlePoint = Vector3.new(-3, 0.5, 44.058) -- Поменяйте значения на координаты середины карты
local radiantModels = {}
local direModels = {}
local modelFolder = game.ServerStorage:WaitForChild("Creeps")
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find("RadiantCreep") then
table.insert(radiantModels, model)
elseif model.Name:find("DireCreep") then
table.insert(direModels, model)
end
end
local pathfindingService = game:GetService("PathfindingService")
local function spawnCreeps()
for _, model in ipairs(radiantModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Radiant"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemySpawnPoint = radiantSpawnPoint
if factionValue.Value == "Radiant" then
enemySpawnPoint = direSpawnPoint
end
local lookVector = (enemySpawnPoint - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, middlePoint)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end)()
end
end
for _, model in ipairs(direModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Dire"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemySpawnPoint = radiantSpawnPoint
if factionValue.Value == "Radiant" then
enemySpawnPoint = direSpawnPoint
end
local lookVector = (enemySpawnPoint - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, middlePoint)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end)()
end
end
end
spawnCreeps() Срочно нужно переделать точку направления крипов. Они должны будут идти на трон противоположной фракции. Но если крипы разных встретят друг друга в определенном радиусе, то начнут драться до тех пор, близости все крипы вражеской фракции не умрут (скрипт на драку крипов я сам сделаю, хотя было бы славно если бы ты это сделал) | e6ed3a03c29570f6e45bfd8221d4909b | {
"intermediate": 0.36217600107192993,
"beginner": 0.517855703830719,
"expert": 0.11996835470199585
} |
15,023 | -- Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
local middlePoint = Vector3.new(-3, 0.5, 44.058) -- Поменяйте значения на координаты середины карты
local radiantModels = {}
local direModels = {}
local modelFolder = game.ServerStorage:WaitForChild("Creeps")
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find("RadiantCreep") then
table.insert(radiantModels, model)
elseif model.Name:find("DireCreep") then
table.insert(direModels, model)
end
end
local pathfindingService = game:GetService("PathfindingService")
local function spawnCreeps()
for _, model in ipairs(radiantModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Radiant"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemySpawnPoint = radiantSpawnPoint
if factionValue.Value == "Radiant" then
enemySpawnPoint = direSpawnPoint
end
local lookVector = (enemySpawnPoint - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, middlePoint)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end)()
end
end
for _, model in ipairs(direModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Dire"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemySpawnPoint = radiantSpawnPoint
if factionValue.Value == "Radiant" then
enemySpawnPoint = direSpawnPoint
end
local lookVector = (enemySpawnPoint - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, middlePoint)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end)()
end
end
end
spawnCreeps() Срочно нужно переделать точку направления крипов. Они должны будут идти на трон противоположной фракции. Но если крипы разных встретят друг друга в определенном радиусе, то начнут драться до тех пор, близости все крипы вражеской фракции не умрут (скрипт на драку крипов я сам сделаю, хотя было бы славно если бы ты это сделал). трон крипов Radiant называется в workspace RadiantAncient, а крипов Dire называется DireAncient | 28af13ca5c294488fbb1d7df37bd637a | {
"intermediate": 0.36217600107192993,
"beginner": 0.517855703830719,
"expert": 0.11996835470199585
} |
15,024 | -- Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
local middlePoint = Vector3.new(-3, 0.5, 44.058) -- Поменяйте значения на координаты середины карты
local radiantModels = {}
local direModels = {}
local modelFolder = game.ServerStorage:WaitForChild("Creeps")
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find("RadiantCreep") then
table.insert(radiantModels, model)
elseif model.Name:find("DireCreep") then
table.insert(direModels, model)
end
end
local pathfindingService = game:GetService("PathfindingService")
local function spawnCreeps()
for _, model in ipairs(radiantModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Radiant"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemySpawnPoint = radiantSpawnPoint
if factionValue.Value == "Radiant" then
enemySpawnPoint = direSpawnPoint
end
local lookVector = (enemySpawnPoint - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, middlePoint)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end)()
end
end
for _, model in ipairs(direModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Dire"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemySpawnPoint = radiantSpawnPoint
if factionValue.Value == "Radiant" then
enemySpawnPoint = direSpawnPoint
end
local lookVector = (enemySpawnPoint - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, middlePoint)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end)()
end
end
end
spawnCreeps() Срочно нужно переделать точку направления крипов. Они должны будут идти на трон противоположной фракции. Но если крипы разных встретят друг друга в определенном радиусе, то начнут драться до тех пор, близости все крипы вражеской фракции не умрут (скрипт на драку крипов я сам сделаю, хотя было бы славно если бы ты это сделал). трон крипов Radiant называется в workspace RadiantAncient, а крипов Dire называется DireAncient | bdca50207477a4f9cf50909de95dfd63 | {
"intermediate": 0.36217600107192993,
"beginner": 0.517855703830719,
"expert": 0.11996835470199585
} |
15,025 | -- Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
local middlePoint = Vector3.new(-3, 0.5, 44.058) -- Поменяйте значения на координаты середины карты
local radiantModels = {}
local direModels = {}
local modelFolder = game.ServerStorage:WaitForChild("Creeps")
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find("RadiantCreep") then
table.insert(radiantModels, model)
elseif model.Name:find("DireCreep") then
table.insert(direModels, model)
end
end
local pathfindingService = game:GetService("PathfindingService")
local function spawnCreeps()
for _, model in ipairs(radiantModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Radiant"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemySpawnPoint = radiantSpawnPoint
if factionValue.Value == "Radiant" then
enemySpawnPoint = direSpawnPoint
end
local lookVector = (enemySpawnPoint - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, middlePoint)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end)()
end
end
for _, model in ipairs(direModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Dire"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemySpawnPoint = radiantSpawnPoint
if factionValue.Value == "Radiant" then
enemySpawnPoint = direSpawnPoint
end
local lookVector = (enemySpawnPoint - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, middlePoint)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end)()
end
end
end
spawnCreeps() Срочно нужно переделать точку направления крипов. Они должны будут идти на трон противоположной фракции. Но если крипы разных фракций встретят друг друга в определенном радиусе, то начнут драться до тех пор (урон крипов за удар вальируется от (12-18), близости все крипы вражеской фракции не умрут. трон крипов Radiant называется в workspace RadiantAncient, а крипов Dire называется DireAncient | eb2110cb9acdf859976db21040fcf751 | {
"intermediate": 0.33060041069984436,
"beginner": 0.5339257717132568,
"expert": 0.13547387719154358
} |
15,026 | -- Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
local radiantModels = {}
local direModels = {}
local modelFolder = game.ServerStorage:WaitForChild("Creeps")
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find("RadiantCreep") then
table.insert(radiantModels, model)
elseif model.Name:find("DireCreep") then
table.insert(direModels, model)
end
end
local pathfindingService = game:GetService("PathfindingService")
local function spawnCreeps()
for _, model in ipairs(radiantModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Radiant"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.DireAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Parent do
if (creep.PrimaryPart.Position - cree.Position).Magnitude <= 10 then
-- Начать драться с крипами противоположной фракции
for _, enemyCreep in ipairs(direModels) do
if enemyCreep.Parent and (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 10 then
-- Скрипт на драку крипов здесь
end
end
else
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end
end
end)()
end
end
for _, model in ipairs(direModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Dire"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.RadiantAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Parent do
if (creep.PrimaryPart.Position - enemyThrone.Position).Magnitude <= 10 then
-- Начать драться с крипами противоположной фракции
for _, enemyCreep in ipairs(radiantModels) do
if enemyCreep.Parent and (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 10 then
-- Скрипт на драку крипов здесь
end
end
else
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end
end
end)()
end
end
end
spawnCreeps()
Обнаружение крипа из противоположной фракции неверно. Крипы должны обнаружить на этом расстоянии не трон противоположной фракции, а КРИПА ИЗ ДРУГОЙ ФРАКЦИИ. | 5e1912f3df21ccc901ccbda9f2d29096 | {
"intermediate": 0.2955680191516876,
"beginner": 0.5246557593345642,
"expert": 0.17977619171142578
} |
15,027 | – Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
local radiantModels = {}
local direModels = {}
local modelFolder = game.ServerStorage:WaitForChild(“Creeps”)
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find(“RadiantCreep”) then
table.insert(radiantModels, model)
elseif model.Name:find(“DireCreep”) then
table.insert(direModels, model)
end
end
local pathfindingService = game:GetService(“PathfindingService”)
local function spawnCreeps()
for _, model in ipairs(radiantModels) do
local factionValue = Instance.new(“StringValue”)
factionValue.Name = “Faction”
factionValue.Value = “Radiant”
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild(“HumanoidRootPart”)
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.DireAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Parent do
if (creep.PrimaryPart.Position - cree.Position).Magnitude <= 10 then
– Начать драться с крипами противоположной фракции
for _, enemyCreep in ipairs(direModels) do
if enemyCreep.Parent and (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 10 then
– Скрипт на драку крипов здесь
end
end
else
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end
end
end)()
end
end
for _, model in ipairs(direModels) do
local factionValue = Instance.new(“StringValue”)
factionValue.Name = “Faction”
factionValue.Value = “Dire”
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild(“HumanoidRootPart”)
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.RadiantAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Parent do
if (creep.PrimaryPart.Position - enemyThrone.Position).Magnitude <= 10 then
– Начать драться с крипами противоположной фракции
for _, enemyCreep in ipairs(radiantModels) do
if enemyCreep.Parent and (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 10 then
– Скрипт на драку крипов здесь
end
end
else
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end
end
end)()
end
end
end
spawnCreeps()
Обнаружение крипа из противоположной фракции неверно. Крипы должны обнаружить на этом расстоянии не трон противоположной фракции, а КРИПА ИЗ ДРУГОЙ ФРАКЦИИ. Чтобы это сделать попробуй проверить весь workspace на крипов и сравнить их парамитер stringvalue со своим собственным
– Проверка на обнаружение крипа из противоположной фракции
– Для радиантских крипов
for _, enemyCreep in ipairs(workspace:GetChildren()) do
if enemyCreep:IsA(“Model”) and enemyCreep:FindFirstChild(“Faction”) and enemyCreep.Faction.Value == “Dire” then
if enemyCreep.PrimaryPart and (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 10 then
– Скрипт на драку крипов здесь
end
end
end
– Для дирских крипов
for _, enemyCreep in ipairs(workspace:GetChildren()) do
if enemyCreep:IsA(“Model”) and enemyCreep:FindFirstChild(“Faction”) and enemyCreep.Faction.Value == “Radiant” then
if enemyCreep.PrimaryPart and (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 10 then
– Скрипт на драку крипов здесь
end
end
end я сделал как ты сказал, но ничего не случилось. Даже принт не сработал, можешь полностью расписать скрипт | fdb3b5b7202d1edf9fc4774107a5b585 | {
"intermediate": 0.3117167353630066,
"beginner": 0.5137830972671509,
"expert": 0.17450013756752014
} |
15,028 | -- Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
local radiantModels = {}
local direModels = {}
local modelFolder = game.ServerStorage:WaitForChild("Creeps")
-- Получаем список моделей крипов и разделяем их по фракциям
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find("RadiantCreep") then
table.insert(radiantModels, model)
elseif model.Name:find("DireCreep") then
table.insert(direModels, model)
end
end
local pathfindingService = game:GetService("PathfindingService")
local function spawnCreeps()
-- Спавн радиантских крипов
for _, model in ipairs(radiantModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Radiant"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.DireAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while wait() do
for _, enemyCreep in ipairs(workspace:GetChildren()) do
if enemyCreep:IsA("Model") and enemyCreep:FindFirstChild("Faction") and enemyCreep.Faction.Value == "Dire" then
if enemyCreep.PrimaryPart and (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 10 then
print("Крипы начинают драку!")
-- Скрипт на драку крипов здесь
elseif enemyCreep.PrimaryPart and (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude > 10 then
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end
end
end
end
end)()
end
end
-- Спавн дирских крипов
for _, model in ipairs(direModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Dire"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.RadiantAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while wait() do
for _, enemyCreep in ipairs(workspace:GetChildren()) do
if enemyCreep:IsA("Model") and enemyCreep:FindFirstChild("Faction") and enemyCreep.Faction.Value == "Radiant" then
if enemyCreep.PrimaryPart and (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 10 then
print("Крипы начинают драку!")
-- Скрипт на драку крипов здесь
elseif enemyCreep.PrimaryPart and (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude > 10 then
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end
end
end
end
end)()
end
end
end
spawnCreeps() крипы не идут. | e88fcbbee565d4e729b8ff2196968baf | {
"intermediate": 0.2787262797355652,
"beginner": 0.41716107726097107,
"expert": 0.30411258339881897
} |
15,029 | – Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
local radiantModels = {}
local direModels = {}
local modelFolder = game.ServerStorage:WaitForChild(“Creeps”)
– Получаем список моделей крипов и разделяем их по фракциям
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find(“RadiantCreep”) then
table.insert(radiantModels, model)
elseif model.Name:find(“DireCreep”) then
table.insert(direModels, model)
end
end
local pathfindingService = game:GetService(“PathfindingService”)
local function spawnCreeps()
– Спавн радиантских крипов
for _, model in ipairs(radiantModels) do
local factionValue = Instance.new(“StringValue”)
factionValue.Name = “Faction”
factionValue.Value = “Radiant”
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild(“HumanoidRootPart”)
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.DireAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Humanoid.Health > 0 do – Проверка здесь чтобы крипы начали движение только если они живы
local targetCreep = nil
for _, enemyCreep in ipairs(workspace:GetChildren()) do
if enemyCreep:IsA(“Model”) and enemyCreep:FindFirstChild(“Faction”) and enemyCreep.Faction.Value == “Dire” and enemyCreep.PrimaryPart then
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 10 then
targetCreep = enemyCreep – Крипы начнут драку с ближайшим враждебным крипом
break
end
end
end
if targetCreep then
creep.Humanoid:MoveTo(creep.PrimaryPart.Position) – Остановка крипа на месте
print(“Крипы начинают драку!”)
– Скрипт на драку крипов здесь
else
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end
wait() – Подождать до следующего кадра
end
end)()
end
end
– Спавн дирских крипов
for _, model in ipairs(direModels) do
local factionValue = Instance.new(“StringValue”)
factionValue.Name = “Faction”
factionValue.Value = “Dire”
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild(“HumanoidRootPart”)
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.RadiantAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Humanoid.Health > 0 do
local targetCreep = nil
for _, enemyCreep in ipairs(workspace:GetChildren()) do
if enemyCreep:IsA(“Model”) and enemyCreep:FindFirstChild(“Faction”) and enemyCreep.Faction.Value == “Radiant” and enemyCreep.PrimaryPart then
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 10 then
targetCreep = enemyCreep
break
end
end
end
if targetCreep then
creep.Humanoid:MoveTo(creep.PrimaryPart.Position)
print(“Крипы начинают драку!”)
– Скрипт на драку крипов здесь
else
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end
wait()
end
end)()
end
end
end
spawnCreeps()
Даже после твоей корректировки когда условия для драки крипов соблюдены, они не дерутся. Всмысле даже print не работает. Добавь корректировки сразу в скрипт. | a91ac7456e87fa77834d02fd958a33fd | {
"intermediate": 0.32861417531967163,
"beginner": 0.4568014442920685,
"expert": 0.21458439528942108
} |
15,030 | Public Sub FindEarliestServiceDate()
Application.EnableEvents = False
Dim ws As Worksheet
Dim lastRow As Long
Dim rng As Range
Dim cell As Range
Dim earliestDate As Date
Set ws = ActiveSheet
lastRow = ws.Cells(ws.Rows.count, "B").End(xlUp).Row
Set rng = ws.Range("B5:B" & lastRow)
For Each cell In rng
If cell.Value = "Service" Then
If earliestDate = 0 Or cell.Offset(0, 6).Value < earliestDate Then
earliestDate = cell.Offset(0, 6).Value
End If
End If
Next cell
ws.Range("H3").Value = earliestDate
Application.EnableEvents = True
End Sub
I would like to add to the code above to do the following;
If the value 'Service' is not found in column 'B' then the vlaue of 'H3' should be "" | 783b0e2d5ae2be92299bb9a4aeb877cd | {
"intermediate": 0.44169068336486816,
"beginner": 0.35054513812065125,
"expert": 0.20776420831680298
} |
15,031 | -- Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
local radiantModels = {}
local direModels = {}
local modelFolder = game.ServerStorage:WaitForChild("Creeps")
-- Получаем список моделей крипов и разделяем их по фракциям
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find("RadiantCreep") then
table.insert(radiantModels, model)
elseif model.Name:find("DireCreep") then
table.insert(direModels, model)
end
end
local pathfindingService = game:GetService("PathfindingService")
local function spawnCreeps()
-- Спавн радиантских крипов
for _, model in ipairs(radiantModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Radiant"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.DireAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Humanoid.Health > 0 do -- Проверка здесь чтобы крипы начали движение только если они живы
print(1)
local targetCreep = nil
for _, enemyCreep in ipairs(workspace:GetChildren()) do
print(2)
if enemyCreep:IsA("Model") and enemyCreep:FindFirstChild("Faction") and enemyCreep.Faction.Value == "Dire" and enemyCreep.PrimaryPart then
print(3)
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 10 then
print(4)
targetCreep = enemyCreep -- Крипы начнут драку с ближайшим враждебным крипом
break
end
end
end
if targetCreep then
creep.Humanoid:MoveTo(creep.PrimaryPart.Position) -- Остановка крипа на месте
print("Крипы начинают драку!")
-- Скрипт на драку крипов здесь
else
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
end
end
wait() -- Подождать до следующего кадра
end
end)()
end
end
-- Спавн дирских крипов
for _, model in ipairs(direModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Dire"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.RadiantAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Humanoid.Health > 0 do -- Проверка здесь чтобы крипы начали движение только если они живы
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
print(1)
local targetCreep = nil
for _, enemyCreep in ipairs(workspace:GetChildren()) do
print(2)
if enemyCreep.Name == "RadiantCreep" then
print(3)
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 25 then
print(4)
targetCreep = enemyCreep -- Крипы начнут драку с ближайшим враждебным крипом
break
end
end
end
if targetCreep then
waypoints = {}
creep.Humanoid:MoveTo(creep.Humanoid.RootPart.Position)
creep.Humanoid:MoveTo(creep.PrimaryPart.Position) -- Остановка крипа на месте
print("Крипы начинают драку!")
-- Скрипт на драку крипов здесь
end
end
wait() -- Подождать до следующего кадра
end
end)()
end
end
end
spawnCreeps()
помоги на 123 строке отключить движение крипов чтобы они никуда не шли из-за pathfinding | 4e677696aa49b7be89789996c437e433 | {
"intermediate": 0.3330234885215759,
"beginner": 0.513653576374054,
"expert": 0.1533229649066925
} |
15,032 | -- Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
local radiantModels = {}
local direModels = {}
local modelFolder = game.ServerStorage:WaitForChild("Creeps")
-- Получаем список моделей крипов и разделяем их по фракциям
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find("RadiantCreep") then
table.insert(radiantModels, model)
elseif model.Name:find("DireCreep") then
table.insert(direModels, model)
end
end
local pathfindingService = game:GetService("PathfindingService")
local function spawnCreeps()
-- Спавн радиантских крипов
for _, model in ipairs(radiantModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Radiant"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.DireAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Humanoid.Health > 0 do -- Проверка здесь чтобы крипы начали движение только если они живы
local targetCreep
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
print(1)
targetCreep = nil
for _, enemyCreep in ipairs(workspace:GetChildren()) do
print(2)
if enemyCreep.Name == "DireCreep" then
print(3)
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 10 then
print(4)
targetCreep = enemyCreep -- Крипы начнут драку с ближайшим враждебным крипом
break
end
end
end
if targetCreep then
waypoints = {} -- Сброс пути
creep.Humanoid:MoveTo(creep.Humanoid.RootPart.Position)
creep.Humanoid:MoveTo(creep.PrimaryPart.Position) -- Остановка крипа на месте
print("Крипы начинают драку!")
-- Скрипт на драку крипов здесь
break
end
end
if targetCreep then
break -- Прерывание цикла и движения крипа, если найден враждебный крип
end
wait() -- Подождать до следующего кадра
end
end)()
end
end
-- Спавн дирских крипов
for _, model in ipairs(direModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Dire"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.RadiantAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Humanoid.Health > 0 do -- Проверка здесь чтобы крипы начали движение только если они живы
local targetCreep
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
print(1)
targetCreep = nil
for _, enemyCreep in ipairs(workspace:GetChildren()) do
print(2)
if enemyCreep.Name == "RadiantCreep" then
print(3)
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 10 then
print(4)
targetCreep = enemyCreep -- Крипы начнут драку с ближайшим враждебным крипом
break
end
end
end
if targetCreep then
waypoints = {} -- Сброс пути
creep.Humanoid:MoveTo(creep.Humanoid.RootPart.Position)
creep.Humanoid:MoveTo(creep.PrimaryPart.Position) -- Остановка крипа на месте
print("Крипы начинают драку!")
-- Скрипт на драку крипов здесь
break
end
end
if targetCreep then
break -- Прерывание цикла и движения крипа, если найден враждебный крип
end
wait() -- Подождать до следующего кадра
end
end)()
end
end
end
spawnCreeps()
сделай так чтобы вместо print("Крипы начинают драку") активировалась функция драки. Эта функция отвечает за то какой крип кого бьет. Крипы противоположных фракций подходят друг к другу на 1.5 studs и раз в 0.6-0.8 сек наносят друг другу урону от 12-16 и если крип убьет крипа противоположной фракции, то он начинает аттаковать либо следующего крипа из противоположной фракции или продолжает идти дальше к трону | 268cb23bcadf42af3c6d1b31c2f94060 | {
"intermediate": 0.30930349230766296,
"beginner": 0.4740006625652313,
"expert": 0.21669583022594452
} |
15,033 | -- Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
local radiantModels = {}
local direModels = {}
local function startFight(attacker, target)
while attacker.Humanoid.Health > 0 and target.Humanoid.Health > 0 do
attacker.Humanoid:MoveTo(target.PrimaryPart.Position)
wait(0.6) -- Промежуток между атаками (можно настроить)
if (attacker.PrimaryPart.Position - target.PrimaryPart.Position).Magnitude <= 1.5 then
-- Нанесение урона
local damage = math.random(8, 12) -- Рандомное значение урона (можно настроить)
target.Humanoid.Health = target.Humanoid.Health - damage
else
attacker.Humanoid:MoveTo(target.PrimaryPart.Position)
end
end
end
local modelFolder = game.ServerStorage:WaitForChild("Creeps")
-- Получаем список моделей крипов и разделяем их по фракциям
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find("RadiantCreep") then
table.insert(radiantModels, model)
elseif model.Name:find("DireCreep") then
table.insert(direModels, model)
end
end
local pathfindingService = game:GetService("PathfindingService")
local function spawnCreeps()
-- Спавн радиантских крипов
for _, model in ipairs(radiantModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Radiant"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.DireAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Humanoid.Health > 0 do -- Проверка здесь чтобы крипы начали движение только если они живы
local targetCreep
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
print(1)
targetCreep = nil
for _, enemyCreep in ipairs(workspace:GetChildren()) do
print(2)
if enemyCreep.Name == "DireCreep" then
print(3)
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 10 then
print(4)
targetCreep = enemyCreep -- Крипы начнут драку с ближайшим враждебным крипом
break
end
end
end
if targetCreep then
waypoints = {} -- Сброс пути
creep.Humanoid:MoveTo(creep.Humanoid.RootPart.Position)
creep.Humanoid:MoveTo(creep.PrimaryPart.Position) -- Остановка крипа на месте
startFight(creep, targetCreep) -- Активация функции драки
break
end
end
if targetCreep then
break -- Прерывание цикла и движения крипа, если найден враждебный крип
end
wait() -- Подождать до следующего кадра
end
end)()
end
end
-- Спавн дирских крипов
for _, model in ipairs(direModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Dire"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.RadiantAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Humanoid.Health > 0 do -- Проверка здесь чтобы крипы начали движение только если они живы
local targetCreep
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
print(1)
targetCreep = nil
for _, enemyCreep in ipairs(workspace:GetChildren()) do
print(2)
if enemyCreep.Name == "RadiantCreep" then
print(3)
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= 10 then
print(4)
targetCreep = enemyCreep -- Крипы начнут драку с ближайшим враждебным крипом
break
end
end
end
if targetCreep then
waypoints = {} -- Сброс пути
creep.Humanoid:MoveTo(creep.Humanoid.RootPart.Position)
creep.Humanoid:MoveTo(creep.PrimaryPart.Position) -- Остановка крипа на месте
startFight(creep, targetCreep) -- Активация функции драки
break
end
end
if targetCreep then
break -- Прерывание цикла и движения крипа, если найден враждебный крип
end
wait() -- Подождать до следующего кадра
end
end)()
end
end
end
spawnCreeps() сделай так чтобы после драки крипы которые выжили и не обнаружили вокруг себя других крипов противоположной фракции продолжили идти на трон противоположной фракции | d778583e7cc88660136dcc8b619bbf14 | {
"intermediate": 0.35061341524124146,
"beginner": 0.4724542498588562,
"expert": 0.17693231999874115
} |
15,034 | -- Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
local creepsattackrange = 8
local radiantModels = {}
local direModels = {}
local pathfindingService = game:GetService("PathfindingService")
local function checkForEnemyCreep(creep)
for _, enemyCreep in ipairs(workspace:GetChildren()) do
if enemyCreep.Name == "RadiantCreep" or enemyCreep.Name == "DireCreep" then
if creep.Name:find("RadiantCreep") and enemyCreep.Name == "DireCreep" then
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= creepsattackrange then
return true -- Если найден враждебный крип рядом, возвращаем true
end
elseif creep.Name:find("DireCreep") and enemyCreep.Name == "RadiantCreep" then
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= creepsattackrange then
return true -- Если найден враждебный крип рядом, возвращаем true
end
end
end
end
return false -- Если враждебных крипов рядом не найдено, возвращаем false
end
local function startFight(attacker, target)
while attacker.Humanoid.Health > 0 and target.Humanoid.Health > 0 do
attacker.Humanoid:MoveTo(target.PrimaryPart.Position)
wait(0.2) -- Промежуток между атаками (можно настроить)
if (attacker.PrimaryPart.Position - target.PrimaryPart.Position).Magnitude <= 1.5 then
-- Нанесение урона
local damage = math.random(2, 6) -- Рандомное значение урона (можно настроить)
target.Humanoid.Health = target.Humanoid.Health - damage
else
attacker.Humanoid:MoveTo(target.PrimaryPart.Position)
end
if attacker.Humanoid.Health > 0 and target.Humanoid.Health > 0 then
-- Проверяем наличие крипов противоположной фракции рядом после каждой атаки
local enemyCreepNearby = checkForEnemyCreep(attacker)
if not enemyCreepNearby then
-- Спавн трона на противоположной стороне
local enemyThrone
if attacker.Name:find("RadiantCreep") then
enemyThrone = workspace.DireAncient
elseif attacker.Name:find("DireCreep") then
enemyThrone = workspace.RadiantAncient
end
local path = pathfindingService:CreatePath()
path:ComputeAsync(attacker.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
attacker.Humanoid:MoveTo(waypoint.Position)
attacker.Humanoid.MoveToFinished:Wait()
enemyCreepNearby = checkForEnemyCreep(attacker)
if enemyCreepNearby then
break -- Прерываем цикл, если найден враждебный крип
end
end
if not enemyCreepNearby then
attacker.Humanoid:MoveTo(enemyThrone.Position) -- Продолжаем движение к трону
end
end
end
end
end
local modelFolder = game.ServerStorage:WaitForChild("Creeps")
-- Получаем список моделей крипов и разделяем их по фракциям
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find("RadiantCreep") then
table.insert(radiantModels, model)
elseif model.Name:find("DireCreep") then
table.insert(direModels, model)
end
end
local function spawnCreeps()
-- Спавн радиантских крипов
for _, model in ipairs(radiantModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Radiant"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.DireAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Humanoid.Health > 0 do -- Проверка здесь чтобы крипы начали движение только если они живы
local targetCreep
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
print(1)
targetCreep = nil
for _, enemyCreep in ipairs(workspace:GetChildren()) do
print(2)
if enemyCreep.Name == "DireCreep" then
print(3)
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= creepsattackrange then
print(4)
targetCreep = enemyCreep -- Крипы начнут драку с ближайшим враждебным крипом
break
end
end
end
if targetCreep then
waypoints = {} -- Сброс пути
creep.Humanoid:MoveTo(creep.Humanoid.RootPart.Position)
creep.Humanoid:MoveTo(creep.PrimaryPart.Position) -- Остановка крипа на месте
startFight(creep, targetCreep) -- Активация функции драки
break
end
end
if targetCreep then
break -- Прерывание цикла и движения крипа, если найден враждебный крип
end
wait() -- Подождать до следующего кадра
end
end)()
end
end
-- Спавн дирских крипов
for _, model in ipairs(direModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Dire"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.RadiantAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Humanoid.Health > 0 do -- Проверка здесь чтобы крипы начали движение только если они живы
local targetCreep
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
print(1)
targetCreep = nil
for _, enemyCreep in ipairs(workspace:GetChildren()) do
print(2)
if enemyCreep.Name == "RadiantCreep" then
print(3)
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= creepsattackrange then
print(4)
targetCreep = enemyCreep -- Крипы начнут драку с ближайшим враждебным крипом
break
end
end
end
if targetCreep then
waypoints = {} -- Сброс пути
creep.Humanoid:MoveTo(creep.Humanoid.RootPart.Position)
creep.Humanoid:MoveTo(creep.PrimaryPart.Position) -- Остановка крипа на месте
startFight(creep, targetCreep) -- Активация функции драки
break
end
end
if targetCreep then
break -- Прерывание цикла и движения крипа, если найден враждебный крип
end
wait() -- Подождать до следующего кадра
end
end)()
end
end
end
spawnCreeps() Все равно равно крипы останавливаются после первой драки и никуда не идут. | 99426986d73f1ba17e10e7bee6028d34 | {
"intermediate": 0.3434871733188629,
"beginner": 0.49386364221572876,
"expert": 0.16264912486076355
} |
15,035 | -- Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
local creepsattackrange = 8
local radiantModels = {}
local direModels = {}
local pathfindingService = game:GetService("PathfindingService")
local function checkForEnemyCreep(creep)
for _, enemyCreep in ipairs(workspace:GetChildren()) do
if enemyCreep.Name == "RadiantCreep" or enemyCreep.Name == "DireCreep" then
if creep.Name:find("RadiantCreep") and enemyCreep.Name == "DireCreep" then
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= creepsattackrange then
return true -- Если найден враждебный крип рядом, возвращаем true
end
elseif creep.Name:find("DireCreep") and enemyCreep.Name == "RadiantCreep" then
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= creepsattackrange then
return true -- Если найден враждебный крип рядом, возвращаем true
end
end
end
end
return false -- Если враждебных крипов рядом не найдено, возвращаем false
end
local function startFight(attacker, target)
while attacker.Humanoid.Health > 0 and target.Humanoid.Health > 0 do
attacker.Humanoid:MoveTo(target.PrimaryPart.Position)
wait(0.2)
if (attacker.PrimaryPart.Position - target.PrimaryPart.Position).Magnitude <= 1.5 then
local damage = math.random(2, 6)
target.Humanoid.Health = target.Humanoid.Health - damage
else
attacker.Humanoid:MoveTo(target.PrimaryPart.Position)
end
if attacker.Humanoid.Health > 0 and target.Humanoid.Health > 0 then
local enemyCreepNearby = checkForEnemyCreep(attacker)
if not enemyCreepNearby then
target = nil -- Сброс цели, чтобы крип начал искать новую после каждой атаки
break
end
end
end
end
local modelFolder = game.ServerStorage:WaitForChild("Creeps")
-- Получаем список моделей крипов и разделяем их по фракциям
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find("RadiantCreep") then
table.insert(radiantModels, model)
elseif model.Name:find("DireCreep") then
table.insert(direModels, model)
end
end
local function spawnCreeps()
-- Спавн радиантских крипов
for _, model in ipairs(radiantModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Radiant"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.DireAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Humanoid.Health > 0 do -- Проверка здесь чтобы крипы начали движение только если они живы
local targetCreep
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
print(1)
targetCreep = nil
for _, enemyCreep in ipairs(workspace:GetChildren()) do
print(2)
if enemyCreep.Name == "DireCreep" then
print(3)
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= creepsattackrange then
print(4)
targetCreep = enemyCreep -- Крипы начнут драку с ближайшим враждебным крипом
break
end
end
end
if targetCreep then
waypoints = {} -- Сброс пути
creep.Humanoid:MoveTo(creep.Humanoid.RootPart.Position)
creep.Humanoid:MoveTo(creep.PrimaryPart.Position) -- Остановка крипа на месте
startFight(creep, targetCreep) -- Активация функции драки
break
end
end
if targetCreep then
break -- Прерывание цикла и движения крипа, если найден враждебный крип
end
wait() -- Подождать до следующего кадра
end
end)()
end
end
-- Спавн дирских крипов
for _, model in ipairs(direModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Dire"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.RadiantAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Humanoid.Health > 0 do -- Проверка здесь чтобы крипы начали движение только если они живы
local targetCreep
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
print(1)
targetCreep = nil
for _, enemyCreep in ipairs(workspace:GetChildren()) do
print(2)
if enemyCreep.Name == "RadiantCreep" then
print(3)
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= creepsattackrange then
print(4)
targetCreep = enemyCreep -- Крипы начнут драку с ближайшим враждебным крипом
break
end
end
end
if targetCreep then
waypoints = {} -- Сброс пути
creep.Humanoid:MoveTo(creep.Humanoid.RootPart.Position)
creep.Humanoid:MoveTo(creep.PrimaryPart.Position) -- Остановка крипа на месте
startFight(creep, targetCreep) -- Активация функции драки
break
end
end
if targetCreep then
break -- Прерывание цикла и движения крипа, если найден враждебный крип
end
wait() -- Подождать до следующего кадра
end
end)()
end
end
end
spawnCreeps() Все равно равно крипы останавливаются после первой драки и никуда не идут. А еще поменяй один параметр чтобы поиск целей (например if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= creepsattackrange then) еще проверял чтобы у врага было хп больше 0 | bca850b8cd2f8f80d5084d6cc9fe563b | {
"intermediate": 0.28527840971946716,
"beginner": 0.531931459903717,
"expert": 0.182790145277977
} |
15,036 | -- Переменные для координат спавна крипов
local radiantSpawnPoint = Vector3.new(133.165, 0.5, 47.051)
local direSpawnPoint = Vector3.new(-132.107, 0.5, 43.742)
local creepsattackrange = 8
local radiantModels = {}
local direModels = {}
local pathfindingService = game:GetService("PathfindingService")
local function checkForEnemyCreep(creep)
for _, enemyCreep in ipairs(workspace:GetChildren()) do
if enemyCreep.Name == "RadiantCreep" or enemyCreep.Name == "DireCreep" then
if creep.Name:find("RadiantCreep") and enemyCreep.Name == "DireCreep" then
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= creepsattackrange and enemyCreep.Humanoid.Health > 0 then
return true -- Если найден враждебный крип рядом, возвращаем true
end
elseif creep.Name:find("DireCreep") and enemyCreep.Name == "RadiantCreep" then
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= creepsattackrange and enemyCreep.Humanoid.Health > 0 then
return true -- Если найден враждебный крип рядом, возвращаем true
end
end
end
end
return false -- Если враждебных крипов рядом не найдено, возвращаем false
end
local function startFight(attacker, target)
while attacker.Humanoid.Health > 0 and target.Humanoid.Health > 0 do
attacker.Humanoid:MoveTo(target.PrimaryPart.Position)
wait(0.2)
if (attacker.PrimaryPart.Position - target.PrimaryPart.Position).Magnitude <= 1.5 then
local damage = math.random(2, 6)
target.Humanoid.Health = target.Humanoid.Health - damage
else
attacker.Humanoid:MoveTo(target.PrimaryPart.Position)
end
if attacker.Humanoid.Health > 0 and target.Humanoid.Health > 0 then
local enemyCreepNearby = checkForEnemyCreep(attacker)
if not enemyCreepNearby then
target = nil -- Сброс цели, чтобы крип начал искать новую после каждой атаки
break
end
end
end
end
local modelFolder = game.ServerStorage:WaitForChild("Creeps")
-- Получаем список моделей крипов и разделяем их по фракциям
for _, model in ipairs(modelFolder:GetChildren()) do
if model.Name:find("RadiantCreep") then
table.insert(radiantModels, model)
elseif model.Name:find("DireCreep") then
table.insert(direModels, model)
end
end
local function spawnCreeps()
-- Спавн радиантских крипов
for _, model in ipairs(radiantModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Radiant"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(radiantSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.DireAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Humanoid.Health > 0 do -- Проверка здесь чтобы крипы начали движение только если они живы
local targetCreep
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
print(1)
targetCreep = nil
for _, enemyCreep in ipairs(workspace:GetChildren()) do
print(2)
if enemyCreep.Name == "DireCreep" then
print(3)
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= creepsattackrange and enemyCreep.Humanoid.Health > 0 then
print(4)
targetCreep = enemyCreep -- Крипы начнут драку с ближайшим враждебным крипом
break
end
end
end
if targetCreep then
waypoints = {} -- Сброс пути
creep.Humanoid:MoveTo(creep.Humanoid.RootPart.Position)
creep.Humanoid:MoveTo(creep.PrimaryPart.Position) -- Остановка крипа на месте
startFight(creep, targetCreep) -- Активация функции драки
break
end
end
if targetCreep then
break -- Прерывание цикла и движения крипа, если найден враждебный крип
end
wait() -- Подождать до следующего кадра
end
end)()
end
end
-- Спавн дирских крипов
for _, model in ipairs(direModels) do
local factionValue = Instance.new("StringValue")
factionValue.Name = "Faction"
factionValue.Value = "Dire"
for i = 1, 3 do
local creep = model:Clone()
creep.Parent = workspace
creep.PrimaryPart = creep:FindFirstChild("HumanoidRootPart")
creep:SetPrimaryPartCFrame(CFrame.new(direSpawnPoint + Vector3.new(i * math.random(2,4), 0, i * math.random(2,4))))
local enemyThrone = workspace.RadiantAncient
local lookVector = (enemyThrone.Position - creep.PrimaryPart.Position).Unit
creep:SetPrimaryPartCFrame(CFrame.new(creep.PrimaryPart.Position, creep.PrimaryPart.Position + lookVector))
coroutine.wrap(function()
while creep.Humanoid.Health > 0 do -- Проверка здесь чтобы крипы начали движение только если они живы
local targetCreep
local path = pathfindingService:CreatePath()
path:ComputeAsync(creep.PrimaryPart.Position, enemyThrone.Position)
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
creep.Humanoid:MoveTo(waypoint.Position)
creep.Humanoid.MoveToFinished:Wait()
print(1)
targetCreep = nil
for _, enemyCreep in ipairs(workspace:GetChildren()) do
print(2)
if enemyCreep.Name == "RadiantCreep" then
print(3)
if (enemyCreep.PrimaryPart.Position - creep.PrimaryPart.Position).Magnitude <= creepsattackrange and enemyCreep.Humanoid.Health > 0 then
print(4)
targetCreep = enemyCreep -- Крипы начнут драку с ближайшим враждебным крипом
break
end
end
end
if targetCreep then
waypoints = {} -- Сброс пути
creep.Humanoid:MoveTo(creep.Humanoid.RootPart.Position)
creep.Humanoid:MoveTo(creep.PrimaryPart.Position) -- Остановка крипа на месте
startFight(creep, targetCreep) -- Активация функции драки
break
end
end
if targetCreep then
break -- Прерывание цикла и движения крипа, если найден враждебный крип
end
wait() -- Подождать до следующего кадра
end
end)()
end
end
end
spawnCreeps() крипы просто ломаются после первой драки и перестают двигаться и не ищут новых целей | 368eb9c9ec0d7fcf8d4d9dbd73743761 | {
"intermediate": 0.2828664183616638,
"beginner": 0.5372591614723206,
"expert": 0.17987439036369324
} |
15,037 | Hello there! | 012ff29ad36a9d569ba21d2cb7727f1b | {
"intermediate": 0.324867308139801,
"beginner": 0.2612829804420471,
"expert": 0.41384971141815186
} |
15,038 | local Lighting = game:GetService("Lighting")
local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local TweenService = game:GetService("TweenService")
local dayOfWeek = {"Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота", "Воскресенье"}
local JobLocation = Vector3.new(0, 500, 0) -- координаты блока Job
local SchoolLocation = Vector3.new(0, 600, 0) -- координаты блока School
local HomeLocation = Vector3.new(0, 800, 0) -- координаты блока Home
local ShopLocation = Vector3.new(0, 1000, 0) -- координаты блока Shop
local timeCycle = {
{time = 0, speed = 1}, -- ночь
{time = 600, speed = 8}, -- утро
{time = 900, speed = 4}, -- день
{time = 1800, speed = 1}, -- вечер
{time = 2400, speed = 2} -- ночь
}
local function getDayOfWeek()
return dayOfWeek[(math.floor(tick() / 86400) % 7) + 1]
end
local function updateTimeGui()
local time = Lighting:GetMinutesAfterMidnight()
local minutes = math.floor(time % 60)
local hours = math.floor(time / 60)
StarterGui:SetCore("SendNotification", {
Title = "Время суток";
Text = string.format("День: %s\nВремя: %02d:%02d", getDayOfWeek(), hours, minutes);
Duration = 1;
})
end
local function updateNPCs()
local NPCs = Workspace.Civilians:GetChildren()
for _, NPC in ipairs(NPCs) do
local age = NPC:FindFirstChild("Age") and NPC.Age.Value or 0
local busy = NPC:FindFirstChild("Busy") and NPC.Busy.Value or false
local path = Instance.new("Pathfinding")
local partToGo
if age < 18 then
if busy then
partToGo = SchoolLocation
else
partToGo = HomeLocation
end
else
if busy then
partToGo = JobLocation
else
partToGo = HomeLocation
end
end
path:ComputeAsync(NPC.HumanoidRootPart.Position, partToGo)
local waypoints = path:GetWaypoints()
for _, waypoint in ipairs(waypoints) do
local moveTween = TweenService:Create(NPC.HumanoidRootPart, TweenInfo.new(waypoint.Action == Enum.PathWaypointAction.Jump and 0.5 or 1), {
CFrame = waypoint.Position
})
moveTween:Play()
moveTween.Completed:Wait()
end
NPC.Humanoid:MoveTo(partToGo)
if partToGo == HomeLocation or partToGo == ShopLocation then
if busy then
NPC.Busy.Value = false
else
NPC.Busy.Value = true
end
end
end
end
Lighting.TimeOfDay = 0
game:GetService("RunService").Heartbeat:Connect(function()
local time = Lighting:GetMinutesAfterMidnight()
for i = 1, #timeCycle do
if time >= timeCycle[i].time and time < timeCycle[i + 1].time then
Lighting.ClockTime = i
wait(1 / timeCycle[i].speed)
break
end
end
updateTimeGui()
if time % 60 >= 55 then
updateNPCs()
end
end)
StarterGui:SetCore("TopbarEnabled", false)
StarterGui:SetCore("ChatBarDisabled", true)
StarterGui:SetCore("Stats", true) -- Показывать Fps и Ping игрока
for _, player in ipairs(Players:GetPlayers()) do
StarterGui:SetCore("UserGuiEnabled", false)
StarterGui:SetCore("IsChatVisible", false)
local gui = Instance.new("ScreenGui")
gui.Name = "TimeGUI"
gui.Parent = player.PlayerGui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 100)
frame.Position = UDim2.new(0, 10, 0, 10)
frame.BackgroundTransparency = 0.8
frame.BackgroundColor3 = Color3.new(0, 0, 0)
frame.BorderSizePixel = 0
frame.Parent = gui
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.Position = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.Text = ("День: "..dayOfWeek.."\nВремя:"..game.Lighting.ClockTime)
label.Font = Enum.Font.SourceSansBold
label.TextColor3 = Color3.new(1, 1, 1)
label.TextSize = 18
label.Parent = frame
end
Players.PlayerAdded:Connect(function(player)
StarterGui:SetCore("UserGuiEnabled", false)
StarterGui:SetCore("IsChatVisible", false)
local gui = Instance.new("ScreenGui")
gui.Name = "TimeGUI"
gui.Parent = player.PlayerGui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 100)
frame.Position = UDim2.new(0, 10, 0, 10)
frame.BackgroundTransparency = 0.8
frame.BackgroundColor3 = Color3.new(0, 0, 0)
frame.BorderSizePixel = 0
frame.Parent = gui
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.Position = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.Text = ("День: "..dayOfWeek.."\nВремя:"..game.Lighting.ClockTime)
label.Font = Enum.Font.SourceSansBold
label.TextColor3 = Color3.new(1, 1, 1)
label.TextSize = 18
label.Parent = frame
end)
Players.PlayerRemoving:Connect(function(player)
player.PlayerGui:FindFirstChild("TimeGUI"):Destroy()
end)
return {} сделай так чтобы время суток менялось | c99e849819462049d3b8acd6673c22b2 | {
"intermediate": 0.29892101883888245,
"beginner": 0.38431015610694885,
"expert": 0.3167688548564911
} |
15,039 | local Lighting = game:GetService("Lighting")
local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local TweenService = game:GetService("TweenService")
local dayOfWeek = {"Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота", "Воскресенье"}
local JobLocation = Vector3.new(0, 500, 0) -- координаты блока Job
local SchoolLocation = Vector3.new(0, 600, 0) -- координаты блока School
local HomeLocation = Vector3.new(0, 800, 0) -- координаты блока Home
local ShopLocation = Vector3.new(0, 1000, 0) -- координаты блока Shop
local timeCycle = {
{time = 0, speed = 1}, -- ночь
{time = 600, speed = 8}, -- утро
{time = 900, speed = 4}, -- день
{time = 1800, speed = 1}, -- вечер
{time = 2400, speed = 2} -- ночь
}
local function getDayOfWeek()
return dayOfWeek[(math.floor(tick() / 86400) % 7) + 1]
end
local function updateTimeGui()
local time = Lighting:GetMinutesAfterMidnight()
local minutes = math.floor(time % 60)
local hours = math.floor(time / 60)
StarterGui:SetCore("SendNotification", {
Title = "Время суток";
Text = string.format("День: %s\nВремя: %02d:%02d", getDayOfWeek(), hours, minutes);
Duration = 1;
})
end
local function updateNPCs()
local NPCs = Workspace.Civilians:GetChildren()
for _, NPC in ipairs(NPCs) do
local age = NPC:FindFirstChild("Age") and NPC.Age.Value or 0
local busy = NPC:FindFirstChild("Busy") and NPC.Busy.Value or false
local path = Instance.new("Pathfinding")
local partToGo
if age < 18 then
if busy then
partToGo = SchoolLocation
else
partToGo = HomeLocation
end
else
if busy then
partToGo = JobLocation
else
partToGo = HomeLocation
end
end
path:ComputeAsync(NPC.HumanoidRootPart.Position, partToGo)
local waypoints = path:GetWaypoints()
for _, waypoint in ipairs(waypoints) do
local moveTween = TweenService:Create(NPC.HumanoidRootPart, TweenInfo.new(waypoint.Action == Enum.PathWaypointAction.Jump and 0.5 or 1), {
CFrame = waypoint.Position
})
moveTween:Play()
moveTween.Completed:Wait()
end
NPC.Humanoid:MoveTo(partToGo)
if partToGo == HomeLocation or partToGo == ShopLocation then
if busy then
NPC.Busy.Value = false
else
NPC.Busy.Value = true
end
end
end
end
Lighting.TimeOfDay = 0
game:GetService("RunService").Heartbeat:Connect(function()
local time = Lighting:GetMinutesAfterMidnight()
for i = 1, #timeCycle do
if time >= timeCycle[i].time and time < timeCycle[i + 1].time then
Lighting.ClockTime = i
wait(1 / timeCycle[i].speed)
break
end
end
updateTimeGui()
if time % 60 >= 55 then
updateNPCs()
end
end)
StarterGui:SetCore("TopbarEnabled", false)
StarterGui:SetCore("ChatBarDisabled", true)
StarterGui:SetCore("Stats", true) -- Показывать Fps и Ping игрока
for _, player in ipairs(Players:GetPlayers()) do
StarterGui:SetCore("UserGuiEnabled", false)
StarterGui:SetCore("IsChatVisible", false)
local gui = Instance.new("ScreenGui")
gui.Name = "TimeGUI"
gui.Parent = player.PlayerGui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 100)
frame.Position = UDim2.new(0, 10, 0, 10)
frame.BackgroundTransparency = 0.8
frame.BackgroundColor3 = Color3.new(0, 0, 0)
frame.BorderSizePixel = 0
frame.Parent = gui
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.Position = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.Text = ("День: "..dayOfWeek.."\nВремя:"..game.Lighting.ClockTime)
label.Font = Enum.Font.SourceSansBold
label.TextColor3 = Color3.new(1, 1, 1)
label.TextSize = 18
label.Parent = frame
end
Players.PlayerAdded:Connect(function(player)
StarterGui:SetCore("UserGuiEnabled", false)
StarterGui:SetCore("IsChatVisible", false)
local gui = Instance.new("ScreenGui")
gui.Name = "TimeGUI"
gui.Parent = player.PlayerGui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 100)
frame.Position = UDim2.new(0, 10, 0, 10)
frame.BackgroundTransparency = 0.8
frame.BackgroundColor3 = Color3.new(0, 0, 0)
frame.BorderSizePixel = 0
frame.Parent = gui
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.Position = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.Text = ("День: "..dayOfWeek.."\nВремя:"..game.Lighting.ClockTime)
label.Font = Enum.Font.SourceSansBold
label.TextColor3 = Color3.new(1, 1, 1)
label.TextSize = 18
label.Parent = frame
end)
Players.PlayerRemoving:Connect(function(player)
player.PlayerGui:FindFirstChild("TimeGUI"):Destroy()
end)
return {} проверь мой скрипт. Почему-то время не меняется и дата не меняется | d115d01eb36c5665267764fc48fdc9e0 | {
"intermediate": 0.29892101883888245,
"beginner": 0.38431015610694885,
"expert": 0.3167688548564911
} |
15,040 | local Lighting = game:GetService("Lighting")
local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local TweenService = game:GetService("TweenService")
local dayOfWeek = {"Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота", "Воскресенье"}
local JobLocation = Vector3.new(0, 500, 0) -- координаты блока Job
local SchoolLocation = Vector3.new(0, 600, 0) -- координаты блока School
local HomeLocation = Vector3.new(0, 800, 0) -- координаты блока Home
local ShopLocation = Vector3.new(0, 1000, 0) -- координаты блока Shop
local timeCycle = {
{time = 0, speed = 1}, -- ночь
{time = 600, speed = 8}, -- утро
{time = 900, speed = 4}, -- день
{time = 1800, speed = 1}, -- вечер
{time = 2400, speed = 2} -- ночь
}
local function getDayOfWeek()
return dayOfWeek[(math.floor(tick() / 86400) % 7) + 1]
end
local function updateTimeGui()
local time = Lighting:GetMinutesAfterMidnight()
local minutes = math.floor(time % 60 + 0.5)
local hours = math.floor(time / 60)
StarterGui:SetCore("SendNotification", {
Title = "Время суток";
Text = string.format("День: %s\nВремя: %02d:%02d", getDayOfWeek(), hours, minutes);
Duration = 1;
})
end
local function updateNPCs()
local NPCs = Workspace.Civilians:GetChildren()
for _, NPC in ipairs(NPCs) do
local age = NPC:FindFirstChild("Age") and NPC.Age.Value or 0
local busy = NPC:FindFirstChild("Busy") and NPC.Busy.Value or false
local path = Instance.new("Pathfinding")
local partToGo
if age < 18 then
if busy then
partToGo = SchoolLocation
else
partToGo = HomeLocation
end
else
if busy then
partToGo = JobLocation
else
partToGo = HomeLocation
end
end
path:ComputeAsync(NPC.HumanoidRootPart.Position, partToGo)
local waypoints = path:GetWaypoints()
for _, waypoint in ipairs(waypoints) do
local moveTween = TweenService:Create(NPC.HumanoidRootPart, TweenInfo.new(waypoint.Action == Enum.PathWaypointAction.Jump and 0.5 or 1), {
CFrame = waypoint.Position
})
moveTween:Play()
moveTween.Completed:Wait()
end
NPC.Humanoid:MoveTo(partToGo)
if partToGo == HomeLocation or partToGo == ShopLocation then
if busy then
NPC.Busy.Value = false
else
NPC.Busy.Value = true
end
end
end
end
Lighting.TimeOfDay = 0
game:GetService("RunService").Heartbeat:Connect(function()
local time = Lighting:GetMinutesAfterMidnight()
for i = 1, #timeCycle do
if time >= timeCycle[i].time and (i + 1 <= #timeCycle and time < timeCycle[i + 1].time) then
Lighting.ClockTime = i
wait(1 / timeCycle[i].speed)
break
end
end
updateTimeGui()
if time % 60 >= 55 then
updateNPCs()
end
end)
StarterGui:SetCore("TopbarEnabled", false)
StarterGui:SetCore("ChatBarDisabled", true)
StarterGui:SetCore("Stats", true) -- Показывать Fps и Ping игрока
for _, player in ipairs(Players:GetPlayers()) do
StarterGui:SetCore("UserGuiEnabled", false)
StarterGui:SetCore("IsChatVisible", false)
local gui = Instance.new("ScreenGui")
gui.Name = "TimeGUI"
gui.Parent = player.PlayerGui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 100)
frame.Position = UDim2.new(0, 10, 0, 10)
frame.BackgroundTransparency = 0.8
frame.BackgroundColor3 = Color3.new(0, 0, 0)
frame.BorderSizePixel = 0
frame.Parent = gui
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.Position = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.Text = ("День: "..dayOfWeek.."\nВремя:"..game.Lighting.ClockTime)
label.Font = Enum.Font.SourceSansBold
label.TextColor3 = Color3.new(1, 1, 1)
label.TextSize = 18
label.Parent = frame
end
Players.PlayerAdded:Connect(function(player)
StarterGui:SetCore("UserGuiEnabled", false)
StarterGui:SetCore("IsChatVisible", false)
local gui = Instance.new("ScreenGui")
gui.Name = "TimeGUI"
gui.Parent = player.PlayerGui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 100)
frame.Position = UDim2.new(0, 10, 0, 10)
frame.BackgroundTransparency = 0.8
frame.BackgroundColor3 = Color3.new(0, 0, 0)
frame.BorderSizePixel = 0
frame.Parent = gui
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.Position = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.Text = ("День: "..dayOfWeek.."\nВремя:"..game.Lighting.ClockTime)
label.Font = Enum.Font.SourceSansBold
label.TextColor3 = Color3.new(1, 1, 1)
label.TextSize = 18
label.Parent = frame
end)
Players.PlayerRemoving:Connect(function(player)
player.PlayerGui:FindFirstChild("TimeGUI"):Destroy()
end)
return {} почему то создается рамка в startergui, но время и день недели не пишутся. Так же в консоль выходит warn "StarterGui:SetCore must be called from a local script.". Раздели пожалуйста все клиентские функции и серверный по отдельности чтобы я мог распределить их на отдельные скрипты | ac3a2b911c865c65b1c3bc09a138309b | {
"intermediate": 0.2888001501560211,
"beginner": 0.426447331905365,
"expert": 0.2847524583339691
} |
15,041 | local Lighting = game:GetService("Lighting")
local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local TweenService = game:GetService("TweenService")
local dayOfWeek = {"Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота", "Воскресенье"}
local JobLocation = Vector3.new(0, 500, 0) -- координаты блока Job
local SchoolLocation = Vector3.new(0, 600, 0) -- координаты блока School
local HomeLocation = Vector3.new(0, 800, 0) -- координаты блока Home
local ShopLocation = Vector3.new(0, 1000, 0) -- координаты блока Shop
local timeCycle = {
{time = 0, speed = 1}, -- ночь
{time = 600, speed = 8}, -- утро
{time = 900, speed = 4}, -- день
{time = 1800, speed = 1}, -- вечер
{time = 2400, speed = 2} -- ночь
}
local function getDayOfWeek()
return dayOfWeek[(math.floor(tick() / 86400) % 7) + 1]
end
local function updateTimeGui()
local time = Lighting:GetMinutesAfterMidnight()
local minutes = math.floor(time % 60)
local hours = math.floor(time / 60)
end
local function updateNPCs()
local NPCs = Workspace.Civilians:GetChildren()
for _, NPC in ipairs(NPCs) do
local age = NPC:FindFirstChild("Age") and NPC.Age.Value or 0
local busy = NPC:FindFirstChild("Busy") and NPC.Busy.Value or false
local path = Instance.new("Pathfinding")
local partToGo
if age < 18 then
if busy then
partToGo = SchoolLocation
else
partToGo = HomeLocation
end
else
if busy then
partToGo = JobLocation
else
partToGo = HomeLocation
end
end
path:ComputeAsync(NPC.HumanoidRootPart.Position, partToGo)
local waypoints = path:GetWaypoints()
for _, waypoint in ipairs(waypoints) do
local moveTween = TweenService:Create(NPC.HumanoidRootPart, TweenInfo.new(waypoint.Action == Enum.PathWaypointAction.Jump and 0.5 or 1), {
CFrame = waypoint.Position
})
moveTween:Play()
moveTween.Completed:Wait()
end
NPC.Humanoid:MoveTo(partToGo)
if partToGo == HomeLocation or partToGo == ShopLocation then
if busy then
NPC.Busy.Value = false
else
NPC.Busy.Value = true
end
end
end
end
Lighting.TimeOfDay = 0
game:GetService("RunService").Heartbeat:Connect(function()
local time = Lighting:GetMinutesAfterMidnight()
for i = 1, #timeCycle do
if time >= timeCycle[i].time and time < timeCycle[i + 1].time then
Lighting.ClockTime = i
wait(1 / timeCycle[i].speed)
break
end
end
updateTimeGui()
if time % 60 >= 55 then
updateNPCs()
end
end)
for _, player in ipairs(Players:GetPlayers()) do
local gui = Instance.new("ScreenGui")
gui.Name = "TimeGUI"
gui.Parent = player.PlayerGui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 100)
frame.Position = UDim2.new(0, 10, 0, 10)
frame.BackgroundTransparency = 0.8
frame.BackgroundColor3 = Color3.new(0, 0, 0)
frame.BorderSizePixel = 0
frame.Parent = gui
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.Position = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.Text = ("День: "..dayOfWeek[game.Lighting.ClockTime].." Время:"..game.Lighting.ClockTime)
label.Font = Enum.Font.SourceSansBold
label.TextColor3 = Color3.new(1, 1, 1)
label.TextSize = 18
label.Parent = frame
end
Players.PlayerAdded:Connect(function(player)
local gui = Instance.new("ScreenGui")
gui.Name = "TimeGUI"
gui.Parent = player.PlayerGui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 100)
frame.Position = UDim2.new(0, 10, 0, 10)
frame.BackgroundTransparency = 0.8
frame.BackgroundColor3 = Color3.new(0, 0, 0)
frame.BorderSizePixel = 0
frame.Parent = gui
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.Position = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.Text = ("День: "..dayOfWeek[game.Lighting.ClockTime].." Время:"..game.Lighting.ClockTime)
label.Font = Enum.Font.SourceSansBold
label.TextColor3 = Color3.new(1, 1, 1)
label.TextSize = 18
label.Parent = frame
end)
Players.PlayerRemoving:Connect(function(player)
player.PlayerGui:FindFirstChild("TimeGUI"):Destroy()
end)
return {} сделай так чтобы время шло и чтобы у клиентов обновлялось время и день недели регулярно | f9acb89ac5871a48430f8150840ad0dc | {
"intermediate": 0.29784756898880005,
"beginner": 0.4585071802139282,
"expert": 0.24364520609378815
} |
15,042 | local Lighting = game:GetService("Lighting")
local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local TweenService = game:GetService("TweenService")
local dayOfWeek = {"Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота", "Воскресенье"}
local UpdateTimeEvent = Instance.new("RemoteEvent")
UpdateTimeEvent.Name = "UpdateTimeEvent"
UpdateTimeEvent.Parent = game.ReplicatedStorage
local GetDayOfWeekFunction = Instance.new("RemoteFunction")
GetDayOfWeekFunction.Name = "GetDayOfWeekFunction"
GetDayOfWeekFunction.Parent = game.ReplicatedStorage
local JobLocation = Vector3.new(0, 500, 0) -- координаты блока Job
local SchoolLocation = Vector3.new(0, 600, 0) -- координаты блока School
local HomeLocation = Vector3.new(0, 800, 0) -- координаты блока Home
local ShopLocation = Vector3.new(0, 1000, 0) -- координаты блока Shop
local timeCycle = {
{time = 0, speed = 1}, -- ночь
{time = 600, speed = 8}, -- утро
{time = 900, speed = 4}, -- день
{time = 1800, speed = 1}, -- вечер
{time = 2400, speed = 2} -- ночь
}
local function getDayOfWeek()
return dayOfWeek[(math.floor(tick() / 86400) % 7) + 1]
end
local function updateTimeGui()
local time = Lighting:GetMinutesAfterMidnight()
local minutes = math.floor(time % 60)
local hours = math.floor(time / 60)
end
game:GetService("RunService").Heartbeat:Connect(function()
-- ваш код обновления времени
local time = Lighting:GetMinutesAfterMidnight()
local dayOfWeek = getDayOfWeek()
-- передача информации клиентам
UpdateTimeEvent:FireAllClients(time, dayOfWeek)
end)
local function updateNPCs()
local NPCs = Workspace.Civilians:GetChildren()
for _, NPC in ipairs(NPCs) do
local age = NPC:FindFirstChild("Age") and NPC.Age.Value or 0
local busy = NPC:FindFirstChild("Busy") and NPC.Busy.Value or false
local path = Instance.new("Pathfinding")
local partToGo
if age < 18 then
if busy then
partToGo = SchoolLocation
else
partToGo = HomeLocation
end
else
if busy then
partToGo = JobLocation
else
partToGo = HomeLocation
end
end
path:ComputeAsync(NPC.HumanoidRootPart.Position, partToGo)
local waypoints = path:GetWaypoints()
for _, waypoint in ipairs(waypoints) do
local moveTween = TweenService:Create(NPC.HumanoidRootPart, TweenInfo.new(waypoint.Action == Enum.PathWaypointAction.Jump and 0.5 or 1), {
CFrame = waypoint.Position
})
moveTween:Play()
moveTween.Completed:Wait()
end
NPC.Humanoid:MoveTo(partToGo)
if partToGo == HomeLocation or partToGo == ShopLocation then
if busy then
NPC.Busy.Value = false
else
NPC.Busy.Value = true
end
end
end
end
Lighting.TimeOfDay = 0
game:GetService("RunService").Heartbeat:Connect(function()
local time = Lighting:GetMinutesAfterMidnight()
for i = 1, #timeCycle do
if time >= timeCycle[i].time and time < timeCycle[i + 1].time then
Lighting.ClockTime = i
wait(1 / timeCycle[i].speed)
break
end
end
updateTimeGui()
if time % 60 >= 55 then
updateNPCs()
end
end)
for _, player in ipairs(Players:GetPlayers()) do
local gui = Instance.new("ScreenGui")
gui.Name = "TimeGUI"
gui.Parent = player.PlayerGui
script.LocalScript:Clone().Parent = gui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 100)
frame.Position = UDim2.new(0, 10, 0, 10)
frame.BackgroundTransparency = 0.8
frame.BackgroundColor3 = Color3.new(0, 0, 0)
frame.BorderSizePixel = 0
frame.Parent = gui
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.Position = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.Text = ("День: "..dayOfWeek[game.Lighting.ClockTime].." Время:"..game.Lighting.ClockTime)
label.Font = Enum.Font.SourceSansBold
label.TextColor3 = Color3.new(1, 1, 1)
label.TextSize = 18
label.Parent = frame
end
Players.PlayerAdded:Connect(function(player)
local gui = Instance.new("ScreenGui")
gui.Name = "TimeGUI"
gui.Parent = player.PlayerGui
script.LocalScript:Clone().Parent = gui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 100)
frame.Position = UDim2.new(0, 10, 0, 10)
frame.BackgroundTransparency = 0.8
frame.BackgroundColor3 = Color3.new(0, 0, 0)
frame.BorderSizePixel = 0
frame.Parent = gui
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.Position = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.Text = ("День: "..dayOfWeek[game.Lighting.ClockTime].." Время:"..game.Lighting.ClockTime)
label.Font = Enum.Font.SourceSansBold
label.TextColor3 = Color3.new(1, 1, 1)
label.TextSize = 18
label.Parent = frame
end)
Players.PlayerRemoving:Connect(function(player)
player.PlayerGui:FindFirstChild("TimeGUI"):Destroy()
end)
return {} can you make time go faster? it feels like it doesnt event work. Can u check time script? | 45ec6cce43115eb7c8151a39eb104bad | {
"intermediate": 0.19554825127124786,
"beginner": 0.5746074318885803,
"expert": 0.22984424233436584
} |
15,043 | local Lighting = game:GetService("Lighting")
local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local TweenService = game:GetService("TweenService")
local dayOfWeek = {"Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота", "Воскресенье"}
local UpdateTimeEvent = Instance.new("RemoteEvent")
UpdateTimeEvent.Name = "UpdateTimeEvent"
UpdateTimeEvent.Parent = game.ReplicatedStorage
local JobLocation = Vector3.new(0, 500, 0) -- координаты блока Job
local SchoolLocation = Vector3.new(0, 600, 0) -- координаты блока School
local HomeLocation = Vector3.new(0, 800, 0) -- координаты блока Home
local ShopLocation = Vector3.new(0, 1000, 0) -- координаты блока Shop
local timeCycle = {
{time = 0, speed = 4}, -- night
{time = 600, speed = 16}, -- morning
{time = 900, speed = 8}, -- day
{time = 1800, speed = 2}, -- evening
{time = 2400, speed = 4} -- night
}
local function getDayOfWeek()
return dayOfWeek[(math.floor(tick() / 86400) % 7) + 1]
end
local function updateTimeGui()
local time = Lighting:GetMinutesAfterMidnight()
local minutes = math.floor(time % 60)
local hours = math.floor(time / 60)
end
game:GetService("RunService").Heartbeat:Connect(function()
-- ваш код обновления времени
local time = Lighting:GetMinutesAfterMidnight()
local dayOfWeek = getDayOfWeek()
-- передача информации клиентам
UpdateTimeEvent:FireAllClients(time, dayOfWeek)
end)
local function updateNPCs()
local NPCs = Workspace.Civilians:GetChildren()
for _, NPC in ipairs(NPCs) do
local age = NPC:FindFirstChild("Age") and NPC.Age.Value or 0
local busy = NPC:FindFirstChild("Busy") and NPC.Busy.Value or false
local path = Instance.new("Pathfinding")
local partToGo
if age < 18 then
if busy then
partToGo = SchoolLocation
else
partToGo = HomeLocation
end
else
if busy then
partToGo = JobLocation
else
partToGo = HomeLocation
end
end
path:ComputeAsync(NPC.HumanoidRootPart.Position, partToGo)
local waypoints = path:GetWaypoints()
for _, waypoint in ipairs(waypoints) do
local moveTween = TweenService:Create(NPC.HumanoidRootPart, TweenInfo.new(waypoint.Action == Enum.PathWaypointAction.Jump and 0.5 or 1), {
CFrame = waypoint.Position
})
moveTween:Play()
moveTween.Completed:Wait()
end
NPC.Humanoid:MoveTo(partToGo)
if partToGo == HomeLocation or partToGo == ShopLocation then
if busy then
NPC.Busy.Value = false
else
NPC.Busy.Value = true
end
end
end
end
Lighting.TimeOfDay = 0
game:GetService("RunService").Heartbeat:Connect(function()
local time = Lighting:GetMinutesAfterMidnight()
for i = 1, #timeCycle do
if time >= timeCycle[i].time and time < timeCycle[i + 1].time then
Lighting.ClockTime = i
wait(1 / timeCycle[i].speed)
break
end
end
updateTimeGui()
if time % 60 >= 55 then
updateNPCs()
end
end)
for _, player in ipairs(Players:GetPlayers()) do
local gui = Instance.new("ScreenGui")
gui.Name = "TimeGUI"
gui.Parent = player.PlayerGui
script.LocalScript:Clone().Parent = gui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 100)
frame.Position = UDim2.new(0, 10, 0, 10)
frame.BackgroundTransparency = 0.8
frame.BackgroundColor3 = Color3.new(0, 0, 0)
frame.BorderSizePixel = 0
frame.Parent = gui
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.Position = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.Text = ""
label.Font = Enum.Font.SourceSansBold
label.TextColor3 = Color3.new(1, 1, 1)
label.TextSize = 18
label.Parent = frame
end
Players.PlayerAdded:Connect(function(player)
local gui = Instance.new("ScreenGui")
gui.Name = "TimeGUI"
gui.Parent = player.PlayerGui
script.LocalScript:Clone().Parent = gui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 100)
frame.Position = UDim2.new(0, 10, 0, 10)
frame.BackgroundTransparency = 0.8
frame.BackgroundColor3 = Color3.new(0, 0, 0)
frame.BorderSizePixel = 0
frame.Parent = gui
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.Position = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.Text = ""
label.Font = Enum.Font.SourceSansBold
label.TextColor3 = Color3.new(1, 1, 1)
label.TextSize = 18
label.Parent = frame
end)
Players.PlayerRemoving:Connect(function(player)
player.PlayerGui:FindFirstChild("TimeGUI"):Destroy()
end)
return {} роблокс выдает ошибку "Remote event invocation queue exhausted for ReplicatedStorage.UpdateTimeEvent; did you forget to implement OnClientEvent?", а еще время не идет | 72e63325e040240341f71502af50865a | {
"intermediate": 0.24941779673099518,
"beginner": 0.4721023440361023,
"expert": 0.2784798741340637
} |
15,044 | explain pubsub coding to me | b0b6a9c164e1092687349a36865c2e10 | {
"intermediate": 0.23781438171863556,
"beginner": 0.5185083746910095,
"expert": 0.2436772733926773
} |
15,045 | how to add tracking and spacing to a text in jetpack compose kotlin | 463a108255926bcefe8a7c741e444801 | {
"intermediate": 0.39389801025390625,
"beginner": 0.1866234540939331,
"expert": 0.41947850584983826
} |
15,046 | how to return upgrade page in Nginx | 662dea7c2b1c97255bf68bee08ca78cb | {
"intermediate": 0.4265037477016449,
"beginner": 0.28547045588493347,
"expert": 0.288025826215744
} |
15,047 | Example: Draw UML diagram for the below system
A bank system contains data on customers(identified by name and address) and their accounts.
Each account has a balance and there are 2 type of accounts: one for savings which offers an interest rate, the other for investments, used to buy stocks.
Stocks are bought at a certain quantity for a certain price (ticker) and the bank applies commission on stock orders | 16478fc09981d5e37be9c8b29ad4da31 | {
"intermediate": 0.4231113791465759,
"beginner": 0.31107205152511597,
"expert": 0.2658165693283081
} |
15,048 | bash: /home/lysen/.conda/envs/ax/bin/pip: /home/byu/.conda/envs/ax/bin/python: bad interpreter: Permission denied | 21bb901735f5ea20c4e29e5e370746d0 | {
"intermediate": 0.3494957983493805,
"beginner": 0.3652237057685852,
"expert": 0.2852804958820343
} |
15,049 | Please write sample code that can get input parameter in AWS Lambda | 0d475eafccd4a67d691e88fc360c36de | {
"intermediate": 0.6087295413017273,
"beginner": 0.1693117320537567,
"expert": 0.2219586968421936
} |
15,050 | i would like to show you a char sheet for a char im devloping for dndn 5e i would like you to help me finish some of the details, i will provide you will all current details first . i will then give you the task at hand i would like you to achive for me please dont recite the input back im trying to void token limits | 536720eae3ac8302e892acbb48dd9001 | {
"intermediate": 0.38918179273605347,
"beginner": 0.2752031087875366,
"expert": 0.33561503887176514
} |
15,051 | Переведи это c c# на c++ glm Vector3D.Transform(
new Vector3D<float>(0, 0, 1),
Matrix4X4.CreateFromYawPitchRoll(-Rotation.Y, Rotation.X, Rotation.Z)); | 14943d1df258c916c8493393d1f414d0 | {
"intermediate": 0.3571978211402893,
"beginner": 0.38563036918640137,
"expert": 0.2571718692779541
} |
15,052 | using rust dioxus to render a select with a lot option | f3e890be4c57e9ef8abb645e5fe35261 | {
"intermediate": 0.36539649963378906,
"beginner": 0.2606915831565857,
"expert": 0.37391191720962524
} |
15,053 | can you teach me lambda in kotlin please, as simple as possible | bb52bf3b1a527948f926a64df9ee38c4 | {
"intermediate": 0.4135311543941498,
"beginner": 0.37572431564331055,
"expert": 0.2107444554567337
} |
15,054 | teach me how to program in c | 48276fac0ef33caa0766511018e429df | {
"intermediate": 0.2675881087779999,
"beginner": 0.26995810866355896,
"expert": 0.4624537527561188
} |
15,055 | prisma findmany latest post by on createdAt field | f1f7af1aed5b112df690857f4b450365 | {
"intermediate": 0.33032700419425964,
"beginner": 0.25230783224105835,
"expert": 0.4173651337623596
} |
15,056 | prisma error The table `post` does not exist in the current database | 0355ff2cca00d5c00e034ffd462b9dec | {
"intermediate": 0.29984739422798157,
"beginner": 0.33450400829315186,
"expert": 0.3656485974788666
} |
15,057 | id_user = models.AutoField( primary_key=True)
nm_useraccountname = models.CharField( max_length=50)
nm_useraccountpassword = models.CharField( max_length=15)
i uswed these modles for both registration adn login html
from django.contrib import messages
from django.contrib.auth import authenticate, login
from django.shortcuts import render, redirect
from .forms import LoginForm
def login_view(request):
if request.method == 'POST':
form = LoginForm(request.POST)
if form.is_valid():
username = form.cleaned_data['nm_useraccountname']
password = form.cleaned_data['nm_useraccountname']
user = authenticate(request, username=username, password=password)
print(f"Username: {username}, Password: {password}")
if user is not None:
login(request, user)
messages.success(request, 'Login successful.')
return redirect('datavieww')
else:
messages.error(request, 'Invalid username or password.')
else:
form = LoginForm()
return render(request, 'accounts/loginn.html', {'form': form})
my login views
{% load static %}
{% load widget_tweaks %}
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" integrity="sha384-gfdkjb5BdAXd+lj+gudLWI+BXq4IuLW5IT+brZEZsLFm++aCMlF1V92rMkPaX4PP" crossorigin="anonymous">
<style>
body,
html {
margin: 0;
padding: 0;
height: 100%;
background: #7abecc !important;
}
.user_card {
width: 350px;
margin-top: auto;
margin-bottom: auto;
background: #74cfbf;
position: relative;
display: flex;
justify-content: center;
flex-direction: column;
padding: 10px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
-webkit-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
-moz-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 5px;
}
.form_container {
margin-top: 20px;
}
#form-title{
color: #fff;
}
.login_btn {
width: 100%;
background: #33ccff !important;
color: white !important;
}
.login_btn:focus {
box-shadow: none !important;
outline: 0px !important;
}
.login_container {
padding: 0 2rem;
}
.input-group-text {
background: #f7ba5b !important;
color: white !important;
border: 0 !important;
border-radius: 0.25rem 0 0 0.25rem !important;
}
.input_user,
.input_pass:focus {
box-shadow: none !important;
outline: 0px !important;
}
#messages{
background-color: grey;
color: #fff;
padding: 10px;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="container h-100">
<div class="d-flex justify-content-center h-100">
<div class="user_card">
<div class="d-flex justify-content-center">
<h3 id="form-title">LOGIN</h3>
</div>
<div class="d-flex justify-content-center form_container">
<form method="POST" action="">
{% csrf_token %}
<div class="input-group mb-3">
<div class="input-group-append">
<span class="input-group-text"><i class="fas fa-user"></i></span>
</div>
<input type="text" name="nm_useraccountname" placeholder="Username..." class="form-control">
</div>
<div class="input-group mb-2">
<div class="input-group-append">
<span class="input-group-text"><i class="fas fa-key"></i></span>
</div>
<input type="password" name="nm_useraccountname" placeholder="Password..." class="form-control" >
</div>
<div class="d-flex justify-content-center mt-3 login_container">
<input class="btn login_btn" type="submit" value="Login">
</div>
</form>
</div>
<div class="mt-4">
<div class="d-flex justify-content-center links">
Don't have an account? <a href="{% url 'registration' %}" class="ml-2">Sign Up</a>
</div>
<div class="mt-4">
<div class="d-flex justify-content-center links">
forgot password? <a href="{% url 'reset_password' %}" class="ml-2">forgot password</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
my login template
ind errors i anot login | c9465bb3c05eb45dfb01f59de4200c2f | {
"intermediate": 0.2029624581336975,
"beginner": 0.6165096163749695,
"expert": 0.18052789568901062
} |
15,058 | Who is the prime minister of India? | e225f3be02c08076b29c9dd40dafd219 | {
"intermediate": 0.4055582582950592,
"beginner": 0.24003298580646515,
"expert": 0.35440871119499207
} |
15,059 | I want you to act as a Linux terminal. I will enter commands and you will reply with what the terminal should display. I want you to reply only with the terminal output in a single code block, nothing else. Don’t write explanations. Don’t type commands unless I instruct you to do so. When I need to tell you something in English, I will put the text in brackets [like this]. I need you to 给我创建一个react项目. Your default directory is /app, which has this project. My first command is [history] | c8fd611c736627f9308300cae96e3568 | {
"intermediate": 0.2930895984172821,
"beginner": 0.25938689708709717,
"expert": 0.4475235044956207
} |
15,060 | current time in linux | 5ddc66915de5caf258fae11ccaff93fb | {
"intermediate": 0.34990638494491577,
"beginner": 0.25124219059944153,
"expert": 0.3988513946533203
} |
15,061 | I want you to act as a Linux terminal. I will enter commands and you will reply with what the terminal should display. I want you to reply only with the terminal output in a single code block, nothing else. Don’t write explanations. Don’t type commands unless I instruct you to do so. When I need to tell you something in English, I will put the text in brackets [like this]. I need you to 给我创建一个react项目. Your default directory is /app, which has this project. My first command is [tree] | 258a54605a08cc2f2f66337a4544bf52 | {
"intermediate": 0.29452431201934814,
"beginner": 0.25336912274360657,
"expert": 0.4521065950393677
} |
15,062 | write a program in python to generate random, valid, and legitamate user agents an actual device might use | cae6b2faabf536968f0c85976e8f600d | {
"intermediate": 0.27148202061653137,
"beginner": 0.0932149738073349,
"expert": 0.6353030204772949
} |
15,063 | can a broswer extension edit your user agent | 4834734e88b512dcead10a7ac73069b7 | {
"intermediate": 0.5633208155632019,
"beginner": 0.1453508734703064,
"expert": 0.2913282811641693
} |
15,064 | make a temple os user agent, does not have to be real | c50717cd243e37445595bddea6c53dcc | {
"intermediate": 0.36766499280929565,
"beginner": 0.2211945354938507,
"expert": 0.41114047169685364
} |
15,065 | Can you give exercise standard administration and gust account | 67e1c0ed9379791499cb92f99a31d149 | {
"intermediate": 0.45186084508895874,
"beginner": 0.355170339345932,
"expert": 0.19296878576278687
} |
15,066 | public int smallestEvenMultiple(int n) {
return n << (n & 1);
} Что означет в данном случае <<? | 8ee95a1019cb39930398ded9a8502a0e | {
"intermediate": 0.28473636507987976,
"beginner": 0.4313327372074127,
"expert": 0.2839309275150299
} |
15,067 | shift(1) | db4613e301f1a26cea69dcd644de906b | {
"intermediate": 0.35618728399276733,
"beginner": 0.25328338146209717,
"expert": 0.3905293643474579
} |
15,068 | Python read 大聪明 file | 10d752c461ad25be36ca7d7c85b22dce | {
"intermediate": 0.3204323649406433,
"beginner": 0.34262827038764954,
"expert": 0.33693939447402954
} |
15,069 | av_frame_alloc | 45cd2247a68a103b73792fbcd1882886 | {
"intermediate": 0.27294301986694336,
"beginner": 0.29146578907966614,
"expert": 0.4355911910533905
} |
15,070 | is there an R package that convert xlsx files to html in R | 5392f8412c38e19ace2df2e7d13b5caa | {
"intermediate": 0.4770302176475525,
"beginner": 0.1741710752248764,
"expert": 0.3487987220287323
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.