-
Notifications
You must be signed in to change notification settings - Fork 7
/
Mount-Dismount.js
28 lines (26 loc) · 964 Bytes
/
Mount-Dismount.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
////////////////////////////////////////////////////////////////////////////////
// ~ Mount / Dismount~ //
// - Taldor / Quin - //
////////////////////////////////////////////////////////////////////////////////
//
// Ulozeni aktualniho mounta a nasledne mount/dismount pres jeden hotkey.
//
// Pouziti:
// Hotkey -> Run script :
// AddMount() => prida mounta do object listu
// MountAndDismount() => nasedne/ sleze z mounta, nutne prvne ulozit mounta pres AddMount
//
////////////////////////////////////////////////////////////////////////////////
function AddMount() {
Orion.AddObject('myMount');
Orion.Print('-1', 'Target your mount')
}
function MountAndDismount() {
if (!Orion.ObjAtLayer('Mount')) {
if (!Orion.FindObject('myMount'))
AddMount();
else
Orion.UseObject('myMount');
} else
Orion.UseObject('self');
}