35 lines
747 B
Markdown
35 lines
747 B
Markdown
# test2.js — loop() (satır 76)
|
||
|
||
[← test2.js](index.md) · [← Master](../../wiki.md)
|
||
|
||
```javascript
|
||
function loop(c, uuid)
|
||
{
|
||
c.scheduleScript(LOOP_DELAY, function(context)
|
||
{
|
||
if (mappet.get("grey_world_" + uuid) !== true)
|
||
{
|
||
return;
|
||
}
|
||
|
||
var player = context.getServer().getEntity(uuid);
|
||
|
||
if (player == null || !player.isPlayer())
|
||
{
|
||
return;
|
||
}
|
||
|
||
var blindness = mappet.getPotion("blindness");
|
||
|
||
if (blindness != null && !player.hasPotion(blindness))
|
||
{
|
||
player.applyPotion(blindness, 999999, 0, false);
|
||
}
|
||
|
||
sendFog(player, true);
|
||
|
||
loop(context, uuid);
|
||
});
|
||
}
|
||
```
|