-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
• Adicionado daily quest (prêmios ainda não configurados). • Ajustes nos eventos duca, battlefield e zombie. • Adicionado a função splitTrimmed (TFS). • Reajustado o save para cada 3 horas na função onTimer (retirado função onThink). • Reajuste na função withdrawMoney. • Reajstado vários scripts com funções antigas (compat.lua). • Fixado vários monstros (TFS). • Adicionado NPC que vende items por event coins. • Ajustes na pasta das quests. • Vários outros ajustes no mapa e no datapack.
- Loading branch information
1 parent
6399073
commit 2a58f31
Showing
84 changed files
with
343 additions
and
281 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
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
File renamed without changes.
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
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
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,46 @@ | ||
local days = { | ||
[1] = {2160, 1, "first"}, | ||
[2] = {2160, 2, "second"}, | ||
[3] = {2160, 3, "third"}, | ||
[4] = {2160, 4, "fourth"}, | ||
[5] = {2160, 5, "fifth"}, | ||
[6] = {2160, 6, "sixth"}, | ||
[7] = {2160, 7, "seventh"} | ||
} | ||
|
||
function onUse(player, item, fromPosition, target, toPosition, isHotkey) | ||
|
||
local timeQuest = player:getStorageValue(Storage.dailyQuestTime) > 0 and player:getStorageValue(Storage.dailyQuestTime) or 0 | ||
if (timeQuest + 86400) >= os.time() then | ||
player:sendTextMessage(MESSAGE_STATUS_SMALL, "You still can't get the next reward.") | ||
player:getPosition():sendMagicEffect(CONST_ME_POFF) | ||
return true | ||
elseif (timeQuest + 172800) <= os.time() then | ||
player:setStorageValue(Storage.dailyQuest, 1) | ||
end | ||
|
||
local day = player:getStorageValue(Storage.dailyQuest) > 0 and player:getStorageValue(Storage.dailyQuest) or 1 | ||
local dayReward = days[day] | ||
if dayReward then | ||
local reward = ItemType(dayReward[1]) | ||
if reward:getId() ~= 0 then | ||
if player:getFreeCapacity() < reward:getWeight() then | ||
player:sendTextMessage(MESSAGE_STATUS_SMALL, "You don't have capacity.") | ||
player:getPosition():sendMagicEffect(CONST_ME_POFF) | ||
return true | ||
end | ||
|
||
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You received ".. dayReward[2] .." ".. reward:getName() .. " as a reward for the ".. dayReward[3] .." day of daily quest.") | ||
player:addItem(reward:getId(), dayReward[2]) | ||
player:setStorageValue(Storage.dailyQuestTime, os.time()) | ||
|
||
if day == 7 then | ||
player:setStorageValue(Storage.dailyQuest, 1) | ||
else | ||
player:setStorageValue(Storage.dailyQuest, day + 1) | ||
end | ||
end | ||
end | ||
|
||
return true | ||
end |
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
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
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
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
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
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 |
---|---|---|
|
@@ -16,4 +16,4 @@ function onUse(player, item, fromPosition, target, toPosition, isHotkey) | |
end | ||
end | ||
return true | ||
end | ||
end |
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
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
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
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
Oops, something went wrong.