Djivar
AKA Wickedviruz
I don't know if this have been showed before but
here is a script when you walk on a tile the monster appears,
Its good to have if you want a "boss" in demon helmet for exampel
Movements/scripts/monster.lua
movements.xml
pics!
Before steping in on the tile:
After:
And for the teleport to pop up you need make a lua file in creaturescripts/scripts/portals.lua and add:
on login.lua add this
And then in creaturescripts.xml add this:
And the monster Elastico.xml
And in monsters.xml
Rep+ if it works or you like it XD
Sorry if some one have posted some thing like this alrdy
here is a script when you walk on a tile the monster appears,
Its good to have if you want a "boss" in demon helmet for exampel
Movements/scripts/monster.lua
PHP:
local t = {
storage = 32001,
monster = {"Elastico", {x=xxxx, y=xxx, z=x}},
msg = "Oh no! Elastico appeared, you have to kill him to get out of here.."
}
function onStepIn(cid, item, position, fromPosition)
if getPlayerStorageValue(cid, t.storage) < 1 then
doCreatureSay(cid, t.msg, TALKTYPE_ORANGE_1)
doSummonCreature(t.monster[1], t.monster[2])
setPlayerStorageValue(cid, t.storage, 1)
end
return TRUE
end
movements.xml
PHP:
<movevent type="StepIn" uniqueid="xxxx" event="script" value="monster.lua"/>
pics!
Before steping in on the tile:
After:
And for the teleport to pop up you need make a lua file in creaturescripts/scripts/portals.lua and add:
PHP:
----------->Scripetd by JDB<------------
---->Credits to JDB for this script<----
local m = {
["Elastico"] = {
message = "Escape through the teleport quickly before it closes!",
cfg = {
{
time = 60, -- Seconds until tp closes.
to = { x = xxxx, y = xxxx, z = x }, -- Where the tp takes you.
tp = { x = xxxx, y = xxxx, z = x } -- Where the tp creates.
},
}
}
}
function onKill(cid, target)
if isPlayer(target) then
return true
end
local monster = m[getCreatureName(target)]
if monster then
for i = 1, #monster.cfg do
local c = monster.cfg[i]
local function deleteTeleport()
local teleport = getTileItemById(c.tp, 1387).uid
if(teleport > 0) then
doRemoveItem(teleport)
doSendMagicEffect(c.tp, CONST_ME_POFF)
doSendAnimatedText(c.tp, "Closed", TEXTCOLOR_RED)
end
return true
end
doCreateTeleport(1387, c.to, c.tp)
doSendMagicEffect(c.tp, CONST_ME_ENERGYAREA)
addEvent(deleteTeleport, c.time * 1000)
end
doCreatureSay(cid, monster.message, TALKTYPE_ORANGE_1)
end
return true
end
Code:
registerCreatureEvent(cid, "MonsterPortal")
PHP:
<event type="kill" name="MonsterPortal" event="script" value="portals.lua"/>
And the monster Elastico.xml
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Elastico" nameDescription="a Elastico" race="fire" experience="120000" speed="350" manacost="0">
<health now="125000" max="125000"/>
<look type="12" corpse="5995"/>
<targetchange interval="5000" chance="8"/>
<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="90"/>
<flag runonhealth="2500"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="180" attack="180"/>
<attack name="physical" interval="3000" chance="15" radius="5" target="0" min="-32" max="-10">
<attribute key="areaEffect" value="blackspark"/>
</attack>
<attack name="fire" interval="2000" chance="16" range="7" radius="7" target="1" min="-30" max="-40">
<attribute key="shootEffect" value="fire"/>
<attribute key="areaEffect" value="firearea"/>
</attack>
<attack name="firefield" interval="1000" chance="10" range="7" radius="4" target="1">
<attribute key="shootEffect" value="fire"/>
</attack>
<attack name="lifedrain" interval="4000" chance="19" length="8" spread="0" min="-50" max="-130">
<attribute key="areaEffect" value="purpleenergy"/>
</attack>
</attacks>
<defenses armor="50" defense="48">
<defense name="healing" interval="1000" chance="9" min="20" max="50">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="healing" interval="1000" chance="12" min="10" max="20">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="speed" interval="1000" chance="5" speedchange="40" duration="700">
<attribute key="areaEffect" value="redshimmer"/>
</defense>
</defenses>
<elements>
<element icePercent="15"/>
<element deathPercent="45"/>
<element holyPercent="25"/>
</elements>
<immunities>
<immunity earth="1"/>
<immunity fire="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity invisible="1"/>
</immunities>
<summons maxSummons="4">
<summon name="demon" interval="2500" chance="25"/>
</summons>
<voices interval="5000" chance="10">
<voice sentence="PRAISED BE MY MASTERS, THE RUTHLESS SEVEN!" yell="1"/>
<voice sentence="YOU ARE DOOMED!" yell="1"/>
<voice sentence="ORSHABAAL IS BACK!" yell="1"/>
<voice sentence="Be prepared for the day my masters will come for you!"/>
<voice sentence="SOULS FOR ORSHABAAL!" yell="1"/>
</voices>
<loot>
<item id="2148" countmax="100" chance1="100000" chancemax="0"/>
<item id="2148" countmax="25" chance1="100000" chancemax="0"/>
<item id="2148" countmax="50" chance1="100000" chancemax="0"/>
<item id="2152" countmax="45" chance1="100000" chancemax="0"/>
<item id="2144" countmax="35" chance1="100000" chancemax="0"/>
<item id="5954" countmax="2" chance1="9900" chancemax="0"/>
<item id="2377" chance="3333"/>
<item id="2188" chance="1000" /> -- wand of plague
<item id="2393" chance="10059"/>
<item id="2432" chance="3000"/>
<item id="2434" chance="9000"/>
<item id="5925" countmax="1" chance1="9000" chancemax="0"/>
<item id="5906" countmax="1" chance1="1000" chancemax="0"/>
<item id="5954" countmax="1" chance1="1000" chancemax="0"/>
<item id="2144" countmax="55" chance1="100000" chancemax="0"/>
<item id="2182" chance="1333" /> -- snakebite rod
<item id="1987" chance="100000">
<inside>
<item id="2421" chance="1000"/>
<item id="2148" countmax="100" chance1="100000" chancemax="0"/>
<item id="2144" countmax="4" chance1="4000" chancemax="0"/>
<item id="2462" chance="9700"/>
<item id="2149" countmax="3" chance1="1428" chancemax="0"/>
<item id="2171" chance="2333"/>
<item id="2387" chance="6666"/>
<item id="2470" chance="6500"/>
<item id="2520" chance="7050"/>
<item id="2522" chance="1050"/>
<item id="5808" chance="7050"/>
<item id="2418" chance="833"/>
</inside>
</item>
</loot>
</monster>
PHP:
<monster name="Elastico" file="demons/Elastico.xml"/>
Sorry if some one have posted some thing like this alrdy
Last edited: