Postado Setembro 21, 2014 10 anos Este é um post popular. Boa Tarde Turma, Hoje vou Postar um sistema de Win e Lose Score daquele teleport (TEAM-PVP). Agora vai ficar mais divertido o sistema de PVP do (Pokemon dash advanced) Premio: Ganha 5 hd + 5% exp + Score Placar: adicionei um sistema de placar tambem onde aparece: Redfrag (2) vs (4) BlueFrag Servidor Usado: Pokemon Dash Advanced (Pokemon com Level) Bom vamos La: Atençao: tome cuidado ao editar esse script e facil de buga o sistema inteiro do pvp team intao vamos la: vai no seu exp.lua creaturescripts/exp.lua: add isso no começo do script: local function doPlayerAddPercentLevel(cid, percent) local player_lv, player_lv_1 = getExperienceForLevel(getPlayerLevel(cid)), getExperienceForLevel(getPlayerLevel(cid)+2) local percent_lv = ((player_lv_1 - player_lv) / 200) * percent doPlayerAddExperience(cid, percent_lv) end procure por : if valor >= getCreatureHealth(cid) then Logo abaixo adiciona isso: if getPlayerStorageValue(cid, 6598755) == 1 or getPlayerStorageValue(cid, 6598754) == 1 then setPlayerStorageValue(cid, 6598755, 0) setPlayerStorageValue(cid, 6598754, 0) doRemoveCondition(cid, CONDITION_OUTFIT) doSendAnimatedText(getCreaturePosition(cid),"LOOSE",math.random(1,255)) setPlayerStorageValue(cid,19998,getPlayerStorageValue(cid,19998)+1) end if getPlayerStorageValue(getCreatureMaster(attacker), 6598755) == 1 then setPlayerStorageValue(getCreatureMaster(attacker),19999,getPlayerStorageValue(getCreatureMaster(attacker),19999)+1) doPlayerSendTextMessage(getCreatureMaster(attacker),MESSAGE_EVENT_ORANGE,"[Kill-Player] Voce Ganhou 5 HD + 10% EXP. E Agora tem "..(getPlayerStorageValue(getCreatureMaster(attacker),19999) + 1).." WIN SCORES.") doSendAnimatedText(getCreaturePosition(getCreatureMaster(attacker)),"WINN",math.random(1,255)) doPlayerAddItem(getCreatureMaster(attacker), 2152, 5) doPlayerAddPercentLevel(getCreatureMaster(attacker),10) setPlayerStorageValue(getCreatureMaster(attacker), 6598755,1) setGlobalStorageValue(5001, getGlobalStorageValue(5001) + 1) doBroadcastMessage("[Placar] : RedFrag [".. (getGlobalStorageValue(5001)+1).."] X ["..(getGlobalStorageValue(5002)+1).. "] BlueFrag",22) elseif getPlayerStorageValue(getCreatureMaster(attacker), 6598754) == 1 then setPlayerStorageValue(getCreatureMaster(attacker),19999,getPlayerStorageValue(getCreatureMaster(attacker),19999)+1) doPlayerSendTextMessage(getCreatureMaster(attacker),MESSAGE_EVENT_ORANGE,"[Kill-Player] Voce Ganhou 5 HD + 10% EXP. E Agora tem "..(getPlayerStorageValue(getCreatureMaster(attacker),19999) + 1).." WIN SCORES.") doSendAnimatedText(getCreaturePosition(getCreatureMaster(attacker)),"WINN",math.random(1,255)) doPlayerAddItem(getCreatureMaster(attacker), 2150, 5) doPlayerAddPercentLevel(getCreatureMaster(attacker),10) setPlayerStorageValue(getCreatureMaster(attacker), 6598754,1) setGlobalStorageValue(5002, getGlobalStorageValue(5002) + 1) doBroadcastMessage("[Placar] : RedFrag [".. (getGlobalStorageValue(5001)+1).."] X ["..(getGlobalStorageValue(5002)+1).. "] BlueFrag",22) end Se quiserem por no Look tambem eu deixei mais legal ! Troca seu look.lua por esse : local NPCBattle = { ["Brock"] = {artig = "He is", cidbat = "Pewter"}, ["Misty"] = {artig = "She is", cidbat = "Cerulean"}, ["Blaine"] = {artig = "He is", cidbat = "Cinnabar"}, ["Sabrina"] = {artig = "She is", cidbat = "Saffron"}, --alterado v2.9 \/ peguem tudo! ["Kira"] = {artig = "She is", cidbat = "Viridian"}, ["Koga"] = {artig = "He is", cidbat = "Fushcia"}, ["Erika"] = {artig = "She is", cidbat = "Celadon"}, ["Surge"] = {artig = "He is", cidbat = "Vermilion"}, } function onLook(cid, thing, position, lookDistance) local str = {} if not isCreature(thing.uid) then local iname = getItemInfo(thing.itemid) if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then unLock(thing.uid) local lock = getItemAttribute(thing.uid, "lock") local pokename = getItemAttribute(thing.uid, "poke") table.insert(str, "You see "..iname.article.." "..iname.name..".") if getItemAttribute(thing.uid, "unique") then table.insert(str, " It's an unique item.") end table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename.." [level "..getItemAttribute(thing.uid, "level").."].\n") if lock and lock > 0 then table.insert(str, "It will unlock in ".. os.date("%d/%m/%y %X", lock)..".\n") end local boost = getItemAttribute(thing.uid, "boost") or 0 if boost > 0 then table.insert(str, "Boost level: +"..boost..".\n") end if getItemAttribute(thing.uid, "nick") then table.insert(str, "It's nickname is: "..getItemAttribute(thing.uid, "nick")..".\n") end if getItemAttribute(thing.uid, "gender") == SEX_MALE then table.insert(str, "It is male.") elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then table.insert(str, "It is female.") else table.insert(str, "It is genderless.") end table.insert(str, "\n--- Status ---") table.insert(str, "\nOffense: "..math.floor(getItemAttribute(thing.uid, "offense")).." Defense: "..math.floor(getItemAttribute(thing.uid, "defense")).."\n") table.insert(str, "Agility: "..math.floor(getItemAttribute(thing.uid, "speed")).." Sp. Attack: "..math.floor(getItemAttribute(thing.uid, "specialattack")).."\n") table.insert(str, "Vitality: "..math.floor(getItemAttribute(thing.uid, "vitality")).."") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then table.insert(str, "You see a "..string.lower(iname.name).." ["..getItemAttribute(thing.uid, "level").."]. ") if isContainer(thing.uid) then table.insert(str, "(Vol: "..getContainerCap(thing.uid)..")") end table.insert(str, "\n") if getItemAttribute(thing.uid, "gender") == SEX_MALE then table.insert(str, "It is male.") elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then table.insert(str, "It is female.") else table.insert(str, "It is genderless.") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif isContainer(thing.uid) then --containers if iname.name == "dead human" and getItemAttribute(thing.uid, "pName") then table.insert(str, "You see a dead human (Vol:"..getContainerCap(thing.uid).."). ") table.insert(str, "You recognize ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." was killed by a ") table.insert(str, getItemAttribute(thing.uid, "attacker")..".") else table.insert(str, "You see "..iname.article.." "..iname.name..". (Vol:"..getContainerCap(thing.uid)..").") end if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then table.insert(str, "\nItemID: ["..thing.itemid.."]") local pos = getThingPos(thing.uid) table.insert(str, "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif getItemAttribute(thing.uid, "unique") then --alterado v2.8 \/ local p = getThingPos(thing.uid) table.insert(str, "You see ") if thing.type > 1 then table.insert(str, thing.type.." "..iname.plural..".") else table.insert(str, iname.article.." "..iname.name..".") end table.insert(str, " It's an unique item.\n"..iname.description) if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then table.insert(str, "\nItemID: ["..thing.itemid.."]") table.insert(str, "\nPosition: ["..p.x.."]["..p.y.."]["..p.z.."]") end sendMsgToPlayer(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false else return true end end local npcname = getCreatureName(thing.uid) if isNpc(thing.uid) and NPCBattle[npcname] then --npcs duel table.insert(str, "You see "..npcname..". "..NPCBattle[npcname].artig.." leader of the gym from "..NPCBattle[npcname].cidbat..".") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false end if getPlayerStorageValue(thing.uid, 697548) ~= -1 then --npcs de TV table.insert(str, getPlayerStorageValue(thing.uid, 697548)) local pos = getThingPos(thing.uid) if youAre[getPlayerGroupId(cid)] then table.insert(str, "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false end if not isPlayer(thing.uid) and not isMonster(thing.uid) then table.insert(str, "You see "..getCreatureName(thing.uid)..".") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false end local loses = (getPlayerStorageValue(thing.uid,19998) +1) local wins = (getPlayerStorageValue(thing.uid,19999) +1) local rank = (getPlayerClanRank(thing.uid)+0) if isPlayer(thing.uid) then doPlayerSendTextMessage(cid, 25,"You See "..getCreatureName(thing.uid).."\n Level: ["..getPlayerLevel(thing.uid).."].\nClan: ["..getPlayerClanName(thing.uid).."] - Rank: ["..rank.."].\nGuild: ["..getPlayerGuildName(thing.uid).."] - Rank: ["..getPlayerGuildRank(thing.uid).."].\nWins: ["..wins.."].\nLoses: ["..loses.."]..") return false end if getCreatureName(thing.uid) == "Evolution" then return false end if not isSummon(thing.uid) then table.insert(str, "You see a wild "..string.lower(getCreatureName(thing.uid)).." [level "..getPokemonLevel(thing.uid).."].\n") if getPokemonGender(thing.uid) == SEX_MALE then table.insert(str, "It is male.") elseif getPokemonGender(thing.uid) == SEX_FEMALE then table.insert(str, "It is female.") else table.insert(str, "It is genderless.") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false elseif isSummon(thing.uid) and not isPlayer(thing.uid) then local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0 local boostshow = " + "..boostlevel.."]" if showBoostSeparated then boostshow = "] [+"..boostlevel.."]" end local levelinfo = "["..getPokemonLevel(thing.uid)..""..boostshow.."" if getCreatureMaster(thing.uid) == cid then local myball = getPlayerSlotItem(cid, 8).uid local nexp = getItemAttribute(myball, "nextlevelexp") table.insert(str, "You see your "..string.lower(getCreatureName(thing.uid)).." "..levelinfo..".") table.insert(str, "\nVida: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".") table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid)) if getItemAttribute(myball, "level") <= 149 then table.insert(str, "\nExperiencia Para Proximo Level: ["..nexp.."].") end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str)) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a "..string.lower(getCreatureName(thing.uid)).." "..levelinfo..".\nIt belongs to "..getCreatureName(getCreatureMaster(thing.uid))..".\nVida: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".") end return false end return true end
Postado Setembro 21, 2014 10 anos Boa, obrigado pela contribuição =) Ot Design: https://discord.gg/VgtVRNmCD7
Postado Setembro 23, 2014 10 anos Pode testar em servidor sem level system? Teste nesse aqui: http://www.tibiaking.com/forum/topic/34423-pda-by-bolz-v31/ REP+ Editado Setembro 23, 2014 10 anos por TopllDanStar (veja o histórico de edições)
Postado Outubro 26, 2014 10 anos Thank's. Editado Outubro 28, 2014 10 anos por ZombiTR (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.