• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent Kill Monster & Create Portal

Status
Not open for further replies.
This is all very great but you made one tiny mistake. You forgot one of those sneaky semi-colons

local config =
{
timeToRemove = 30; -- Seconds
monsters = { -- New Player Position & Teleport Position
["Ushuriel"] = { {x=100, y=100, z=7 }, {x=100, y=100, z=7, stackpos = 1 } },
["Morgaroth"] = { {x=100, y=100, z=7 }, {x=100, y=100, z=7, stackpos = 1 } }
}
}


Mmmmmm, not sure if i was completely correct. It worked, its just i had an error in console and the tp didn't go away

Lua Script Error: [CreatureScript Interface]
/creaturescripts/scripts//teleports_inquisition2.lua:eek:nDeath

luaAddEvent(). Callback parameter should be a function.
 
Last edited:
Updated the script.
Not tested.
 
Im test it and this script don't work

What is that ? ^^
Lua:
    if (name = cfg.monster)
<_<
 
@Up,
I don't know.
What is that? :confused: :eek:
 
In onKill event you don't need to add this:
Lua:
<script>
    <event name="monsterTeleport"/>
</script>

to monster file :thumbup:

btw. this script is fully bugged <_<
 
Yea, I noticed that...
I updated the script, and forgot to erase that.

@2up,
Sarcasm.
 
Health: [0 / 8200]. and monster dont die =,-
i cant see name and health , he dont move but he atk and stend ;o


its something with
data/creaturescripts/creaturescripts.xml
<event type="kill" name="monsterTeleport" script="script.lua"/>

sorry for my english ;x
 
@Up,
Try it now, I changed the script.
 
now this script does nothing at all.

I have tested it 30 mins ago and tp was popping up, but the moster won't die, now nothing

Could you paste the older version (with Onkill function)?
 
Last edited:
[19/08/2009 08:07:01] [Warning - Event::loadScript] Event onDeath not found (data/creaturescripts/scripts/demon.lua)

;/

i try make - if monster death then.. make tp but i try only CreatureSay and it dont work too

Code:
local cfg = 
{
monster = "Demon"
}

function onDeath(cid, corpse, killer)
    if(getCreatureName(target) == cfg.monster) then
    doCreatureSay(cid, "You have 45 seconds to enter the teleport!", TALKTYPE_ORANGE_1)
    end
    return TRUE
end
or
Code:
local cfg = 
{
monster = "Demon"
}

function onKill(cid, corpse, killer)
    if(getCreatureName(target) == cfg.monster) then
    doCreatureSay(cid, "You have 45 seconds to enter the teleport!", TALKTYPE_ORANGE_1)
    end
    return TRUE
end

btw i using 0.3.5
 
Last edited:
Updated, with a little help.
 
PHP:
  bosses = {
        ["Ushuriel"] = { x = 588, y = 1086, z = 7 },
        ["Annihilion"] = { x = 276, y = 1045, z = 6 },
        ["Latrivan"] = { x = 46, y = 1109, z = 7}
    }

its "Teleport To Position or "Teleport Position" ? o,o because i think it need two wpt per one monster.

@JDB
Can you test it on TFS 0.3.5 ? because function onDeath dont work for me ;)

[Warning - Event::loadScript] Event onDeath not found (data/creaturescripts/scripts/demon.lua)
 
Works perfectly, thank you :thumbup:

BTW. Can you make it to use for more than one monster?

Or second script: After killing monster (most experience) you get teleported - like in Pythius the Rotten?
 
Last edited:
First post updated, and should work.
Multiple monsters have been created in the script.
 
[19/08/2009 19:11:50] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/monstertp.lua)
[19/08/2009 19:11:50] data/creaturescripts/scripts/monstertp.lua:4: '}' expected (to close '{' at line 2) near 'monsters'

Multiple monsters script does not work.
 
Now it should.
Try it again, and let me know :thumbup:
 
Vdk,
Stop posting scripts that are edited versions of mine.
I am online, I am here to fix my own.

About your script:

[19/08/2009 19:18:14] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/monstertp.lua)
[19/08/2009 19:18:14] data/creaturescripts/scripts/monstertp.lua:25: 'end' expected (to close 'function' at line 10) near '<eof>'

Now just some small errors with 'end'.
 
@up,
I sent you a PM.
You can report there, instead of filling up posts.
 
Status
Not open for further replies.
Back
Top