Ir para conteúdo

Posts Recomendados

XTibia_smile.gif

 

Error :

[13/08/2011 12:51:28] [Error - TalkAction Interface] 
[13/08/2011 12:51:28] data/talkactions/scripts/move1.lua:onSay
[13/08/2011 12:51:28] Description: 
[13/08/2011 12:51:28] data/talkactions/scripts/move1.lua:676: attempt to index field '?' (a nil value)
[13/08/2011 12:51:28] stack traceback:
[13/08/2011 12:51:28] 	data/talkactions/scripts/move1.lua:676: in function <data/talkactions/scripts/move1.lua:669>

 

 

Script!

 

local dynpun1 = createCombatArea{
{1, 0, 0}, 
{0, 2, 0}, 
{0, 0, 0}, 
}

local dynpun2 = createCombatArea{
{0, 0, 0}, 
{0, 2, 0}, 
{0, 0, 1}, 
}


local dynpun3 = createCombatArea{
{0, 0, 0}, 
{1, 2, 0}, 
{0, 0, 0}, 
}


local dynpun4 = createCombatArea{
{0, 0, 1}, 
{0, 2, 0}, 
{0, 0, 0}, 
}


local dynpun5 = createCombatArea{
{0, 0, 0}, 
{0, 2, 0}, 
{0, 1, 0}, 
}

local confusion = createCombatArea{
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0}
}

local psychic = createCombatArea{
{0, 0, 0, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 2, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 0, 0, 0}
}

local waterspout = createCombatArea{
{1, 1, 1, 1, 1},
{1, 1, 1, 1, 1},
{1, 1, 3, 1, 1},
{1, 1, 1, 1, 1},
{1, 1, 1, 1, 1}
}


local c = {
[30] = {x = {
		pok = pidgey,
		spell = "Quick Attack",
		minLv = 1,
		ex = 1600001,
		base1 = 20,
		base2 = 21,
		dista = 1,
		bonus = 2,
		type = "normal",
		cd = 7
         }
     },
[5] = {x = {
		pok = pidgeotto,
		spell = "Quick Attack",
		minLv = 1,
		ex = 1700001,
		base1 = 100,
		base2 = 101,
		dista = 1,
		bonus = 2.5,
		type = "normal",
		cd = 7
         }
     },
[80] = {x = {
		pok = pidgeot,
		spell = "Quick Attack",
		minLv = 1,
		ex = 1800001,
		base1 = 200,
		base2 = 201,
		dista = 1,
		bonus = 3,
		type = "normal",
		cd = 7
         }
     },
[36] = {x = {
		pok = rattata,
		spell = "Quick Attack",
		minLv = 1,
		ex = 1900001,
		base1 = 20,
		base2 = 21,
		dista = 1,
		bonus = 2,
		type = "normal",
		cd = 7
         }
     },
[69] = {x = {
		pok = raticate,
		spell = "Quick Attack",
		minLv = 1,
		ex = 2000001,
		base1 = 100,
		base2 = 101,
		dista = 1,
		bonus = 3,
		type = "normal",
		cd = 7
         }
     },
[44] = {x = {
		pok = zubat,
		spell = "Bite",
		minLv = 1,
		ex = 4100001,
		base1 = 20,
		base2 = 21,
		dista = 1,
		bonus = 1.7,
		type = "normal",
		cd = 11
         }
     },
[122] = {x = {
		pok = golbat,
		spell = "Bite",
		minLv = 1,
		ex = 4200001,
		base1 = 100,
		base2 = 101,
		dista = 1,
		bonus = 5.4,
		type = "normal",
		cd = 11
         }
     },
[250] = {x = {
		pok = bellsprout,
		spell = "Slash",
		minLv = 1,
		ex = 6900001,
		base1 = 20,
		base2 = 21,
		dista = 1,
		bonus = 2,
		type = "normal",
		cd = 11
         }
     },
[37] = {x = {
		pok = weepinbell,
		spell = "Slash",
		minLv = 1,
		ex = 7000001,
		base1 = 100,
		base2 = 101, -- 150
		dista = 1, -- 3
		bonus = 2.7, -- 3
		type = "normal",
		cd = 11 -- 11
         }
     },
[240] = {x = {
		pok = victreebel,
		spell = "Slash",
		minLv = 1,
		ex = 7100001,
		base1 = 200,
		base2 = 220,
		dista = 1,
		bonus = 4,
		type = "normal",
		cd = 11
         }
     },
[19] = {x = {
		pok = magikarp,
		spell = "Splash",
		minLv = 1,
		ex = 1290001,
		base1 = 280,
		base2 = 300,
		dista = 1,
		bonus = 4,
		type = "normal",
		target = "no",
		cd = 6
         }
     },
[111] = {x = {
		pok = poliwag,
		spell = "Doubleslap",
		minLv = 1,
		ex = 6000001,
		base1 = 10,
		base2 = 11,
		dista = 1,
		bonus = 1.2,
		type = "normal",
		cd = 7
         }
     },
[212] = {x = {
		pok = poliwhirl,
		spell = "Doubleslap",
		minLv = 1,
		ex = 6100001,
		base1 = 48,
		base2 = 53,
		dista = 1,
		bonus = 2.2,
		type = "normal",
		cd = 7
         }
     },
[104] = {x = {
		pok = poliwrath,
		spell = "Mega Punch",
		minLv = 1,
		ex = 6200001,
		base1 = 190,
		base2 = 205,
		dista = 1,
		bonus = 5.4,
		type = "fighting",
		cd = 12
         }
     },
[262] = {x = {
		pok = abra,
		spell = "Confusion",
		minLv = 1,
		ex = 6300001,
		base1 = 35,
		base2 = 45,
		dista = 5,
		bonus = 5,
		type = "psychic",
		target = "no",
		cd = 12
         }
     },
[219] = {x = {
		pok = kadaabra,
		spell = "Psychic",
		minLv = 1,
		ex = 6400001,
		base1 = 135,
		base2 = 145,
		dista = 5,
		bonus = 9,
		type = "psychic",
		target = "no",
		cd = 23
         }
     },
[218] = {x = {
		pok = alaka,
		spell = "Psychic",
		minLv = 1,
		ex = 6500001,
		base1 = 235,
		base2 = 245,
		dista = 5,
		bonus = 12,
		type = "psychic",
		target = "no",
		cd = 23
         }
     },
[56] = {x = {
		pok = oddish,
		spell = "Absorb",
		minLv = 1,
		ex = 4300001,
		base1 = 25,
		base2 = 30,
		dista = 1,
		bonus = 2,
		type = "grass",
		cd = 10
         }
     },
[74] = {x = {
		pok = gloom,
		spell = "Absorb",
		minLv = 1,
		ex = 4400001,
		base1 = 35,
		base2 = 45,
		dista = 1,
		bonus = 3.5,
		type = "grass",
		cd = 10
         }
     },
[86] = {x = {
		pok = vileplume,
		spell = "Absorb",
		minLv = 1,
		ex = 4500001,
		base1 = 55,
		base2 = 65,
		dista = 1,
		bonus = 5,
		type = "grass",
		cd = 10
         }
     },
[33] = {x = {
		pok = horsea,
		spell = "Bubbles",
		minLv = 1,
		ex = 1160001,
		base1 = 20,
		base2 = 21,
		dista = 4,
		bonus = 2.4,
		type = "water",
		cd = 10
         }
     },
[276] = {x = {
		pok = seadra,
		spell = "Water Spout",
		minLv = 1,
		ex = 1170001,
		base1 = 100,
		base2 = 105,
		dista = 5,
		bonus = 3.4,
		target = "no",
		type = "water",
		cd = 14
         }
     },
[214] = {x = {
		pok = grimer,
		spell = "Mud Shot",
		minLv = 1,
		ex = 8800001,
		base1 = 35,
		base2 = 40,
		dista = 5,
		bonus = 2.9,
		type = "ground",
		cd = 10
         }
     },
[47] = {x = {
		pok = Muk,
		spell = "Mud Shot",
		minLv = 1,
		ex = 8900001,
		base1 = 101,
		base2 = 105,
		dista = 5,
		bonus = 5,
		type = "ground",
		cd = 10
         }
     },
[21] = {x = {
		pok = weedle,
		spell = "Horn Attack",
		minLv = 1,
		ex = 1300001,
		base1 = 30,
		base2 = 35,
		dista = 1,
		bonus = 2.4,
		type = "normal",
		cd = 9
         }
     },
[60] = {x = {
		nome = Kakuna,
		spell = "Headbutt",
		minLv = 1,
		ex = 1400001,
		base1 = 80,
		base2 = 85,
		dista = 1,
		bonus = 3.4,
		type = "normal",
		cd = 9
         }
     },
[45] = {x = {
		pok = beedrill,
		spell = "Fury Attack",
		minLv = 1,
		ex = 1500001,
		base1 = 60,
		base2 = 65,
		dista = 3,
		bonus = 2,
		type = "normal",
		cd = 11
         }
     },
[26] = {x = {
		pok = doduo,
		spell = "Quick Attack",
		minLv = 1,
		ex = 8400001,
		base1 = 82,
		base2 = 97,
		dista = 1,
		bonus = 2,
		type = "normal",
		cd = 8
         }
     },
[120] = {x = {
		pok = dodrio,
		spell = "Rapid Hit",
		minLv = 1,
		ex = 8500001,
		base1 = 222,
		base2 = 237,
		dista = 1,
		bonus = 3,
		type = "normal",
		cd = 6
         }
     },
[217] = {x = {
		pok = magnemite,
		spell = "Super Sonic",
		minLv = 1,
		ex = 8100001,
		base1 = 0,
		base2 = 0,
		dista = 5,
		bonus = 0,
		type = "normal",
		cd = 15
         }
     },
[223] = {x = {
		pok = magneton,
		spell = "Super Sonic",
		minLv = 1,
		ex = 8200001,
		base1 = 0,
		base2 = 0,
		dista = 5,
		bonus = 0,
		type = "normal",
		cd = 15
         }
     },
[123] = {x = {
		pok = voltorb,
		spell = "Slam",
		minLv = 1,
		ex = 1000001,
		base1 = 85,
		base2 = 95,
		dista = 1,
		bonus = 2.2,
		type = "normal",
		cd = 16
         }
     },
[287] = {x = {
		pok = voltorbroll,
		spell = "Slam",
		minLv = 1,
		ex = 1000001,
		base1 = 185,
		base2 = 195,
		dista = 1,
		bonus = 4,
		type = "normal",
		cd = 16
         }
     },
[125] = {x = {
		pok = electrode,
		spell = "Slam",
		minLv = 1,
		ex = 1010001,
		base1 = 185,
		base2 = 195,
		dista = 1,
		bonus = 4,
		type = "normal",
		cd = 16
         }
     },
[286] = {x = {
		pok = electroderoll,
		spell = "Slam",
		minLv = 1,
		ex = 1010001,
		base1 = 355,
		base2 = 365,
		dista = 1,
		bonus = 5,
		type = "normal",
		cd = 16
         }
     },
[196] = {x = {
		pok = geodude,
		spell = "Rock Throw",
		minLv = 1,
		ex = 7400001,
		base1 = 35,
		base2 = 40,
		dista = 5,
		bonus = 2.6,
		type = "rock",
		cd = 14
         }
     },
[247] = {x = {
		pok = graveler,
		spell = "Rock Throw",
		minLv = 1,
		ex = 7500001,
		base1 = 105,
		base2 = 106,
		dista = 5,
		bonus = 3.9,
		type = "rock",
		cd = 14
         }
     },
[116] = {x = {
		pok = golem,
		spell = "Rock Throw",
		minLv = 1,
		ex = 7600001,
		base1 = 205,
		base2 = 210,
		dista = 5,
		bonus = 5,
		type = "rock",
		cd = 14
         }
     },
[288] = {x = {
		pok = golemroll,
		spell = "Rock Throw",
		minLv = 1,
		ex = 7600001,
		base1 = 105,
		base2 = 106,
		dista = 5,
		bonus = 2.5,
		type = "rock",
		cd = 14
         }
     },
[43] = {x = {
		pok = sandshrew,
		spell = "Scratch",
		minLv = 1,
		ex = 2700001,
		base1 = 15,
		base2 = 25,
		dista = 1,
		bonus = 2.2,
		type = "normal",
		cd = 12
         }
     },
[284] = {x = {
		pok = sandshrew,
		spell = "Scratch",
		minLv = 1,
		ex = 2700001,
		base1 = 5,
		base2 = 7,
		dista = 1,
		bonus = 1,
		type = "normal",
		cd = 12
         }
     },
[115] = {x = {
		pok = sandslash,
		spell = "Slash",
		minLv = 1,
		ex = 2800001,
		base1 = 105,
		base2 = 106,
		dista = 1,
		bonus = 5,
		type = "normal",
		cd = 16
         }
     },
[285] = {x = {
		pok = sandslash,
		spell = "Slash",
		minLv = 1,
		ex = 2800001,
		base1 = 75,
		base2 = 105,
		dista = 1,
		bonus = 3,
		type = "normal",
		cd = 16
         }
     },
[29] = {x = {
		pok = charmander,
		spell = "Scratch",
		minLv = 1,
		ex = 400001,
		base1 = 30,
		base2 = 40,
		dista = 1,
		bonus = 3,
		type = "normal",
		cd = 10
         }
     },
[23] = {x = {
		pok = charmeleon,
		spell = "Scratch",
		minLv = 1,
		ex = 500001,
		base1 = 90,
		base2 = 100,
		dista = 1,
		bonus = 3.5,
		type = "normal",
		cd = 10
         }
     },
[67] = {x = {
		pok = charizard,
		spell = "Scratch",
		minLv = 1,
		ex = 600001,
		base1 = 190,
		base2 = 200,
		dista = 1,
		bonus = 4.5,
		type = "normal",
		cd = 10
         }
     },
}

function onSay(cid)

if #getCreatureSummons(cid) == 0 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a pokemon to  moves.")
return 0
end
pokemon = c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType]
if getPlayerLevel(cid) < c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.minLv then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don\'t have enough level to  this move.")
return 0
end
	if exhaustion.get(cid, pokemon.x.ex) then
	seconds = math.floor(((exhaustion.get(cid, pokemon.x.ex)) + 1))
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to wait "..seconds.." seconds to  this move again.")
	return 0
	end
if getPlayerStorageValue(getCreatureSummons(cid)[1], 3) >= 1 then
doSendAnimatedText(getThingPos(getCreatureSummons(cid)[1]), "MISS", 215)
setPlayerStorageValue(getCreatureSummons(cid)[1], 3, -1)
doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
return true
end
if getPlayerStorageValue(getCreatureSummons(cid)[1], 5) >= 1 then
	if math.random(1,100) <= 33 then
	doSendAnimatedText(getThingPos(getCreatureSummons(cid)[1]), "SELF HIT", 180)
	local levels = getPlayerLevel(cid)
	doTargetCombatHealth(cid, getCreatureSummons(cid)[1], COMBAT_PHYSICALDAMAGE, -(math.random((levels*3),(levels*5))), -((math.random((levels*3),(levels*5))+10)), 3)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	return true
	end
end
if pokemon.x.target ~= "no" then

	if not isMonster(getCreatureTarget(cid)) then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don\'t have any targets.")
	return 0
	end
	if getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid))) > pokemon.x.dista then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Get closer to the target to  this move.")
	return 0
	end
	if not isSightClear(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid)), false) then
	return 0
	end
end
if pokemon.x.type == "flying" then
	elementa = FLYDAMAGE
elseif pokemon.x.type == "ground" then
	elementa = GROUNDDAMAGE
elseif pokemon.x.type == "electric" then
	elementa = ELECTRICDAMAGE
elseif pokemon.x.type == "ghost" then
	elementa = GHOSTDAMAGE
elseif pokemon.x.type == "normal" then
	elementa = NORMALDAMAGE
elseif pokemon.x.type == "fighting" then
	elementa = FIGHTINGDAMAGE
elseif pokemon.x.type == "poison" then
	elementa = POISONDAMAGE
elseif pokemon.x.type == "rock" then
	elementa = ROCKDAMAGE
elseif pokemon.x.type == "bug" then
	elementa = BUGDAMAGE
elseif pokemon.x.type == "fire" then
	elementa = FIREDAMAGE
elseif pokemon.x.type == "water" then
	elementa = WATERDAMAGE
elseif pokemon.x.type == "grass" then
	elementa = GRASSDAMAGE
elseif pokemon.x.type == "psychic" then
	elementa = PSYCHICDAMAGE
elseif pokemon.x.type == "ice" then
	elementa = ICEDAMAGE
elseif pokemon.x.type == "dragon" then
	elementa = DRAGONDAMAGE
end

local element = elementa
local num1 = (pokemon.x.base1)
local num2 = (pokemon.x.base2)
local num3 = (pokemon.x.bonus)
if getPlayerStorageValue(getCreatureSummons(cid)[1], 254) >= 1 then
num3 = num3 * 1.8
setPlayerStorageValue(getCreatureSummons(cid)[1], 254, 0)
end
setPlayerStorageValue(getCreatureSummons(cid)[1], 1000, ((num1)+(getPlayerLevel(cid)*(num3))))
if pokemon.x.spell == "Dynamic Punch" then
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 112)
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), dynpun1, 0, 0, 17)
	addEvent(doAreaCombatHealth, 105, getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), dynpun1, 0, 0, 17)
	addEvent(doAreaCombatHealth, 250, getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), dynpun2, 0, 0, 17)
	addEvent(doAreaCombatHealth, 400, getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), dynpun3, 0, 0, 17)
	addEvent(doAreaCombatHealth, 555, getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), dynpun4, 0, 0, 17)
	addEvent(doAreaCombatHealth, 700, getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), dynpun5, 0, 0, 17)
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	return 0
elseif pokemon.x.spell == "Quick Attack" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 3)
	return 0
elseif pokemon.x.spell == "Slam" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 3)
	return 0
elseif pokemon.x.spell == "Rapid Hit" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 3)
	local hitalvo = getCreatureTarget(cid)
	local function hit(params)
	if isCreature(getCreatureSummons(params.cid)[1]) then
	if isCreature(getCreatureTarget(params.cid)) then
	if getCreatureTarget(params.cid) == params.hitalvo then
	doAreaCombatHealth(getCreatureSummons(params.cid)[1], NORMALDAMAGE, getThingPos(getCreatureTarget(params.cid)), 0, -0, -0, 3)
	end
	end
	end
	end
	addEvent(hit, 80, {cid = cid, hitalvo = hitalvo})
	addEvent(hit, 280, {cid = cid, hitalvo = hitalvo})
	addEvent(hit, 480, {cid = cid, hitalvo = hitalvo})
	addEvent(hit, 680, {cid = cid, hitalvo = hitalvo})
	return 0
elseif pokemon.x.spell == "Bite" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 146)
	return 0
elseif pokemon.x.spell == "Slash" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 160)
	return 0
elseif pokemon.x.spell == "Splash" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 53)
	return 0
elseif pokemon.x.spell == "Doubleslap" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	local function slap(params)
	if isMonster(getCreatureTarget(params.cid)) then
	doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 3)
	else
	end
	end
	addEvent(slap, 0, {cid = cid})
	addEvent(slap, 600, {cid = cid})
	return 0
elseif pokemon.x.spell == "Mega Punch" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 112)
	return 0
elseif pokemon.x.spell == "Scratch" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 142)
	return 0
elseif pokemon.x.spell == "Scratch" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 142)
	return 0
elseif pokemon.x.spell == "Confusion" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureSummons(cid)[1]), confusion, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 133)
	return 0
elseif pokemon.x.spell == "Psychic" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureSummons(cid)[1]), psychic, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 136)
	return 0
elseif pokemon.x.spell == "Absorb" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	local life = getCreatureHealth(getCreatureTarget(cid))
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 14)
	local newlife = life - getCreatureHealth(getCreatureTarget(cid))
	doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 14)
	doCreatureAddHealth(getCreatureSummons(cid)[1], newlife)
	doSendAnimatedText(getThingPos(getCreatureSummons(cid)[1]), "+"..newlife.."", 35)
	return 0
elseif pokemon.x.spell == "Mud Shot" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	setPlayerStorageValue(getCreatureTarget(cid), 3, 1)
	local mudalvo = getCreatureTarget(cid)
local function ver(params)
if isCreature(params.mudalvo) then
if getPlayerStorageValue(params.mudalvo, 3) >= 1 then
setPlayerStorageValue(params.mudalvo, 3, -1)
end
end
end
	addEvent(ver, 4500, {mudalvo = mudalvo})
	doSendDistanceShoot(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid)), 1)
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 34)
	return 0
elseif pokemon.x.spell == "Bubbles" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
		local function throw(params)
		if isMonster(getCreatureTarget(params.cid)) then
		doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]), getThingPos(getCreatureTarget(params.cid)), 2)
		else
		end
		end
		local function damage(params)
		if isMonster(getCreatureTarget(params.cid)) then
		doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 25)
		else
		end
		end
	addEvent(throw, 0, {cid = cid})
	addEvent(damage, 0, {cid = cid})
	return 0
elseif pokemon.x.spell == "Water Spout" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doSendDistanceShoot(getThingPos(getCreatureSummons(cid)[1]), {x=getThingPos(getCreatureSummons(cid)[1]).x, y=getThingPos(getCreatureSummons(cid)[1]).y-5, z=getThingPos(getCreatureSummons(cid)[1]).z}, 2)
	local function spout(params)
	if isCreature(getCreatureSummons(params.cid)[1]) then
	for x = -2,2 do
		for y = -2,2 do
	local newpos = getThingPos(getCreatureSummons(params.cid)[1])
	newpos.x = newpos.x+x
	newpos.y = newpos.y+y
	doSendDistanceShoot({x=getThingPos(getCreatureSummons(params.cid)[1]).x, y=getThingPos(getCreatureSummons(params.cid)[1]).y-5, z=getThingPos(getCreatureSummons(params.cid)[1]).z}, newpos, 2)
	end
	end
	end
	end

	local function spdmg(params)
	if isCreature(getCreatureSummons(params.cid)[1]) then
	doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureSummons(params.cid)[1]), waterspout, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 68)
	end
	end

	addEvent(spout, 300, {cid = cid})
	addEvent(spdmg, 450, {cid = cid})
	return 0
elseif pokemon.x.spell == "Horn Attack" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doSendDistanceShoot(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid)), 15)
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 3)
	return 0
elseif pokemon.x.spell == "Rock Throw" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doSendDistanceShoot(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid)), 11)
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 3)
	return 0
elseif pokemon.x.spell == "Headbutt" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 3)
	return 0
elseif pokemon.x.spell == "Super Sonic" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	local t = getCreatureTarget(cid)
	setPlayerStorageValue(t, 5, 1)
	local function confd(params)
	if isCreature(params.t) then
	local spdc = getCreatureSpeed(params.t)
	if getCreatureLookDir(params.t) == 0 then
	confs = math.random(1,3)
	elseif getCreatureLookDir(params.t) == 1 then
		confurandom = math.random(1,99)
		if confurandom <= 33 then
		confs = 0
		elseif confurandom >= 67 then
		confs = 2
		else
		confs = 3
		end
	elseif getCreatureLookDir(params.t) == 2 then
		confurandom = math.random(1,99)
		if confurandom <= 33 then
		confs = 3
		elseif confurandom >= 67 then
		confs = 0
		else
		confs = 1
		end
	elseif getCreatureLookDir(params.t) == 3 then
	confs = math.random(0,2)
	end
	doPushCreature(params.t, confs, 1, 0)
	doSendMagicEffect(getThingPos(params.t), 31)
	end
	end
	local function nonc(params)
	if isCreature(params.t) then
	doChangeSpeed(params.t, -getCreatureSpeed(params.t))
	doChangeSpeed(params.t, getCreatureBaseSpeed(params.t))
	setPlayerStorageValue(params.t, 5, -1)
	end
	end
	doSendDistanceShoot(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid)), 32)

	doChangeSpeed(t, -( getCreatureSpeed(t)/3))
	doSendMagicEffect(getThingPos(t), 31)
	for i = 1, math.random(6,7) do
	addEvent(confd, 1000*i, {cid = cid, t = t})
	end
	addEvent(nonc, 7100, {cid - cid, t = t})
	return 0
elseif pokemon.x.spell == "Fury Attack" then
	doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
	doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..",  "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
	exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
	local namezito = getCreatureName(getCreatureSummons(cid)[1])
	local namezin = getCreatureName(getCreatureTarget(cid))
	local function pee(params)
	if isCreature(getCreatureSummons(params.cid)[1]) then
	if isCreature(getCreatureTarget(params.cid)) then
	if getCreatureName(getCreatureSummons(params.cid)[1]) == namezito then
	if getCreatureName(getCreatureTarget(params.cid)) == namezin then
	doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]), getThingPos(getCreatureTarget(params.cid)), 15)
	doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(getPlayerLevel(params.cid)*(num3))), -((num2)+(getPlayerLevel(params.cid)*(num3))), 3)
	end
	end
	end
	end
	end
	local delay = 200
	randnee = math.random(1,100)
	if randnee >= 1 and randnee <= 37 then
	a = 2
	elseif randnee >= 38 and randnee <= 74 then
	a = 3
	elseif randnee >= 75 and randnee <= 88 then
	a = 4
	else
	a = 5
	end
	local times = a
	for i = 1,a do
	addEvent(pee, delay, {cid = cid})
	delay = delay + 600
	end
	local function msg(params)
	if #getCreatureSummons(params.cid) >= 1 then
	doSendAnimatedText(getThingPos(getCreatureSummons(params.cid)[1]), ""..times.." HITS", 35)
	end
	end
	addEvent(msg, 580*a, {cid = cid})
	return 0
end
return 0
end

 

 

 

Aguardo Respostas :D

Editado por AnyurCT
Link para o comentário
https://xtibia.com/forum/topic/164814-galera-me-ajuda-com-essa-talkation-abaixo/
Compartilhar em outros sites

Cara Tenta Ver No Scrip Procure Pela Linha 679 Se For Grave Nao Sei Explica

maffia.gif

Systtem-Ot
Global Full Tps
Ip:system-ot.sytes.net
Protocolo:8.6
Site:system-ot.sytes.net:8090

Link para o comentário
https://xtibia.com/forum/topic/164814-galera-me-ajuda-com-essa-talkation-abaixo/#findComment-1084456
Compartilhar em outros sites

×
×
  • Criar Novo...