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

Need help with my quest, can't make it work =//

Dankoo

Active Member
Joined
Sep 4, 2010
Messages
1,007
Reaction score
27
I'm trying to make a bit complex quest, but after trying really hard, no results...

The idea is, the player click an statue, then a boss is summoned in front of it.

The player kill the boss, then a portal appears and players with lvl 100+ can enter it, and a lot of monsters are summoned after it's death.

After 20 secs the portal disappears, and the player can't summon 2 bosses at the same time u know

So, my tries:

At statue:

actions.xml
LUA:
<action actionid="8754" event="script" value="quests/vampire_lord_summon.lua"/>

the vampire_lord_summon.lua I haven't created yet

creaturescripts.xml
LUA:
<event type="death" name="VampireLord" event="script" value="vampire_lord.lua"/>

vampire_lord.lua (creaturescripts)

LUA:
local config = {
teleportId = 1387,
bosse = "Vampire Lord"
}

local portal_in_pos = {x = 32477, y = 31758, z = 10}
local summonSec = 1 -- How many seconds they should be summoned after kill

function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "VampireLord")
if config.bosse == getCreatureName(cid) then	
local position = portal_in_pos	
teleport = doCreateItem(config.teleportId,255,position)
doSetItemActionId(teleport, 9024)
end
end
function createMonster()
local positions = {
    {x = 32931, y = 31418, z = 2}, --1
    {x = 32935, y = 31418, z = 2}, --2
    {x = 32935, y = 31422, z = 2}, --3
    {x = 32934, y = 31422, z = 2}, --4
	{x = 32936, y = 31420, z = 2}, --5
	{x = 32931, y = 31420, z = 2}, --6
	{x = 32933, y = 31423, z = 2}, --7
	{x = 32935, y = 31422, z = 2}, --8
	{x = 32930, y = 31421, z = 2}, --9
    {x = 32933, y = 314232, z = 2} --10
}
	for i = 1, 10 do
		doCreateMonster(cid, "Vampire Bride", positions[i])
return TRUE
end
end

movements.xml
LUA:
<movevent type="StepIn" actionid="9024" event="script" value="vampire_lord_portal.lua" />

LUA:
function onStepIn(cid, item, frompos, item2, topos) 

local portal_in_pos = {x = 32934, y = 31417, z = 2}
local novapos = {x=32792, y = 31115, z = 6} 
local portal_iten_pos = getThingfromPos(portal_in_pos) 

if item.actionid == 9024 then

getThingfromPos(getPlayerPosition(cid)) 
doSendMagicEffect(getPlayerPosition(cid),2) 
doTeleportThing(cid,novapos) 
doSendMagicEffect(novapos,10) 
doRemoveItem(portal_iten_pos.uid, 255)
end 
end

When I kill Vampire Lord, nothing happens, and no errors are displayed in console

crap =S any ideas?

thanks :peace:
 
Why not use onKill by that you wont need to regestir event in monster file , also on matching target name with monster to prevent mistakes use

LUA:
if string.lower(getCreatureName(target)) == string.lower("RaT") then
 
Back
Top