arturhaddad
Member
- Joined
- Aug 14, 2010
- Messages
- 217
- Reaction score
- 8
Hello,
i'm using this addon bonus system:
resumed /\
so anyone that uses that full outfits will have the bonus.
I want that every vocation can still use every outfit BUT only X vocation gain the bonus for an especific outfit.
EXAMPLE:
Full hunter outfit gives +3 distance.
Paladins wearing full hunter outfit will have +3 distance.
Sorcerers, druids and knights are able to use the full outfit but they won't have +3 distance.
I saw that this script can be easily adapted and might work:
BUT it wont have as many functions as in outfits.xml
i'm using this addon bonus system:
XML:
<outfits>
<outfit id="2">
<list gender="0" lookType="137" name="Hunter">
<skills dist="3"/>
</list>
<list gender="1" lookType="129" name="Hunter">
<skills dist="3"/>
</list>
</outfit>
<outfit id="3">
<list gender="0" lookType="138" name="Mage">
<stats magLevel="2"/>
<stats maxMana="200"/>
</list>
<list gender="1" lookType="130" name="Mage">
<stats magLevel="2"/>
<stats maxMana="200"/>
</list>
</outfit>
so anyone that uses that full outfits will have the bonus.
I want that every vocation can still use every outfit BUT only X vocation gain the bonus for an especific outfit.
EXAMPLE:
Full hunter outfit gives +3 distance.
Paladins wearing full hunter outfit will have +3 distance.
Sorcerers, druids and knights are able to use the full outfit but they won't have +3 distance.
I saw that this script can be easily adapted and might work:
Lua:
local hunter = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(hunter, CONDITION_PARAM_TICKS, -1)
setConditionParam(hunter, CONDITION_PARAM_SKILL_DISTANCE, 3)
local knight = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(knight, CONDITION_PARAM_TICKS, -1)
setConditionParam(knight, CONDITION_PARAM_SKILL_SWORD, 3)
local mage = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(mage, CONDITION_PARAM_TICKS, -1)
setConditionParam(mage, CONDITION_PARAM_STAT_MAGICLEVEL, 2)
local yalahar = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(yalahar, CONDITION_PARAM_TICKS, -1)
setConditionParam(yalahar, CONDITION_PARAM_STAT_MAGICLEVEL, 2)
local barbarian = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(barbarian, CONDITION_PARAM_TICKS, -1)
setConditionParam(barbarian, CONDITION_PARAM_SKILL_AXE, 3)
local norse = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(norse, CONDITION_PARAM_TICKS, -1)
setConditionParam(norse, CONDITION_PARAM_SKILL_SHIELD, 2)
local nightmare = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(norse, CONDITION_PARAM_TICKS, -1)
setConditionParam(norse, CONDITION_PARAM_SKILL_SHIELD, 3)
function onOutfit(cid, old, current)
if(current.lookType == old.lookType) then
return TRUE
end
--Citizen
if(current.lookType == 128 and current.lookAddons == 3 or current.lookType == 136 and current.lookAddons == 3) then --Bonus on
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 100)
doCreatureAddHealth(cid, 100)
doChangeSpeed(cid, 10)
elseif(old.lookType == 128 and old.lookAddons == 3 or old.lookType == 136 and old.lookAddons == 3) then --Bonus off
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 100)
doCreatureAddHealth(cid, -100)
doChangeSpeed(cid, -10)
end
--Hunter
if(current.lookType == 129 and current.lookAddons == 3 or current.lookType == 137 and current.lookAddons == 3) then --Bonus on
doAddCondition(cid, hunter)
elseif(old.lookType == 129 and old.lookAddons == 3 or old.lookType == 137 and old.lookAddons == 3) then --Bonus off
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
end
--Mage
if(current.lookType == 130 and current.lookAddons == 3 or current.lookType == 138 and current.lookAddons == 3) then --Bonus on
doAddCondition(cid, mage)
setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 200)
doCreatureAddMana(cid, 200)
elseif(old.lookType == 130 and old.lookAddons == 3 or old.lookType == 138 and old.lookAddons == 3) then --Bonus off
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
setCreatureMaxMana(cid, getCreatureMaxMana(cid) - 200)
doCreatureAddMana(cid, -200)
end
--Knight
if(current.lookType == 131 and current.lookAddons == 3 or current.lookType == 139 and current.lookAddons == 3) then --Bonus on
doAddCondition(cid, knight)
elseif(old.lookType == 131 and old.lookAddons == 3 or old.lookType == 139 and old.lookAddons == 3) then --Bonus off
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
end
--Summoner
if(current.lookType == 133 and current.lookAddons == 3 or current.lookType == 141 and current.lookAddons == 3) then --Bonus on
doAddCondition(cid, mage)
setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 100)
doCreatureAddMana(cid, 100)
elseif(old.lookType == 133 and old.lookAddons == 3 or old.lookType == 141 and old.lookAddons == 3) then --Bonus off
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
setCreatureMaxMana(cid, getCreatureMaxMana(cid) - 100)
doCreatureAddMana(cid, -100)
end
--Warrior
if(current.lookType == 134 and current.lookAddons == 3 or current.lookType == 142 and current.lookAddons == 3) then --Bonus on
doAddCondition(cid, knight)
elseif(old.lookType == 134 and old.lookAddons == 3 or old.lookType == 142 and old.lookAddons == 3) then --Bonus off
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
end
--Barbarian
if(current.lookType == 143 and current.lookAddons == 3 or current.lookType == 147 and current.lookAddons == 3) then --Bonus on
doAddCondition(cid, barbarian)
elseif(old.lookType == 143 and old.lookAddons == 3 or old.lookType == 147 and old.lookAddons == 3) then --Bonus off
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
end
--Druid
if(current.lookType == 144 and current.lookAddons == 3 or current.lookType == 148 and current.lookAddons == 3) then --Bonus on
doAddCondition(cid, mage)
elseif(old.lookType == 144 and old.lookAddons == 3 or old.lookType == 148 and old.lookAddons == 3) then --Bonus off
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
end
--Wizard
if(current.lookType == 145 and current.lookAddons == 3 or current.lookType == 149 and current.lookAddons == 3) then --Bonus on
doAddCondition(cid, mage)
setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 100)
doCreatureAddMana(cid, 100)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 100)
doCreatureAddHealth(cid, 100)
elseif(old.lookType == 145 and old.lookAddons == 3 or old.lookType == 149 and old.lookAddons == 3) then --Bonus off
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
setCreatureMaxMana(cid, getCreatureMaxMana(cid) - 100)
doCreatureAddMana(cid, -100)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 100)
doCreatureAddHealth(cid, -100)
end
--Oriental
if(current.lookType == 146 and current.lookAddons == 3 or current.lookType == 150 and current.lookAddons == 3) then --Bonus on
setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 200)
doCreatureAddMana(cid, 200)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 200)
doCreatureAddHealth(cid, 200)
doChangeSpeed(cid, 10)
elseif(old.lookType == 146 and old.lookAddons == 3 or old.lookType == 150 and old.lookAddons == 3) then --Bonus off
setCreatureMaxMana(cid, getCreatureMaxMana(cid) - 200)
doCreatureAddMana(cid, -200)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 200)
doCreatureAddHealth(cid, -200)
doChangeSpeed(cid, -10)
end
--Assassin
if(current.lookType == 152 and current.lookAddons == 3 or current.lookType == 156 and current.lookAddons == 3) then --Bonus on
doAddCondition(cid, hunter)
doChangeSpeed(cid, 20)
elseif(old.lookType == 152 and old.lookAddons == 3 or old.lookType == 156 and old.lookAddons == 3) then --Bonus off
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
doChangeSpeed(cid, -20)
end
--Shaman
if(current.lookType == 154 and current.lookAddons == 3 or current.lookType == 158 and current.lookAddons == 3) then --Bonus on
doAddCondition(cid, mage)
elseif(old.lookType == 154 and old.lookAddons == 3 or old.lookType == 158 and old.lookAddons == 3) then --Bonus off
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
end
--Norse
if(current.lookType == 251 and current.lookAddons == 3 or current.lookType == 252 and current.lookAddons == 3) then --Bonus on
doAddCondition(cid, norse)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 200)
doCreatureAddHealth(cid, 200)
elseif(old.lookType == 251 and old.lookAddons == 3 or old.lookType == 252 and old.lookAddons == 3) then --Bonus off
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 200)
doCreatureAddHealth(cid, -200)
end
--Nightmare
if(current.lookType == 268 and current.lookAddons == 3 or current.lookType == 269 and current.lookAddons == 3) then --Bonus on
doAddCondition(cid, nightmare)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 100)
doCreatureAddHealth(cid, 100)
elseif(old.lookType == 268 and old.lookAddons == 3 or old.lookType == 269 and old.lookAddons == 3) then --Bonus off
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 100)
doCreatureAddHealth(cid, -100)
end
--Jester
if(current.lookType == 270 and current.lookAddons == 3 or current.lookType == 273 and current.lookAddons == 3) then --Bonus on
setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 100)
doCreatureAddMana(cid, 100)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 100)
doCreatureAddHealth(cid, 100)
doChangeSpeed(cid, 10)
elseif(old.lookType == 270 and old.lookAddons == 3 or old.lookType == 273 and old.lookAddons == 3) then --Bonus off
setCreatureMaxMana(cid, getCreatureMaxMana(cid) - 100)
doCreatureAddMana(cid, -100)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 100)
doCreatureAddHealth(cid, -100)
doChangeSpeed(cid, -10)
end
--Brotherhood
if(current.lookType == 278 and current.lookAddons == 3 or current.lookType == 279 and current.lookAddons == 3) then --Bonus on
doAddCondition(cid, mage)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 200)
doCreatureAddHealth(cid, 200)
elseif(old.lookType == 278 and old.lookAddons == 3 or old.lookType == 279 and old.lookAddons == 3) then --Bonus off
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 200)
doCreatureAddHealth(cid, -200)
end
--Demonhunter
if(current.lookType == 288 and current.lookAddons == 3 or current.lookType == 289 and current.lookAddons == 3) then --Bonus on
setCreatureMaxMana(cid, getCreatureMaxMana(cid) - 100)
doCreatureAddMana(cid, -100)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 100)
doCreatureAddHealth(cid, 100)
doChangeSpeed(cid, 20)
elseif(old.lookType == 288 and old.lookAddons == 3 or old.lookType == 289 and old.lookAddons == 3) then --Bonus off
setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 100)
doCreatureAddMana(cid, 100)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 100)
doCreatureAddHealth(cid, -100)
doChangeSpeed(cid, -20)
end
--Yalaharian
if(current.lookType == 324 and current.lookAddons == 3 or current.lookType == 325 and current.lookAddons == 3) then --Bonus on
setCreatureMaxMana(cid, getCreatureMaxMana(cid) + 200)
doCreatureAddMana(cid, 200)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + 200)
doCreatureAddHealth(cid, 200)
doAddCondition(cid, yalahar)
elseif(old.lookType == 324 and old.lookAddons == 3 or old.lookType == 325 and old.lookAddons == 3) then --Bonus off
setCreatureMaxMana(cid, getCreatureMaxMana(cid) - 200)
doCreatureAddMana(cid, -200)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - 200)
doCreatureAddHealth(cid, -200)
doRemoveCondition(cid, yalahar)
end
return TRUE
end
BUT it wont have as many functions as in outfits.xml
XML:
manaShield
invisible
healthGain/healthTicks
manaGain/manaTicks
speed
--------------
reflect percentAll
reflect percentElements
reflect percentMagic
reflect percentEnergy
reflect percentFire
reflect percentPoison
reflect percentIce
reflect percentHoly
reflect percentDeath
reflect percentLifeDrain
reflect percentManaDrain
reflect percentDrown
reflect percentPhysical
reflect percentHealing
reflect percentUndefined
reflect chanceAll
reflect chanceElements
reflect chanceMagic
reflect chanceEnergy
reflect chancetFire
reflect chancePoison
reflect chanceIce
reflect chanceHoly
reflect chanceDeath
reflect chanceLifeDrain
reflect chanceManaDrain
reflect chanceDrown
reflect chancePhysical
reflect chanceHealing
reflect chanceUndefined
--------------
absorb percentAll
absorb percentElements
absorb percentMagic
absorb percentEnergy
absorb percentFire
absorb percentPoison
absorb percentIce
absorb percentHoly
absorb percentDeath
absorb percentLifeDrain
absorb percentManaDrain
absorb percentDrown
absorb percentPhysical
absorb percentHealing
absorb percentUndefined
--------------
skills fist
skills club
skills axe
skills sword
skills distance
skills shielding
skills fishing
skills melee (fist, club, sword y axe)
skills weapon (club, sword, axe, dist)
skills fistPercent
skills clubPercent
skills axePercent
skills swordPercent
skills distancePercent
skills shieldingPercent
skills fishingPercent
skills meleePercent (fist, club, sword y axe)
skills weaponPercent (club, sword, axe, dist)
--------------
stats maxHealth
stats maxMana
stats soul
stats level
stats magLevel
stats maxHealthPercent
stats maxManaPercent
stats soulPercent
stats levelPercent
stats magLevelPercent
--------------
supress poison
supress fire
supress energy
supress physical
supress haste
supress paralyze
supress invisible
supress light
supress manaShield
supress drunk
supress drown
supress muted
Last edited: