Tibia Dark

TibiaDark Aqui Podras Encontrar Todo Sobre OTXserver.


Addon Por Statuas

Comparte
avatar
Kroxos

Vocacion : Paladin

Experiencia : LUA

Mensajes : 7
Reputación : 2
Edad : 22
Localización : Venezuela

Addon Por Statuas

Mensaje por Kroxos el Mar Jun 17, 2014 11:02 am

Hola a todos los usuarios de Tibia Dark Aqui les traigo addon por statuas primero vamos a actions/scripts crean un lua y llamado addonsstatus y agregan los siguiente:

Código:
local config = {

[3001] = {
      name = "Citizen Addon", -- name
      addon_type = 3, -- addon
      outfit = {136,128}, -- female / male
      cost = 0, -- cost
      items = {{5878,100},{5890,100},{5902,50},{2480,1}}, -- items
  },
  [3002] = {
      name = "Second Citizen Addon",
      addon_type = 2,
      outfit = {136,128},
      cost = 0,
      items = {{5890,100},{5902,50},{2480,1}},
  },
  [3003] = {
      name = "Hunter Addon",
      addon_type = 3,
      outfit = {137,129},
      cost = 0,
      items = {{5947,1},{5876,100},{5948,100},{5889,1},{5887,1},{5888,1},{5891,5},{5875,1}},
  },
  [3004] = {
      name = "Second Hunter Addon",
      addon_type = 2,
      outfit = {137,129},
      cost = 0,
      items = {{5875,1}},
  },
  [3005] = {
      name = "Mage Addon",
      addon_type = 3,
      outfit = {138,130},
      cost = 0,
      items = {{5958,1},{5903,1}},
  },
  [3006] = {
      name = "Second Mage Addon",
      addon_type = 2,
      outfit = {138,130},
      cost = 0,
      items = {{5903,1}},
  },
  [3007] = {
      name = "Knight Addon",
      addon_type = 3,
      outfit = {139,131},
      cost = 0,
      items = {{5880,100},{5893,100},{5924,1},{5885,1},{5887,1}},
  },
  [3008] = {
      name = "Second Knight Addon",
      addon_type = 2,
      outfit = {139,131},
      cost = 0,
      items = {{5893,100},{5924,1},{5885,1},{5887,1}},
  },
  [3009] = {
      name = "Nobleman Addon",
      addon_type = 3,
      outfit = {140,132},
      cost = 300000,
      items = {},
  },
  [3010] = {
      name = "Second Nobleman Addon",
      addon_type = 2,
      outfit = {140,132},
      cost = 150000,
      items = {},
  },
 
  [3011] = {
      name = "Summoner Addon",
      addon_type = 3,
      outfit = {141,133},
      cost = 0,
      items = {{5958,1},{5894,70},{5911,20},{5883,40},{5905,30},{5904,15},{5882,40},{5881,60},{5886,10},{5922,35}},
  },
  [3012] = {
      name = "Second Summoner Addon",
      addon_type = 2,
      outfit = {141,133},
      cost = 0,
      items = {{5894,70},{5911,20},{5883,40},{5905,30},{5904,15},{5882,40},{5881,60},{5886,10},{5922,35}},
  },
  [3013] = {
      name = "Warrior Addon",
      addon_type = 3,
      outfit = {142,134},
      cost = 0,
      items = {{5899,100},{5925,100},{5884,1},{5919,1},{5887,1},{5880,100}},
  },
  [3014] = {
      name = "Second Warrior Addon",
      addon_type = 2,
      outfit = {142,134},
      cost = 0,
      items = {{5887,1},{5880,100}},
  },
  [3015] = {
      name = "Barbarian Addon",
      addon_type = 3,
      outfit = {147,143},
      cost = 0,
      items = {{5885,1},{5884,1},{5911,50},{5910,50},{5886,10},{5892,1},{5880,100},{5893,50},{5876,50}},
  },
  [3016] = {
      name = "Second Barbarian Addon",
      addon_type = 2,
      outfit = {147,143},
      cost = 0,
      items = {{5892,1},{5880,100},{5893,50},{5876,50}},
  },
  [3017] = {
      name = "Druid Addon",
      addon_type = 3,
      outfit = {148,144},
      cost = 0,
      items = {{5897,50},{5896,50},{5940,1},{5938,1},{5937,1},{5942,1},{5906,100}},
  },
  [3018] = {
      name = "Second Druid Addon",
      addon_type = 2,
      outfit = {148,144},
      cost = 0,
      items = {{5940,1},{5938,1},{5937,1},{5942,1},{5906,100}},
  },
  [3019] = {
      name = "Wizard Addon",
      addon_type = 3,
      outfit = {149,145},
      cost = 0,
      items = {{2488,1},{2123,1},{2492,1},{2536,1},{5922,50}},
  },
  [3020] = {
      name = "Second Wizard Addon",
      addon_type = 2,
      outfit = {149,145},
      cost = 0,
      items = {{5922,50}},
  },
  [3021] = {
      name = "Oriental Addon",
      addon_type = 3,
      outfit = {150,146},
      cost = 0,
      items = {{5945,1},{5883,100},{5895,100},{5891,2},{5912,100}},
  },
  [3022] = {
      name = "Second Oriental Addon",
      addon_type = 2,
      outfit = {150,146},
      cost = 0,
      items = {{5883,100},{5895,100},{5891,2},{5912,100}},
  },
  [3023] = {
      name = "Pirate Addon",
      addon_type = 3,
      outfit = {155,151},
      cost = 0,
      items = {{6126,100},{6097,100},{6098,100},{2385,1},{6098,1},{6095,1},{6096,1}},
  },
  [3024] = {
      name = "Second Pirate Addon",
      addon_type = 2,
      outfit = {155,151},
      cost = 0,
      items = {{2385,1},{6098,1},{6095,1},{6096,1}},
  },
  [3025] = {
      name = "Assassin Addon",
      addon_type = 3,
      outfit = {156,152},
      cost = 0,
      items = {{5898,30},{5882,10},{5881,30},{5895,20},{5905,20},{5906,10},{5885,1},{5909,50},{5910,50},{5911,50},{5912,50},{5913,50},{5914,50},{5886,10}},
  },
  [3026] = {
      name = "Second Assassin Addon",
      addon_type = 2,
      outfit = {156,152},
      cost = 0,
      items = {{5909,50},{5910,50},{5911,50},{5912,50},{5913,50},{5914,50},{5886,10}},
  },
  [3027] = {
      name = "Beggar Addon",
      addon_type = 3,
      outfit = {157,153},
      cost = 0,
      items = {{5883,100},{6107,1}},
  },
  [3028] = {
      name = "Second Beggar Addon",
      addon_type = 2,
      outfit = {157,153},
      cost = 0,
      items = {{6107,1}},
  },
  [3029] = {
      name = "Shaman Addon",
      addon_type = 3,
      outfit = {158,154},
      cost = 0,
      items = {{3955,5},{5015,1},{3966,5},{3967,5}},
  },
  [3030] = {
      name = "Second Shaman Addon",
      addon_type = 2,
      outfit = {158,154},
      cost = 0,
      items = {{3966,5},{3967,5}},
  },
  [3031] = {
      name = "Norseman Addon",
      addon_type = 3,
      outfit = {252,251},
      cost = 0,
      items = {{7290,5},{7290,10}},
  },
  [3032] = {
      name = "Second Norseman Addon",
      addon_type = 2,
      outfit = {252,251},
      cost = 0,
      items = {{7290,10}},
  },
  [3033] = {
      name = "Nightmare Addon",
      addon_type = 3,
      outfit = {269,268},
      cost = 0,
      items = {{6500,500}},
  },
  [3034] = {
      name = "Second Nightmare Addon",
      addon_type = 2,
      outfit = {269,268},
      cost = 0,
      items = {{6500,1500}},
  },
  [3035] = {
      name = "Jester Addon",
      addon_type = 3,
      outfit = {270,273},
      cost = 0,
      items = {{5879,1},{5878,4},{5909,5}},
  },
  [3036] = {
      name = "Second Jester Addon",
      addon_type = 2,
      outfit = {270,273},
      cost = 0,
      items = {{5909,5}},
  },
  [3037] = {
      name = "Brotherhood Addon",
      addon_type = 3,
      outfit = {279,278},
      cost = 0,
      items = {{6500,1000}},
  },
  [3038] = {
      name = "Second Brotherhood Addon",
      addon_type = 2,
      outfit = {279,278},
      cost = 0,
      items = {{6500,1500}},
  },
  [3039] = {
      name = "Demonhunter Addon",
      addon_type = 3,
      outfit = {288,289},
      cost = 300000,
      items = {},
  },
  [3040] = {
      name = "Second Demonhunter Addon",
      addon_type = 2,
      outfit = {288,289},
      cost = 150000,
      items = {},
  },
  [3041] = {
      name = "Yalaharian Addon",
      addon_type = 3,
      outfit = {324,325},
      cost = 300000,
      items = {},
  },
  [3042] = {
      name = "Second Yalaharian Addon",
      addon_type = 2,
      outfit = {324,325},
      cost = 150000,
      items = {},
    },
  [3043] = {
      name = "Wayfarer Addon",
      addon_type = 3,
      outfit = {324,325},
      cost = 0,
      items = {{12618,1},{2474,1}},
    },
  [3044] = {
      name = "Second Wayfarer Addon",
      addon_type = 2,
      outfit = {324,325},
      cost = 150000,
      items = {},
  },
 
} -------- config end -------
local storage = 14000
function onUse(cid, item, fromPosition, itemEx, toPosition)
        local addon, removeItems, removeMoney = config[item.actionid], 0, 0
        if getPlayerStorageValue(cid, storage + item.actionid) ~= 1 then
                if getPlayerMoney(cid) >= addon.cost then
                        removeMoney = 1
                end
                if #addon.items > 0 then
                        for i = 1, #addon.items do
                                if getPlayerItemCount(cid, addon.items[i][1]) >= addon.items[i][2] then
                                        removeItems = removeItems+1
                                end
                        end
                end
                if removeMoney == 1 and removeItems == #addon.items then
                        for i = 1, #addon.items do
                                doPlayerRemoveItem(cid, addon.items[i][1], addon.items[i][2])
                        end
                        doPlayerRemoveMoney(cid, addon.cost)
                        doPlayerAddOutfit(cid, addon.outfit[1], addon.addon_type)
                        doPlayerAddOutfit(cid, addon.outfit[2], addon.addon_type)
                        setPlayerStorageValue(cid, storage + item.actionid, 1)
                        doPlayerSendTextMessage(cid, 23, "Now you can use the "..addon.name..".")
                else
                        if addon.cost ~= 0 then
                                msg = "You need "..addon.cost.." gold coins and "
                        else
                                msg = "You need "
                        end
                        if #addon.items > 0 then
                                for i = 1, #addon.items do
                                        msg = msg..""..addon.items[i][2].."x "..getItemNameById(addon.items[i][1]).." "
                                end
                        end
                        doPlayerSendTextMessage(cid, 23, msg.."for the "..addon.name..".")
                end
        else
                doPlayerSendTextMessage(cid, 23, "You already have the "..addon.name..".")
        end
        return TRUE
end

luego en actions.xml agrean esto

Código:
<action actionid="3001-3044" event="script" value="addonsstatus.lua"/>

recuerden ponerle el actionid a los statuas del 3001-3044 o a su preferencia dejen Rep+




    Fecha y hora actual: Vie Nov 16, 2018 5:20 am