-
Notifications
You must be signed in to change notification settings - Fork 9
Installation Pre 1.4
Oen44 edited this page Nov 24, 2021
·
2 revisions
- Open
data/global.lua
. - Add somewhere on top
dofile('data/upgrade_system_core.lua')
- Open
data/events/events.xml
. - Make sure you have enabled
<event class="Creature" method="onTargetCombat" enabled="1" />
<event class="Player" method="onLook" enabled="1" />
<event class="Player" method="onMoveItem" enabled="1" />
<event class="Player" method="onItemMoved" enabled="1" />
<event class="Player" method="onGainExperience" enabled="1" />
- Open
data/events/scripts/player.lua
. - Find
Player:onLook
. - Add after
local description = "You see " .. thing:getDescription(distance)
description = onItemUpgradeLook(self, thing, position, distance, description)
- Find
Player:onMoveItem
. - Change
return true
from last line to
return us_onMoveItem(self, item, fromPosition, toPosition)
- Find
Player:onItemMoved
. - Add inside
onUpgradeMoved(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)
- Find
Player:onGainExperience
. - Add at the end before
return exp
exp = us_onGainExperience(self, source, exp, rawExp)
- Open
data/events/scripts/creature.lua
. - Find
Creature:onTargetCombat
. - Add somewhere (the best place is after all events, before any event that calculates damage, like DPS Counter)
target:registerEvent("UpgradeSystemHealth")
target:registerEvent("UpgradeSystemDeath")
- Open
data/actions/actions.xml
. - This is important part, you have to specify items ID for crystals, scroll of identification and crystal extractor. I have created custom items for myself and IDs are one after another so I'm using
fromid
andtoid
. I hope you can handle it.
<action fromid="26383" toid="26389" script="upgrade_system_actions.lua" /> <!-- Crystals and Scroll -->
<action fromid="26393" toid="26396" script="upgrade_system_actions.lua" /> <!-- Crystals -->
<action itemid="26391" script="upgrade_system_tool.lua" /> <!-- Crystal Extractor -->
- Open
data/creaturescripts/creaturescripts.xml
. - Add
<event type="login" name="UpgradeSystemLogin" script="upgrade_system_cs.lua" />
<event type="death" name="UpgradeSystemDeath" script="upgrade_system_cs.lua" />
<event type="kill" name="UpgradeSystemKill" script="upgrade_system_cs.lua" />
<event type="healthchange" name="UpgradeSystemHealth" script="upgrade_system_cs.lua" />
<event type="manachange" name="UpgradeSystemMana" script="upgrade_system_cs.lua" />
<event type="preparedeath" name="UpgradeSystemPD" script="upgrade_system_cs.lua" />
- Download 2.4.10 version from Release Page.
- Extract and copy content of the archive into your
data
.