PO
dúvida

Teleportar sem precisar ter falado com Nurse Joy

Por Pokerangers, 14 de fev. de 2014 em Archived

duvida simples
17
2.2k
PokerangersP
14 de fevereiro de 2014 às 21:51

Bom galera, gostaria de saber, como faço para que não precise ter falado com a Nurse Joy para teleporta para as cidades.

Meu server esta com problema, mesmo apos ter falado, pede pra falar com ela.

Queria tirar isso de uma vez. Acredito que seja fácil :)

 

Desde já, obrigado!

zipter98Z
14 de fevereiro de 2014 às 22:01

Área incorreta, tópico movido. Mais cuidado da próxima vez.

homersapiensH
14 de fevereiro de 2014 às 22:02

Va em data/talkactions/scripts e mude seu tele.lua por este

local poke = {'Abra', 'Kadabra', 'Alakazam', 'Drowzee', 'Hypno', 'Mr. Mime', 'Porygon', 'Porygon2', "Shiny Abra",
              "Shiny Alakazam", "Shiny Hypno"}
local etele = 9499
local cdtele = 1800

local config = {
premium = false, -- se precisa ser premium account (true or false)
battle = true	-- se precisa estar sem battle (true). Se colocar false, poderá usar teleport no meio de batalhas
}

local places = {
[1] = {name = "Cerulean", id = 1, sto = 897530},
[2] = {name = "Saffron", id = 2, sto = 897531},
[3] = {name = "Lavender", id = 3, sto = 897532},
[4] = {name = "Celadon", id = 4, sto = 897533},
[5] = {name = "Pewter", id = 5, sto = 897534},
[6] = {name = "Viridian", id = 6, sto = 897535},  --alterado v1.7
[7] = {name = "Vermilion", id = 7, sto = 897536},
[8] = {name = "Fuchsia", id = 8, sto = 897537},          
[9] = {name = "Cinnabar", id = 9},
[10] = {name = "Snow", id = 10, sto = 897538},
[11] = {name = "Golden", id = 11, sto = 897539},
[12] = {name = "Hamlin", id = 12, sto = 897540},
[13] = {name = "Butwal", id = 13, sto = 897541},
[14] = {name = "Shamouti", id = 14, sto = 897542},
[15] = {name = "Murcott", id = 15, sto = 897543},
[16] = {name = "Outland North", id = 16, sto = 897544},
[17] = {name = "Outland East", id = 17, sto = 897545},
[19] = {name = "Outland South", id = 18, sto = 897546},
}


function onSay(cid, words, param)

	if #getCreatureSummons(cid) == 0 then
		doPlayerSendCancel(cid, "You need a pokemon to use teleport.")
	return true
	end

	if not isInArray(poke, getCreatureName(getCreatureSummons(cid)[1])) then
	return 0
	end

    if getPlayerStorageValue(cid, 22545) == 1 then      --golden arena
       doPlayerSendCancel(cid, "You can't do that while the golden arena!")
    return true
    end
    
    if getPlayerStorageValue(cid, 212124) >= 1 then         --alterado v1.6
       return doPlayerSendCancel(cid, "You can't do it with a pokemon with mind controlled!")
    end

    if getPlayerStorageValue(cid, 52480) >= 1 then
       return doPlayerSendCancel(cid, "You can't do it while a duel!")  --alterado v1.6
    end
    
    if getPlayerStorageValue(cid, 6598754) == 1 or getPlayerStorageValue(cid, 6598755) == 1 then 
	   return doPlayerSendCancel(cid, "You can't do it while in the PVP Zone!")   --alterado v1.7
    end
   
	if exhaustion.get(cid, etele) and exhaustion.get(cid, etele) > 0 then
		local tempo = tonumber(exhaustion.get(cid, etele)) or 0
		local min = math.floor(tempo)
		doPlayerSendCancel(cid, "Your pokemon is tired, wait "..getStringmytempo(tempo).." to teleport again.")
	return true
	end

	if config.premium and not isPremium(cid) then
		doPlayerSendCancel(cid, "Only premium members are allowed to use teleport.")
	return true
	end

	if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then
		doPlayerSendCancel(cid, "Your pokemon can't concentrate during battles.")
	return true
	end

	if (param == '') then
		local str = ""
		str = str .. "Places to go :\n\nHouse\n"
			for a = 1, #places do
				str = str..""..places[a].name.."\n"
			end
		doShowTextDialog(cid, 7416, str)
	return true
	end

	local item = getPlayerSlotItem(cid, 8)
	local nome = getPokeballName(item.uid)
	local summon = getCreatureSummons(cid)[1]
	local lastppos = getThingPos(cid)
	local lastspos = getThingPos(summon)
	local telepos = {}
	local myplace = ""
	local townid = 0
	local citySto = 0  --alterado v1.7

	if string.lower(param) == "house" then

		if not getHouseByPlayerGUID(getPlayerGUID(cid)) then
			doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You don't own a house.")
		return true
		end

		telepos = getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid)))
		myplace = "our home"

	else

		for x = 1, #places do
			if string.find(string.lower(places[x].name), string.lower(param)) then
				townid = places[x].id
				myplace = places[x].name
				citySto = places[x].sto or -1  --alterado v1.7
			end
		end

		if myplace == "" then
			doPlayerSendCancel(cid, "That place doesn't exist.")
		return true
		end

	end

	if myplace ~= "" and townid > 0 then
		telepos = getTownTemplePosition(townid)
	end
	
	if getDistanceBetween(getThingPos(cid), telepos) <= 15 then
		doPlayerSendCancel(cid, "You are too near to the place you want to go!")
	return true
	end

	doSendMagicEffect(getThingPos(summon), 29)
	doSendMagicEffect(getThingPos(cid), 29)

	doTeleportThing(cid, telepos, false)

	local pos2 = getClosestFreeTile(cid, getPosByDir(getThingPos(cid), SOUTH))

	doTeleportThing(summon, pos2, false)

	doSendMagicEffect(getThingPos(cid), 29)

	doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", 1)
	doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", 1, false, 0, lastppos)
	doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER)
	doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER, false, 0, lastspos)

	doCreatureSetLookDir(cid, SOUTH)
	doCreatureSetLookDir(summon, SOUTH)

	doSendMagicEffect(getThingPos(summon), CONST_ME_TELEPORT)
	exhaustion.set(cid, etele, cdtele)

return true
end
PokerangersP
14 de fevereiro de 2014 às 23:17

Deu certo cara, muito obrigado.

 

Outra duvida aqui, como faço pra da uma acelerada na velocidade do todos os pokemons?

homersapiensH
14 de fevereiro de 2014 às 23:25

Tem duas opções;

Configuration.lua:

pokes = {  

["Bulbasaur"] = {offense = 4.9, defense = 4.9, specialattack = 6.5, vitality = 4.5, agility = 196, exp = 64, level = 5, wildLvl = 20, type = "grass", type2 = "poison"},

Cada monster.xml

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Bulbasaur" nameDescription="a bulbasaur" race="grass" experience="216" speed="107" manacost="0">
    <health now="60" max="60"/>
    <look type="376" head="15" body="30" legs="95" feet="113" corpse="11847"/>
    <targetchange interval="10000" chance="0"/>
    <strategy attack="100" defense="0"/>
    <flags>
        <flag summonable="1"/>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag illusionable="1"/>
        <flag convinceable="1"/>
        <flag pushable="1"/>
        <flag canpushitems="0"/>
        <flag canpushcreatures="0"/>
        <flag targetdistance="1"/>
        <flag staticattack="97"/>
        <flag runonhealth="0"/>
        <flag hungerdelay="23"/>
    </flags>
    <attacks>
        <attack name="melee" interval="2000" chance="100" range="1" min="-50" max="-100"/>
		<attack name="Quick Attack" interval="2476" chance="28" range="2"/>
        <attack name="Razor Leaf" interval="2758" chance="30" range="4"/>
		<attack name="Vine Whip" interval="2993" chance="28" range="6"/>
		<attack name="Headbutt" interval="2711" chance="30" range="1"/>
		<attack name="Leech Seed" interval="4476" chance="28" range="5"/>
		<attack name="Solar Beam" interval="4779" chance="17" range="6"/>
        <attack name="Sleep Powder" interval="5766" chance="18" range="6"/>
        <attack name="Stun Spore" interval="4497" chance="21" range="6"/>
        <attack name="Poison Powder" interval="5202" chance="19" range="6"/>
    </attacks>
    <defenses armor="0" defense="0"/>
    <voices interval="5000" chance="10">
        <voice sentence="BULBASAUR!"/>
    </voices>
    <loot>
        <item id="12163" chance="10000" countmax="50"/>
        <item id="12155" chance="5000" count="1" countmax="1"/>
        <item id="12153" chance="6000" count="1" countmax="1"/>
        <item id="12154" chance="4000" count="1" countmax="1"/>
    </loot>
    <script>
        <event name="Spawn"/>
    </script>
</monster>

PokerangersP
15 de fevereiro de 2014 às 00:08

Não tem um jeito de acelerar todos juntos? ou é só um por um?

15 de fevereiro de 2014 às 11:03

Não tem um jeito de acelerar todos juntos? ou é só um por um?

Como o homersapiens disse, o xml de cada poke, nao muda em nada, tem que editar na parte " agility " no configuration.lua.

["Bulbasaur"] = {offense = 4.9, defense = 4.9, specialattack = 6.5, vitality = 4.5, agility = 196, exp = 64, level = 5, wildLvl = 20, type = "grass", type2 = "poison"},
PokerangersP
15 de fevereiro de 2014 às 11:10

No caso, eu teria que alterar um por um?

 

Outra divida, tenho outland em meu server, e queria que nao desse pra jogar pokeball neles, é possivel? OBS: Somente alguns pokemons escolhidos que não sera possivel jogar pokeball.

GeraldoidaG
15 de fevereiro de 2014 às 11:15

Cara só da pra fazer isso se esse pokemon que vc colocar lá não tenha em nenhum outro lugar. pq se tiver não vai dar pra cata-lo tbm. Pra tirar a possibilidade de jogar a ball vá em data/lib/configuration.lua e vá na parte "pokecatches" e retire o nome do pokemon de lá.

 

Ou se vc criar outro monstro .

Editado Fevereiro 15 por Geraldoida

15 de fevereiro de 2014 às 11:16

No caso, eu teria que alterar um por um?

 

Outra divida, tenho outland em meu server, e queria que nao desse pra jogar pokeball neles, é possivel? OBS: Somente alguns pokemons escolhidos que não sera possivel jogar pokeball.

Sim, é possivel sim, adicionando os corpses de cada um dos Pokes da Outland no items.xml.

Sobre a velocidade: vc terá que editar um por um sim.

Editado Fevereiro 15 por FlamesAdmin

PokerangersP
15 de fevereiro de 2014 às 11:26

Tipo, quero que de pra pega loot, mais que nao de para jogar balls nele. é possivel?

15 de fevereiro de 2014 às 11:33

Tipo, quero que de pra pega loot, mais que nao de para jogar balls nele. é possivel?

Sim cara.

PokerangersP
15 de fevereiro de 2014 às 11:57

Cara, derrepente minha CDBar sumiu, sem erro nem nada, de ontem pra hoje, sumiu, oque pode ser? uso OTClient

15 de fevereiro de 2014 às 12:17

configuration.lua:

useOTClient = true

PokerangersP
15 de fevereiro de 2014 às 12:46

Ja estava true

 

Começo do configuration.lua

 

 

 

ftt66tuseOTClient = true -- coloque false caso n for usar o OTClient!!!
useKpdoDlls = true -- coloque true pra usar as barras de cooldown.
intervalToRegrowBushAndStones = 15 -- this also affects dig (in seconds) / isso afeta dig também (em segundos)
nurseHealsOnlyInPZ = true -- true = precisa estar em pz pra falar com a nurse
accountManagerOutfit = {lookType = 304, lookHead = 1, lookBody = 1, lookLegs = 1, lookFeet = 1}
accountManagerRandomPokemonOutfit = true -- se true, quando o acc manager logar, vai ter uma outfit de pokemon aleatoria
reloadHighscoresWhenUsingPc = true -- talvez dê lag, lembrando que tem uma opção no config.lua que indica o intervalo do update das highscores
backupPos = {x = 4, y = 3, z = 10} -- alguma pos para criar monstros quando tentar sair do fly/ride/surf em lugares que não são muito espaçosos
nurseHealsPokemonOut = true
maximumBoost = 50
boost_rate = 1.8
catchMakesPokemonHappier = true
dittoCopiesStatusToo = false
dittoBonus = 0.85 --0.45
wildBeforeNames = false
hideBoost = false
showBoostSeparated = true
canFishWhileSurfingOrFlying = false
allEvolutionsCanBeInduzedByStone = true
evolutionByStoneRequireLevel = true
PlayerSpeed = 200
playerExperienceRate = 0.65
attackRate = 1
specialoffenseRate = 3.55
levelFactor = 1.4
defenseRate = 0.7
playerDamageReduction = 0.32
summonReduction = 1
generalSpecialAttackReduction = 0.8
summonSpecialDamageReduction = 1
vitReductionForWild = 1 -- 1 means that nothing will change, 0.5 means that wild pokemon hp will drop by half
speedRate = 1.85
wildEvolveChance = 850
pokemonExpPerLevelRate = 6
baseExpRate = 0.5
generalExpRate = 1
HPperVITwild = 13
HPperVITsummon = 12.2
baseNurseryHappiness = 95
baseNurseryHunger = 150
minHappyToEvolve = 190
maxHappyToEvolve = 500
happyLostOnDeath = 35
happyGainedOnEvolution = 20
happinessRate = {
[5] = {rate = 1.5, effect = 183, n = getConfigValue(PokemonStageVeryHappy)},
[4] = {rate = 1.2, effect = 170, n = getConfigValue(PokemonStageHappy)},
[3] = {rate = 1.0, effect = 182, n = getConfigValue(PokemonStageOK)},
[2] = {rate = 0.7, effect = 169, n = getConfigValue(PokemonStageSad)},
[1] = {rate = 0.4, effect = 168, n = getConfigValue(PokemonStageMad)}}

Posta ele inteiro tava dando crash no xtibia.
Se ja estava true, oque faço?