Dark-Tibia
Dark-Tibia
Dark-Tibia
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.


En este foro encontras ayuda subre tu Otserver
 
ÍndicePortalÚltimas imágenesBuscarRegistrarseConectarse
Navegación
 Portal
 Índice
 Miembros
 Perfil
 FAQ
 Buscar
Conectarse
Nombre de Usuario:
Contraseña:
Entrar automáticamente en cada visita: 
:: Recuperar mi contraseña
Últimos temas
» johnnathann
Addons Bonus system Icon_minitimeSáb Sep 15, 2012 8:48 pm por johnnathannj

»  [8.70] Real Global Map 1.8 + Imagenes + Scans
Addons Bonus system Icon_minitimeLun Jun 11, 2012 4:53 am por Lazcano

» Speedy War [8.60]
Addons Bonus system Icon_minitimeVie Mar 30, 2012 2:12 pm por GOD ALE

»  [Rpg-Pvp][8.60]Kreuus Easy
Addons Bonus system Icon_minitimeJue Mar 29, 2012 11:42 pm por GOD ALE

» [Script] Royal Crossbow!
Addons Bonus system Icon_minitimeJue Mar 29, 2012 11:22 pm por GOD ALE

» Ayuda con el ot server
Addons Bonus system Icon_minitimeJue Mar 29, 2012 10:45 pm por GOD ALE

»  Tiko ot editado 8.60
Addons Bonus system Icon_minitimeJue Mar 29, 2012 10:34 pm por GOD ALE

»  VikiRanch.'[8.60] war v.1.0
Addons Bonus system Icon_minitimeJue Mar 29, 2012 9:54 pm por GOD ALE

» Abrir Puertos De Tibia En El Router Thomson tg585 de telmex
Addons Bonus system Icon_minitimeVie Oct 28, 2011 1:21 pm por panda

Mejores posteadores
Dj Pacos
Addons Bonus system I_vote_lcapAddons Bonus system I_voting_barAddons Bonus system I_vote_rcap 
admin heber723
Addons Bonus system I_vote_lcapAddons Bonus system I_voting_barAddons Bonus system I_vote_rcap 
God Maracula
Addons Bonus system I_vote_lcapAddons Bonus system I_voting_barAddons Bonus system I_vote_rcap 
GoD Mexicansoul
Addons Bonus system I_vote_lcapAddons Bonus system I_voting_barAddons Bonus system I_vote_rcap 
God Dunckan
Addons Bonus system I_vote_lcapAddons Bonus system I_voting_barAddons Bonus system I_vote_rcap 
Admin Azteca
Addons Bonus system I_vote_lcapAddons Bonus system I_voting_barAddons Bonus system I_vote_rcap 
Slayer
Addons Bonus system I_vote_lcapAddons Bonus system I_voting_barAddons Bonus system I_vote_rcap 
God Damubu
Addons Bonus system I_vote_lcapAddons Bonus system I_voting_barAddons Bonus system I_vote_rcap 
DJ Punk
Addons Bonus system I_vote_lcapAddons Bonus system I_voting_barAddons Bonus system I_vote_rcap 
Glonlova
Addons Bonus system I_vote_lcapAddons Bonus system I_voting_barAddons Bonus system I_vote_rcap 

 

 Addons Bonus system

Ir abajo 
3 participantes
AutorMensaje
God Dunckan
Nivel 4
Nivel 4
God Dunckan


100

Mensajes : 67
Puntos : 192
Reputación : 22
Fecha de inscripción : 03/05/2011

Addons Bonus system Empty
MensajeTema: Addons Bonus system   Addons Bonus system Icon_minitimeMar Mayo 10, 2011 3:43 pm

Bien les traigo desde otlan est scritp que lo que hace es segun el addon que llebes te da unos atributos por ejemplo, mas vida,mas mana,mas distancia.. etc..

Creamos un archivo y lo llamamos..outfits.lua y dentro ponemos

Código:

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)

local nightmare = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(norse, CONDITION_PARAM_TICKS, -1)
setConditionParam(norse, CONDITION_PARAM_SKILL_SHIELD, 3)

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)

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] = {maxMana = 200}, [138] = {maxMana = 200}, --Mage
        [131] = {condition = knight}, [139] = {condition = knight}, --Knight
        [133] = {maxMana = 100}, [141] = {maxMana = 100}, --Summoner
        [134] = {condition = knight}, [142] = {condition = knight}, --Warrior
        [143] = {condition = barbarian}, [147] = {condition = barbarian}, --Barbarian
        [144] = {condition = mage}, [148] = {condition = mage}, --Druid
        [145] = {maxHealth = 100, maxMana = 100}, [149] = {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 = speed2, typ = CONDITION_HASTE}, [156] = {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, maxHealth = 100}, [269] = {condition = nightmare, maxHealth = 100}, --Nightmare
        [270] = {maxHealth = 100, maxMana = 100, condition = speed1, typ = CONDITION_HASTE}, [273] = {maxHealth = 100, maxMana = 100, condition = speed1, typ = CONDITION_HASTE}, --Jester
        [278] = {maxHealth = 200}, [279] = {maxHealth = 200}, --Brotherhood
        [288] = {maxHealth = 500, maxMana = 500, condition = speed2, typ = CONDITION_HASTE}, [289] = {maxHealth = 500, maxMana = 500, condition = speed2, typ = CONDITION_HASTE}, --Demonhunter
        [324] = {condition = mage, maxHealth = 200, maxMana = 200}, [325] = {condition = mage, maxHealth = 200, maxMana = 200} --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)
                                                doRemoveCondition(cid, CONDITION_INFIGHT)
                end
                if (outfitBonusTable[old.lookType]).maxMana ~= nil then
                        setCreatureMaxMana(cid, getCreatureMaxMana(cid) -(outfitBonusTable[old.lookType]).maxMana)
                        doCreatureAddMana(cid, -(outfitBonusTable[old.lookType]).maxMana)
                                                doRemoveCondition(cid, CONDITION_INFIGHT)
                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



Luego vamos a xml y agregamos..


Código:


<event type="outfit" name="Addons" event="script"  value="outfits.lua"/>
<event type="login" name="AddonsLogin" event="script" value="outfits.lua"/>


Doi creditos ami 1% por traerlo y a elexonic 99%
Volver arriba Ir abajo
admin heber723
Admin
Admin
admin heber723


100

Mensajes : 128
Puntos : 1163
Reputación : 16
Fecha de inscripción : 27/04/2011

Addons Bonus system Empty
MensajeTema: Re: Addons Bonus system   Addons Bonus system Icon_minitimeMar Mayo 10, 2011 4:14 pm

hola amigo chido gracias por el aporte pero me parece que ya andaba posteado pero de igual forma gracias por traerlo +rep
Volver arriba Ir abajo
Dj Pacos
Admin
Admin
Dj Pacos


100

Mensajes : 169
Puntos : 294
Reputación : 56
Fecha de inscripción : 01/05/2011
Edad : 31

Addons Bonus system Empty
MensajeTema: Re: Addons Bonus system   Addons Bonus system Icon_minitimeMar Mayo 10, 2011 7:46 pm

hay uno parecido de god maracula pero no es el mismo.

gran aporte.
Volver arriba Ir abajo
Contenido patrocinado





Addons Bonus system Empty
MensajeTema: Re: Addons Bonus system   Addons Bonus system Icon_minitime

Volver arriba Ir abajo
 
Addons Bonus system
Volver arriba 
Página 1 de 1.

Permisos de este foro:No puedes responder a temas en este foro.
Dark-Tibia :: Scripts-
Cambiar a: