43 lines
1.1 KiB
Markdown
43 lines
1.1 KiB
Markdown
# TelekinesiLal.js — handleCommand() (satır 156)
|
||
|
||
[← TelekinesiLal.js](index.md) · [← Master](../../wiki.md)
|
||
|
||
```javascript
|
||
function handleCommand(c, p, args) {
|
||
var text = normalize(args);
|
||
|
||
if (text === "defol" || text === "at" || text === "firlat" || text === "fırlat") {
|
||
var throwState = loadState();
|
||
if (!throwState.active || throwState.mode !== "hold") {
|
||
p.send("\u00a7e[Kisil] Once bir oyuncuyu tutmalisin.");
|
||
return;
|
||
}
|
||
throwHeld(c, p, throwState);
|
||
return;
|
||
}
|
||
|
||
if (text === "birak" || text === "bırak" || text === "sal" || text === "dur") {
|
||
releaseOnly(c, p, false);
|
||
return;
|
||
}
|
||
|
||
if (text === "reset" || text === "temiz") {
|
||
releaseOnly(c, p, true);
|
||
return;
|
||
}
|
||
|
||
var target = getLookPlayer(p, LOOK_RANGE);
|
||
if (!target) {
|
||
p.send("\u00a7e[Kisil] Bir oyuncuya bakip Kisil yaz.");
|
||
return;
|
||
}
|
||
|
||
if (uuidOf(target) === uuidOf(p)) {
|
||
p.send("\u00a7e[Kisil] Kendini tutmaya calisma knk.");
|
||
return;
|
||
}
|
||
|
||
startHold(c, p, target);
|
||
}
|
||
```
|