• 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!

[REQUEST] Moving Statue (read for description)

dave182

New Member
Joined
Jan 23, 2009
Messages
80
Reaction score
3
Hi everybody, I need a script for a statue, for example a dwarvn statue, and i need a script to let it to move following someone and if it touchs the person, the person die. but i need the script to when it kills the person it backs to it's initial waypoint. I mean, for example, you pull a lever with (same as the annihilator) and when you pull it, you apepar on a room with the statue 5 sqm behind you and it starts to follow u. if it kills you, it backs to its initial waypoint. Could someone help me?
 
But now there is my problem, look this [20/07/2009 20:29:29] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/playerdeath.lua)
[20/07/2009 20:29:29] data/creaturescripts/scripts/playerdeath.lua:62: ')' expected (to close '(' at line 61) near 'doTeleportThing'

I Will REP the one who helps me :s

OK, I resolve the first problem, now its this [20/07/2009 21:16:20] data/creaturescripts/scripts/playerdeath.lua:59: attempt to index global 'str' (a nil value)
[20/07/2009 21:16:20] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/playerdeath.lua)
 
Last edited:
Try this way
Code:
local monster_pos = {x=366,y=603,z=7}
local player_pos = {x=366,y=598,z=7}
local killer = getCreatureName(lastHitKiller)

if (killer:lower() == "amazon statue") then
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
        doTeleportThing(cid, player_pos)
        doTeleportThing(lastHitKiller, monster_pos)
        return TRUE
end

Or just:
Code:
local monster_pos = {x=366,y=603,z=7}
local player_pos = {x=366,y=598,z=7}

if (getCreatureName(lastHitKiller) == "Amazon Statue") then
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
        doTeleportThing(cid, player_pos)
        doTeleportThing(lastHitKiller, monster_pos)
        return TRUE
end
 
Last edited:
Try this way
Code:
local monster_pos = {x=366,y=603,z=7}
local player_pos = {x=366,y=598,z=7}
local killer = getCreatureName(lastHitKiller)

if (killer:lower() == "amazon statue") then
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
        doTeleportThing(cid, player_pos)
        doTeleportThing(lastHitKiller, monster_pos)
        return TRUE
end

That one works fine, but the statue doesnt spawn when I enter the labyrinth, any1 know where to set it up ? =)
 
You should put it on yours RME

but that wont work if more than one player are in the labyrinth at the same time...

I mean, if there are 3 players in the labyrinth, then the statue will only follow one of them, and the others 2 can go free... so I want the statue to spawn when a player enters the labyrinth and follow the player that comes to the tile. (It would be good if I there is a script that can make it unable to enter the portal if another player is standing on the tile where the teleport are going to). Hope you understand :D

Btw, the statue aint moving when I'm on the tile, but it is maybe because the statue is named "Guardian Statue" for me, so should I change its name to Amazon Statue instead of Guardian? ^^
 
Last edited:
[21/07/2009 10:14:34] Lua Script Error: [CreatureScript Interface]
[21/07/2009 10:14:34] data/creaturescripts/scripts/playerdeath.lua

[21/07/2009 10:14:34] luaGetCreatureName(). Creature not found

:s
 
No way, this is my last request: [21/07/2009 10:14:34] Lua Script Error: [CreatureScript Interface]
[21/07/2009 10:14:34] data/creaturescripts/scripts/playerdeath.lua

[21/07/2009 10:14:34] luaGetCreatureName(). Creature not found

If i fix this, the script is going to be good
 
It doesn't works for me, I get no error, but the statue aint even moving or killing me when i'm beside or infront of it =(
I got no movement script, maybe thats needed ^^ :p I just got script in monster folder, monsters.xml and playerdeath.lua
 
Back
Top