mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-05-02 02:29:21 +02:00
fix many bugs found from another nostalrius forks
This commit is contained in:
parent
89df66e1c9
commit
f2cbc2dc1c
@ -9,7 +9,7 @@ list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
|||||||
|
|
||||||
include(cotire)
|
include(cotire)
|
||||||
|
|
||||||
add_compile_options(-Wall -Werror -pipe -fvisibility=hidden)
|
add_compile_options(-Wall -pipe -fvisibility=hidden)
|
||||||
|
|
||||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||||
add_compile_options(-fno-strict-aliasing)
|
add_compile_options(-fno-strict-aliasing)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
function onUse(player, item, fromPosition, target, toPosition)
|
function onUse(player, item, fromPosition, target, toPosition)
|
||||||
if tem:getId() == 2772 and Game.isItemThere({x = 32090, y = 32148, z = 09},2772) and Game.isItemThere ({x = 32092, y = 32148, z = 09},2772) and Game.isItemThere ({x = 32094, y = 32148, z = 09},2772) and Game.isItemThere ({x = 32088, y = 32148, z = 09},2772) then
|
if item:getId() == 2772 and Game.isItemThere({x = 32090, y = 32148, z = 09},2772) and Game.isItemThere ({x = 32092, y = 32148, z = 09},2772) and Game.isItemThere ({x = 32094, y = 32148, z = 09},2772) and Game.isItemThere ({x = 32088, y = 32148, z = 09},2772) then
|
||||||
item:transform(2773, 1)
|
item:transform(2773, 1)
|
||||||
item:decay()
|
item:decay()
|
||||||
Game.removeItemOnMap({x = 32092, y = 32149, z = 10}, 1282)
|
Game.removeItemOnMap({x = 32092, y = 32149, z = 10}, 1282)
|
||||||
|
@ -8,7 +8,7 @@ function onLogin(player)
|
|||||||
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
|
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
|
||||||
end
|
end
|
||||||
|
|
||||||
loginStr = string.format("Your last visit on Nostalrius: %s.", os.date("%a %b %d %X %Y", player:getLastLoginSaved()))
|
loginStr = string.format("Your last visit on " .. configManager.getString(configKeys.SERVER_NAME) .. ": %s.", os.date("%a %b %d %X %Y", player:getLastLoginSaved()))
|
||||||
end
|
end
|
||||||
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
|
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
|
||||||
|
|
||||||
@ -43,8 +43,10 @@ function onLogin(player)
|
|||||||
player:setStorageValue(43434, 1)
|
player:setStorageValue(43434, 1)
|
||||||
elseif player:getStorageValue(43434) == 1 then
|
elseif player:getStorageValue(43434) == 1 then
|
||||||
player:setStorageValue(43434, 0)
|
player:setStorageValue(43434, 0)
|
||||||
player:teleportTo({x = 32369, y = 32241, z = 7})
|
if player:getVocation():getId() > 0 then
|
||||||
player:setTown(Town("Thais"))
|
player:teleportTo({x = 32369, y = 32241, z = 7})
|
||||||
|
player:setTown(Town("Thais"))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Events
|
-- Events
|
||||||
|
@ -1,39 +1,50 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<raids>
|
<raids>
|
||||||
<raid name="abdendrielbadgers" repeat="true" margin="60" interval2="600" file="abdendrielbadgers.xml"/>
|
<!--
|
||||||
<raid name="abdendrielwolfattack" repeat="true" margin="60" interval2="600" file="abdendrielwolfattack.xml"/>
|
86400 - 1 day
|
||||||
<raid name="ankrahmunscarabinvasion" repeat="false" margin="60" interval2="600" file="ankrahmunscarabinvasion.xml"/>
|
604800 - 7 days
|
||||||
<raid name="carlintowerorcs" repeat="true" margin="60" interval2="600" file="carlintowerorcs.xml"/>
|
1209600 - 14 days
|
||||||
<raid name="cavesgrorlam0" repeat="true" margin="60" interval2="600" file="cavesgrorlam0.xml"/>
|
2419200 - 28 days
|
||||||
<raid name="cavesgrorlam1" repeat="true" margin="60" interval2="600" file="cavesgrorlam1.xml"/>
|
2592000 - 30 days
|
||||||
<raid name="cavesgrorlam2" repeat="true" margin="60" interval2="600" file="cavesgrorlam2.xml"/>
|
15552000 - 180 days
|
||||||
<raid name="cavesgrorlam3" repeat="true" margin="60" interval2="600" file="cavesgrorlam3.xml"/>
|
31104000 - 360 days
|
||||||
<raid name="cavesgrorlam4" repeat="true" margin="60" interval2="600" file="cavesgrorlam4.xml"/>
|
1130763600 - halloweenhare real interval
|
||||||
<raid name="cavesgrorlam5" repeat="true" margin="60" interval2="600" file="cavesgrorlam5.xml"/>
|
-->
|
||||||
<raid name="cormayadwarfattack" repeat="true" margin="60" interval2="600" file="cormayadwarfattack.xml"/>
|
<raid name="abdendrielbadgers" repeat="true" margin="0" interval2="1209600" file="abdendrielbadgers.xml"/>
|
||||||
<raid name="darashiaundeadinvasion" repeat="false" margin="60" interval2="600" file="darashiaundeadinvasion.xml"/>
|
<raid name="abdendrielwolfattack" repeat="true" margin="0" interval2="2592000" file="abdendrielwolfattack.xml"/>
|
||||||
<raid name="darashiawaspplague" repeat="true" margin="60" interval2="600" file="darashiawaspplague.xml"/>
|
<raid name="ankrahmunscarabinvasion" repeat="false" margin="0" interval2="15552000" file="ankrahmunscarabinvasion.xml"/>
|
||||||
<raid name="dracoriadieingdragons" repeat="true" margin="60" interval2="600" file="dracoriadieingdragons.xml"/>
|
<raid name="carlintowerorcs" repeat="true" margin="0" interval2="2592000" file="carlintowerorcs.xml"/>
|
||||||
<raid name="drefianecromancer" repeat="true" margin="60" interval2="600" file="drefianecromancer.xml"/>
|
<raid name="cavesgrorlam0" repeat="true" margin="0" interval2="1209600" file="cavesgrorlam0.xml"/>
|
||||||
<raid name="edronorshabaal" repeat="false" margin="60" interval2="600" file="edronorshabaal.xml"/>
|
<raid name="cavesgrorlam1" repeat="true" margin="0" interval2="1209600" file="cavesgrorlam1.xml"/>
|
||||||
<raid name="edronskunks" repeat="true" margin="60" interval2="600" file="edronskunks.xml"/>
|
<raid name="cavesgrorlam2" repeat="true" margin="0" interval2="1209600" file="cavesgrorlam2.xml"/>
|
||||||
<raid name="foldayetis" repeat="true" margin="60" interval2="600" file="foldayetis.xml"/>
|
<raid name="cavesgrorlam3" repeat="true" margin="0" interval2="1209600" file="cavesgrorlam3.xml"/>
|
||||||
<raid name="halloweenhare" repeat="true" margin="60" interval2="600" file="halloweenhare.xml"/>
|
<raid name="cavesgrorlam4" repeat="true" margin="0" interval2="1209600" file="cavesgrorlam4.xml"/>
|
||||||
<raid name="kazordoonhornedfox" repeat="true" margin="60" interval2="600" file="kazordoonhornedfox.xml"/>
|
<raid name="cavesgrorlam5" repeat="true" margin="0" interval2="1209600" file="cavesgrorlam5.xml"/>
|
||||||
<raid name="kazordoonspiderplague" repeat="true" margin="60" interval2="600" file="kazordoonspiderplague.xml"/>
|
<raid name="cormayadwarfattack" repeat="true" margin="0" interval2="1209600" file="cormayadwarfattack.xml"/>
|
||||||
<raid name="mintwalinminogeneral" repeat="true" margin="60" interval2="600" file="mintwalinminogeneral.xml"/>
|
<raid name="darashiaundeadinvasion" repeat="false" margin="0" interval2="15552000" file="darashiaundeadinvasion.xml"/>
|
||||||
<raid name="mistisledruid" repeat="true" margin="60" interval2="600" file="mistisledruid.xml"/>
|
<raid name="darashiawaspplague" repeat="true" margin="0" interval2="1209600" file="darashiawaspplague.xml"/>
|
||||||
<raid name="necropolisbeholder" repeat="true" margin="60" interval2="600" file="necropolisbeholder.xml"/>
|
<raid name="dracoriadieingdragons" repeat="true" margin="0" interval2="1209600" file="dracoriadieingdragons.xml"/>
|
||||||
<raid name="northroadoutlaws" repeat="true" margin="60" interval2="600" file="northroadoutlaws.xml"/>
|
<raid name="drefianecromancer" repeat="true" margin="0" interval2="1209600" file="drefianecromancer.xml"/>
|
||||||
<raid name="orclandorc" repeat="true" margin="60" interval2="600" file="orclandorc.xml"/>
|
<raid name="edronorshabaal" repeat="false" margin="0" interval2="31104000" file="edronorshabaal.xml"/>
|
||||||
<raid name="pohdemodras" repeat="true" margin="60" interval2="600" file="pohdemodras.xml"/>
|
<raid name="edronskunks" repeat="true" margin="0" interval2="2592000" file="edronskunks.xml"/>
|
||||||
<raid name="pohwidow" repeat="true" margin="60" interval2="600" file="pohwidow.xml"/>
|
<raid name="foldayetis" repeat="true" margin="0" interval2="2592000" file="foldayetis.xml"/>
|
||||||
<raid name="rookgaardrats" repeat="true" margin="60" interval2="600" file="rookgaardrats.xml"/>
|
<!--halloweenhare commented because invalid spawn positions. Fix it and uncomment-->
|
||||||
<raid name="shadowthorndharalion" repeat="true" margin="60" interval2="600" file="shadowthorndharalion.xml"/>
|
<!--<raid name="halloweenhare" repeat="true" margin="0" interval2="1130763600" file="halloweenhare.xml"/>-->
|
||||||
<raid name="stonehomeghoulattack" repeat="true" margin="60" interval2="600" file="stonehomeghoulattack.xml"/>
|
<raid name="kazordoonhornedfox" repeat="true" margin="0" interval2="1209600" file="kazordoonhornedfox.xml"/>
|
||||||
<raid name="thaiscaverats" repeat="true" margin="60" interval2="600" file="thaiscaverats.xml"/>
|
<raid name="kazordoonspiderplague" repeat="true" margin="0" interval2="1209600" file="kazordoonspiderplague.xml"/>
|
||||||
<raid name="thaislighthouseorcs" repeat="true" margin="60" interval2="600" file="thaislighthouseorcs.xml"/>
|
<raid name="mintwalinminogeneral" repeat="true" margin="0" interval2="1209600" file="mintwalinminogeneral.xml"/>
|
||||||
<raid name="thaisorcinvasion" repeat="false" margin="60" interval2="600" file="thaisorcinvasion.xml"/>
|
<raid name="mistisledruid" repeat="true" margin="0" interval2="2592000" file="mistisledruid.xml"/>
|
||||||
<raid name="venoreelfinvasion" repeat="false" margin="60" interval2="600" file="venoreelfinvasion.xml"/>
|
<raid name="necropolisbeholder" repeat="true" margin="0" interval2="1209600" file="necropolisbeholder.xml"/>
|
||||||
<raid name="venoreswampelves" repeat="true" margin="60" interval2="600" file="venoreswampelves.xml"/>
|
<raid name="northroadoutlaws" repeat="true" margin="0" interval2="604800" file="northroadoutlaws.xml"/>
|
||||||
|
<raid name="orclandorc" repeat="true" margin="0" interval2="1209600" file="orclandorc.xml"/>
|
||||||
|
<raid name="pohdemodras" repeat="true" margin="0" interval2="1209600" file="pohdemodras.xml"/>
|
||||||
|
<raid name="pohwidow" repeat="true" margin="0" interval2="2419200" file="pohwidow.xml"/>
|
||||||
|
<raid name="rookgaardrats" repeat="true" margin="0" interval2="86400" file="rookgaardrats.xml"/>
|
||||||
|
<raid name="shadowthorndharalion" repeat="true" margin="0" interval2="1209600" file="shadowthorndharalion.xml"/>
|
||||||
|
<raid name="stonehomeghoulattack" repeat="true" margin="0" interval2="1209600" file="stonehomeghoulattack.xml"/>
|
||||||
|
<raid name="thaiscaverats" repeat="true" margin="0" interval2="604800" file="thaiscaverats.xml"/>
|
||||||
|
<raid name="thaislighthouseorcs" repeat="true" margin="0" interval2="604800" file="thaislighthouseorcs.xml"/>
|
||||||
|
<raid name="thaisorcinvasion" repeat="false" margin="0" interval2="15552000" file="thaisorcinvasion.xml"/>
|
||||||
|
<raid name="venoreelfinvasion" repeat="false" margin="0" interval2="15552000" file="venoreelfinvasion.xml"/>
|
||||||
|
<raid name="venoreswampelves" repeat="true" margin="0" interval2="1209600" file="venoreswampelves.xml"/>
|
||||||
</raids>
|
</raids>
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
local combat = Combat()
|
local combat = Combat()
|
||||||
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
|
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
|
||||||
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_POISON)
|
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
|
||||||
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)
|
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)
|
||||||
|
|
||||||
function onCastSpell(creature, variant)
|
function onCastSpell(creature, variant)
|
||||||
|
creature:removeCondition(CONDITION_POISON)
|
||||||
return combat:execute(creature, variant)
|
return combat:execute(creature, variant)
|
||||||
end
|
end
|
@ -1,7 +1,7 @@
|
|||||||
local combat = Combat()
|
local combat = Combat()
|
||||||
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
|
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
|
||||||
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
|
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
|
||||||
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
|
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
|
||||||
|
|
||||||
function onGetFormulaValues(player, level, maglevel)
|
function onGetFormulaValues(player, level, maglevel)
|
||||||
local base = 30
|
local base = 30
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
local combat = Combat()
|
local combat = Combat()
|
||||||
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
|
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
|
||||||
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
|
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
|
||||||
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
|
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
|
||||||
|
|
||||||
function onGetFormulaValues(player, level, maglevel)
|
function onGetFormulaValues(player, level, maglevel)
|
||||||
local base = 15
|
local base = 15
|
||||||
|
@ -217,7 +217,7 @@
|
|||||||
<rune name="Firebomb" id="3192" allowfaruse="1" charges="2" maglv="5" blocktype="solid" script="runes/firebomb.lua" />
|
<rune name="Firebomb" id="3192" allowfaruse="1" charges="2" maglv="5" blocktype="solid" script="runes/firebomb.lua" />
|
||||||
<rune name="Fire Wall" id="3190" allowfaruse="1" charges="4" maglv="6" blocktype="solid" script="runes/fire wall.lua" />
|
<rune name="Fire Wall" id="3190" allowfaruse="1" charges="4" maglv="6" blocktype="solid" script="runes/fire wall.lua" />
|
||||||
<rune name="Energy Field" id="3164" allowfaruse="1" charges="3" maglv="3" blocktype="solid" script="runes/energy field.lua" />
|
<rune name="Energy Field" id="3164" allowfaruse="1" charges="3" maglv="3" blocktype="solid" script="runes/energy field.lua" />
|
||||||
<rune name="Energybomb" id="3151" allowfaruse="1" charges="2" maglv="10" blocktype="solid" script="runes/energybomb.lua" />
|
<rune name="Energybomb" id="3149" allowfaruse="1" charges="2" maglv="10" blocktype="solid" script="runes/energybomb.lua" />
|
||||||
<rune name="Energy Wall" id="3166" allowfaruse="1" charges="4" maglv="9" blocktype="solid" script="runes/energy wall.lua" />
|
<rune name="Energy Wall" id="3166" allowfaruse="1" charges="4" maglv="9" blocktype="solid" script="runes/energy wall.lua" />
|
||||||
<rune name="Soulfire" id="3195" allowfaruse="1" charges="3" maglv="7" needtarget="1" blocktype="solid" script="runes/soulfire.lua" />
|
<rune name="Soulfire" id="3195" allowfaruse="1" charges="3" maglv="7" needtarget="1" blocktype="solid" script="runes/soulfire.lua" />
|
||||||
<rune name="Envenom" id="3179" allowfaruse="1" charges="1" maglv="4" needtarget="1" blocktype="solid" script="runes/envenom.lua" />
|
<rune name="Envenom" id="3179" allowfaruse="1" charges="1" maglv="4" needtarget="1" blocktype="solid" script="runes/envenom.lua" />
|
||||||
@ -348,7 +348,7 @@
|
|||||||
<vocation name="Master Sorcerer" />
|
<vocation name="Master Sorcerer" />
|
||||||
<vocation name="Elder Druid" />
|
<vocation name="Elder Druid" />
|
||||||
</conjure>
|
</conjure>
|
||||||
<conjure name="Energybomb" words="adevo mas vis" lvl="37" mana="880" soul="5" prem="1" reagentId="3147" conjureId="3151" conjureCount="2" needlearn="0" function="conjureRune">
|
<conjure name="Energybomb" words="adevo mas vis" lvl="37" mana="880" soul="5" prem="1" reagentId="3147" conjureId="3149" conjureCount="2" needlearn="0" function="conjureRune">
|
||||||
<vocation name="Sorcerer" />
|
<vocation name="Sorcerer" />
|
||||||
<vocation name="Master Sorcerer" />
|
<vocation name="Master Sorcerer" />
|
||||||
</conjure>
|
</conjure>
|
||||||
|
@ -16,7 +16,6 @@ function onSay(player, words, param)
|
|||||||
position:sendMagicEffect(CONST_ME_POFF)
|
position:sendMagicEffect(CONST_ME_POFF)
|
||||||
else
|
else
|
||||||
player:sendTextMessage(MESSAGE_INFO_DESCR, "You are visible again.")
|
player:sendTextMessage(MESSAGE_INFO_DESCR, "You are visible again.")
|
||||||
position.x = position.x + 1
|
|
||||||
position:sendMagicEffect(CONST_ME_TELEPORT)
|
position:sendMagicEffect(CONST_ME_TELEPORT)
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
@ -65,7 +65,6 @@ set(tfs_SRC
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/tools.cpp
|
${CMAKE_CURRENT_LIST_DIR}/tools.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/vocation.cpp
|
${CMAKE_CURRENT_LIST_DIR}/vocation.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/waitlist.cpp
|
${CMAKE_CURRENT_LIST_DIR}/waitlist.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/weapons.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/wildcardtree.cpp
|
${CMAKE_CURRENT_LIST_DIR}/wildcardtree.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user