Runes Emblem Backpack for TFS 1.X by Fresh
Medivia like ` inspired script
TFS "tested" version:
Script tested and works on TFS 1.X (Tested on TFS 1.0)
but I think it should work on higher versions (not tested by myself)
Description "what-is-this-script" doing:
I made an simple `events` script for player.lua that allow players to use specific `emblem runes backpack` to carry runes in (only runes with specific type ex. in sudden death emblem backpack you can only put SD's).
like on preview image
Script is inspired by runes backpacks on popular server Medivia.
Preview:
Open data/events/scripts/player.lua and paste somewhere under
Player : onMoveItem(item, count, fromPosition, toPosition) this code:
Lua:
-- Rune emblem system :: backpacks only for certain runes
local runy = {
{backpack = 23571, runes = 2287}, -- LMM
{backpack = 24011, runes = 2285}, -- Poison Field
{backpack = 24010, runes = 2301}, -- Fire Field
{backpack = 23569, runes = 2311}, -- Heavy Magic Missile
{backpack = 23570, runes = 2265}, -- Intense Healing Rune
{backpack = 24021, runes = 2302}, -- Fireball
{backpack = 24009, runes = 2277}, -- Energy Field
{backpack = 24018, runes = 2261}, -- Destroy Field
{backpack = 24025, runes = 2316}, -- Animate Dead
{backpack = 24019, runes = 2310}, -- Desintegrate
{backpack = 24014, runes = 2286}, -- Poison Bomb
{backpack = 24013, runes = 2305}, -- Fire Bomb
{backpack = 23568, runes = 2304}, -- Great Fireball
{backpack = 24023, runes = 2290}, -- Convince Creature
{backpack = 23575, runes = 2273}, -- Ultimate Healing Rune
{backpack = 24024, runes = 2291}, -- Chameleon
{backpack = 24017, runes = 2289}, -- Poison Wall
{backpack = 23567, runes = 2313}, -- Explosion
{backpack = 24020, runes = 2308}, -- Soulfire
{backpack = 23573, runes = 2293}, -- Magic Wall
{backpack = 24012, runes = 2262}, -- Energy Bomb
{backpack = 24015, runes = 2279}, -- Energy Wall
{backpack = 23574, runes = 2268}, -- Sudden Death Rune
{backpack = 24016, runes = 2303}, -- Fire Wall
{backpack = 24022, runes = 2278} -- Paralyze
}
if toPosition.x == CONTAINER_POSITION and toPosition.y >= 64 then
local container = self:getContainerById(toPosition.y-64)
for _, emblem in ipairs(runy) do
if container:getId() == emblem.backpack then
if item:getId() ~= emblem.runes then
self:sendTextMessage(MESSAGE_STATUS_SMALL, "You may carry only runes of specific type in this backpack, nothing else.")
return false
end
end
end
end
-- // Rune emblem system
Make sure in events.xml you have (onMoveItem event enabled [set to 1]):
Configuration spoiler (for braindead copy-paste people who don't read the code):
Thats all,
Code:
<event class="Player" method="onMoveItem" enabled="1" />
Configuration spoiler (for braindead copy-paste people who don't read the code):
In "local = runy" (table) you configure certain backpack for runes and runes for backpack
backpack = backpack_ID for certain runes[emblem.runes]
runes = ID_ of rune to put into specific backpack [emblem.backpack]
backpack = backpack_ID for certain runes[emblem.runes]
runes = ID_ of rune to put into specific backpack [emblem.backpack]
Have fun using this script.
- If you copy this script into other forums like `brasilian ones` please atleast insert author name..
Tag:
Specific backpack contain ONLY runes with one type
Last edited by a moderator: