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

Help with boss system!.

leyendario

kind of scripter
Joined
Aug 1, 2009
Messages
49
Reaction score
14
Location
Venezuela
ok my problem is that i want an action script that teleport 3 players to a room and when it happens summon a boss... no chest quest.. only that, teleport and boss summoned!

i make a script following some guides... but i cant make it works...
it looks like an anihi..

This is my script

Code:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 7010 then
end
if item.itemid == 1946 then
end
player1pos = {x=167, y=47, z=15, stackpos=253}
player1 = getThingfromPos(player1pos)

player2pos = {x=165, y=46, z=15, stackpos=253}
player2 = getThingfromPos(player2pos)

player3pos = {x=165, y=46, z=15, stackpos=253}
player3 = getThingfromPos(player3pos)



if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 then

player1level = getPlayerLevel(player1.uid)
player2level = getPlayerLevel(player2.uid)
player3level = getPlayerLevel(player3.uid)


questlevel = 100

if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel then

    demon1pos = {x=230, y=30, z=7}
    

    doSummonCreature("Fire Boss", demon1pos)
    

    nplayer1pos = {x=229, y=30, z=7}
    nplayer2pos = {x=226, y=27, z=7}
    nplayer3pos = {x=226, y=33, z=7}
    
    doSendMagicEffect(player1pos,2)
    doSendMagicEffect(player2pos,2)
    doSendMagicEffect(player3pos,2)
    
    doTeleportThing(player1.uid,nplayer1pos)
    doTeleportThing(player2.uid,nplayer2pos)
    doTeleportThing(player3.uid,nplayer3pos)
    
    doSendMagicEffect(nplayer1pos,10)
    doSendMagicEffect(nplayer2pos,10)
    doSendMagicEffect(nplayer3pos,10)
    
    doTransformItem(item.uid,1945)

    else
    doPlayerSendCancel(cid,"All players must have level 100 to enter.")
    end
    else
    doPlayerSendCancel(cid,"you need 3 players")
end
end

it goes not do enything... no teleport nothing. and it should at least say you "need 3 players" but it dosnt.
plz help!
 
Last edited:
Look for Annihilator System, there are a lot of annihi system that, when you pull a lever it teleports you to a certainly position (you can modify it) and summons demons (you can change the number of monsters, and the monster you want to appear)
 
Not Tested

Lua:
local players_pos = 
{
    {x=1100, y=1000, z=7}, -- Stand Position
    {x=1100, y=1000, z=7},
    {x=1100, y=1000, z=7}
}

local new_player_pos = 
{
    {x=1100, y=1000, z=7}, -- New Position
    {x=1100, y=1000, z=7},
    {x=1100, y=1000, z=7}
}

local monster_pos = 
{ 
    {x=1100, y=1000, z=7} -- Monster pos
}

local monster = "Morgaroth"
local questLevel = 100

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if (item.itemid == 1945) and (item.uid == 5000) then
	for i = 1, 3 do
	player[i] = getThingfromPos(players_pos[i])
	    if getPlayerLevel(player[i].uid) >= questLevel then
		doSendMagicEffect(players_pos[i], CONST_ME_POFF)
		doTeleportThing(player[i].uid, new_player_pos[i], FALSE)
		doSendMagicEffect(new_player_posn[i], CONST_ME_ENERGYAREA)
		doSummonCreature(monster, monster_pos)
		doTransformItem(item.uid, item.itemid + 1)
	    else
		doPlayerSendCancel(cid, "All Players must be level ".. questLevel .." or higher.")
	    end
	end
    end
    elseif (item.itemid == 1946) then
	doPlayerSendCancel(cid, "The lever has already been pulled.")
    end
    return TRUE
end
 
ok it works.. but when the team die... the boss stay there and when another team tryout the quest and use the switch other boss is summoned and there are now 2 boss... and if they dont kill them.. there will be 3 boss...

is there a way to disappear the boss once the team is killed??
or when the switch is used the boss dissapear and is summoned another one..??
 
Back
Top