Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local config = {
- [4001] = { name = "Full Citizen Addon", addon_type = 3, outfit = {136,128}, cost = 40 },
- [4002] = { name = "Full Hunter Addon", addon_type = 3, outfit = {137,129}, cost = 30 },
- [4003] = { name = "First Mage Addon", addon_type = 1, outfit = {138,130}, cost = 50, },
- [4004] = { name = "Full Knight Addon", addon_type = 3, outfit = {139,131}, cost = 30 },
- [4005] = { name = "Full Nobleman Addon", addon_type = 3, outfit = {140,132}, cost = 30 },
- [4006] = { name = "Full Summoner Addon", addon_type = 3, outfit = {141,133}, cost = 60 },
- [4007] = { name = "Full Warrior Addon", addon_type = 3, outfit = {142,134}, cost = 60 },
- [4008] = { name = "Full Barbarian Addon", addon_type = 3, outfit = {147,143}, cost = 60 },
- [4009] = { name = "Full Druid Addon", addon_type = 3, outfit = {148,144}, cost = 35 },
- [4010] = { name = "Full Wizard Addon", addon_type = 3, outfit = {149,145}, cost = 45 },
- [4011] = { name = "Full Oriental Addon", addon_type = 3, outfit = {150,146}, cost = 45 },
- [4012] = { name = "Full Pirate Addon", addon_type = 3, outfit = {155,151}, cost = 30 },
- [4013] = { name = "Full Assassin Addon", addon_type = 3, outfit = {156,152}, cost = 60 },
- [4014] = { name = "Full Beggar Addon", addon_type = 3, outfit = {157,153}, cost = 40 },
- [4015] = { name = "Full Shaman Addon", addon_type = 3, outfit = {158,154}, cost = 30 },
- [4016] = { name = "Full Norseman Addon", addon_type = 3, outfit = {252,251}, cost = 30 },
- [4017] = { name = "Full Nightmare Addon", addon_type = 3, outfit = {269,268}, cost = 30 },
- [4018] = { name = "Full Jester Addon", addon_type = 3, outfit = {270,273}, cost = 45 },
- [4019] = { name = "Full Brotherhood Addon", addon_type = 3, outfit = {279,278}, cost = 35 },
- [4020] = { name = "Full Demonhunter Addon", addon_type = 3, outfit = {288,289}, cost = 55 },
- [4021] = { name = "Full Yalaharian Addon", addon_type = 3, outfit = {324,325}, cost = 35 },
- [4022] = { name = "Full Warmaster Addon", addon_type = 3, outfit = {336,335}, cost = 45 },
- [4023] = { name = "Full Wayfarer Addon", addon_type = 3, outfit = {366,367}, cost = 60 }
- }
- local storage = 14000
- local MessageGet = "You paid "..addon.cost.." in "..addon.name.." and you have "..getPlayerStorageValue(cid, 176602).."."
- local MessageFail = "You need "..addon.cost.." task points for the "..addon.name.." and you have "..getPlayerStorageValue(cid, 176602).."."
- local MessageHave = "You already have the "..addon.name.."."
- 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 getPlayerStorageValue(cid, 176602) >= addon.cost then
- removePoints = 1
- end
- if removePoints == 1 then
- 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, 21, MessageGet)
- setPlayerStorageValue(cid, 176602, getPlayerStorageValue(cid, 176602)-addon.cost)
- else
- doPlayerSendTextMessage(cid, 21, MessageFail)
- end
- else
- doPlayerSendTextMessage(cid, 21, MessageHave)
- end
- return TRUE
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement