Ir para conteúdo
  • Cadastre-se

Posts Recomendados

.Qual servidor ou website você utiliza como base? 

 RealPoke, version 0.3.6

 

Qual o motivo deste tópico? 

system level bug

Está surgindo algum erro? Se sim coloque-o aqui. 

 

Citar

sim

spawn.lua

Você tem o código disponível? Se tiver publique-o aqui: 

 local shinys = {
"Bulbasaur" , "Ivysaur" , "Venusaur" , "Charmander" , "Charmeleon" , "Charizard" , "Squirtle" , "Wartortle" , "Blastoise" , "Caterpie" , "Metapod" , "Butterfree" , "Weedle" , "Kakuna" , "Beedrill" , 
"Pidgey" , "Pidgeotto" , "Pidgeot" , "Rattata" , "Raticate" , "Spearow" , "Fearow" , "Ekans" , "Arbok"  , "Pikachu" , "Raichu" , "Sandshrew" , "Sandslash" , "Nidoran female" , "Nidorina" , "Nidoqueen" , 
"Nidoran male" , "Nidorino" , "Nidoking" , "Clefairy" , "Clefable" , "Vulpix" , "Ninetales" , "Jigglypuff" , "Wigglytuff" , "Zubat" , "Golbat" , "Oddish" , "Gloom" , "Vileplume" , "Paras" , "Parasect" , 
"Venonat" , "Venomoth" , "Diglett" , "Dugtrio" , "Meowth" , "Persian" , "Psyduck" , "Golduck" , "Mankey" , "Primeape" , "Growlithe" , "Arcanine" , "Poliwag" , "Poliwhirl" , "Poliwrath" , "Abra" , "Kadabra" , 
"Alakazam" , "Machop" , "Machoke" , "Machamp" , "Bellsprout" , "Weepinbell" , "Victreebel" , "Tentacool" , "Tentacruel" , "Geodude" , "Graveler" , "Golem" , "Ponyta" , "Rapidash" , "Slowpoke" , "Slowbro" , 
"Magnemite" , "Magneton" ," Farfetch'd" , "Doduo" , "Dodrio" , "Seel" , "Dewgong" , "Grimer" , "Muk" , "Shellder" , "Cloyster" , "Gastly" , "Haunter" , "Gengar" , "Onix" , "Drowzee" , "Hypno" , "Krabby" , 
"Kingler" , "Voltorb" , "Electrode" , "Exeggcute" , "Exeggutor" , "Cubone" , "Marowak" , "Hitmonlee" , "Hitmonchan" , "Lickitung" , "Koffing" , "Weezing" , "Rhyhorn" , "Rhydon" , "Chansey" , "Tangela" , 
"Kangaskhan" , "Horsea" , "Seadra" , "Goldeen" , "Seaking" , "Staryu" , "Starmie" , "Mr. mime" , "Scyther" , "Jynx" , "Electabuzz" , "Magmar" , "Pinsir" , "Tauros" , "Magikarp" , "Gyarados" , "Lapras" , 
"Ditto" , "Eevee" , "Vaporeon" , "Jolteon" , "Flareon" , "Porygon" , "Omanyte" , "Omastar" , "Kabuto" , "Kabutops" , "Aerodactyl" ," Snorlax" , "Dratini" , "Dragonair" , "Dragonite" , 
"Chikorita" , "Bayleef" , "Meganium" , "Cyndaquil" , "Quilava" , "Typhlosion" , "Totodile" , "Croconaw" , "Feraligatr" , "Sentret" , "Furret" , "Hoothoot" , "Noctowl" , "Ledyba" , "Ledian" , "Spinarak" , 
"Ariados" , "Crobat" , "Chinchou" , "Lanturn" , "Pichu" , "Cleffa" , "Igglybuff" , "Togepi" , "Togetic" , "Natu" , "Xatu" , "Mareep" , "Flaaffy" , "Ampharos" , "Bellossom" , "Marill" , "Azumarill" , 
"Sudowoodo" , "Politoed" , "Hoppip" , "Skiploom" , "Jumpluff" , "Aipom" , "Sunkern" , "Sunflora" , "Yanma" , "Wooper" , "Quagsire" , "Espeon" , "Umbreon" , "Murkrow" , "Slowking" , "Misdreavus" , "Unown" , 
"Wobbuffet" , "Girafarig" , "Pineco" , "Forretress" , "Dunsparce" , "Gligar" , "Steelix" , "Snubbull" , "Granbull" , "Qwilfish" ,  "Scizor" , "Shuckle" , "Heracross" , "Sneasel" , "Teddiursa" , "Ursaring" , 
"Slugma" , "Magcargo" , "Swinub" , "Piloswine" , "Corsola" , "Remoraid" , "Octillery" , "Delibird" , "Mantine" , "Skarmory" , "Houndour" , "Houndoom" , "Kingdra" , "Phanpy" , "Donphan" , "Porygon2" , 
"Stantler" , "Smeargle" , "Tyrogue" , "Hitmontop" , "Smoochum" , "Elekid" , "Magby" , "Miltank" , "Blissey" , "Larvitar" , "Pupitar" , "Tyranitar"
}
local raros = {"Articuno" , "Zapdos" , "Moltres" , "Mewtwo" , "Mew" , "Raikou" , "Entei" , "Suicune" , "Lugia" , "Ho-oh" , "Celebi", "Rayquaza"}                               --alterado v2.5


local function doPokemonRegisterLevel(cid)
	if not isCreature(cid) then return true end
	if getWildPokemonLevel(cid) == -1 then
		setWildPokemonLevel(cid)
	end
if isCreature(cid) then
if not isSummon(cid) then
   if string.find(tostring(getCreatureName(cid)), "Shiny") then
      local newName = tostring(getCreatureName(cid)):match("Shiny (.*)")
      local newNamed = newName.." ["..getPokemonLevel(cid).."]" 
   else
		newNamed = getCreatureName(cid).." ["..getPokemonLevel(cid).."]"
   end
     doCreatureSetNick(cid, newNamed)
end	
end	
end

local function doSetRandomGender(cid)
	if not isCreature(cid) then return true end
	if isSummon(cid) then return true end
	local gender = 0
	local name = getCreatureName(cid)
	if not newpokedex[name] then return true end
	local rate = newpokedex[name].gender
		if rate == 0 then
			gender = 3
		elseif rate == 1000 then
			gender = 4
		elseif rate == -1 then
			gender = 2
		elseif math.random(1, 1000) <= rate then
			gender = 4
		else
			gender = 3
		end
	doCreatureSetSkullType(cid, gender)
end

local function doShiny(cid)
if isCreature(cid) then
   if isSummon(cid) then return true end
   if getPlayerStorageValue(cid, 74469) >= 1 then return true end
   if getPlayerStorageValue(cid, 22546) >= 1 then return true end 
   if isNpcSummon(cid) then return true end
   if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v2.9
   
if isInArray(shinys, getCreatureName(cid)) then  --alterado v2.9 \/
   chance = 1    --1% chance        
elseif isInArray(raros, getCreatureName(cid)) then   --n coloquem valores menores que 0.1 !!
   chance = 5   --0.5% chance       
else
   return true
end    
    if math.random(1, 1000) <= chance then  
      doSendMagicEffect(getThingPos(cid), 18)               
      local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid)
      doRemoveCreature(cid)
      local shi = doCreateMonster(name, pos, false)
      setPlayerStorageValue(shi, 74469, 1)      
   else
       setPlayerStorageValue(cid, 74469, 1)
   end                                        --/\
else                                                            
return true
end
end

function onSpawn(cid)

    registerCreatureEvent(cid, "Experience")
	registerCreatureEvent(cid, "GeneralConfiguration")
	registerCreatureEvent(cid, "DirectionSystem")
	registerCreatureEvent(cid, "CastSystem")
	registerCreatureEvent(cid, "WildSpells")
	 
	 if isInArray(passivepokemons, getPokemonName(cid)) then
		registerCreatureEvent(cid, "BlockAttack")
	 end

	if isSummon(cid) then
		registerCreatureEvent(cid, "SummonDeath")
	return true
	end

	addEvent(doPokemonRegisterLevel, 5, cid)
	addEvent(doSetRandomGender, 5, cid)
	addEvent(doShiny, 10, cid)

return true
end

Level System.lua

function getPokemonStatus(name, multiplier)
	local a = pokes[name]
	local m = 1
	if not a then return false end
	if not a.offense then return false end
	if multiplier then m = multiplier end
local ret = {}
	ret.off = a.offense * m
	ret.offense = ret.off

	ret.def = a.defense * m
	ret.defense = ret.def

	ret.sdef = a.specialdefense * m
	ret.specialdefense = ret.sdef	
	
	ret.agi = a.agility * m
	ret.agility = ret.agi

	ret.spatk = a.specialattack * m
	ret.specialattack = ret.spatk

	ret.vit = a.vitality * m
	ret.vitality = ret.vit
return ret
end

function getPokemonType(name)                --by smowking
local path = "data/monster/pokes/Shiny Kanto/"..name..".xml"
local tpw = io.type(io.open(path))

if not tpw then
   path = "data/monster/pokes/Nesil 2/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Nesil 1/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Nesil 3/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Nesil 4/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Nesil 5/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Novelty/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Shiny Hoenn/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Shiny Johto/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Shiny Sinnoh/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/"..name..".xml"
   tpw = io.type(io.open(path))
end   
if not tpw then
   return print("[getPokemonType] Poke with name: "..name.." ins't in any paste on monster/pokes/") and 2
end
   local arq = io.open(path, "a+")
   local txt = arq:read("*all")
   arq:close()
   local a, b = txt:find('race="(.-)"')
   txt = string.sub(txt, a + 6, b - 1)
return txt
end 

function getPokemonXMLOutfit(name)                --alterado v2.9 \/
local path = "data/monster/pokes/Shiny Kanto/"..name..".xml"
local tpw = io.type(io.open(path))

if not tpw then
   path = "data/monster/pokes/Nesil 2/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Nesil 1/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Nesil 3/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Nesil 4/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Nesil 5/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Novelty/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Shiny Hoenn/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Shiny Johto/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/Shiny Sinnoh/"..name..".xml"
   tpw = io.type(io.open(path))
end
if not tpw then
   path = "data/monster/pokes/"..name..".xml"
   tpw = io.type(io.open(path))
end   
if not tpw then
   return print("[getPokemonXMLOutfit] Poke with name: "..name.." ins't in any paste on monster/pokes/") and 2
end
   local arq = io.open(path, "a+")
   local txt = arq:read("*all")
   arq:close()
   local a, b = txt:find('look type="(.-)"')
   txt = string.sub(txt, a + 11, b - 1)
return tonumber(txt)
end 

function doEvolutionOutfit(cid, oldout, outfit)
	if not isCreature(cid) then return true end
		if getCreatureOutfit(cid).lookType == oldout then
			doSetCreatureOutfit(cid, {lookType = outfit}, -1)
		else
			doSetCreatureOutfit(cid, {lookType = oldout}, -1)
		end
end

function doStartEvolution(cid, evolution, seconds)
	if not isCreature(cid) then return true end
	local a = getPlayerStorageValue(cid, 1007)
	local b = getCreatureHealth(cid) / getCreatureMaxHealth(cid)
	local d = getThingPos(cid)
	local e = getCreatureMaster(cid)
	if getHappinessRate(cid) < 1 then return true end
	local f = getCreatureOutfit(cid).lookType
	local g = getItemAttribute(getPlayerSlotItem(e, 8).uid, "nick") or getCreatureName(cid)
	local h = getPokemonXMLOutfit(evolution)
	doItemSetAttribute(getPlayerSlotItem(e, 8).uid, "hp", b)
	doCreatureSay(e, "What? My "..g.." is evolving!", TALKTYPE_SAY)
	doSummonMonster(e, "Evolution")
	doReturnPokemon(e, cid, getPlayerSlotItem(e, 8), 0, true)
	local evo = getCreatureSummons(e)[1]
	doEvolutionOutfit(evo, h, f)
	doCreatureSetHideHealth(evo, true)
	doCreatureSetLookDir(evo, 2)
	setPlayerStorageValue(evo, 1007, g)
	doTeleportThing(evo, d, false)
	addEvent(sendSSJEffect, 250, evo)
	doSendAnimatedText(getThingPos(evo), "EVOLUTION", COLOR_GRASS)
	doSendEvolutionEffect(evo, getThingPos(evo), evolution, 20, false, false, f, h)
end

function doSendEvolutionEffect(cid, pos, evolution, turn, ssj, evolve, f, h)
	if not isCreature(cid) then
		doSendAnimatedText(pos, "CANCEL", 215)
	return true end
	if evolve then
		doEvolvePokemon(getCreatureMaster(cid), {uid = cid}, evolution, 0, 0)
	return true
	end
	doSendMagicEffect(pos, 18)
		if ssj then
			sendSSJEffect(evo)
		end
	doEvolutionOutfit(cid, f, h)
	addEvent(doSendEvolutionEffect, math.pow(1900, turn/20), cid, getThingPos(cid), evolution, turn - 1, turn == 19, turn == 2, f, h)
end

function sendSSJEffect(cid)
	if not isCreature(cid) then return true end
	local pos1 = getThingPos(cid)
	local pos2 = getThingPos(cid)
	pos2.x = pos2.x + math.random(-1, 1)
	pos2.y = pos2.y - math.random(1, 2)
	doSendDistanceShoot(pos1, pos2, 37)
	addEvent(sendSSJEffect, 45, cid)
end

function sendFinishEvolutionEffect(cid, alternate)
	if not isCreature(cid) then return true end
	local pos1 = getThingPos(cid)

	if alternate then
		local pos = {
		[1] = {-2, 0},
		[2] = {-1, -1},
		[3] = {0, -2},
		[4] = {1, -1},
		[5] = {2, 0},
		[6] = {1, 1},
		[7] = {0, 2},
		[8] = {-1, 1}}
		for a = 1, 8 do
			local pos2 = getThingPos(cid)
			pos2.x = pos2.x + pos[a][1]
			pos2.y = pos2.y + pos[a][2]
			local pos = getThingPos(cid)
			doSendDistanceShoot(pos2, pos, 37)
			addEvent(doSendDistanceShoot, 300, pos, pos2, 37)
		end
	else
		for a = 0, 3 do
			doSendDistanceShoot(pos1, getPosByDir(pos1, a), 37)
		end
		for a = 4, 7 do
			addEvent(doSendDistanceShoot, 600, pos1, getPosByDir(pos1, a), 37)
		end
	end
end

function doEvolvePokemon(cid, item2, theevo, stone1, stone2)

	if not isCreature(cid) then return true end

	if not pokes[theevo] or not pokes[theevo].offense then
	doReturnPokemon(cid, item2.uid, getPlayerSlotItem(cid, 8), pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect, false, true)
	return true
	end

	local owner = getCreatureMaster(item2.uid)
	local pokeball = getPlayerSlotItem(cid, 8)
	local description = "Contains a "..theevo.."."
	local pct = getCreatureHealth(item2.uid) / getCreatureMaxHealth(item2.uid)






		doItemSetAttribute(pokeball.uid, "hp", pct)

		doItemSetAttribute(pokeball.uid, "poke", theevo)
		doItemSetAttribute(pokeball.uid, "description", "Contains a "..theevo..".")

		doPlayerSendTextMessage(cid, 27, "Parabens! Seu "..getPokeName(item2.uid).." Evoluiu Para "..theevo.."!")		

		doSendMagicEffect(getThingPos(item2.uid), 18)
		doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos[theevo])
		doSendMagicEffect(getThingPos(cid), 173)
		

		local oldpos = getThingPos(item2.uid)
		local oldlod = getCreatureLookDir(item2.uid)
		local oldlvl = getPokemonLevel(item2.uid)
		doRemoveCreature(item2.uid)

		doSummonMonster(cid, theevo)
		local pk = getCreatureSummons(cid)[1]

		doTeleportThing(pk, oldpos, false)
		doCreatureSetLookDir(pk, oldlod)

		sendFinishEvolutionEffect(pk, true)
		addEvent(sendFinishEvolutionEffect, 550, pk, true)
		addEvent(sendFinishEvolutionEffect, 1050, pk)
		
		doPlayerRemoveItem(cid, stone1, 1)
		doPlayerRemoveItem(cid, stone2, 1)

		doAddPokemonInOwnList(cid, theevo)

		local status = getPokemonStatus(getCreatureName(pk))

		local off = status.off * 7.5
		local def = status.def * 7.5
		local agi = status.agi * 7.5
		local spatk = status.spatk * 7.5
		local vit = status.vit * 7.5

		doItemSetAttribute(pokeball.uid, "offense", getItemAttribute(pokeball.uid, "offense") + off)
		doItemSetAttribute(pokeball.uid, "defense", getItemAttribute(pokeball.uid, "defense") + def)
		doItemSetAttribute(pokeball.uid, "speed", getItemAttribute(pokeball.uid, "speed") + agi)
		doItemSetAttribute(pokeball.uid, "specialattack", getItemAttribute(pokeball.uid, "specialattack") + spatk)
		doItemSetAttribute(pokeball.uid, "vitality", getItemAttribute(pokeball.uid, "vitality") + vit)

		doPlayerSendTextMessage(cid, 27, "Evoluçao Bonus: • Offense: +"..doMathDecimal(off).."  • Defense: +"..doMathDecimal(def).."  • Spc. Atk: +"..doMathDecimal(spatk).."  • Agility: +"..doMathDecimal(agi).."  • Vitality: +"..doMathDecimal(vit).."")

		local happy = getItemAttribute(pokeball.uid, "happy")

		doItemSetAttribute(pokeball.uid, "happy", happy + happyGainedOnEvolution)

		if happy + happyGainedOnEvolution > 255 then
			doItemSetAttribute(pokeball.uid, "happy", 255)
		end

		adjustStatus(pk, pokeball.uid, true, false)

		if useKpdoDlls then
			doUpdateMoves(cid)
		end
end




function doMathDecimal(number, casas)

	if math.floor(number) == number then return number end

	local c = casas and casas + 1 or 3

	for a = 0, 10 do
		if math.floor(number) < math.pow(10, a) then
			local str = string.sub(""..number.."", 1, a + c)
			return tonumber(str)	
		end
	end

return number
end


function doAdjustWithDelay(cid, pk, health, vit, status)
if isCreature(cid) then                                   --alterado v2.5
   if not isCreature(cid) then return true end
   adjustStatus(pk, getPlayerSlotItem(cid, 8).uid, health, vir, status)
end
end

function adjustStatus(pk, item, health, vite, conditions)

	if not isCreature(pk) then return true end

	local bonusoffense = getItemAttribute(item, boffense) or 0
	local bonusdefense = getItemAttribute(item, bdefense) or 0
	local bonusagility = getItemAttribute(item, bagility) or 0
	local bonussattack = getItemAttribute(item, bsattack) or 0

	setPlayerStorageValue(pk, 1000, getItemAttribute(item, "level"))
	setPlayerStorageValue(pk, 1001, getItemAttribute(item, "offense"))
	setPlayerStorageValue(pk, 1002, getItemAttribute(item, "defense"))
	setPlayerStorageValue(pk, 1003, getItemAttribute(item, "speed"))
	setPlayerStorageValue(pk, 1005, getItemAttribute(item, "specialattack"))
	setPlayerStorageValue(pk, 1016, getItemAttribute(item, "spdefense"))

	local gender = getItemAttribute(item, "gender") and getItemAttribute(item, "gender") or 0
	doCreatureSetSkullType(pk, gender)

	if vite == true then
		local pct = getCreatureHealth(pk) / getCreatureMaxHealth(pk)
		local vit = getItemAttribute(item, "vitality") - getPlayerStorageValue(pk, 1004)
		setCreatureMaxHealth(pk, getCreatureMaxHealth(pk) + ( vit * HPperVIT ))
		doCreatureAddHealth(pk, pct * vit * HPperVIT)
	end

	setPlayerStorageValue(pk, 1004, getItemAttribute(item, "vitality"))

	doRegainSpeed(pk)

	local nick = getItemAttribute(item, "poke")
	
	if string.find(tostring(nick), "Shiny") then
	   nick = tostring(nick):match("(Shiny .*)")
    end

	if getItemAttribute(item, "nick") then
		nick = getItemAttribute(item, "nick")
	end

	setPlayerStorageValue(pk, 1007, nick)

	local boostlevel = getItemAttribute(item, "boost") or 0
	local boostshow = hideBoost and "]" or " + "..boostlevel.."]"
	local lvlstr = ""

	if showBoostSeparated then
		boostshow = hideBoost and "]" or "] [+"..boostlevel.."]"
	end

	if hideSummonsLevel then
		if not hideBoost then
			nick = nick.." [+"..boostlevel.."]"
		end
	else
		nick = nick.." ["..boostshow..""
	end


	if not getItemAttribute(item, "happy") then
		doItemSetAttribute(item, "happy", 120)
	end

	if not getItemAttribute(item, "hunger") then
		doItemSetAttribute(item, "hunger", 5)
	end

	local happy = getItemAttribute(item, "happy")
		if happy < 0 then
			happy = 1
		end
	setPlayerStorageValue(pk, 1008, happy)

	local hunger = getItemAttribute(item, "hunger")
	setPlayerStorageValue(pk, 1009, hunger)

	if health == true then
		local mh = getCreatureMaxHealth(pk) + HPperVIT * getVitality(pk) * statusVitSummonMultiplier
		local rd = 1 - (tonumber(getItemAttribute(item, "hp")))
		setCreatureMaxHealth(pk, mh)
		doCreatureAddHealth(pk, getCreatureMaxHealth(pk))
		doCreatureAddHealth(pk, -(getCreatureMaxHealth(pk) * rd))
	end

	if isSummon(pk) and conditions then                        --alterado v2.5 daki pra baixo!!
		local burn = getItemAttribute(item, "burn")   
		if burn and burn >= 0 then
		   local ret = {id = pk, cd = burn, check = false, damage = getItemAttribute(item, "burndmg"), cond = "Burn"}
		   addEvent(doCondition2, 3500, ret)
		end

		local poison = getItemAttribute(item, "poison")
		if poison and poison >= 0 then
		   local ret = {id = pk, cd = poison, check = false, damage = getItemAttribute(item, "poisondmg"), cond = "Poison"}
		   addEvent(doCondition2, 1500, ret)
		end

        local confuse = getItemAttribute(item, "confuse")
		if confuse and confuse >= 0 then
		   local ret = {id = pk, cd = confuse, check = false, cond = "Confusion"}
		   addEvent(doCondition2, 1200, ret)                                                --alterado v2.5
		end

        local sleep = getItemAttribute(item, "sleep")
		if sleep and sleep >= 0 then
		   local ret = {id = pk, cd = sleep, check = false, first = true, cond = "Sleep"}
		   doCondition2(ret)
		end
		
		local miss = getItemAttribute(item, "miss")     
		if miss and miss >= 0 then      
          local ret = {id = pk, cd = miss, eff = getItemAttribute(item, "missEff"), check = false, spell = getItemAttribute(item, "missSpell"), cond = "Miss"}
          doCondition2(ret)
        end
        
        local fear = getItemAttribute(item, "fear")
        if fear and fear >= 0 then
           local ret = {id = pk, cd = fear, check = false, skill = getItemAttribute(item, "fearSkill"), cond = "Fear"}
           doCondition2(ret)
        end
        
        local silence = getItemAttribute(item, "silence")
        if silence and silence >= 0 then      
           local ret = {id = pk, cd = silence, eff = getItemAttribute(item, "silenceEff"), check = false, cond = "Silence"}
           doCondition2(ret)
        end                                     
        
        local stun = getItemAttribute(item, "stun")
        if stun and stun >= 0 then
           local ret = {id = pk, cd = stun, eff = getItemAttribute(item, "stunEff"), check = false, spell = getItemAttribute(item, "stunSpell"), cond = "Stun"}
           doCondition2(ret)
        end 
                                                       
        local paralyze = getItemAttribute(item, "paralyze")
        if paralyze and paralyze >= 0 then
           local ret = {id = pk, cd = paralyze, eff = getItemAttribute(item, "paralyzeEff"), check = false, first = true, cond = "Paralyze"}
           doCondition2(ret)
        end  
                                                     
        local slow = getItemAttribute(item, "slow")
        if slow and slow >= 0 then
           local ret = {id = pk, cd = slow, eff = getItemAttribute(item, "slowEff"), check = false, first = true, cond = "Slow"}
           doCondition2(ret)
        end                                              
        
        local leech = getItemAttribute(item, "leech")
        if leech and leech >= 0 then
           local ret = {id = pk, cd = leech, attacker = 0, check = false, damage = getItemAttribute(item, "leechdmg"), cond = "Leech"}
           doCondition2(ret)
        end                               
        
        for i = 1, 3 do
            local buff = getItemAttribute(item, "Buff"..i)
            if buff and buff >= 0 then
               local ret = {id = pk, cd = buff, eff = getItemAttribute(item, "Buff"..i.."eff"), check = false, 
               buff = getItemAttribute(item, "Buff"..i.."skill"), first = true, attr = "Buff"..i}
               doCondition2(ret)
            end
        end
               
	end
	                                                                   --alterado v2.9 
    if getItemAttribute(item, "boost") and getItemAttribute(item, "boost") >= 50 and getItemAttribute(item, "aura") then
       sendAuraEffect(pk, auraSyst[getItemAttribute(item, "aura")])        
    end
    
    if getPlayerStorageValue(getCreatureMaster(pk), 6598754) >= 1 then
        setPlayerStorageValue(pk, 6598754, 1)                               
    elseif getPlayerStorageValue(getCreatureMaster(pk), 6598755) >= 1 then
        setPlayerStorageValue(pk, 6598755, 1)
    end

return true
end

function setWildPokemonLevel(cid, optionalLevel, optionalStatus, optionalNick, optionalExtraExp)

	if not isCreature(cid) then return true end
	if not pokes[getCreatureName(cid)] then return true end  --alterado v2.6

	local off = 0
	local def = 0
	local sdef = 0
	local agi = 0
	local spatk = 0
	local vit = 0
	local this = getCreatureName(cid)

	    levelwildmin = pokes[this].wildLvlMin                                                                                        
	    levelwildmax = pokes[this].wildLvlMax - 5 --Reduzido em 5 o level maximo dos pokemons.                                                                                       

	local status = getPokemonStatus(this)
		if status then
			off = status.off
			def = status.def
			sdef = status.sdef
			agi = status.agi
			vit = status.vit
			spatk = status.spatk
		end
	local pokelevel = math.random(levelwildmin, levelwildmax)
	setPlayerStorageValue(cid, 1000, pokelevel) --alterado v2.8
	setPlayerStorageValue(cid, 67312, this) --alterado v2.8
	
	if optionalStatus and optionalStatus.off then
		setPlayerStorageValue(cid, 1001, optionalStatus.offense)
		setPlayerStorageValue(cid, 1002, optionalStatus.defense)
		setPlayerStorageValue(cid, 1003, optionalStatus.agility)
		setPlayerStorageValue(cid, 1004, optionalStatus.vitality)
		setPlayerStorageValue(cid, 1005, optionalStatus.specialattack)
		setPlayerStorageValue(cid, 1016, optionalStatus.specialdefense)
		setPlayerStorageValue(cid, 1011, optionalStatus.offense)
		setPlayerStorageValue(cid, 1012, optionalStatus.defense)
		setPlayerStorageValue(cid, 1013, optionalStatus.agility)
		setPlayerStorageValue(cid, 1014, optionalStatus.vitality)
		setPlayerStorageValue(cid, 1015, optionalStatus.specialattack)
	else
		setPlayerStorageValue(cid, 1001, off * statusMultiplier + (2*pokelevel))
		setPlayerStorageValue(cid, 1002, def * statusMultiplier + (2*pokelevel))
		setPlayerStorageValue(cid, 1003, agi * statusMultiplier + (2*pokelevel))
		setPlayerStorageValue(cid, 1004, vit * statusVitMultiplier + (2*pokelevel))
		setPlayerStorageValue(cid, 1005, spatk * statusMultiplier + (2*pokelevel))
		setPlayerStorageValue(cid, 1016, sdef * statusMultiplier + (2*pokelevel))
		setPlayerStorageValue(cid, 1011, getPlayerStorageValue(cid, 1001))
		setPlayerStorageValue(cid, 1012, getPlayerStorageValue(cid, 1002))
		setPlayerStorageValue(cid, 1013, getPlayerStorageValue(cid, 1003))
		setPlayerStorageValue(cid, 1014, getPlayerStorageValue(cid, 1004))
		setPlayerStorageValue(cid, 1015, getPlayerStorageValue(cid, 1005))
	end

	doRegainSpeed(cid)

	if isSummon(cid) then
		return true
	else
		setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + getVitality(cid) * HPperVIT * vitReductionForWild)
		doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
    end
	
	
	if pokes[getCreatureName(cid)].exp then
		local exp = (pokes[getCreatureName(cid)].exp * baseExpRate) + (5 * pokelevel)
		setPlayerStorageValue(cid, 1006, exp * generalExpRate)
		if getPlayerStorageValue(cid, 22546) == 1 then
          setPlayerStorageValue(cid, 1006, 750)
          doSetCreatureDropLoot(cid, false)
       end  
	end
end

function getOffenseInRage(cid)  --alterado v2.8
	if not isCreature(cid) then return 0 end

	if getPlayerStorageValue(cid, 547888) >= 1 then
		return tonumber(getPlayerStorageValue(cid, 1001)) / 2
	end 

return tonumber(getPlayerStorageValue(cid, 1001))
end

function getOffense(cid)
	if not isCreature(cid) then return 0 end

	--[[if getPlayerStorageValue(cid, 3894) >= 1 then
		return tonumber(getPlayerStorageValue(cid, 1001)) / 2
	end ]]

return tonumber(getPlayerStorageValue(cid, 1001))
end

function getDefense(cid)
	if not isCreature(cid) then return 0 end

--[[	if getPlayerStorageValue(cid, 3894) >= 1 then
		return tonumber(getPlayerStorageValue(cid, 1002)) / 2
	end  ]]

return tonumber(getPlayerStorageValue(cid, 1002))
end

function getSpeed(cid)
	if not isCreature(cid) then return 0 end
return tonumber(getPlayerStorageValue(cid, 1003))
end

function getVitality(cid)
	if not isCreature(cid) then return 0 end
return tonumber(getPlayerStorageValue(cid, 1004))
end

function getSpecialAttack(cid)
	if not isCreature(cid) then return 0 end
return tonumber(getPlayerStorageValue(cid, 1005))
end

function getHappiness(cid)
	if not isCreature(cid) then return 0 end
return tonumber(getPlayerStorageValue(cid, 1008))
end

function getSpecialDefense(cid)
	if not isCreature(cid) then return 0 end
return  tonumber(getPlayerStorageValue(cid, 1016))
end

function getWildPokemonExp(cid)
return getPlayerStorageValue(cid, 1006)
end

function getWildPokemonLevel(cid)    
return getPlayerStorageValue(cid, 1000)
end

function getLevel(cid)
	if isSummon(cid) then
	return getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "level")
	end
return getPlayerStorageValue(cid, 1000)
end

function getPokeName(cid)
	if not isSummon(cid) then return getCreatureName(cid) end
	if getCreatureName(cid) == "Evolution" then return getPlayerStorageValue(cid, 1007) end
	
local item = getPlayerSlotItem(getCreatureMaster(cid), 8)
	if getItemAttribute(item.uid, "nick") then                          --alterado v2.7
	   return getItemAttribute(item.uid, "nick")
	end
	if string.find(tostring(getCreatureName(cid)), "Shiny") then
      local newName = tostring(getCreatureName(cid)):match("(Shiny .*)")
      return newName
    end
return getCreatureName(cid)
end

function getPokeballName(item, truename)
if not truename and getItemAttribute(item, "nick") then
return getItemAttribute(item, "nick")
end
return getItemAttribute(item, "poke")
end

function getMasterLevel(poke)
    if not isSummon(poke) then return 0 end
return getPlayerLevel(getCreatureMaster(poke)) --alterado v2.5
end

function getPokeballBoost(ball)
    if not isPokeball(ball.itemid) then return 0 end  --alterado v2.8
return getItemAttribute(ball.uid, "boost") or 0
end

function getPokemonBoost(poke)
    if not isSummon(poke) then return 0 end       --alterado v2.5
return getItemAttribute(getPlayerSlotItem(getCreatureMaster(poke), 8).uid, "boost") or 0
end

function getPokemonLevelByName(name)
return pokes[name] and pokes[name].level or 0  --alterado v2.9
end

function getPokemonLevel(cid)
	if not isCreature(cid) then return 0 end
return getPlayerStorageValue(cid, 1000)
end

function getPokemonGender(cid)
return getCreatureSkullType(cid)
end

function setPokemonGender(cid, gender)
if isCreature(cid) and gender then        --alterado v2.8
   doCreatureSetSkullType(cid, gender)
   return true
end
return false
end

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 

untitled.thumb.PNG.926cc278ed7f99c3855ee51e2909c89c.PNG

NTO PANZER SERVIDOR 24H 

1554689_1.png

http://narutopanzer.blogspot.com.br/

RATE  EXP 999

 

DBO SERVIDOR 24H 

1549171_1.png

http://dbowtf.ddns.net/

RATE EXP 400

 

 

Link para o post
Compartilhar em outros sites
1 hora atrás, FlamesAdmin disse:

seu servidor os pokes tem level?

 

NTO PANZER SERVIDOR 24H 

1554689_1.png

http://narutopanzer.blogspot.com.br/

RATE  EXP 999

 

DBO SERVIDOR 24H 

1549171_1.png

http://dbowtf.ddns.net/

RATE EXP 400

 

 

Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por cloudrun2023
      CloudRun - Sua Melhor Escolha para Hospedagem de OTServer!
      Você está procurando a solução definitiva para hospedar seu OTServer com desempenho imbatível e segurança inigualável? Não procure mais! Apresentamos a CloudRun, sua parceira confiável em serviços de hospedagem na nuvem.
       
      Recursos Exclusivos - Proteção DDoS Avançada:
      Mantenha seu OTServer online e seguro com nossa robusta proteção DDoS, garantindo uma experiência de jogo ininterrupta para seus jogadores.
       
      Servidores Ryzen 7 Poderosos: Desfrute do poder de processamento superior dos servidores Ryzen 7 para garantir um desempenho excepcional do seu OTServer. Velocidade e estabilidade garantidas!
       
      Armazenamento NVMe de Alta Velocidade:
      Reduza o tempo de carregamento do jogo com nosso armazenamento NVMe ultrarrápido. Seus jogadores vão adorar a rapidez com que podem explorar o mundo do seu OTServer.
       
      Uplink de até 1GB:
      Oferecemos uma conexão de alta velocidade com até 1GB de largura de banda, garantindo uma experiência de jogo suave e livre de lag para todos os seus jogadores, mesmo nos momentos de pico.
       
      Suporte 24 Horas:
      Estamos sempre aqui para você! Nossa equipe de suporte está disponível 24 horas por dia, 7 dias por semana, para resolver qualquer problema ou responder a qualquer pergunta que você possa ter. Sua satisfação é a nossa prioridade.
       
      Fácil e Rápido de Começar:
      Configurar seu OTServer na CloudRun é simples e rápido. Concentre-se no desenvolvimento do seu jogo enquanto cuidamos da hospedagem.
       
      Entre em Contato Agora!
      Website: https://central.cloudrun.com.br/index.php?rp=/store/cloud-ryzen-brasil
      Email: [email protected]
      Telefone: (47) 99902-5147

      Não comprometa a qualidade da hospedagem do seu OTServer. Escolha a CloudRun e ofereça aos seus jogadores a melhor experiência de jogo possível. Visite nosso site hoje mesmo para conhecer nossos planos e começar!
       
      https://central.cloudrun.com.br/index.php?rp=/store/cloud-ryzen-brasil
       
      CloudRun - Onde a Velocidade Encontra a Confiabilidade!
       

    • Por FeeTads
      SALVE rapaziada do TK, esses dias vim pensando em novos scripts pro meu OT, e em um deles eu precisava que determinada area não contasse frag pro player que matasse outros, PORÉM eu precisava que os players que morressem nessa area ainda assim tivessem as penalidades da sua morte, procurei por ai, achei alguns scripts que apenas tiravam o SKULL e não realmente o FRAG do player.

      **script atualizado 22/10/2023** - melhorado e otimizado, levei o script pra puxar as infos por .lua / creatureScripts

      vou disponibilizar o code aqui, e o que fazer pra determinada area não contar frag.

      SOURCE OTX 2 / TFS 0.x, Funciona em TFS 1.x mudando as tags e ajeitando as sintaxes.

      vá em creatureevent.cpp

      procure por:
      else if(type == "preparedeath") _type = CREATURE_EVENT_PREPAREDEATH;
      Adiciona abaixo:
      else if(type == "nocountfrag") _type = CREATURE_EVENT_NOCOUNTFRAG;

      procure por:
      case CREATURE_EVENT_PREPAREDEATH: return "onPrepareDeath";  
      Adicione abaixo: 
      case CREATURE_EVENT_NOCOUNTFRAG: return "noCountFragArea";

      procure por:
      case CREATURE_EVENT_PREPAREDEATH: return "cid, deathList";
      Adicione abaixo:
      case CREATURE_EVENT_NOCOUNTFRAG: return "cid, target";

      agora no mesmo arquivo, vá até o final do arquivo e adicione essa função:
      uint32_t CreatureEvent::executeNoCountFragArea(Creature* creature, Creature* target) { //noCountFragArea(cid, target) if(m_interface->reserveEnv()) { ScriptEnviroment* env = m_interface->getEnv(); if(m_scripted == EVENT_SCRIPT_BUFFER) { env->setRealPos(creature->getPosition()); std::ostringstream scriptstream; scriptstream << "local cid = " << env->addThing(creature) << std::endl; scriptstream << "local target = " << env->addThing(target) << std::endl; if(m_scriptData) scriptstream << *m_scriptData; bool result = true; if(m_interface->loadBuffer(scriptstream.str())) { lua_State* L = m_interface->getState(); result = m_interface->getGlobalBool(L, "_result", true); } m_interface->releaseEnv(); return result; } else { #ifdef __DEBUG_LUASCRIPTS__ std::ostringstream desc; desc << creature->getName(); env->setEvent(desc.str()); #endif env->setScriptId(m_scriptId, m_interface); env->setRealPos(creature->getPosition()); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(creature)); lua_pushnumber(L, env->addThing(target)); bool result = m_interface->callFunction(2); m_interface->releaseEnv(); return result; } } else { std::clog << "[Error - CreatureEvent::noCountFragArea] Call stack overflow." << std::endl; return 0; } }

      agora vá em creatureevent.h

      procure por:
      CREATURE_EVENT_PREPAREDEATH
      adicione abaixo:
      CREATURE_EVENT_NOCOUNTFRAG

      procure por:
      uint32_t executePrepareDeath(Creature* creature, DeathList deathList);
      Adicione abaixo:
      uint32_t executeNoCountFragArea(Creature* creature, Creature* target);

      agora vá em player.cpp

      procure por:
      bool Player::onKilledCreature(Creature* target, DeathEntry& entry)
      abaixo de:
      War_t enemy; if(targetPlayer->getEnemy(this, enemy)) { if(entry.isLast()) IOGuild::getInstance()->updateWar(enemy); entry.setWar(enemy); }
      Adicione o seguinte código:
      if (targetPlayer){ CreatureEventList killEvents = getCreatureEvents(CREATURE_EVENT_NOCOUNTFRAG); for (const auto &event : killEvents) { if (!event->executeNoCountFragArea(this, target)) { return true; } } }

      //

      Feito isso, tudo completo na sua source, agora é necessário adicionar o creaturescript dentro do servidor

      vá até creaturescripts/scripts
      crie um arquivo chamado, "noCountFragInArea.lua"
      e dentro dele cole o código:
       
      --[[ script feito por feetads / TibiaKing ]]-- --[[ discord: feetads / FeeTads#0246 ]]-- -- Add positions here for which you do not want to count frags local areas = { [1] = {from = {x = 91, y = 122, z = 7}, to = {x = 98, y = 127, z = 7}}, -- from = area superior esquerda / to = area inferior direita (formando um quadrado) } local onlyKillerInArea = false -- only killer need to be in area? function noCountFragArea(cid, target) if not isCreature(cid) or not isCreature(target) then return true end local posKiller = getPlayerPosition(cid) local posTarget = getPlayerPosition(target) for i = 1, #areas do local area = areas[i] if isInArea(posKiller, area.from, area.to) then if onlyKillerInArea then return false elseif isInArea(posTarget, area.from, area.to) then return false end end end return true end
      agora em creaturescripts.xml
      <event type="nocountfrag" name="fragarea" event="script" value="noCountFragInArea.lua"/>
      agora em creaturescripts/scripts/login.lua
       procure por OU semelhante a esse:
      registerCreatureEvent(cid, "AdvanceSave")
      e abaixo adicione:
      registerCreatureEvent(cid, "fragarea")

      //


      Agora tudo certo, quando quiser adiciona uma area que não pega frag, vá até o script e apenas coloque a area, igual o demonstrado no script

      Exemplo:
      local areas = { [1] = {from = {x = 91, y = 122, z = 7}, to = {x = 98, y = 127, z = 7}}, [2] = {from = {x = 1000, y = 1000, z = 7}, to = {x = 1100, y = 1100, z = 7}}, }
      assim somente colocando a area no script e abrindo o server ou dando /reload, já funcionará a area como não pegar frag.
      Esse sistema pode ser bom pra areas de pvp ativo, onde você ainda quer que o player que morrer perca os atributos, como se fosse uma morte normal, porém não conta frag pra quem matar.
      Bom pra sistemas tipo castle 48h (guild war), onde há diversas mortes e risco de pegar red, atrapalhando a war.

      Façam bom proveito dos scripts, e deixem os créditos no script rsrs

      **Eu fiz as alterações e o simples código por isso vim disponibilizar, créditos meus**
    • Por Muvuka
      Abri canal a força creaturescript acho que funcione no creaturescript cria script creaturescript
       
      <channel id="9" name="HELP" logged="yes"/>
      <channel id="12" name="Report Bugs" logged="yes"/>
      <channel id="13" name="Loot" logged="yes"/>
      <channel id="14" name="Report Character Rules Tibia Rules" logged="yes"/>
      <channel id="15" name="Death Channel"/>
      <channel id="6548" name="DexSoft" level="1"/>
      <channel id="7" name="Reports" logged="yes"/>
       
      antes de 
              if(lastLogin > 0) then adicione isso:
                      doPlayerOpenChannel(cid, CHANNEL_HELP) doPlayerOpenChannel(cid, 1,  2, 3) = 1,2 ,3 Channels, entendeu? NÃO FUNCIONA EU QUERO UM MEIO DE ABRI SEM USA A SOURCE
       
      EU NÃO CONSEGUI ABRI EU NÃO TENHO SOURCE
       
       
    • Por bolachapancao
      Rapaziada seguinte preciso de um script que ao utilizar uma alavanca para até 4 jogadores.
      Os jogadores serão teleportados para hunt durante uma hora e depois de uma hora os jogadores serão teleportados de volta para o templo.
       
      Observação: caso o jogador morra ou saia da hunt o evento hunt é cancelado.

      Estou a base canary
      GitHub - opentibiabr/canary: Canary Server 13.x for OpenTibia community.
       
    • Por RAJADAO
      .Qual servidor ou website você utiliza como base? 
      Sabrehaven 8.0
      Qual o motivo deste tópico? 
      Ajuda com novos efeitos
       
      Olá amigos, gostaria de ajuda para introduzir os seguintes efeitos no meu servidor (usando o Sabrehaven 8.0 como base), adicionei algumas runas novas (avalanche, icicle, míssil sagrado, stoneshower & Thunderstorm) e alguns novos feitiços (exevo mas san, exori san, exori tera, exori frigo, exevo gran mas frigo, exevo gran mas tera, exevo tera hur, exevo frigo hur) mas nenhum dos efeitos dessas magias parece existir no servidor, alguém tem um link para um tutorial ou algo assim para que eu possa fazer isso funcionar?
      Desculpe pelo mau inglês, sou brasileiro.

      Obrigado!


      AVALANCHE RUNE id:3161 \/
      (COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)

      STONESHOWER RUNE id:3175 \/
      (COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_STONES)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)

      THUNDERSTORM RUNE id:3202 \/
      (COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_E NERGYHIT)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)

      ICICLE RUNE id:3158 \/
      COMBAT_ICEDAMAGE
      CONST_ME_ICEAREA
      CONST_ANI_ICE

      SANTO MÍSSIL RUNA id:3182 \/
      (COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)

      CONST_ME_PLANTATTACK (exevo gran mas tera)
      CONST_ME_ICETORNADO (exevo gran mas frigo)
      CONST_ME_SMALLPLANTS (exevo tera hur)
      CONST_ME_ICEAREA (exevo frigo hur)
      CONST_ME_ICEATTACK (exori frigo)
      CONST_ME_CARNIPHILA (exori tera)

      EXORI SAN \/
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
      CONST_ME_HOLYDAM IDADE

      EXEVO MAS SAN \/
      CONST_ME_HOLYAREA
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo