Ir para conteúdo
  • 0

[Pedido] Script De Bônus


Maconheira

Pergunta

Boa Tarde, eu queria um script que quando você consegue fazer um addon completo e usar ele, você ficará com um bônus de Skill ou Speed. Exemplo:

 

Quando completar o addon hunter e usar ele você ficará com +1 de Distance

 

Se alguém puder me ajudar, eu darei um Rep+ como recompensa

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

não é de minha autoria.

 

 


<event type="outfit" name="Addons" event="script" value="outfits.lua"/>
<event type="login" name="AddonsLogin" event="script" value="outfits.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 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)
setConditionParam(norse, CONDITION_PARAM_STAT_MAXHEALTH, 200) --- hp

local nightmare = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(nightmare, CONDITION_PARAM_TICKS, -1)
setConditionParam(nightmare, CONDITION_PARAM_SKILL_SHIELD, 3)
setConditionParam(nightmare, CONDITION_PARAM_STAT_MAXHEALTH, 100) --- hp

local yalaharian = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(yalaharian, CONDITION_PARAM_TICKS, -1)
setConditionParam(yalaharian, CONDITION_PARAM_STAT_MAGICLEVEL, 2)
setConditionParam(yalaharian, CONDITION_PARAM_STAT_MAXHEALTH, 200) --- hp
setConditionParam(yalaharian, CONDITION_PARAM_STAT_MAXMANA, 200) --- mana

local demonhunter = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(demonhunter, CONDITION_PARAM_TICKS, -1)
setConditionParam(demonhunter, CONDITION_PARAM_STAT_MAXHEALTH, 500) --- hp
setConditionParam(demonhunter, CONDITION_PARAM_STAT_MAXMANA, 500) -- mana

local brotherhood = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(brotherhood, CONDITION_PARAM_TICKS, -1)
setConditionParam(brotherhood, CONDITION_PARAM_STAT_MAXHEALTH, 200) --- hp

local hpmana100 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(hpmana100, CONDITION_PARAM_TICKS, -1)
setConditionParam(hpmana100, CONDITION_PARAM_STAT_MAXHEALTH, 100) --- hp
setConditionParam(hpmana100, CONDITION_PARAM_STAT_MAXMANA, 100) --- mana

local hpmana200 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(hpmana200, CONDITION_PARAM_TICKS, -1)
setConditionParam(hpmana200, CONDITION_PARAM_STAT_MAXHEALTH, 200) --- hp
setConditionParam(hpmana200, CONDITION_PARAM_STAT_MAXMANA, 200) --- mana

local mana100 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(mana100, CONDITION_PARAM_TICKS, -1)
setConditionParam(mana100, CONDITION_PARAM_STAT_MAXMANA, 100) --- mana

local mana200 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(mana200, CONDITION_PARAM_TICKS, -1)
setConditionParam(mana200, CONDITION_PARAM_STAT_MAXMANA, 200) --- mana

local hp100 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(hp100, CONDITION_PARAM_TICKS, -1)
setConditionParam(hp100, CONDITION_PARAM_STAT_MAXHEALTH, 100) --- hp

local speed1 = createConditionObject(CONDITION_HASTE)
setConditionParam(speed1, CONDITION_PARAM_TICKS, -1)
setConditionParam(speed1, CONDITION_PARAM_SPEED, 10)

local speed2 = createConditionObject(CONDITION_HASTE)
setConditionParam(speed2, CONDITION_PARAM_TICKS, -1)
setConditionParam(speed2, CONDITION_PARAM_SPEED, 20)

--- CONDITION_PARAM_STAT_MAXHEALTH, CONDITION_PARAM_STAT_MAXMANA
--- CONDITION_PARAM_BUFF
outfitBonusTable = { --- [] = {condition = , typ = }
[128] = {condition = {speed1, hp100}, typ = {CONDITION_HASTE, CONDITION_ATTRIBUTES}}, [136] = {condition = {speed1, hp100}, typ = {CONDITION_HASTE, CONDITION_ATTRIBUTES}}, --Citizen --[maxHealth = 100]
[129] = {condition = hunter}, [137] = {condition = hunter}, --Hunter
[130] = {condition = mana200, typ = CONDITION_ATTRIBUTES}, [138] = {condition = mana200, typ = CONDITION_ATTRIBUTES}, --Mage
[131] = {condition = knight, typ = CONDITION_ATTRIBUTES}, [139] = {condition = knight, typ = CONDITION_ATTRIBUTES}, --Knight
[133] = {condition = mana100, typ = CONDITION_ATTRIBUTES}, [141] = {condition = mana100, typ = CONDITION_ATTRIBUTES}, --Summoner -- [maxMana = 100]
[134] = {condition = knight, typ = CONDITION_ATTRIBUTES}, [142] = {condition = knight, typ = CONDITION_ATTRIBUTES}, --Warrior
[143] = {condition = barbarian, typ = CONDITION_ATTRIBUTES}, [147] = {condition = barbarian, typ = CONDITION_ATTRIBUTES}, --Barbarian
[144] = {condition = mage, typ = CONDITION_ATTRIBUTES}, [148] = {condition = mage, typ = CONDITION_ATTRIBUTES}, --Druid
[145] = {condition = {hpmana100}, typ = CONDITION_ATTRIBUTES}, [149] = {condition = {hpmana100}, typ = CONDITION_ATTRIBUTES}, --Wizard --[maxHealth = 100, maxMana = 100]
[146] = {condition = {speed1, hpmana200}, typ = {CONDITION_HASTE, CONDITION_ATTRIBUTES}}, [150] = {condition = {speed1, hpmana200}, typ = {CONDITION_HASTE, CONDITION_ATTRIBUTES}}, --Oriental --[maxHealth = 200, maxMana = 200]
[152] = {condition = speed2, typ = CONDITION_HASTE}, [156] = {condition = speed2, typ = CONDITION_HASTE}, --Assassin
[154] = {condition = mage, typ = CONDITION_ATTRIBUTES}, [158] = {condition = mage, typ = CONDITION_ATTRIBUTES}, --Shaman
[251] = {condition = norse, typ = CONDITION_ATTRIBUTES}, [252] = {condition = norse, typ = CONDITION_ATTRIBUTES}, --Norse [maxHealth = 200]
[268] = {condition = nightmare, typ = CONDITION_ATTRIBUTES}, [269] = {condition = nightmare, typ = CONDITION_ATTRIBUTES}, --Nightmare --[maxHealth = 100]
[270] = {condition = {speed1, hpmana100}, typ = {CONDITION_HASTE, CONDITION_ATTRIBUTES}}, [273] = {condition = {speed1, hpmana100}, typ = {CONDITION_HASTE, CONDITION_ATTRIBUTES}}, --Jester --[maxHealth = 100, maxMana = 100]
[278] = {condition = brotherhood, typ = CONDITION_ATTRIBUTES}, [279] = {condition = brotherhood, typ = CONDITION_ATTRIBUTES}, --Brotherhood -- [maxHealth = 200]
[288] = {condition = speed2, typ = CONDITION_HASTE}, [289] = {condition = speed2, typ = CONDITION_HASTE}, --Demonhunter --[maxHealth = 500, maxMana = 500]
[324] = {condition = yalaharian, typ = CONDITION_ATTRIBUTES}, [325] = {condition = yalaharian, typ = CONDITION_ATTRIBUTES} --Yalaharian -- [maxHealth = 200, maxMana = 200]
}

function onLogin(cid)
registerCreatureEvent(cid, "Addons")
--- local current = getCreatureOutfit(cid)
return onOutfit(cid, {lookAddons = 1}, getCreatureOutfit(cid)) and true
end

function onOutfit(cid, old, current)
if getPlayerAccess(cid) >= 3 then
return print("Staff/support can't get any addon bonus!") and true
end
if old.lookAddons == 3 and outfitBonusTable[old.lookType] then --Bonus off
if (outfitBonusTable[old.lookType]).typ ~= nil then
if type((outfitBonusTable[old.lookType]).typ) == "table" then
for _, value in pairs((outfitBonusTable[old.lookType]).typ) do
doRemoveCondition(cid, value)
end
else
doRemoveCondition(cid, (outfitBonusTable[old.lookType]).typ)
end
end
end
if current.lookAddons == 3 and outfitBonusTable[current.lookType] then --Bonus on
if (outfitBonusTable[current.lookType]).condition ~= nil then
if type((outfitBonusTable[current.lookType]).condition) == "table" then
for _, value in pairs((outfitBonusTable[current.lookType]).condition) do
doAddCondition(cid, value)
end
else
doAddCondition(cid, (outfitBonusTable[current.lookType]).condition)
end
end
end
return true
end

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...