Skip to content

Commit

Permalink
lasted from otservbr
Browse files Browse the repository at this point in the history
  • Loading branch information
mattyx14 committed Jan 27, 2022
1 parent e747021 commit e1a9a7c
Show file tree
Hide file tree
Showing 1,505 changed files with 7,068 additions and 7,667 deletions.
9 changes: 4 additions & 5 deletions config.lua.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- NOTE: valid values for worldType are: "pvp", "no-pvp" and "pvp-enforced"
worldType = "pvp"
hotkeyAimbotEnabled = true
protectionLevel = 0
protectionLevel = 7
pzLocked = 60 * 1000
removeChargesFromRunes = true
removeChargesFromPotions = true
Expand Down Expand Up @@ -164,14 +164,13 @@ serverSaveShutdown = true
sortLootByChance = true

-- Rates
-- NOTE: rateExp, rateSkill and rateMagic is used when 'rateUseStages = false' - or a fallback only
-- NOTE: rateExp, rateSkill and rateMagic is used as a fallback only
-- To configure rates see file data/stages.lua
rateUseStages = true
rateExp = 1
rateLoot = 3
rateSpawn = 1
rateSkill = 1
rateLoot = 1
rateMagic = 1
rateSpawn = 1

-- Today regeneration condition over an loop every 1 second,
-- so values which should regenerated less then 1 second
Expand Down
178 changes: 87 additions & 91 deletions data/XML/imbuements.xml

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions data/XML/mounts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,13 @@
<mount id="179" clientid="1389" name="Void Watcher" speed="20" premium="no" type="store" />
<mount id="180" clientid="1390" name="Rune Watcher" speed="20" premium="no" type="store" />
<mount id="181" clientid="1391" name="Rift Watcher" speed="20" premium="no" type="store" />
<mount id="182" clientid="1417" name="Phant" speed="20" premium="yes" type="arena" />
<mount id="183" clientid="1430" name="Shellodon" speed="20" premium="yes" type="quest" />
<mount id="184" clientid="1431" name="Singeing Steed" speed="20" premium="yes" type="quest" />
<mount id="185" clientid="1439" name="Hyacinth" speed="20" premium="no" type="store" />
<mount id="186" clientid="1440" name="Peony" speed="20" premium="no" type="store" />
<mount id="187" clientid="1441" name="Dandelion" speed="20" premium="no" type="store" />
<mount id="188" clientid="1446" name="Rustwurm" speed="20" premium="no" type="store" />
<mount id="189" clientid="1447" name="Bogwurm" speed="20" premium="no" type="store" />
<mount id="190" clientid="1448" name="Gloomwurm" speed="20" premium="no" type="store" />
</mounts>
10 changes: 10 additions & 0 deletions data/XML/outfits.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@
<outfit type="0" looktype="1372" name="Rascoohan" premium="yes" unlocked="no" enabled="yes" from="quest" />
<outfit type="0" looktype="1383" name="Merry Garb" premium="no" unlocked="no" enabled="yes" from="store" />
<outfit type="0" looktype="1385" name="Rune Master" premium="no" unlocked="no" enabled="yes" from="store" />
<outfit type="0" looktype="1387" name="Citizen of Issavi" premium="yes" unlocked="no" enabled="yes" from="quest" />
<outfit type="0" looktype="1416" name="Forest Warden" premium="no" unlocked="no" enabled="yes" from="store" />
<outfit type="0" looktype="1437" name="Royal Bounacean Advisor" premium="yes" unlocked="no" enabled="yes" from="quest" />
<outfit type="0" looktype="1445" name="Dragon Knight" premium="no" unlocked="no" enabled="yes" from="store" />
<outfit type="0" looktype="1450" name="Arbalester" premium="no" unlocked="no" enabled="yes" from="store" />

<!-- Male outfits -->
<outfit type="1" looktype="128" name="Citizen" premium="no" unlocked="yes" enabled="yes" />
Expand Down Expand Up @@ -197,4 +202,9 @@
<outfit type="1" looktype="1371" name="Rascoohan" premium="yes" unlocked="no" enabled="yes" from="quest" />
<outfit type="1" looktype="1382" name="Merry Garb" premium="no" unlocked="no" enabled="yes" from="store" />
<outfit type="1" looktype="1384" name="Rune Master" premium="no" unlocked="no" enabled="yes" from="store" />
<outfit type="1" looktype="1386" name="Citizen of Issavi" premium="yes" unlocked="no" enabled="yes" from="quest" />
<outfit type="1" looktype="1415" name="Forest Warden" premium="no" unlocked="no" enabled="yes" from="store" />
<outfit type="1" looktype="1436" name="Royal Bounacean Advisor" premium="yes" unlocked="no" enabled="yes" from="quest" />
<outfit type="1" looktype="1444" name="Dragon Knight" premium="no" unlocked="no" enabled="yes" from="store" />
<outfit type="1" looktype="1449" name="Arbalester" premium="no" unlocked="no" enabled="yes" from="store" />
</outfits>
2 changes: 1 addition & 1 deletion data/XML/vocations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@
<skill id="5" multiplier="1.1" />
<skill id="6" multiplier="1.1" />
</vocation>
</vocations>
</vocations>
4 changes: 2 additions & 2 deletions data/chatchannels/scripts/advertising.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ function onSpeak(player, type, message)
return true
end

if player:getLevel() == 1 then
player:sendCancelMessage("You may not speak into channels as long as you are on level 1.")
if player:getLevel() < 20 and not player:isPremium() then
player:sendCancelMessage("You may not speak in this channel unless you have reached level 20 or your account has premium status.")
return false
end

Expand Down
6 changes: 3 additions & 3 deletions data/chatchannels/scripts/english_chat.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
function onSpeak(player, type, message)
local playerAccountType = player:getAccountType()
if player:getLevel() == 1 and playerAccountType < ACCOUNT_TYPE_GAMEMASTER then
player:sendCancelMessage("You may not speak into channels as long as you are on level 1.")
if player:getLevel() < 20 and not player:isPremium() then
player:sendCancelMessage("You may not speak in this channel unless you have reached level 20 or your account has premium status.")
return false
end

local playerAccountType = player:getAccountType()
if type == TALKTYPE_CHANNEL_Y then
if playerAccountType >= ACCOUNT_TYPE_GAMEMASTER then
type = TALKTYPE_CHANNEL_O
Expand Down
42 changes: 19 additions & 23 deletions data/events/events.xml
Original file line number Diff line number Diff line change
@@ -1,48 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<events>
<!-- Creature Methods -->
<event class="Creature" method="onChangeOutfit" enabled="1" />
<event class="Creature" method="onAreaCombat" enabled="0" />
<event class="Creature" method="onTargetCombat" enabled="1" /><!-- removeCombatProtection on secure modes protection -->
<event class="Creature" method="onChangeOutfit" enabled="1" />
<event class="Creature" method="onDrainHealth" enabled="1" />
<event class="Creature" method="onHear" enabled="0" />
<event class="Creature" method="onTargetCombat" enabled="1" /><!-- removeCombatProtection on secure modes protection -->

<!-- Monster Methods -->
<event class="Monster" method="onDropLoot" enabled="1" />
<event class="Monster" method="onSpawn" enabled="1" />

<!-- Party Methods -->
<event class="Party" method="onDisband" enabled="0" />
<event class="Party" method="onJoin" enabled="0" />
<event class="Party" method="onLeave" enabled="0" />
<event class="Party" method="onDisband" enabled="0" />
<event class="Party" method="onShareExperience" enabled="1" />

<!-- Player Methods -->
<event class="Player" method="onBrowseField" enabled="0" />
<event class="Player" method="onChangeZone" enabled="1" />
<event class="Player" method="onGainExperience" enabled="1" />
<event class="Player" method="onGainSkillTries" enabled="1" />
<event class="Player" method="onItemMoved" enabled="0" />
<event class="Player" method="onLook" enabled="1" />
<event class="Player" method="onLookInBattleList" enabled="1" />
<event class="Player" method="onLookInTrade" enabled="1" />
<event class="Player" method="onLookInShop" enabled="0" />
<event class="Player" method="onMoveItem" enabled="1" /><!-- Protections on rewardsystem and global depots -->
<event class="Player" method="onItemMoved" enabled="0" />
<event class="Player" method="onChangeZone" enabled="1" />
<event class="Player" method="onLookInTrade" enabled="1" />
<event class="Player" method="onLoseExperience" enabled="0" />
<event class="Player" method="onMoveCreature" enabled="1" />
<event class="Player" method="onMoveItem" enabled="1" /><!-- Protections on rewardsystem and global depots -->
<event class="Player" method="onReportBug" enabled="1" />
<event class="Player" method="onReportRuleViolation" enabled="1" />
<event class="Player" method="onTurn" enabled="1" /><!-- Move with ( ctrl + arrows ) like to TFS 0.3.x : 0.4 -->
<event class="Player" method="onTradeRequest" enabled="1" /><!-- Move with ( ctrl + arrows ) like to TFS 0.3.x : 0.4 -->
<event class="Player" method="onTradeAccept" enabled="1" />
<event class="Player" method="onGainExperience" enabled="1" />
<event class="Player" method="onLoseExperience" enabled="0" />
<event class="Player" method="onGainSkillTries" enabled="1" />
<event class="Player" method="onRequestQuestLog" enabled="1" />
<event class="Player" method="onRequestQuestLine" enabled="1" />
<event class="Player" method="onRequestQuestLog" enabled="1" />
<event class="Player" method="onStorageUpdate" enabled="1" />
<!-- Imbuement System -->
<event class="Player" method="canBeAppliedImbuement" enabled="1" />
<event class="Player" method="onApplyImbuement" enabled="1" />
<event class="Player" method="clearImbuement" enabled="1" />
<event class="Player" method="onTradeAccept" enabled="1" />
<event class="Player" method="onTradeRequest" enabled="1" /><!-- Move with ( ctrl + arrows ) like to TFS 0.3.x : 0.4 -->
<event class="Player" method="onTurn" enabled="1" /><!-- Move with ( ctrl + arrows ) like to TFS 0.3.x : 0.4 -->
<event class="Player" method="onCombat" enabled="1" />

<event class="Creature" method="onDrainHealth" enabled="1" />
<event class="Player" method="onRemoveCount" enabled="1" /><!-- Tibia 11 function -->

<!-- Monster Methods -->
<event class="Monster" method="onDropLoot" enabled="1" />
<event class="Monster" method="onSpawn" enabled="1" />
</events>
19 changes: 2 additions & 17 deletions data/events/scripts/creature.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function Creature:onChangeOutfit(outfit)
local familiarLookType = self:getFamiliarLooktype()
if familiarLookType ~= 0 then
for _, summon in pairs(self:getSummons()) do
if summon:getType():isPet() then
if summon:getType():familiar() then
if summon:getOutfit().lookType ~= familiarLookType then
summon:setOutfit({lookType = familiarLookType})
end
Expand All @@ -16,14 +16,6 @@ function Creature:onChangeOutfit(outfit)
return true
end

function Creature:onAreaCombat(tile, isAggressive)
return RETURNVALUE_NOERROR
end

function Creature:onTargetCombat(target)
return RETURNVALUE_NOERROR
end

function Creature:onHear(speaker, words, type)
end

Expand Down Expand Up @@ -120,14 +112,7 @@ function Creature:onTargetCombat(target)
end
end

if self:isPlayer() then
if target and target:getName() == staminaBonus.target then
local playerId = self:getId()
if not staminaBonus.eventsTrainer[playerId] then
staminaBonus.eventsTrainer[playerId] = addEvent(addStamina, staminaBonus.period, playerId)
end
end
end
self:addEventStamina(target)
return true
end

Expand Down
Loading

0 comments on commit e1a9a7c

Please sign in to comment.