JG6 44 Posted April 1, 2019 Report Share Posted April 1, 2019 (edited) 20 horas atrás, Lukysz disse: Alguém Pode me ajudar estou com o mesmo problema que Ayron5 Estava ja tendei tirar a função if string.find(tostring(getCreatureName(cid)), "Shiny") then local newName = tostring(getCreatureName(cid)):match("Shiny (.*)") return newName end lib/level system.lua mas não funciono Alguém Pode me ajuda Porvafor. Retira do Spawn.lua talvez seja lá tbm, são dois arquivos o spawn.lua e o level system.lua Edited April 1, 2019 by joaopera Link to comment https://xtibia.com/forum/topic/249218-otclient-shiny-name/page/4/#findComment-1750371 Share on other sites More sharing options...
Lukysz 0 Posted April 1, 2019 Report Share Posted April 1, 2019 joaopera tentei mas da erro na distro ou não funciona , onde realmente tenho que mexer ? estou usando base dxp local shinysName = { "Blastoise", "Venusaur", "Butterfree", "Beedrill", "Pidgeot", "Rattata", "Raticate", "Raichu", "Golbat", "Paras", "Parasect", "Magmar", "Typhlosion", "Xatu", "Growlithe", "Arcanine", "Tentacruel", "Gengar", "Krabby", "Tauros", "Kingler", "Cubone", "Horsea", "Seadra", "Weezing", "Scyther", "Pinsir", "Crobat", "Zubat", "Tentacool", "Feraligatr", "Machamp", "Meganium", "Alakazam", "Tangela", "Ampharos", "Electabuzz", "Jynx", "Charizard", "Voltorb", "Electrode"} function onSpawn(cid) if getCreatureName(cid) == "" or getCreatureName(cid) == nil then setPlayerStorageValue(cid, 510, getCreatureNick(cid)) end --if isTwoGerenetion(doCorrectString(getCreatureName(cid))) then doRemoveCreature(cid) return false end registerCreatureEvent(cid, "GeneralConfiguration") registerCreatureEvent(cid, "WildAttack") registerCreatureEvent(cid, "Experience") registerCreatureEvent(cid, "Matou") registerCreatureEvent(cid, "PokeWalk") registerCreatureEvent(cid, "StatsChange") if not ehMonstro(cid) then registerCreatureEvent(cid, "Target") registerCreatureEvent(cid, "Matou") registerCreatureEvent(cid, "SummonDeath") getPokeDistanceToTeleport(cid) setPokemonGhost(cid) if getCreatureName(cid):find("Shiny ") then setPlayerStorageValue(cid, storages.EhShiny, 1) end return true end addEvent(doShiny, 5, cid) addEvent(adjustWildPoke, 5, cid) setPokemonGhost(cid) doMarkedPos(cid, getThingPos(cid)) if isPokePassive(cid) then setPokemonPassive(cid, true) end return true end function doShiny(cid) if isCreature(cid) then if isSummon(cid) then return true end if isNpcSummon(cid) then return true end local chance = 0 if isInArray(shinysName, doCorrectString(getCreatureName(cid))) then --alterado v1.9 \/ chance = 40 --1% chance end local sid = cid if math.random(1, 500) <= chance then doSendMagicEffect(getThingPos(cid), 18) local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid) if not pokes[name] then return true end doRemoveCreature(cid) --print(name .. ", " .. retireShinyName(name)) local shi = doCreateMonsterNick(sid, name, retireShinyName(name), pos, false) end else return true end end Link to comment https://xtibia.com/forum/topic/249218-otclient-shiny-name/page/4/#findComment-1750378 Share on other sites More sharing options...
Th3g1m3s 2 Posted May 13, 2019 Report Share Posted May 13, 2019 Alguem que possa passar um tutorial de como compilar o otc Link to comment https://xtibia.com/forum/topic/249218-otclient-shiny-name/page/4/#findComment-1751495 Share on other sites More sharing options...
Gufipl 3 Posted January 10, 2020 Report Share Posted January 10, 2020 (edited) @WaloxComo você copia o código para trabalhar no NPC? Edited January 10, 2020 by Gufipl Link to comment https://xtibia.com/forum/topic/249218-otclient-shiny-name/page/4/#findComment-1755957 Share on other sites More sharing options...
LuckXL 4 Posted February 9, 2020 Report Share Posted February 9, 2020 Aqui tá ficando com nomes "bugado" sabe me disser o que pode ser? Link to comment https://xtibia.com/forum/topic/249218-otclient-shiny-name/page/4/#findComment-1756989 Share on other sites More sharing options...
KaboFlow 54 Posted May 15, 2020 Report Share Posted May 15, 2020 Em 23/02/2019 em 09:46, Crypter disse: @XZero if (drawFlags & Otc::DrawNames) { if (g_painter->getColor() != fillColor) g_painter->setColor(fillColor); CachedText shiny; shiny.setText("Shiny"); shiny.setFont(g_fonts.getFont("verdana-11px-rounded")); Rect shinyrect = Rect(point.x - shiny.getTextSize().width() / 2.0, textRect.y - 14, shiny.getTextSize()); if (m_name.find("Shiny") != std::string::npos) { std::string eraseName = m_name; eraseName.erase(0, 5); m_nameCache.setText(eraseName); m_nameCache.draw(textRect); g_painter->setOpacity(0.5); g_painter->setColor(Color(255, 255, 0)); shiny.draw(shinyrect); g_painter->resetColor(); g_painter->resetOpacity(); m_nameCache.setText(m_name); } else { m_nameCache.draw(textRect); } } meu creature.cpp: nao tenhe if (drawFlags & Otc::DrawNames) { Link to comment https://xtibia.com/forum/topic/249218-otclient-shiny-name/page/4/#findComment-1759680 Share on other sites More sharing options...
kamus9629 8 Posted June 18, 2020 Report Share Posted June 18, 2020 @Benny Benny e se eu quizer Fazer Sistema fica antes de shiny 3/5 4/5 5/5 como ficaria ? Link to comment https://xtibia.com/forum/topic/249218-otclient-shiny-name/page/4/#findComment-1760490 Share on other sites More sharing options...
Recommended Posts