Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 17 additions & 44 deletions data/items/items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4344,65 +4344,38 @@
</attribute>
</item>
<item id="2131" article="a" name="fire field">
<attribute key="primarytype" value="fields" />
<attribute key="type" value="magicfield" />
<attribute key="field" value="fire">
<attribute key="ticks" value="10000" />
<attribute key="count" value="7" />
<attribute key="damage" value="20" />
</attribute>
<attribute key="field" value="fire" />
<attribute key="duration" value="120" />
<attribute key="decayTo" value="2132" />
<attribute key="script" value="moveevent">
<attribute key="eventType" value="stepin" />
</attribute>
</item>
<item id="2132" article="a" name="fire field">
<attribute key="primarytype" value="fields" />
<attribute key="type" value="magicfield" />
<attribute key="field" value="fire">
<attribute key="ticks" value="10000" />
<attribute key="count" value="7" />
<attribute key="damage" value="10" />
</attribute>
<attribute key="field" value="fire" />
<attribute key="duration" value="120" />
<attribute key="decayTo" value="2133" />
<attribute key="script" value="moveevent">
<attribute key="eventType" value="stepin" />
</attribute>
</item>
<item id="2133" article="a" name="fire field">
<attribute key="primarytype" value="fields" />
<attribute key="type" value="magicfield" />
<attribute key="field" value="fire" />
<attribute key="duration" value="120" />
<attribute key="decayTo" value="0" />
<attribute key="script" value="moveevent">
<attribute key="eventType" value="stepin" />
</attribute>
</item>
<item id="2134" article="a" name="poison gas">
<attribute key="primarytype" value="fields" />
<attribute key="type" value="magicfield" />
<attribute key="field" value="poison">
<attribute key="ticks" value="5000" />
<attribute key="damage" value="100" />
<attribute key="start" value="5" />
</attribute>
<attribute key="field" value="poison"/>
<attribute key="duration" value="120" />
<attribute key="decayTo" value="0" />
<attribute key="script" value="moveevent">
<attribute key="eventType" value="stepin" />
</attribute>
</item>
<item id="2135" article="an" name="energy field">
<attribute key="primarytype" value="fields" />
<attribute key="type" value="magicfield" />
<attribute key="field" value="energy">
<attribute key="ticks" value="10000" />
<attribute key="damage" value="25" />
</attribute>
<attribute key="duration" value="120" />
<attribute key="decayTo" value="0" />
<attribute key="script" value="moveevent">
<attribute key="eventType" value="stepin" />
</attribute>
</item>
<item id="2136" name="smoke">
<attribute key="primarytype" value="fields" />
Expand Down Expand Up @@ -42626,17 +42599,10 @@ My sad story is told by few living humans but many dead warriors" />
<attribute key="decayTo" value="7359" />
</item>
<item id="21465" article="a" name="fire field">
<attribute key="primarytype" value="fields" />
<attribute key="type" value="magicfield" />
<attribute key="field" value="fire">
<attribute key="ticks" value="10000" />
<attribute key="count" value="7" />
<attribute key="damage" value="10" />
</attribute>
<attribute key="duration" value="120" />
<attribute key="decayTo" value="2132" />
<attribute key="script" value="moveevent">
<attribute key="eventType" value="stepin" />
</attribute>
</item>
<item id="21466" name="ewer with holy water">
<attribute key="description" value="The water in the ewer shimmers faintly. In the desert's heat it will evaporate soon, however" />
Expand Down Expand Up @@ -81361,6 +81327,9 @@ Granted by TibiaGoals.com" />
<attribute key="decayTo" value="49150" />
<attribute key="duration" value="5" />
</item>
<item id="49161" name="stairs">
<attribute key="floorchange" value="down" />
</item>
<item id="49163" article="an" name="ominous soul core">
<attribute key="primarytype" value="soul cores" />
<attribute key="description" value="Offers a soul to the Soulpit. Combine with an exalted core to turn it into a lesser soul core." />
Expand Down Expand Up @@ -83017,8 +82986,12 @@ Granted by TibiaGoals.com" />
<attribute key="description" value="Offers a soul to the Soulpit. Combine with another soul core to create a random new soul core." />
<attribute key="weight" value="100" />
</item>
<item id="50122" article="a" name="stair" />
<item id="50123" article="a" name="stair" />
<item id="50122" article="a" name="ladder" >
<attribute key="type" value="ladder" />
</item>
<item id="50123" article="a" name="ladder" >
<attribute key="type" value="ladder" />
</item>
<item id="50124" article="a" name="arbaziloth santa">
<attribute key="primarytype" value="dolls and bears" />
<attribute key="weight" value="100" />
Expand Down
29 changes: 29 additions & 0 deletions data/scripts/movements/fields/energy_field.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
local energyField = MoveEvent()

local energyCondition = Condition(CONDITION_ENERGY)
energyCondition:setParameter(CONDITION_PARAM_DELAYED, true)
energyCondition:addDamage(5, 2000, -25)

function energyField.onStepIn(creature, item, position, fromPosition)
if not creature:isCreature() then
return true
end

if creature:isPlayer() and creature:getGroup():getId() >= 2 then
return true
end

if creature:isPlayer() or (creature:isMonster() and creature:getMaster() and creature:getMaster():isPlayer()) then
position:sendMagicEffect(CONST_ME_POFF)
return true
end

doTargetCombatHealth(0, creature, COMBAT_ENERGYDAMAGE, -30, -30, CONST_ME_ENERGYHIT)
creature:addCondition(energyCondition)

return true
end

energyField:type("stepin")
energyField:id(2135)
energyField:register()
42 changes: 42 additions & 0 deletions data/scripts/movements/fields/fire_field.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
local fireField = MoveEvent()

local fireCondition20 = Condition(CONDITION_FIRE)
fireCondition20:setParameter(CONDITION_PARAM_DELAYED, true)
fireCondition20:setParameter(CONDITION_PARAM_TICKINTERVAL, 2000)
fireCondition20:setParameter(CONDITION_PARAM_TICKS, 7000)
fireCondition20:setParameter(CONDITION_PARAM_PERIODICDAMAGE, -20)

local fireCondition10 = Condition(CONDITION_FIRE)
fireCondition10:setParameter(CONDITION_PARAM_DELAYED, true)
fireCondition10:setParameter(CONDITION_PARAM_TICKINTERVAL, 2000)
fireCondition10:setParameter(CONDITION_PARAM_TICKS, 7000)
fireCondition10:setParameter(CONDITION_PARAM_PERIODICDAMAGE, -10)

function fireField.onStepIn(creature, item, position, fromPosition)
if not creature:isCreature() then
return true
end

if creature:isPlayer() and creature:getGroup():getId() >= 2 then
return true
end

if creature:isPlayer() or (creature:isMonster() and creature:getMaster() and creature:getMaster():isPlayer()) then
position:sendMagicEffect(CONST_ME_POFF)
return true
end

if item:getId() == 2132 then
doTargetCombatHealth(0, creature, COMBAT_FIREDAMAGE, -10, -10, CONST_ME_HITBYFIRE)
creature:addCondition(fireCondition10)
else
doTargetCombatHealth(0, creature, COMBAT_FIREDAMAGE, -20, -20, CONST_ME_HITBYFIRE)
creature:addCondition(fireCondition20)
end

return true
end

fireField:type("stepin")
fireField:id(21465, 2131, 2132)
fireField:register()
34 changes: 34 additions & 0 deletions data/scripts/movements/fields/poison_field.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
local poisonField = MoveEvent()

local poisonCondition = Condition(CONDITION_POISON)
poisonCondition:setParameter(CONDITION_PARAM_DELAYED, true)

poisonCondition:addDamage(4, 1000, -5)
poisonCondition:addDamage(5, 1000, -4)
poisonCondition:addDamage(7, 1000, -3)
poisonCondition:addDamage(10, 1000, -2)
poisonCondition:addDamage(19, 1000, -1)

function poisonField.onStepIn(creature, item, position, fromPosition)
if not creature:isCreature() then
return true
end

if creature:isPlayer() and creature:getGroup():getId() >= 2 then
return true
end

if creature:isPlayer() or (creature:isMonster() and creature:getMaster() and creature:getMaster():isPlayer()) then
position:sendMagicEffect(CONST_ME_POFF)
return true
end

doTargetCombatHealth(0, creature, COMBAT_EARTHDAMAGE, -10, -10, CONST_ME_POISON)
creature:addCondition(poisonCondition)

return true
end

poisonField:type("stepin")
poisonField:id(2134)
poisonField:register()
34 changes: 26 additions & 8 deletions data/scripts/runes/energy_bomb.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP)
combat:setArea(createCombatArea(AREA_SQUARE1X1))
local combatPvp = Combat()
combatPvp:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
combatPvp:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
combatPvp:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
combatPvp:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP)
combatPvp:setArea(createCombatArea(AREA_SQUARE1X1))

local combatNoPvp = Combat()
combatNoPvp:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
combatNoPvp:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
combatNoPvp:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
combatNoPvp:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_NOPVP)
combatNoPvp:setArea(createCombatArea(AREA_SQUARE1X1))

local rune = Spell("rune")

function rune.onCastSpell(creature, var, isHotkey)
return combat:execute(creature, var)
if not creature:isPlayer() then
return false
end

if creature:isPzLocked() then
combatPvp:execute(creature, var)
rune:setPzLocked(true)
return true
else
--combatNoPvp:execute(creature, var) -- monsters ignore non-pvp fields for some unknown reason, enable at your own risk
combatPvp:execute(creature, var)
return true
end
end

rune:id(55)
Expand All @@ -18,7 +37,6 @@ rune:castSound(SOUND_EFFECT_TYPE_SPELL_OR_RUNE)
rune:impactSound(SOUND_EFFECT_TYPE_SPELL_ENERGY_BOMB_RUNE)
rune:runeId(3149)
rune:allowFarUse(true)
rune:setPzLocked(true)
rune:charges(2)
rune:level(37)
rune:magicLevel(10)
Expand Down
31 changes: 24 additions & 7 deletions data/scripts/runes/energy_field.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP)
local combatPvp = Combat()
combatPvp:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
combatPvp:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
combatPvp:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
combatPvp:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP)

local combatNoPvp = Combat()
combatNoPvp:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
combatNoPvp:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
combatNoPvp:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
combatNoPvp:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_NOPVP)

local rune = Spell("rune")

function rune.onCastSpell(creature, var, isHotkey)
return combat:execute(creature, var)
if not creature:isPlayer() then
return false
end

if creature:isPzLocked() then
combatPvp:execute(creature, var)
rune:setPzLocked(true)
return true
else
--combatNoPvp:execute(creature, var) -- monsters ignore non-pvp fields for some unknown reason, enable at your own risk
combatPvp:execute(creature, var)
return true
end
end

rune:id(27)
Expand All @@ -17,7 +35,6 @@ rune:castSound(SOUND_EFFECT_TYPE_SPELL_OR_RUNE)
rune:impactSound(SOUND_EFFECT_TYPE_SPELL_ENERGY_FIELD_RUNE)
rune:runeId(3164)
rune:allowFarUse(true)
rune:setPzLocked(true)
rune:charges(3)
rune:level(18)
rune:magicLevel(3)
Expand Down
34 changes: 26 additions & 8 deletions data/scripts/runes/energy_wall.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP)
combat:setArea(createCombatArea(AREA_WALLFIELD_ENERGY, AREADIAGONAL_WALLFIELD_ENERGY))
local combatPvp = Combat()
combatPvp:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
combatPvp:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
combatPvp:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
combatPvp:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP)
combatPvp:setArea(createCombatArea(AREA_WALLFIELD_ENERGY, AREADIAGONAL_WALLFIELD_ENERGY))

local combatNoPvp = Combat()
combatNoPvp:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
combatNoPvp:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
combatNoPvp:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
combatNoPvp:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_NOPVP)
combatNoPvp:setArea(createCombatArea(AREA_WALLFIELD_ENERGY, AREADIAGONAL_WALLFIELD_ENERGY))

local rune = Spell("rune")

function rune.onCastSpell(creature, var, isHotkey)
return combat:execute(creature, var)
if not creature:isPlayer() then
return false
end

if creature:isPzLocked() then
combatPvp:execute(creature, var)
rune:setPzLocked(true)
return true
else
--combatNoPvp:execute(creature, var) -- monsters ignore non-pvp fields for some unknown reason, enable at your own risk
combatPvp:execute(creature, var)
return true
end
end

rune:id(33)
Expand All @@ -18,7 +37,6 @@ rune:castSound(SOUND_EFFECT_TYPE_SPELL_OR_RUNE)
rune:impactSound(SOUND_EFFECT_TYPE_SPELL_ENERGY_WALL_RUNE)
rune:runeId(3166)
rune:allowFarUse(true)
rune:setPzLocked(true)
rune:charges(4)
rune:level(41)
rune:magicLevel(9)
Expand Down
Loading