Codex NG
Recurrent Flamer
- Joined
- Jul 24, 2015
- Messages
- 2,994
- Solutions
- 12
- Reaction score
- 1,657
Had no net today so I decided to work on an old script I wrote some years ago and update it to TFS 1.2.
Instructions and credits in the script.
Released as is, if you have an issue regarding this script, you will have to fix it yourself
Learn lua
http://tutorialspoint.com/lua/
Released as is, if you have an issue regarding this script, you will have to fix it yourself
Learn lua
http://tutorialspoint.com/lua/
Code:
--[[
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without
limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
Code:
--[[
Super Vocation Transformation Ring, originally written by artofwork aka Breed, Jotran, Codex NG :p
Updated for a 1.2 server, however this will work as well for a 1.0 or 1.1 server.
This script uses a gold ring (itemid 2179), however you can set it to use whatever item in movements.xml.
What does this script do?
When the item is equipped it will change the player's vocation to a new vocation and apply a series of conditions.
Individual Health and Mana regen settings per vocation.
Individual Health and Mana points settings per vocation.
Individual Skills and Magic Level settings per vocation.
A new outfit for the player including a mount they can ride.
Super Haste for all vocations.
Auto Manashield for sorcerer and druid.
Please update your vocations.xml file in the data\XML directory with the new vocations.
New in this script, outfits which contain mounts (amongst other things), settings to remove soul or an item.
Items or Soul are removed per interval.
Settings to disable constant special effect (can be an eyesore or just cpu intensive on older machines).
Place this in movements.xml
<!-- super vocation transformation ring -->
<!-- gold ring -->
<movevent event="Equip" itemid="2179" slot="ring" script="superVocationTransformationRing.lua" />
<movevent event="DeEquip" itemid="2179" slot="ring" script="superVocationTransformationRing.lua" />
Save this script as superVocationTransformationRing.lua
In data\movements\scripts
]]
-- Configuration Start
local c = {
useSoul = false, -- true to use soul, false to use an item instead
soulAmount = 50, -- amount of soul to remove per interval, setting it to 0 will make the ring last forever
itemid = 2160, -- item to use if useSoul is set to false
itemAmount = 0, -- item amount to remove from the player, setting it to 0 will make the ring last forever
vocationStorage = 18009, -- this holds the players old vocation
effectsStorage = 18010, -- the special effects storage
interval = 1, -- this effects the constant special effect but also the removal of the item/soul, 1 equals 1 second
destroyItem = false, -- should the item be destroyed when it runs out of soul/item amount?
disableAnimation = true -- the constant special effect that is applied to the player will be suppressed if set to true
}
local outfits = {
[1] = { -- sorcerer new outfit after transformation --
lookType = 130,
lookHead = 19,
lookBody = 71,
lookLegs = 128,
lookFeet = 128,
lookMount = 368,
lookAddons = 3
},
[2] = { -- druid new outfit after transformation --
lookType = 63,
lookHead = 20,
lookBody = 30,
lookLegs = 40,
lookFeet = 50,
lookMount = 624,
lookAddons = 3
},
[3] = { -- paladin new outfit after transformation --
lookType = 129,
lookHead = 95,
lookBody = 116,
lookLegs = 121,
lookFeet = 115,
lookMount = 647,
lookAddons = 3
},
[4] = { -- knight new outfit after transformation --
lookType = 131,
lookHead = 95,
lookBody = 95,
lookLegs = 95,
lookFeet = 95,
lookMount = 373,
lookAddons = 3
}
}
local effects = {
[1] = { -- sorcer
firsteffect = CONST_ME_ENERGYAREA,
secondeffect = CONST_ME_BLOCKHIT,
flingeffect = CONST_ANI_SMALLHOLY,
landeffect = CONST_ME_TELEPORT,
ringwaste = CONST_ME_FIREWORK_YELLOW,
ringsorb = CONST_ME_FIREATTACK
},
[2] = { -- druid
firsteffect = CONST_ME_ICEATTACK,
secondeffect = CONST_ME_ICETORNADO,
flingeffect = CONST_ME_ICETORNADO,
landeffect = CONST_ME_ICETORNADO,
ringwaste = CONST_ME_FIREWORK_BLUE,
ringsorb = CONST_ME_MAGIC_BLUE
},
[3] = { -- paladin
firsteffect = CONST_ME_YELLOW_RINGS,
secondeffect = CONST_ME_BLOCKHIT,
flingeffect = CONST_ANI_SMALLHOLY,
landeffect = CONST_ME_HOLYAREA,
ringwaste = CONST_ME_FIREWORK_YELLOW,
ringsorb = CONST_ME_MAGIC_GREEN
},
[4] = { -- knight
firsteffect = CONST_ME_EXPLOSIONAREA,
secondeffect = CONST_ME_FIREAREA,
flingeffect = CONST_ANI_FIRE,
landeffect = CONST_ME_FIREWORK_RED,
ringwaste = CONST_ME_FIREWORK_RED,
ringsorb = CONST_ME_MAGIC_RED
}
}
local stats = {
[1] = { -- sorcerer
parameters = {
{CONDITION_PARAM_SKILL_SHIELD, 20},
{CONDITION_PARAM_STAT_MAGICPOINTS, 35},
{CONDITION_PARAM_STAT_MAXHITPOINTS, 100},
{CONDITION_PARAM_STAT_MAXMANAPOINTS, 700}
}
},
[2] = { -- druid
parameters = {
{CONDITION_PARAM_SKILL_SHIELD, 20},
{CONDITION_PARAM_STAT_MAGICPOINTS, 35},
{CONDITION_PARAM_STAT_MAXHITPOINTS, 100},
{CONDITION_PARAM_STAT_MAXMANAPOINTS, 700}
}
},
[3] = { -- paladin
parameters = {
{CONDITION_PARAM_SKILL_DISTANCE, 35},
{CONDITION_PARAM_SKILL_SHIELD, 30},
{CONDITION_PARAM_STAT_MAGICPOINTS, 15},
{CONDITION_PARAM_STAT_MAXHITPOINTS, 400},
{CONDITION_PARAM_STAT_MAXMANAPOINTS, 350}
}
},
[4] = { -- knight
parameters = {
{CONDITION_PARAM_SKILL_FIST, 50},
{CONDITION_PARAM_SKILL_CLUB, 50},
{CONDITION_PARAM_SKILL_SWORD, 50},
{CONDITION_PARAM_SKILL_AXE, 50},
{CONDITION_PARAM_SKILL_SHIELD, 75},
{CONDITION_PARAM_STAT_MAGICPOINTS, 10},
{CONDITION_PARAM_STAT_MAXHITPOINTS, 1000},
{CONDITION_PARAM_STAT_MAXMANAPOINTS, 250}
}
}
}
local regen = {
[1] = { -- sorcerer
health = 35,
mana = 150
},
[2] = { -- druid
health = 35,
mana = 150
},
[3] = { -- paladin
health = 100,
mana = 100
},
[4] = { -- knight
health = 150,
mana = 50
}
}
-- Configuration End
Last edited: