• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Monster

Sherlok

Active Member
Joined
Aug 29, 2008
Messages
2,116
Reaction score
44
Location
Poland, Wrocław.
Hiho,
Mam sobie takiego monsterka i kilka innych (problem dotyczy chyba tylko bossów z INQ):

Gdy go zabiję w ogóle nie pojawia się jego ciało..

Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Zugurosh" nameDescription="Zugurosh" race="fire" experience="10000" speed="340" manacost="0">
<health now="95000" max="95000"/>
<look type="12" head="2" body="35" legs="57" feet="91" corpse="6068"/>
<targetchange interval="5000" chance="15"/>
<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 targetdistance="1"/>
	<flag staticattack="85"/>
	<flag runonhealth="0"/>
</flags>

<attacks>
    <attack name="melee" interval="2000" skill="120" attack="110"/>
    <attack name="fire" interval="3000" chance="20" target="1" radius="4" min="-250" max="-850">
        <attribute key="areaEffect" value="explosion"/>
    </attack>
    <attack name="death" interval="2000" chance="15" target="0" radius="4" min="-100" max="-350">
        <attribute key="areaEffect" value="smallclouds"/>
    </attack>
    <attack name="manadrain" interval="1000" chance="13" radius="5" target="0" min="-60" max="-230">
        <attribute key="areaEffect" value="watersplash"/>
    </attack>
	<attack name="death" interval="2000" chance="15" length="7" spread="0" min="0" max="-500">
		<attribute key="areaEffect" value="mortarea"/>
	</attack>
</attacks>

<defenses armor="45" defense="55">
	<defense name="healing" interval="2000" chance="15" min="400" max="900">
		<attribute key="areaEffect" value="greenshimmer"/>
	</defense>
	<defense name="invisible" interval="1000" chance="5" duration="6000">
		<attribute key="areaEffect" value="blueshimmer"/>
	</defense>
</defenses>

<elements>
    <element icePercent="-15"/>
    <element energyPercent="-5"/>
    <element earthPercent="-8"/>
	<element firePercent="25"/>
</elements>

<immunities>
	<immunity death="1"/>
	<immunity paralyze="1"/>
	<immunity invisible="1"/>
</immunities>
<script> 
	<event name="inquisitionPortals"/> 
</script>
<voices interval="5000" chance="10">
	<voice sentence="You will run out of resources soon enough!!" yell="1"/>
	<voice sentence="One little mistake and your all are mine!"/>
	<voice sentence="I sense your strength fading!"/>
</voices>

<loot>
    <item id="2148" countmax="100" chance1="100000" chancemax="0"/>
    <item id="2148" countmax="50" chance1="100000" chancemax="0"/>
    <item id="6300" chance="7777"/> --death ring
    <item id="2195" chance="4444" /> -- Boh
    <item id="2646" chance="900" /> -- Golden Boots
    <item id="2393" chance="3000"/> -- Giant sword
    <item id="2432" chance="5555"/> -- Fire Axe
    <item id="2402" chance="10000"/> --Silver dagger
    <item id="2477" chance="6666" /> --Knight legs
    <item id="1987" chance="100000">
		<inside>
			<item id="2151" countmax="11" chance1="6000" chancemax="0"/>
			<item id="2462" chance="9700"/>
			<item id="2149" countmax="3" chance1="1428" chancemax="0"/>
			<item id="2171" chance="2333"/>
			<item id="2158" chance="4444"/> --Blue gem
			<item id="2470" chance="6500"/> --Golden legs
			<item id="2520" chance="9999"/> --Demon shield
		</inside>
	</item>
</loot>
</monster>

Czy przyczyną może być ten element?
Code:
<script> 
	<event name="inquisitionPortals"/> 
</script>

Tutaj jeszcze skrypt od INQ, gdyby był potrzebny :p
Code:
function onDeath(cid, corpse, killer)

registerCreatureEvent(cid, "inquisitionPortals")

local creaturename = getCreatureName(cid)

--- positions where the teleports will be created:

local ushuriel_in_pos = {x=1362, y=1446, z=5, stackpos=2}
local annihilon_in_pos = {x=1454, y=1447, z=5, stackpos=2}
local hellgorak_in_pos = {x=1459, y=1490, z=5, stackpos=2}
local madareth_in_pos = {x=1379, y=1488, z=5, stackpos=2}
local zugurosh_in_pos = {x=1394, y=1445, z=5, stackpos=2}
local brothers_in_pos = {x=1414, y=1488, z=5, stackpos=1}

--- positions where the teleports will be teleported you:

local ushuriel_to_pos = {x=1441, y=1370, z=5, stackpos=1}
local annihilon_to_pos = {x=1513, y=1529, z=5, stackpos=1}
local hellgorak_to_pos = {x=255, y=467, z=5, stackpos=1}
local madareth_to_pos = {x=1312, y=1437, z=6, stackpos=1}
local zugurosh_to_pos = {x=1395, y=1382, z=5, stackpos=1}
local brothers_to_pos = {x=1376, y=1494, z=6, stackpos=1}

local time_to_pass = 180 -- in seconds
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear."

if creaturename == 'Ushuriel' then

teleport = doCreateTeleport(tpID, ushuriel_to_pos, ushuriel_in_pos)

doSendMagicEffect(ushuriel_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInUshurielWard, (1000*time_to_pass))

elseif creaturename == 'Annihilon' then

teleport = doCreateTeleport(tpID, annihilon_to_pos, annihilon_in_pos)

doSendMagicEffect(annihilon_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInAnnihilonWard, (1000*time_to_pass))

elseif creaturename == 'Madareth' then

teleport = doCreateTeleport(tpID, madareth_to_pos, madareth_in_pos)

doSendMagicEffect(madareth_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInMadarethWard, (1000*time_to_pass))

elseif creaturename == 'Hellgorak' then

teleport = doCreateTeleport(tpID, hellgorak_to_pos, hellgorak_in_pos)

doSendMagicEffect(hellgorak_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInHellgorakWard, (1000*time_to_pass))

elseif creaturename == 'Zugurosh' then

teleport = doCreateTeleport(tpID, zugurosh_to_pos, zugurosh_in_pos)

doSendMagicEffect(zugurosh_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInZuguroshWard, (1000*time_to_pass))

elseif creaturename == 'Latrivan' then

teleport = doCreateTeleport(tpID, brothers_to_pos, brothers_in_pos)

doSendMagicEffect(brothers_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInBrothersWard, (1000*time_to_pass))

end
end

function removeTeleportInUshurielWard()
if getThingfromPos({x=1362, y=1446, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1362, y=1446, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1362, y=1362, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInAnnihilonWard()
if getThingfromPos({x=1454, y=1447, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1454, y=1447, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1454, y=1447, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInHellgorakWard()
if getThingfromPos({x=1459, y=1490, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1459, y=1490, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1459, y=1490, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInMadarethWard()
if getThingfromPos({x=1379, y=1488, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1379, y=1488, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1379, y=1488, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInZuguroshWard()
if getThingfromPos({x=1394, y=1445, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1394, y=1445, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1394, y=1445, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInBrothersWard()
if getThingfromPos({x=1414, y=1488, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1414, y=1488, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1414, y=1488, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

Proszę o pomoc, co mogę zrobić, żeby jego ciało normalne się pojawiało? :ninja::confused:

Z góry dzięki,
za pomoc rep++;
 
Code:
function onDeath(cid, corpse, killer)

registerCreatureEvent(cid, "inquisitionPortals")

local creaturename = getCreatureName(cid)

--- positions where the teleports will be created:

local ushuriel_in_pos = {x=1362, y=1446, z=5, stackpos=2}
local annihilon_in_pos = {x=1454, y=1447, z=5, stackpos=2}
local hellgorak_in_pos = {x=1459, y=1490, z=5, stackpos=2}
local madareth_in_pos = {x=1379, y=1488, z=5, stackpos=2}
local zugurosh_in_pos = {x=1394, y=1445, z=5, stackpos=2}
local brothers_in_pos = {x=1414, y=1488, z=5, stackpos=1}

--- positions where the teleports will be teleported you:

local ushuriel_to_pos = {x=1441, y=1370, z=5, stackpos=1}
local annihilon_to_pos = {x=1513, y=1529, z=5, stackpos=1}
local hellgorak_to_pos = {x=255, y=467, z=5, stackpos=1}
local madareth_to_pos = {x=1312, y=1437, z=6, stackpos=1}
local zugurosh_to_pos = {x=1395, y=1382, z=5, stackpos=1}
local brothers_to_pos = {x=1376, y=1494, z=6, stackpos=1}

local time_to_pass = 180 -- in seconds
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear."

if creaturename == 'Ushuriel' then

teleport = doCreateTeleport(tpID, ushuriel_to_pos, ushuriel_in_pos)

doSendMagicEffect(ushuriel_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInUshurielWard, (1000*time_to_pass))

elseif creaturename == 'Annihilon' then

teleport = doCreateTeleport(tpID, annihilon_to_pos, annihilon_in_pos)

doSendMagicEffect(annihilon_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInAnnihilonWard, (1000*time_to_pass))

elseif creaturename == 'Madareth' then

teleport = doCreateTeleport(tpID, madareth_to_pos, madareth_in_pos)

doSendMagicEffect(madareth_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInMadarethWard, (1000*time_to_pass))

elseif creaturename == 'Hellgorak' then

teleport = doCreateTeleport(tpID, hellgorak_to_pos, hellgorak_in_pos)

doSendMagicEffect(hellgorak_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInHellgorakWard, (1000*time_to_pass))

elseif creaturename == 'Zugurosh' then

teleport = doCreateTeleport(tpID, zugurosh_to_pos, zugurosh_in_pos)

doSendMagicEffect(zugurosh_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInZuguroshWard, (1000*time_to_pass))

elseif creaturename == 'Latrivan' then

teleport = doCreateTeleport(tpID, brothers_to_pos, brothers_in_pos)

doSendMagicEffect(brothers_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInBrothersWard, (1000*time_to_pass))

return TRUE
end
end

function removeTeleportInUshurielWard()
if getThingfromPos({x=1362, y=1446, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1362, y=1446, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1362, y=1362, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInAnnihilonWard()
if getThingfromPos({x=1454, y=1447, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1454, y=1447, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1454, y=1447, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInHellgorakWard()
if getThingfromPos({x=1459, y=1490, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1459, y=1490, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1459, y=1490, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInMadarethWard()
if getThingfromPos({x=1379, y=1488, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1379, y=1488, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1379, y=1488, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInZuguroshWard()
if getThingfromPos({x=1394, y=1445, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1394, y=1445, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1394, y=1445, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInBrothersWard()
if getThingfromPos({x=1414, y=1488, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1414, y=1488, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1414, y=1488, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

Zrobiłem tak i po zabiciu potwora crash serwa jest :p
 
LUA:
function onDeath(cid, corpse, killer)

registerCreatureEvent(cid, "inquisitionPortals")

local creaturename = getCreatureName(cid)

--- positions where the teleports will be created:

local ushuriel_in_pos = {x=1362, y=1446, z=5, stackpos=2}
local annihilon_in_pos = {x=1454, y=1447, z=5, stackpos=2}
local hellgorak_in_pos = {x=1459, y=1490, z=5, stackpos=2}
local madareth_in_pos = {x=1379, y=1488, z=5, stackpos=2}
local zugurosh_in_pos = {x=1394, y=1445, z=5, stackpos=2}
local brothers_in_pos = {x=1414, y=1488, z=5, stackpos=1}

--- positions where the teleports will be teleported you:

local ushuriel_to_pos = {x=1441, y=1370, z=5, stackpos=1}
local annihilon_to_pos = {x=1513, y=1529, z=5, stackpos=1}
local hellgorak_to_pos = {x=255, y=467, z=5, stackpos=1}
local madareth_to_pos = {x=1312, y=1437, z=6, stackpos=1}
local zugurosh_to_pos = {x=1395, y=1382, z=5, stackpos=1}
local brothers_to_pos = {x=1376, y=1494, z=6, stackpos=1}

local time_to_pass = 180 -- in seconds
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear."

if creaturename == 'Ushuriel' then
	teleport = doCreateTeleport(tpID, ushuriel_to_pos, ushuriel_in_pos)
	doSendMagicEffect(ushuriel_in_pos, doEffect)
	doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	addEvent(removeTeleportInUshurielWard, (1000*time_to_pass))
elseif creaturename == 'Annihilon' then
	teleport = doCreateTeleport(tpID, annihilon_to_pos, annihilon_in_pos)
	doSendMagicEffect(annihilon_in_pos, doEffect)
	doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	addEvent(removeTeleportInAnnihilonWard, (1000*time_to_pass))
elseif creaturename == 'Madareth' then
	teleport = doCreateTeleport(tpID, madareth_to_pos, madareth_in_pos)
	doSendMagicEffect(madareth_in_pos, doEffect)
	doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	addEvent(removeTeleportInMadarethWard, (1000*time_to_pass))
elseif creaturename == 'Hellgorak' then
	teleport = doCreateTeleport(tpID, hellgorak_to_pos, hellgorak_in_pos)
	doSendMagicEffect(hellgorak_in_pos, doEffect)
	doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	addEvent(removeTeleportInHellgorakWard, (1000*time_to_pass))
elseif creaturename == 'Zugurosh' then
	teleport = doCreateTeleport(tpID, zugurosh_to_pos, zugurosh_in_pos)
	doSendMagicEffect(zugurosh_in_pos, doEffect)
	doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	addEvent(removeTeleportInZuguroshWard, (1000*time_to_pass))
elseif creaturename == 'Latrivan' then
	teleport = doCreateTeleport(tpID, brothers_to_pos, brothers_in_pos)
	doSendMagicEffect(brothers_in_pos, doEffect)
	doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	addEvent(removeTeleportInBrothersWard, (1000*time_to_pass))
end

return true
end

function removeTeleportInUshurielWard()
if getThingfromPos({x=1362, y=1446, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1362, y=1446, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1362, y=1362, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInAnnihilonWard()
if getThingfromPos({x=1454, y=1447, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1454, y=1447, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1454, y=1447, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInHellgorakWard()
if getThingfromPos({x=1459, y=1490, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1459, y=1490, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1459, y=1490, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInMadarethWard()
if getThingfromPos({x=1379, y=1488, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1379, y=1488, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1379, y=1488, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInZuguroshWard()
if getThingfromPos({x=1394, y=1445, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1394, y=1445, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1394, y=1445, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInBrothersWard()
if getThingfromPos({x=1414, y=1488, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1414, y=1488, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1414, y=1488, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
 
LUA:
function onDeath(cid, corpse, killer)

registerCreatureEvent(cid, "inquisitionPortals")

local creaturename = getCreatureName(cid)

--- positions where the teleports will be created:

local ushuriel_in_pos = {x=1362, y=1446, z=5, stackpos=2}
local annihilon_in_pos = {x=1454, y=1447, z=5, stackpos=2}
local hellgorak_in_pos = {x=1459, y=1490, z=5, stackpos=2}
local madareth_in_pos = {x=1379, y=1488, z=5, stackpos=2}
local zugurosh_in_pos = {x=1394, y=1445, z=5, stackpos=2}
local brothers_in_pos = {x=1414, y=1488, z=5, stackpos=1}

--- positions where the teleports will be teleported you:

local ushuriel_to_pos = {x=1441, y=1370, z=5, stackpos=1}
local annihilon_to_pos = {x=1513, y=1529, z=5, stackpos=1}
local hellgorak_to_pos = {x=255, y=467, z=5, stackpos=1}
local madareth_to_pos = {x=1312, y=1437, z=6, stackpos=1}
local zugurosh_to_pos = {x=1395, y=1382, z=5, stackpos=1}
local brothers_to_pos = {x=1376, y=1494, z=6, stackpos=1}

local time_to_pass = 180 -- in seconds
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear."

if creaturename == 'Ushuriel' then
	teleport = doCreateTeleport(tpID, ushuriel_to_pos, ushuriel_in_pos)
	doSendMagicEffect(ushuriel_in_pos, doEffect)
	doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	addEvent(removeTeleportInUshurielWard, (1000*time_to_pass))
elseif creaturename == 'Annihilon' then
	teleport = doCreateTeleport(tpID, annihilon_to_pos, annihilon_in_pos)
	doSendMagicEffect(annihilon_in_pos, doEffect)
	doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	addEvent(removeTeleportInAnnihilonWard, (1000*time_to_pass))
elseif creaturename == 'Madareth' then
	teleport = doCreateTeleport(tpID, madareth_to_pos, madareth_in_pos)
	doSendMagicEffect(madareth_in_pos, doEffect)
	doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	addEvent(removeTeleportInMadarethWard, (1000*time_to_pass))
elseif creaturename == 'Hellgorak' then
	teleport = doCreateTeleport(tpID, hellgorak_to_pos, hellgorak_in_pos)
	doSendMagicEffect(hellgorak_in_pos, doEffect)
	doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	addEvent(removeTeleportInHellgorakWard, (1000*time_to_pass))
elseif creaturename == 'Zugurosh' then
	teleport = doCreateTeleport(tpID, zugurosh_to_pos, zugurosh_in_pos)
	doSendMagicEffect(zugurosh_in_pos, doEffect)
	doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	addEvent(removeTeleportInZuguroshWard, (1000*time_to_pass))
elseif creaturename == 'Latrivan' then
	teleport = doCreateTeleport(tpID, brothers_to_pos, brothers_in_pos)
	doSendMagicEffect(brothers_in_pos, doEffect)
	doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
	addEvent(removeTeleportInBrothersWard, (1000*time_to_pass))
end

return true
end

function removeTeleportInUshurielWard()
if getThingfromPos({x=1362, y=1446, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1362, y=1446, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1362, y=1362, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInAnnihilonWard()
if getThingfromPos({x=1454, y=1447, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1454, y=1447, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1454, y=1447, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInHellgorakWard()
if getThingfromPos({x=1459, y=1490, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1459, y=1490, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1459, y=1490, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInMadarethWard()
if getThingfromPos({x=1379, y=1488, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1379, y=1488, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1379, y=1488, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInZuguroshWard()
if getThingfromPos({x=1394, y=1445, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1394, y=1445, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1394, y=1445, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInBrothersWard()
if getThingfromPos({x=1414, y=1488, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1414, y=1488, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1414, y=1488, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

identyczna sytuacja co wyżej :$
 
onDeath ma inne parametry, jak już tak chcesz to robić to powinieneś to zrobić jako onKill, zresztą skrypt very chujowy
 
zugurosh.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Zugurosh" nameDescription="Zugurosh" race="fire" experience="10000" speed="340" manacost="0">
<health now="95000" max="95000"/>
<look type="12" head="2" body="35" legs="57" feet="91" corpse="6068"/>
<targetchange interval="5000" chance="15"/>
<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 targetdistance="1"/>
	<flag staticattack="85"/>
	<flag runonhealth="0"/>
</flags>

<attacks>
    <attack name="melee" interval="2000" skill="120" attack="110"/>
    <attack name="fire" interval="3000" chance="20" target="1" radius="4" min="-250" max="-850">
        <attribute key="areaEffect" value="explosion"/>
    </attack>
    <attack name="death" interval="2000" chance="15" target="0" radius="4" min="-100" max="-350">
        <attribute key="areaEffect" value="smallclouds"/>
    </attack>
    <attack name="manadrain" interval="1000" chance="13" radius="5" target="0" min="-60" max="-230">
        <attribute key="areaEffect" value="watersplash"/>
    </attack>
	<attack name="death" interval="2000" chance="15" length="7" spread="0" min="0" max="-500">
		<attribute key="areaEffect" value="mortarea"/>
	</attack>
</attacks>

<defenses armor="45" defense="55">
	<defense name="healing" interval="2000" chance="15" min="400" max="900">
		<attribute key="areaEffect" value="greenshimmer"/>
	</defense>
	<defense name="invisible" interval="1000" chance="5" duration="6000">
		<attribute key="areaEffect" value="blueshimmer"/>
	</defense>
</defenses>

<elements>
    <element icePercent="-15"/>
    <element energyPercent="-5"/>
    <element earthPercent="-8"/>
	<element firePercent="25"/>
</elements>

<immunities>
	<immunity death="1"/>
	<immunity paralyze="1"/>
	<immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
	<voice sentence="You will run out of resources soon enough!!" yell="1"/>
	<voice sentence="One little mistake and your all are mine!"/>
	<voice sentence="I sense your strength fading!"/>
</voices>

<loot>
    <item id="2148" countmax="100" chance1="100000" chancemax="0"/>
    <item id="2148" countmax="50" chance1="100000" chancemax="0"/>
    <item id="6300" chance="7777"/> --death ring
    <item id="2195" chance="4444" /> -- Boh
    <item id="2646" chance="900" /> -- Golden Boots
    <item id="2393" chance="3000"/> -- Giant sword
    <item id="2432" chance="5555"/> -- Fire Axe
    <item id="2402" chance="10000"/> --Silver dagger
    <item id="2477" chance="6666" /> --Knight legs
    <item id="1987" chance="100000">
		<inside>
			<item id="2151" countmax="11" chance1="6000" chancemax="0"/>
			<item id="2462" chance="9700"/>
			<item id="2149" countmax="3" chance1="1428" chancemax="0"/>
			<item id="2171" chance="2333"/>
			<item id="2158" chance="4444"/> --Blue gem
			<item id="2470" chance="6500"/> --Golden legs
			<item id="2520" chance="9999"/> --Demon shield
		</inside>
	</item>
</loot>
</monster>

creaturescripts.xml (dodaj)
Code:
<event type="kill" name="Kill" event="script" value="inq.lua"/>

inq.lua, czy jak tam się ten twój skrypt nazywa (przepraszam, że nie zrobiłem wcięć):
Code:
function onKill(cid, target, lastHit)

if isMonster(target) and getCreatureName(target) == "Zugurosh" then
local creaturename = getCreatureName(target)

--- positions where the teleports will be created:

local ushuriel_in_pos = {x=1362, y=1446, z=5, stackpos=2}
local annihilon_in_pos = {x=1454, y=1447, z=5, stackpos=2}
local hellgorak_in_pos = {x=1459, y=1490, z=5, stackpos=2}
local madareth_in_pos = {x=1379, y=1488, z=5, stackpos=2}
local zugurosh_in_pos = {x=1394, y=1445, z=5, stackpos=2}
local brothers_in_pos = {x=1414, y=1488, z=5, stackpos=1}

--- positions where the teleports will be teleported you:

local ushuriel_to_pos = {x=1441, y=1370, z=5, stackpos=1}
local annihilon_to_pos = {x=1513, y=1529, z=5, stackpos=1}
local hellgorak_to_pos = {x=255, y=467, z=5, stackpos=1}
local madareth_to_pos = {x=1312, y=1437, z=6, stackpos=1}
local zugurosh_to_pos = {x=1395, y=1382, z=5, stackpos=1}
local brothers_to_pos = {x=1376, y=1494, z=6, stackpos=1}

local time_to_pass = 180 -- in seconds
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear."

if creaturename == 'Ushuriel' then

teleport = doCreateTeleport(tpID, ushuriel_to_pos, ushuriel_in_pos)

doSendMagicEffect(ushuriel_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInUshurielWard, (1000*time_to_pass))

elseif creaturename == 'Annihilon' then

teleport = doCreateTeleport(tpID, annihilon_to_pos, annihilon_in_pos)

doSendMagicEffect(annihilon_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInAnnihilonWard, (1000*time_to_pass))

elseif creaturename == 'Madareth' then

teleport = doCreateTeleport(tpID, madareth_to_pos, madareth_in_pos)

doSendMagicEffect(madareth_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInMadarethWard, (1000*time_to_pass))

elseif creaturename == 'Hellgorak' then

teleport = doCreateTeleport(tpID, hellgorak_to_pos, hellgorak_in_pos)

doSendMagicEffect(hellgorak_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInHellgorakWard, (1000*time_to_pass))

elseif creaturename == 'Zugurosh' then

teleport = doCreateTeleport(tpID, zugurosh_to_pos, zugurosh_in_pos)

doSendMagicEffect(zugurosh_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInZuguroshWard, (1000*time_to_pass))

elseif creaturename == 'Latrivan' then

teleport = doCreateTeleport(tpID, brothers_to_pos, brothers_in_pos)

doSendMagicEffect(brothers_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInBrothersWard, (1000*time_to_pass))

end
end
end

function removeTeleportInUshurielWard()
if getThingfromPos({x=1362, y=1446, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1362, y=1446, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1362, y=1362, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInAnnihilonWard()
if getThingfromPos({x=1454, y=1447, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1454, y=1447, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1454, y=1447, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInHellgorakWard()
if getThingfromPos({x=1459, y=1490, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1459, y=1490, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1459, y=1490, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInMadarethWard()
if getThingfromPos({x=1379, y=1488, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1379, y=1488, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1379, y=1488, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInZuguroshWard()
if getThingfromPos({x=1394, y=1445, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1394, y=1445, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1394, y=1445, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInBrothersWard()
if getThingfromPos({x=1414, y=1488, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1414, y=1488, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1414, y=1488, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end


Spróbuj tak.
 
zugurosh.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Zugurosh" nameDescription="Zugurosh" race="fire" experience="10000" speed="340" manacost="0">
<health now="95000" max="95000"/>
<look type="12" head="2" body="35" legs="57" feet="91" corpse="6068"/>
<targetchange interval="5000" chance="15"/>
<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 targetdistance="1"/>
	<flag staticattack="85"/>
	<flag runonhealth="0"/>
</flags>

<attacks>
    <attack name="melee" interval="2000" skill="120" attack="110"/>
    <attack name="fire" interval="3000" chance="20" target="1" radius="4" min="-250" max="-850">
        <attribute key="areaEffect" value="explosion"/>
    </attack>
    <attack name="death" interval="2000" chance="15" target="0" radius="4" min="-100" max="-350">
        <attribute key="areaEffect" value="smallclouds"/>
    </attack>
    <attack name="manadrain" interval="1000" chance="13" radius="5" target="0" min="-60" max="-230">
        <attribute key="areaEffect" value="watersplash"/>
    </attack>
	<attack name="death" interval="2000" chance="15" length="7" spread="0" min="0" max="-500">
		<attribute key="areaEffect" value="mortarea"/>
	</attack>
</attacks>

<defenses armor="45" defense="55">
	<defense name="healing" interval="2000" chance="15" min="400" max="900">
		<attribute key="areaEffect" value="greenshimmer"/>
	</defense>
	<defense name="invisible" interval="1000" chance="5" duration="6000">
		<attribute key="areaEffect" value="blueshimmer"/>
	</defense>
</defenses>

<elements>
    <element icePercent="-15"/>
    <element energyPercent="-5"/>
    <element earthPercent="-8"/>
	<element firePercent="25"/>
</elements>

<immunities>
	<immunity death="1"/>
	<immunity paralyze="1"/>
	<immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
	<voice sentence="You will run out of resources soon enough!!" yell="1"/>
	<voice sentence="One little mistake and your all are mine!"/>
	<voice sentence="I sense your strength fading!"/>
</voices>

<loot>
    <item id="2148" countmax="100" chance1="100000" chancemax="0"/>
    <item id="2148" countmax="50" chance1="100000" chancemax="0"/>
    <item id="6300" chance="7777"/> --death ring
    <item id="2195" chance="4444" /> -- Boh
    <item id="2646" chance="900" /> -- Golden Boots
    <item id="2393" chance="3000"/> -- Giant sword
    <item id="2432" chance="5555"/> -- Fire Axe
    <item id="2402" chance="10000"/> --Silver dagger
    <item id="2477" chance="6666" /> --Knight legs
    <item id="1987" chance="100000">
		<inside>
			<item id="2151" countmax="11" chance1="6000" chancemax="0"/>
			<item id="2462" chance="9700"/>
			<item id="2149" countmax="3" chance1="1428" chancemax="0"/>
			<item id="2171" chance="2333"/>
			<item id="2158" chance="4444"/> --Blue gem
			<item id="2470" chance="6500"/> --Golden legs
			<item id="2520" chance="9999"/> --Demon shield
		</inside>
	</item>
</loot>
</monster>

creaturescripts.xml (dodaj)
Code:
<event type="kill" name="Kill" event="script" value="inq.lua"/>

inq.lua, czy jak tam się ten twój skrypt nazywa (przepraszam, że nie zrobiłem wcięć):
Code:
function onKill(cid, target, lastHit)

if isMonster(target) and getCreatureName(target) == "Zugurosh" then
local creaturename = getCreatureName(target)

--- positions where the teleports will be created:

local ushuriel_in_pos = {x=1362, y=1446, z=5, stackpos=2}
local annihilon_in_pos = {x=1454, y=1447, z=5, stackpos=2}
local hellgorak_in_pos = {x=1459, y=1490, z=5, stackpos=2}
local madareth_in_pos = {x=1379, y=1488, z=5, stackpos=2}
local zugurosh_in_pos = {x=1394, y=1445, z=5, stackpos=2}
local brothers_in_pos = {x=1414, y=1488, z=5, stackpos=1}

--- positions where the teleports will be teleported you:

local ushuriel_to_pos = {x=1441, y=1370, z=5, stackpos=1}
local annihilon_to_pos = {x=1513, y=1529, z=5, stackpos=1}
local hellgorak_to_pos = {x=255, y=467, z=5, stackpos=1}
local madareth_to_pos = {x=1312, y=1437, z=6, stackpos=1}
local zugurosh_to_pos = {x=1395, y=1382, z=5, stackpos=1}
local brothers_to_pos = {x=1376, y=1494, z=6, stackpos=1}

local time_to_pass = 180 -- in seconds
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear."

if creaturename == 'Ushuriel' then

teleport = doCreateTeleport(tpID, ushuriel_to_pos, ushuriel_in_pos)

doSendMagicEffect(ushuriel_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInUshurielWard, (1000*time_to_pass))

elseif creaturename == 'Annihilon' then

teleport = doCreateTeleport(tpID, annihilon_to_pos, annihilon_in_pos)

doSendMagicEffect(annihilon_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInAnnihilonWard, (1000*time_to_pass))

elseif creaturename == 'Madareth' then

teleport = doCreateTeleport(tpID, madareth_to_pos, madareth_in_pos)

doSendMagicEffect(madareth_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInMadarethWard, (1000*time_to_pass))

elseif creaturename == 'Hellgorak' then

teleport = doCreateTeleport(tpID, hellgorak_to_pos, hellgorak_in_pos)

doSendMagicEffect(hellgorak_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInHellgorakWard, (1000*time_to_pass))

elseif creaturename == 'Zugurosh' then

teleport = doCreateTeleport(tpID, zugurosh_to_pos, zugurosh_in_pos)

doSendMagicEffect(zugurosh_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInZuguroshWard, (1000*time_to_pass))

elseif creaturename == 'Latrivan' then

teleport = doCreateTeleport(tpID, brothers_to_pos, brothers_in_pos)

doSendMagicEffect(brothers_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInBrothersWard, (1000*time_to_pass))

end
end
end

function removeTeleportInUshurielWard()
if getThingfromPos({x=1362, y=1446, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1362, y=1446, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1362, y=1362, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInAnnihilonWard()
if getThingfromPos({x=1454, y=1447, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1454, y=1447, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1454, y=1447, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInHellgorakWard()
if getThingfromPos({x=1459, y=1490, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1459, y=1490, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1459, y=1490, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInMadarethWard()
if getThingfromPos({x=1379, y=1488, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1379, y=1488, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1379, y=1488, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInZuguroshWard()
if getThingfromPos({x=1394, y=1445, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1394, y=1445, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1394, y=1445, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInBrothersWard()
if getThingfromPos({x=1414, y=1488, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1414, y=1488, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1414, y=1488, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end


Spróbuj tak.

ale tutaj nie chodzi o jednego monstera tylko kilka :o
 
No to wrzuć gdzieś skrypty dla wszystkich monsterów. W postaci przed jakimikolwiek przeróbkami zamieszczanymi w tym temacie. Postaram się pomóc.
 
Zakładam, że część
Code:
<script> 
	<event name="inquisitionPortals"/> 
</script>
jest w pliku xml odpowiadającym każdemu potworkowi z tego questa. W takim razie podaj mi listę tych bossów.
 
ushuriel
annihilon
hellgorak
madareth
zugurosh
brothers

Nie da się tego jakoś fixnąć tylko trzeba dopisywać te monstery do skryptu?
 
Nowa wersja.

zugurosh.xml i inni (wytnij):
Code:
<script> 
	<event name="inquisitionPortals"/> 
</script>

creaturescripts.xml (dodaj)
Code:
<event type="kill" name="Kill" event="script" value="inq.lua"/>

inq.lua, czy jak tam się ten twój skrypt nazywa (przepraszam, że nie zrobiłem wcięć):
Code:
function onKill(cid, target, lastHit)
local names = {"Ushuriel", "Annihilon", "Hellgorak", "Madareth", "Zugurosh", "Brothers"}
if isMonster(target) and isInArray(names, getCreatureName(target)) then
local creaturename = getCreatureName(target)

--- positions where the teleports will be created:

local ushuriel_in_pos = {x=1362, y=1446, z=5, stackpos=2}
local annihilon_in_pos = {x=1454, y=1447, z=5, stackpos=2}
local hellgorak_in_pos = {x=1459, y=1490, z=5, stackpos=2}
local madareth_in_pos = {x=1379, y=1488, z=5, stackpos=2}
local zugurosh_in_pos = {x=1394, y=1445, z=5, stackpos=2}
local brothers_in_pos = {x=1414, y=1488, z=5, stackpos=1}

--- positions where the teleports will be teleported you:

local ushuriel_to_pos = {x=1441, y=1370, z=5, stackpos=1}
local annihilon_to_pos = {x=1513, y=1529, z=5, stackpos=1}
local hellgorak_to_pos = {x=255, y=467, z=5, stackpos=1}
local madareth_to_pos = {x=1312, y=1437, z=6, stackpos=1}
local zugurosh_to_pos = {x=1395, y=1382, z=5, stackpos=1}
local brothers_to_pos = {x=1376, y=1494, z=6, stackpos=1}

local time_to_pass = 180 -- in seconds
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear."

if creaturename == 'Ushuriel' then

teleport = doCreateTeleport(tpID, ushuriel_to_pos, ushuriel_in_pos)

doSendMagicEffect(ushuriel_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInUshurielWard, (1000*time_to_pass))

elseif creaturename == 'Annihilon' then

teleport = doCreateTeleport(tpID, annihilon_to_pos, annihilon_in_pos)

doSendMagicEffect(annihilon_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInAnnihilonWard, (1000*time_to_pass))

elseif creaturename == 'Madareth' then

teleport = doCreateTeleport(tpID, madareth_to_pos, madareth_in_pos)

doSendMagicEffect(madareth_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInMadarethWard, (1000*time_to_pass))

elseif creaturename == 'Hellgorak' then

teleport = doCreateTeleport(tpID, hellgorak_to_pos, hellgorak_in_pos)

doSendMagicEffect(hellgorak_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInHellgorakWard, (1000*time_to_pass))

elseif creaturename == 'Zugurosh' then

teleport = doCreateTeleport(tpID, zugurosh_to_pos, zugurosh_in_pos)

doSendMagicEffect(zugurosh_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInZuguroshWard, (1000*time_to_pass))

elseif creaturename == 'Latrivan' then

teleport = doCreateTeleport(tpID, brothers_to_pos, brothers_in_pos)

doSendMagicEffect(brothers_in_pos, doEffect)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInBrothersWard, (1000*time_to_pass))

end
end
end

function removeTeleportInUshurielWard()
if getThingfromPos({x=1362, y=1446, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1362, y=1446, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1362, y=1362, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInAnnihilonWard()
if getThingfromPos({x=1454, y=1447, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1454, y=1447, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1454, y=1447, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInHellgorakWard()
if getThingfromPos({x=1459, y=1490, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1459, y=1490, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1459, y=1490, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInMadarethWard()
if getThingfromPos({x=1379, y=1488, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1379, y=1488, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1379, y=1488, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInZuguroshWard()
if getThingfromPos({x=1394, y=1445, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1394, y=1445, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1394, y=1445, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInBrothersWard()
if getThingfromPos({x=1414, y=1488, z=5, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1414, y=1488, z=5, stackpos=1}).uid,1)
doSendMagicEffect({x=1414, y=1488, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end


Uprzedzam, że w przyszłości możesz mieć problemy z nowymi skryptami wykorzystującymi ten sam event. Ja miałem kiedyś taki problem i właśnie tak go rozwiązałem. Kolejne skrypty do tego eventu trzeba będzie dodawać jako kolejne "else" w pierwszej instrukcji warunkowej.

@down: mój sposób też nie wymaga eventu w plikach z monsterami.
 
Last edited:
Kumpel też miał taki problem kiedyś i podobno ten skrypt mu działa sam nie testowałem ale możesz sprawdzić jak chcesz (o ile dobrze pamietam to nie wymaga eventu w plikach z monsterami)

http://wklej.org/id/

<event type="kill" name="inq" event="script" value="inq.lua"/>

registerCreatureEvent(cid, "inq")
 
Zapomniałem o najważniejszym, Sherloku:

Dodaj to do creaturescripts/scripts/login.lua:
Code:
registerCreatureEvent(cid, "Kill")

Teraz proszę cię o ponowne przetestowanie mojego sposobu.
 
Back
Top