qual o erro que da?
tp apos matar 1 monstro [ ajudem a arumar meu script ]
Por kinglekke, 06 de dez. de 2013 em Scripts
info
Grupo: Herói
Registrado: 08/08/07
Posts: 520
Reputação: +235
Gênero: Masculino
Char no Tibia: Sir Morths

info
Grupo: Conde
Registrado: 29/04/09
Posts: 904
Reputação: +389
Char no Tibia: Jabuti Selvagem

local tpId = 1387
local tps = {
{name = "cavaleiro Negro", pos = {x=32541, y=30741, z=8, stackpos = 1}, toPos = {x=32532, y=30716, z=8}, time = 30},
{name = "Guardian Spider", pos = {x=32582, y=30816, z=8, stackpos = 1}, toPos = {x=32581, y=30784, z=8}, time = 30},
{name = "Thunder Dragon", pos = {x=32581, y=30742, z=8, stackpos = 1}, toPos = {32581, y=30716, z=8}, time = 30},
{name = "Shadow Pupil", pos = {x=32581, y=30713, z=8, stackpos = 1}, toPos = {32545, y=30682, z=8}, time = 30},
{name = "Shadow Boss", pos = {x=32545, y=30679, z=8, stackpos = 1}, toPos = {x=32565, y=30678, z=8}, time = 30},
{name = "Morgaroth", pos = {x=32666, y=30874, z=8, stackpos = 1}, toPos = {x=32633, y=30852, z=8}, time = 30},
{name = "Alma Perdida", pos = {x=32581, y=30782, z=8, stackpos = 1}, toPos = {x=32581, y=30745, z=8}, time = 30},
}
for _, teles in pairs(tps) do
function removeTp(pos)
local t = getThingFromPos(teles.pos)
if t.itemid == tpId then
doRemoveItem(t.uid, 1)
doSendMagicEffect(teles.pos, CONST_ME_POFF)
end
end
function onDeath(cid)
if getCreatureName(cid) == teles.name then
doCreateTeleport(tpId, teles.topos, teles.pos)
doCreatureSay(cid, "O teleport irá sumir em "..teles.time.." segundos.", TALKTYPE_ORANGE_1)
addEvent(removeTp, teles.time*1000)
end
end
return true
end
vlw pela ajuda de vcs , mais agr bugo a vocaçoes , tipo se puder me ajudar eu agradeço
explicando melhor druid e sorc estao bugados ele nao upa ml nem fufu , tipo nao importan quanto esteja o exp rate ele nao consegue upa ml
<?xml version="1.0" encoding="UTF-8"?>
<vocations>
<vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="30" gainmanaticks="1" gainmanaamount="80" manamultiplier="1.1" attackspeed="1800" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="30" gainmanaticks="1" gainmanaamount="80" manamultiplier="1.1" attackspeed="1800" soulmax="100" gainsoulticks="120" fromvoc="2">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="2" gainhpamount="50" gainmanaticks="2" gainmanaamount="80" manamultiplier="1.4" attackspeed="1600" soulmax="100" gainsoulticks="120" fromvoc="3">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="1" gainhpamount="110" gainmanaticks="2" gainmanaamount="50" manamultiplier="3.0" attackspeed="1600" soulmax="100" gainsoulticks="120" fromvoc="4">
<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="0" gaincap="10" gainhp="7" gainmana="30" gainhpticks="2" gainhpamount="40" gainmanaticks="3" gainmanaamount="100" manamultiplier="3.0" attackspeed="1600" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">
<formula meleeDamage="1.1" distDamage="1.0" wandDamage="1.0" magDamage="1.3" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="6" name="Elder Druid" description="an elder druid" needpremium="0" gaincap="10" gainhp="7" gainmana="30" gainhpticks="2" gainhpamount="40" gainmanaticks="3" gainmanaamount="100" manamultiplier="3.0" attackspeed="1600" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">
<formula meleeDamage="1.1" distDamage="1.0" wandDamage="1.1" magDamage="1.3" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="0" gaincap="20" gainhp="12" gainmana="18" gainhpticks="2" gainhpamount="60" gainmanaticks="3" gainmanaamount="90" manamultiplier="3.0" attackspeed="1400" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">
<formula meleeDamage="1.0" distDamage="1.7" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="8" name="Elite Knight" description="an elite knight" needpremium="0" gaincap="25" gainhp="17" gainmana="10" gainhpticks="1.5" gainhpamount="90" gainmanaticks="2" gainmanaamount="70" manamultiplier="3.0" attackspeed="1400" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">
<formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.1" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="9" name="MagoNegro" description="an MagoNegro" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="10" gainmanaticks="1.5" gainmanaamount="100" manamultiplier="3.0" attackspeed="1600" soulmax="400" gainsoulticks="35" fromvoc="5" lessloss="38">
<formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.4" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="10" name="Curandeiro" description="an Curandeiro" needpremium="1" gaincap="10" gainhp="7" gainmana="30" gainhpticks="2" gainhpamount="10" gainmanaticks="1.5" gainmanaamount="100" manamultiplier="3.0" attackspeed="1600" soulmax="400" gainsoulticks="35" fromvoc="6" lessloss="38">
<formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.2" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="11" name="Assassino" description="an Assassino" needpremium="1" gaincap="20" gainhp="12" gainmana="18" gainhpticks="2" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="3.0" attackspeed="1600" soulmax="400" gainsoulticks="20" fromvoc="7" lessloss="38">
<formula meleeDamage="1.0" distDamage="1.5" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="12" name="Espadachim" description="an Espadachim" needpremium="1" gaincap="25" gainhp="17" gainmana="10" gainhpticks="1" gainhpamount="30" gainmanaticks="1" gainmanaamount="100" manamultiplier="3.0" attackspeed="1600" soulmax="400" gainsoulticks="20" fromvoc="8" lessloss="38">
<formula meleeDamage="1.7" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
</vocations>
eu creio que esta ake o problema so nao sei onde ![]()
Editado Dezembro 7 por kinglekke





info
Grupo: Artesão
Registrado: 29/04/13
Posts: 139
Reputação: +2
alguem poderia me dizer oque fiz errado ? obg
local tpId = 1387
local tps = {
["cavaleiro Negro"] = {pos = {x=32541, y=30741, z=8}, toPos = {x=32532, y=30716, z=8}, time = 30},
["Guardian Spider"] = {pos = {x=32582, y=30816, z=8}, toPos = {x=32581, y=30784, z=8}, time = 30},
["Thunder Dragon"] = {pos = {x=32581, y=30742, z=8}, toPos = {32581, y=30716, z=8}, time = 30},
["Shadow Pupil"] = {pos = {x=32581, y=30713, z=8}, toPos = {32545, y=30682, z=8}, time = 30},
["Shadow Boss"] = {pos = {x=32545, y=30679, z=8}, toPos = {x=32565, y=30678, z=8}, time = 30},
["Morgaroth"] = {pos = {x=32666, y=30874, z=8}, toPos = {x=32633, y=30852, z=8}, time = 30},
["Alma Perdida"] = {pos = {x=32581, y=30782, z=8}, toPos = {x=32581, y=30745, z=8}, time = 30},
}
function removeTp(tp)
local t = getTileItemById(tp.pos, tpId)
if t then
doRemoveItem(t.uid, 1)
doSendMagicEffect(tp.pos, CONST_ME_POFF)
end
end
function onDeath(cid)
local tp = tps[getCreatureName(cid)]
if tp then
doCreateTeleport(tpId, tp.toPos, tp.pos)
doCreatureSay(cid, "O teleport irá sumir em "..tp.time.." segundos.", TALKTYPE_ORANGE_1)
addEvent(removeTp, tp.time*1000, tp)
end
return TRUE
end
alem disso eu fiz assim no monstro , esse seria o morgaroth
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Morgaroth" nameDescription="Morgaroth" race="undead" experience="15000" speed="450" manacost="0">
<health now="55000" max="55000"/>
<look type="12" head="0" body="94" legs="79" feet="79" corpse="6068"/>
<targetchange interval="10000" chance="20"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag canpushcreatures="1"/>
<flag staticattack="98"/>
<flag targetdistance="1"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="240" attack="180"/>
<attack name="fire" interval="2000" chance="30" range="7" radius="7" target="1" min="-500" max="-600">
<attribute key="shootEffect" value="fire"/>
<attribute key="areaEffect" value="firearea"/>
</attack>
<attack name="physical" interval="2000" chance="25" length="8" spread="0" min="-0" max="-580">
<attribute key="areaEffect" value="mortarea"/>
</attack>
<attack name="speed" interval="2000" chance="15" range="7" speedchange="-850" duration="50000">
<attribute key="areaEffect" value="whitenote"/>
</attack>
<attack name="physical" interval="2000" chance="20" target="0" radius="7" min="-500" max="-800">
<attribute key="areaEffect" value="mortarea"/>
</attack>
</attacks>
<defenses armor="55" defense="65">
<defense name="healing" interval="2000" chance="20" min="250" max="750">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="speed" interval="2000" chance="80" speedchange="808" duration="6000">
<attribute key="areaEffect" value="redshimmer"/>
</defense>
</defenses>
<elements>
<element energyPercent="10"/>
<element deathPercent="60"/>
<element physicalPercent="1"/>
<element icePercent="-5"/>
</elements>
<immunities>
<immunity paralyze="1"/>
<immunity invisible="1"/>
<immunity fire="1"/>
<immunity earth="1"/>
</immunities>
<summons maxSummons="6">
<summon name="Demon" interval="2000" chance="20" max="6"/>
</summons>
<voices interval="5000" chance="30">
<voice sentence="I AM MORGAROTH, LORD OF THE TRIANGLE... AND YOU ARE LOST!" yell="1"/>
<voice sentence="MY SEED IS FEAR AND MY HARVEST ARE YOUR SOULS!" yell="1"/>
<voice sentence="THE TRIANGLE OF TERROR WILL RISE!" yell="1"/>
<voice sentence="ZATHROTH! LOOK AT THE DESTRUCTION I AM CAUSING IN YOUR NAME!" yell="1"/>
</voices>
<loot>
<item id="2192" chance="12700" /><!-- crystal ball -->
<item id="2151" chance="2950" /><!-- talon -->
<item id="8929" chance="15125" /><!-- the stomper -->
<item id="2164" chance="5375" /><!-- might ring -->
<item id="2365" chance="100000"><!-- bp holding -->
<inside>
<item id="2514" chance="20000" /><!-- mastermind shield -->
<item id="2421" chance="5375" /><!-- thunder hammer -->
<item id="8852" chance="10000" /><!-- the devileye -->
<item id="2158" chance="12700" /><!-- blue gem -->
<item id="2470" chance="7825" /><!-- golden legs -->
<item id="2462" chance="12700" /><!-- devil helmet -->
<item id="2432" chance="10250" /><!-- fire axe -->
<item id="2123" chance="7825" /><!-- ring of the sky -->
<item id="8473" chance="9750" /><!-- ultimate health potion -->
<item id="2522" chance="12700" /><!-- great shield -->
<item id="2393" chance="7825" /><!-- giant sword -->
<item id="2165" chance="12700" /><!-- stealth ring -->
<item id="8853" chance="10000" /><!-- the ironworker -->
<item id="8850" chance="22450" /><!-- chain bolter -->
<item id="2178" chance="15125" /><!-- mind stone -->
<item id="8851" chance="5375" /><!-- royal crossbow -->
<item id="2171" chance="2950" /><!-- platinum amulet -->
<item id="2112" chance="12700" /><!-- teddy bear -->
<item id="2143" countmax="14" chance="7650" /><!-- white pearl -->
<item id="8865" chance="10250" /><!-- dark lord's cape -->
<item id="2162" chance="15125" /><!-- magic light wand -->
<item id="2520" chance="7825" /><!-- demon shield -->
<item id="8928" chance="15125" /><!-- obsidian truncheon -->
<item id="2174" chance="22450" /><!-- strange symbol -->
<item id="6300" chance="46850" /><!-- death ring -->
<item id="2155" chance="37100" /><!-- green gem -->
<item id="7591" chance="26825" /><!-- great health potion -->
<item id="8881" chance="12700" /><!-- fireborn giant armor -->
<item id="6529" countmax="78" chance="10350" /><!-- infernal bolt -->
<item id="2145" countmax="5" chance="13175" /><!-- small diamond -->
<item id="2167" chance="7825" /><!-- energy ring -->
<item id="5954" countmax="2" chance="22450" /><!-- demon horn -->
<item id="2144" countmax="15" chance="7175" /><!-- black pearl -->
<item id="7590" chance="26825" /><!-- great mana potion -->
<item id="8886" chance="2950" /><!-- molten plate -->
<item id="7421" chance="10250" /><!-- onyx flail -->
<item id="2146" countmax="8" chance="20325" /><!-- small sapphire -->
<item id="2177" chance="20000" /><!-- life crystal -->
<item id="2200" chance="2950" /><!-- protection amulet -->
<item id="7899" chance="5375" /><!-- magma coat -->
<item id="1986" chance="12700" /><!-- red tome -->
<item id="9971" chance="22450" /><!-- gold ingot -->
<item id="8472" chance="36575" /><!-- great spirit potion -->
<item id="2387" chance="17575" /><!-- double axe -->
<item id="2149" countmax="10" chance="14150" /><!-- small emerald -->
<item id="2176" chance="10250" /><!-- orb -->
<item id="2214" chance="20000" /><!-- ring of healing -->
<item id="2197" chance="2950" /><!-- stone skin amulet -->
<item id="2472" chance="12700" /><!-- magic plate armor -->
<item id="6500" countmax="4" chance="26725" /><!-- demonic essence -->
<item id="5943" chance="27325" /><!-- morgaroth's heart -->
<item id="2152" countmax="74" chance="57875" /><!-- platinum coin -->
<item id="2645" chance="2950" /><!-- steel boots -->
<item id="7368" countmax="42" chance="4975" /><!-- assassin star -->
<item id="2150" countmax="20" chance="14900" /><!-- small amethyst -->
<item id="2179" chance="2950" /><!-- gold ring -->
<item id="8867" chance="5375" /><!-- dragon robe -->
<item id="7431" chance="5375" /><!-- demonbone -->
<item id="2033" chance="2950" /><!-- golden mug -->
</inside>
</item>
</loot>
<script>
<event name="tp"/>
</script>
</monster>
oque esta errado ?
duvida sanada
Editado Dezembro 6 por kinglekke