Olá queria pedir pra vocês aqui do Xtibia se alguem poderia criar um script pra min onde o player fale com um npc e pule diretamente para o rank 5 no seu clan.
Obrigado desde já
Olá queria pedir pra vocês aqui do Xtibia se alguem poderia criar um script pra min onde o player fale com um npc e pule diretamente para o rank 5 no seu clan.
Obrigado desde já
Como funciona o sistema de clãs? Dê + detalhes
local clansAtk = {
[1] = {[FIREDAMAGE] = {[1] = {atk = 1.17},[2] = {atk = 1.22},[3] = {atk = 1.27},[4] = {atk = 1.32},[5] = {atk = 1.37},},["null"] = {},},[2] = {[WATERDAMAGE] = {[1] = {atk = 1.05},[2] = {atk = 1.10},[3] = {atk = 1.15},[4] = {atk = 1.20},[5] = {atk = 1.25},},[iCEDAMAGE] = {[1] = {atk = 1.10},[2] = {atk = 1.15},[3] = {atk = 1.20},[4] = {atk = 1.25},[5] = {atk = 1.30},},},[3] = {[ROCKDAMAGE] = {[1] = {atk = 1.05},[2] = {atk = 1.10},[3] = {atk = 1.15},[4] = {atk = 1.20},[5] = {atk = 1.25},},[GROUNDDAMAGE] = {[1] = {atk = 1.05},[2] = {atk = 1.10},[3] = {atk = 1.15},[4] = {atk = 1.20},[5] = {atk = 1.25},},},[4] = {[FLYDAMAGE] = {[1] = {atk = 1.15},[2] = {atk = 1.20},[3] = {atk = 1.25},[4] = {atk = 1.30},[5] = {atk = 1.35},},[DRAGONDAMAGE] = {[1] = {atk = 1.10},[2] = {atk = 1.15},[3] = {atk = 1.20},[4] = {atk = 1.25},[5] = {atk = 1.30},},},[5] = {[GHOSTDAMAGE] = {[1] = {atk = 1.05},[2] = {atk = 1.10},[3] = {atk = 1.15},[4] = {atk = 1.20},[5] = {atk = 1.25},},[POISONDAMAGE] = {[1] = {atk = 1.08},[2] = {atk = 1.13},[3] = {atk = 1.18},[4] = {atk = 1.23},[5] = {atk = 1.28},},},[6] = {[FIGHTDAMAGE] = {[1] = {atk = 1.05},[2] = {atk = 1.10},[3] = {atk = 1.15},[4] = {atk = 1.20},[5] = {atk = 1.25},},[NORMALDAMAGE] = {[1] = {atk = 1.05},[2] = {atk = 1.10},[3] = {atk = 1.15},[4] = {atk = 1.20},[5] = {atk = 1.25},},},[7] = {[PSYCHICDAMAGE] = {[1] = {atk = 1.10},[2] = {atk = 1.15},[3] = {atk = 1.20},[4] = {atk = 1.25},[5] = {atk = 1.30},},["null"] = {},},[8] = {[GRASSDAMAGE] = {[1] = {atk = 1.10},[2] = {atk = 1.15},[3] = {atk = 1.20},[4] = {atk = 1.25},[5] = {atk = 1.35},},[bUGDAMAGE] = {[1] = {atk = 1.10},[2] = {atk = 1.15},[3] = {atk = 1.20},[4] = {atk = 1.25},[5] = {atk = 1.35},},},[9] = {[ELECTRICDAMAGE] = {[1] = {atk = 1.12},[2] = {atk = 1.17},[3] = {atk = 1.22},[4] = {atk = 1.27},[5] = {atk = 1.32},},["null"] = {},}}local clansDef = {[1] = {["fire"] = {[1] = {def = 0.17},[2] = {def = 0.22},[3] = {def = 0.27},[4] = {def = 0.32},[5] = {def = 0.37},},["null"] = {},},[2] = {["water"] = {[1] = {def = 0.05},[2] = {def = 0.10},[3] = {def = 0.15},[4] = {def = 0.20},[5] = {def = 0.25},},["ice"] = {[1] = {def = 0.10},[2] = {def = 0.15},[3] = {def = 0.20},[4] = {def = 0.25},[5] = {def = 0.30},},},[3] = {["rock"] = {[1] = {def = 0.05},[2] = {def = 0.10},[3] = {def = 0.15},[4] = {def = 0.20},[5] = {def = 0.25},},["ground"] = {[1] = {def = 0.10},[2] = {def = 0.15},[3] = {def = 0.20},[4] = {def = 0.25},[5] = {def = 0.30},},},[4] = {["flying"] = {[1] = {def = 0.15},[2] = {def = 0.20},[3] = {def = 0.25},[4] = {def = 0.30},[5] = {def = 0.35},},["dragon"] = {[1] = {def = 0.10},[2] = {def = 0.15},[3] = {def = 0.20},[4] = {def = 0.25},[5] = {def = 0.30},},},[5] = {["ghost"] = {[1] = {def = 0.05},[2] = {def = 0.10},[3] = {def = 0.15},[4] = {def = 0.20},[5] = {def = 0.25},},["poison"] = {[1] = {def = 0.08},[2] = {def = 0.13},[3] = {def = 0.18},[4] = {def = 0.23},[5] = {def = 0.28},},},[6] = {["fighting"] = {[1] = {def = 0.05},[2] = {def = 0.10},[3] = {def = 0.15},[4] = {def = 0.20},[5] = {def = 0.25},},["normal"] = {[1] = {def = 0.05},[2] = {def = 0.10},[3] = {def = 0.15},[4] = {def = 0.20},[5] = {def = 0.25},},},[7] = {["psychic"] = {[1] = {def = 0.10},[2] = {def = 0.15},[3] = {def = 0.20},[4] = {def = 0.25},[5] = {def = 0.30},},["null"] = {},},[8] = {["grass"] = {[1] = {def = 0.05},[2] = {def = 0.10},[3] = {def = 0.15},[4] = {def = 0.20},[5] = {def = 0.35},},["bug"] = {[1] = {def = 0.05},[2] = {def = 0.10},[3] = {def = 0.15},[4] = {def = 0.20},[5] = {def = 0.35},},},[9] = {["electric"] = {[1] = {def = 0.12},[2] = {def = 0.17},[3] = {def = 0.22},[4] = {def = 0.27},[5] = {def = 0.32},},}}local clansName = {--[num do clan] = {nome do clan, storage outfit normal, storage outfit rank5},[1] = {'Volcanic', 181613, 181625},[2] = {'Seavell', 181619, 181622},[3] = {'Orebound', 181620, 181627},[4] = {'Wingeon', 181616, 181626},[5] = {'Malefic', 181615, 181624},[6] = {'Gardestrike', 181614, 181628},[7] = {'Psycraft', 181618, 181629},[8] = {'Naturia', 181612, 181623},[9] = {'Raibolt', 181617, 181621},}function getClanPorcent(master, combat, option, type, type2) --alterado v1.9 \/if getPlayerClanNum(master) >= 1 thenlocal clanAtk = clansAtk[getPlayerClanNum(master)]local clanDef = clansDef[getPlayerClanNum(master)]if option == "atk" and clanAtk[combat] thenreturn clanAtk[combat][getPlayerClanRank(master)].atkelseif option == "def" and clanDef[type] thenreturn clanDef[type][getPlayerClanRank(master)].defelseif option == "def" and clanDef[type2] thenreturn clanDef[type2][getPlayerClanRank(master)].defendendendreturn option == "atk" and 1 or 0endfunction getPlayerClanName(cid)if not isCreature(cid) then return 'No Clan!' endreturn clansName[getPlayerClanNum(cid)] and clansName[getPlayerClanNum(cid)][1] or 'No Clan!'endfunction getPlayerClanNum(cid)if not isCreature(cid) then return -1 endreturn getPlayerStorageValue(cid, 86228)endfunction getPlayerClanRank(cid)if not isCreature(cid) then return -1 endreturn getPlayerStorageValue(cid, 862281)endfunction setPlayerClan(cid, clan)if not isCreature(cid) or not clan then return false endif removePlayerClan(cid) then --para evitar possiveis problemas!if type(clan) == "number" and (clan >= 1 and clan <= 9) thensetPlayerStorageValue(cid, 86228, clan) --sto clansetPlayerClanRank(cid, 1) --set rank 1setPlayerStorageValue(cid, clansName[clan][2], 1) --sto roupareturn trueelseif type(clan) == "string" thenclan = string.lower(clan)for e, f in pairs(clansName) dolocal clan2 = string.lower(f[1])if clan == clan2 thensetPlayerStorageValue(cid, 86228, e) --sto clansetPlayerClanRank(cid, 1) --set rank 1setPlayerStorageValue(cid, clansName[e][2], 1) --sto roupareturn trueendendendendreturn falseendfunction setPlayerClanRank(cid, rank)if not isCreature(cid) or not rank then return false endif type(rank) == "number" and (rank >= 1 and rank <= 5) thensetPlayerStorageValue(cid, 862281, rank)if rank == 5 thensetPlayerStorageValue(cid, clansName[getPlayerClanNum(cid)][3], 1)endreturn trueendreturn falseendfunction removePlayerClan(cid)if not isCreature(cid) then return false endif getPlayerStorageValue(cid, 854789) >= 1 then return false end --nao pode remover o clan se o player tiver fazendo missoes de rank!setPlayerStorageValue(cid, 86228, -1) --sto do clansetPlayerStorageValue(cid, 862281, -1) --sto do ranksetPlayerStorageValue(cid, 854789, -1) --sto da quest de ranksetPlayerStorageValue(cid, 854788, -1) --sto catch, quest de ranksetPlayerStorageValue(cid, 854787, -1) --sto task, quest de rankfor i = 181612, 181638 dosetPlayerStorageValue(cid, i, -1) --sto das roupas de clanendreturn trueendfunction checkItensForTask(cid, itens)local check = 0local array = {}local missing = {}table.insert(missing, "Are missing: ")local c = 0for i = 1, #itens doif getPlayerItemCount(cid, itens[1]) >= itens[2] thencheck = check + 1elsetable.insert(array, {itens[1], (itens[2]-getPlayerItemCount(cid, itens[1]))})endendif check == #itens thenfor b = 1, #itens dodoPlayerRemoveItem(cid, itens[1], itens[2])endreturn 0elsefor a = 1, #array dotable.insert(missing, ((a == #array and c ~= 0) and " and " or a ~= 1 and ", " or "{")..(array[a][2]).." "..(getItemNameById(array[a][1])))c = c+1endtable.insert(missing, "} yet.")return table.concat(missing)endendfunction checkPokemonForTask(cid, poke)local pbs = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)local slot = getPlayerSlotItem(cid, 8)if slot.itemid > 0 and isPokeball(slot.itemid) thenif getItemAttribute(slot.uid, "poke") == poke and getItemAttribute(slot.uid, "task") and getItemAttribute(slot.uid, "task") >= 1 thendoRemoveItem(slot.uid, 1)doTransformItem(getPlayerSlotItem(cid, CONST_SLOT_LEGS).uid, 2395)return trueendendfor i = 1, #pbs doif getItemAttribute(pbs, "poke") == poke and getItemAttribute(pbs, "task") and getItemAttribute(pbs, "task") >= 1 thendoRemoveItem(pbs, 1)return trueendendreturn falseend
clan system
"O fracasso é a oportunidade de se começar de novo inteligentemente"