-
-
Notifications
You must be signed in to change notification settings - Fork 647
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into pathfinder-multithread
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
data-otservbr-global/scripts/actions/mounts/haze_mount.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
local config = { | ||
[32629] = { mountId = 162, message = "You are now versed to ride the haze!" }, | ||
} | ||
|
||
local hazemount = Action() | ||
|
||
function hazemount.onUse(player, item, fromPosition, target, toPosition, isHotkey) | ||
local mount = config[item.itemid] | ||
|
||
if not mount then | ||
return true | ||
end | ||
|
||
if not player:hasMount(mount.mountId) then | ||
player:addMount(mount.mountId) | ||
player:say(mount.message, TALKTYPE_MONSTER_SAY) | ||
item:remove(1) | ||
else | ||
player:sendTextMessage(19, "You already have this mount") | ||
end | ||
return true | ||
end | ||
|
||
hazemount:id(32629) | ||
hazemount:register() |