Passe o conteudo do dois scripts
3
1.1k
info
Grupo: Infante
Registrado: 04/03/11
Posts: 1.6k
Reputação: +393
Char no Tibia: No Have

27 de maio de 2012 às 10:35
info
Grupo: Artesão
Registrado: 03/02/09
Posts: 134
Reputação: +15
Char no Tibia: Knight sparxzin

27 de maio de 2012 às 13:08
addon bonus
local hunter = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(hunter, CONDITION_PARAM_TICKS, -1)
setConditionParam(hunter, CONDITION_PARAM_SKILL_DISTANCE, 3)
local mage = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(mage, CONDITION_PARAM_TICKS, -1)
setConditionParam(mage, CONDITION_PARAM_STAT_MAGICLEVEL, 3)
local knight = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(knight, CONDITION_PARAM_TICKS, -1)
setConditionParam(knight, CONDITION_PARAM_SKILL_SWORD, 3)
setConditionParam(knight, CONDITION_PARAM_SKILL_AXE, 4)
setConditionParam(knight, CONDITION_PARAM_SKILL_CLUB, 5)
local nobleman = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(nobleman, CONDITION_PARAM_TICKS, -1)
setConditionParam(nobleman, CONDITION_PARAM_SKILL_CLUB, 3)
setConditionParam(nobleman, CONDITION_PARAM_SKILL_AXE, 3)
local warrior = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(warrior, CONDITION_PARAM_TICKS, -1)
setConditionParam(warrior, CONDITION_PARAM_SKILL_SWORD, 5)
setConditionParam(warrior, CONDITION_PARAM_SKILL_AXE, 3)
setConditionParam(warrior, CONDITION_PARAM_SKILL_CLUB, 4)
local barbarian = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(barbarian, CONDITION_PARAM_TICKS, -1)
setConditionParam(barbarian, CONDITION_PARAM_SKILL_SWORD, 2)
setConditionParam(barbarian, CONDITION_PARAM_SKILL_AXE, 5)
local druid = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(druid, CONDITION_PARAM_TICKS, -1)
setConditionParam(druid, CONDITION_PARAM_STAT_MAGICLEVEL, 4)
local wizzard = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(wizzard, CONDITION_PARAM_TICKS, -1)
setConditionParam(wizzard, CONDITION_PARAM_STAT_MAGICLEVEL, 1)
local pirate = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(pirate, CONDITION_PARAM_TICKS, -1)
setConditionParam(pirate, CONDITION_PARAM_SKILL_SWORD, 2)
setConditionParam(pirate, CONDITION_PARAM_SKILL_AXE, 2)
setConditionParam(pirate, CONDITION_PARAM_SKILL_CLUB, 3)
local assassin = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(assassin, CONDITION_PARAM_TICKS, -1)
setConditionParam(assassin, CONDITION_PARAM_SKILL_DISTANCE, 5)
local norse = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(norse, CONDITION_PARAM_TICKS, -1)
setConditionParam(norse, CONDITION_PARAM_SKILL_SHIELD, 2)
local nightmare = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(nightmare, CONDITION_PARAM_TICKS, -1)
setConditionParam(nightmare, CONDITION_PARAM_SKILL_SHIELD, 5)
local wayfarer = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(wayfarer, CONDITION_PARAM_TICKS, -1)
setConditionParam(wayfarer, CONDITION_PARAM_SKILL_SWORD, 2)
setConditionParam(wayfarer, CONDITION_PARAM_SKILL_AXE, 2)
setConditionParam(wayfarer, CONDITION_PARAM_SKILL_CLUB, 2)
setConditionParam(wayfarer, CONDITION_PARAM_SKILL_SHIELD, 2)
local baron = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(baron, CONDITION_PARAM_TICKS, -1)
setConditionParam(baron, CONDITION_PARAM_SKILL_SWORD, 3)
setConditionParam(baron, CONDITION_PARAM_SKILL_AXE, 3)
setConditionParam(baron, CONDITION_PARAM_SKILL_CLUB, 3)
setConditionParam(baron, CONDITION_PARAM_SKILL_DISTANCE, 3)
setConditionParam(baron, CONDITION_PARAM_STAT_MAGICLEVEL, 2)
local mldois = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(mldois, CONDITION_PARAM_TICKS, -1)
setConditionParam(mldois, CONDITION_PARAM_STAT_MAGICLEVEL, 2)
outfitBonusTable = { --- [] = {condition = , maxHealth = , maxMana = }
[128] = {maxHealth = 100, condition = speed1, typ = CONDITION_HASTE}, [136] = {maxHealth = 100, condition = speed1, typ = CONDITION_HASTE}, --Citizen
[129] = {condition = hunter}, [137] = {condition = hunter}, --Hunter
[130] = {condition = mage, maxMana = 200}, [138] = {condition = mage, maxMana = 200}, --Mage
[433] = {condition = mldois}, [432] = {condition = mldois}, --Elementalist
[430] = {condition = speed2, typ = CONDITION_HASTE}, [431] = {condition = speed2, typ = CONDITION_HASTE}, --Afflicted
[466] = {condition = mldois}, {condition = norse}, {condition = speed1, typ = CONDITION_HASTE}, [465] = {condition = mldois}, {condition = norse}, {condition = speed1, typ = CONDITION_HASTE}, --Insectoid
[464] = {condition = wayfarer}, {condition = speed1, typ = CONDITION_HASTE}, [463] = {condition = wayfarer}, {condition = speed1, typ = CONDITION_HASTE}, --Deplin
[471] = {condition = baron}, {condition = speed2, typ = CONDITION_HASTE}, [472] = {condition = baron}, {condition = speed2, typ = CONDITION_HASTE}, --Baron
[153] = {maxHealth = 200, maxMana = 200}, [157] = {maxHealth = 200, maxMana = 200}, --Beggar
[367] = {condition = wayfarer}, {condition = speed1, typ = CONDITION_HASTE}, [366] = {condition = wayfarer}, {condition = speed1, typ = CONDITION_HASTE}, --Wayfarer
[132] = {condition = nobleman}, [140] = {condition = nobleman}, --Nobleman
[131] = {condition = knight}, [139] = {condition = knight}, --Knight
[133] = {condition = mldois, maxMana = 100}, [141] = {condition = mldois, maxMana = 100}, --Summoner
[151] = {condition = pirate, maxHealth = 100}, [155] = {condition = pirate, maxHealth = 100}, --Pirate
[134] = {condition = warrior}, [142] = {condition = warrior}, --Warrior
[143] = {condition = barbarian}, [147] = {condition = barbarian}, --Barbarian
[144] = {condition = druid}, [148] = {condition = druid}, --Druid
[145] = {condition = wizzard, maxHealth = 100, maxMana = 100}, [149] = {condition = wizzard, maxHealth = 100, maxMana = 100}, --Wizard
[146] = {maxHealth = 200, maxMana = 200, condition = speed1, typ = CONDITION_HASTE}, [150] = {maxHealth = 200, maxMana = 200, condition = speed1, typ = CONDITION_HASTE}, --Oriental
[152] = {condition = assassin}, {condition = speed2, typ = CONDITION_HASTE}, [156] = {condition = assassin}, {condition = speed2, typ = CONDITION_HASTE}, --Assassin
[154] = {condition = mage}, [158] = {condition = mage}, --Shaman
[251] = {condition = norse, maxHealth = 200}, [252] = {condition = norse, maxHealth = 200}, --Norse
[268] = {condition = nightmare}, [269] = {condition = nightmare}, --Nightmare
[270] = {maxHealth = 100, condition = speed1, typ = CONDITION_HASTE}, [273] = {maxHealth = 100, condition = speed1, typ = CONDITION_HASTE}, --Jester
[278] = {condition = mldois, maxHealth = 100}, [279] = {condition = mldois, maxHealth = 100}, --Brotherhood
[335] = {condition = mldois, maxHealth = 100}, {condition = speed1, typ = CONDITION_HASTE}, [336] = {condition = mldois, maxHealth = 100}, {condition = speed1, typ = CONDITION_HASTE}, --Warmaster
[288] = {maxHealth = 200, condition = speed2, typ = CONDITION_HASTE}, [289] = {maxHealth = 200, condition = speed2, typ = CONDITION_HASTE}, --Demonhunter
[324] = {condition = mldois}, {condition = speed1, typ = CONDITION_HASTE}, [325] = {condition = mldois}, {condition = speed1, typ = CONDITION_HASTE} --Yalaharian
}
function onLogin(cid)
registerCreatureEvent(cid, "Addons")
local oldOutfit = getCreatureOutfit(cid)
if (oldOutfit.lookAddons ~= 3) or (outfitBonusTable[oldOutfit.lookType] == nil) or ((outfitBonusTable[oldOutfit.lookType]).condition == nil) then
return true
end
doAddCondition(cid, (outfitBonusTable[oldOutfit.lookType]).condition)
return true
end
function onOutfit(cid, old, current)
if old.lookAddons == 3 and outfitBonusTable[old.lookType] then --Bonus off
if (outfitBonusTable[old.lookType]).maxHealth ~= nil then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) -(outfitBonusTable[old.lookType]).maxHealth)
doCreatureAddHealth(cid, -(outfitBonusTable[old.lookType]).maxHealth)
end
if (outfitBonusTable[old.lookType]).maxMana ~= nil then
setCreatureMaxMana(cid, getCreatureMaxMana(cid) -(outfitBonusTable[old.lookType]).maxMana)
doCreatureAddMana(cid, -(outfitBonusTable[old.lookType]).maxMana)
end
if (outfitBonusTable[old.lookType]).condition ~= nil then
(outfitBonusTable[old.lookType]).typ = ( (outfitBonusTable[old.lookType]).typ == nil) and CONDITION_ATTRIBUTES or (outfitBonusTable[old.lookType]).typ
doRemoveCondition(cid, (outfitBonusTable[old.lookType]).typ)
end
end
if current.lookAddons == 3 and outfitBonusTable[current.lookType] then --Bonus on
if (outfitBonusTable[current.lookType]).maxHealth ~= nil then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) +(outfitBonusTable[current.lookType]).maxHealth)
doCreatureAddHealth(cid, (outfitBonusTable[current.lookType]).maxHealth)
end
if (outfitBonusTable[current.lookType]).maxMana ~= nil then
setCreatureMaxMana(cid, getCreatureMaxMana(cid) +(outfitBonusTable[current.lookType]).maxMana)
doCreatureAddMana(cid, (outfitBonusTable[current.lookType]).maxMana)
end
if (outfitBonusTable[current.lookType]).condition ~= nil then
doAddCondition(cid, (outfitBonusTable[current.lookType]).condition)
end
end
return true
end
utito tempo san.. mais acontece com todas magias que dao sklls
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, 10000) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCEPERCENT, 150) setConditionParam(condition, CONDITION_PARAM_BUFF, true) setCombatCondition(combat, condition) local speed = createConditionObject(CONDITION_PARALYZE) setConditionParam(speed, CONDITION_PARAM_TICKS, 10000) setConditionFormula(speed, -0.7, 56, -0.7, 56) setCombatCondition(combat, speed) function onCastSpell(cid, var) return doCombat(cid, combat, var) end
ajuda


info
Grupo: Artesão
Registrado: 03/02/09
Posts: 134
Reputação: +15
Char no Tibia: Knight sparxzin
Uso addon bonus, que fica em creaturescripts e tal
quando o player usa um addon que da bonus de skills, as magias de buff como utito tempo, utito tempo san etc, nao funcionam
como fazer os dois funcionar? +rep