• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[Action, Creature Script, etc...] look at this request.

Knight God

Member
Joined
Oct 19, 2008
Messages
1,180
Reaction score
21
Greetings to all and to otland.net. ^_^

good today I was thinking about a creation of a new quest called: Infection of the blob.
steps:

1 - It took six characters in three different vocations. (Sorcerer / Druid, Paladin and Knight). to start the quest should be made up of three tiles and three others in three other tiles. A player extra move the lever shown in the picture by moving the team (A) will be transported to the right of the screen, while the team (B) will be transported to the left of the screen.
pic.jpg

1.5 - If the characters tread three tiles with action id: 3040. This created three different monsters in front of them. but if I step on the tiles the same people they do not create monsters.

2 - The two teams will have to move a lever at the end of the two challenges, must be the two levers activated, the third challenge that must be placed to create a teleport that if these levers are activated, the teleport will be active for a hour for the levers that activated them. but if they enter the 6 characters, this teleport will disappear.

3 - If each team Sorcerer / Druid die, will be expelled from the area to the temple at a time of fifteen seconds, your screen will display a message saying: mission failed, will be transported to the temple in x seconds, you should try another time within five minutes if they want to go again to the quest.

4 - If both teams are in each area and two other teams wishing to enter must wait to die or are expelled.

5 - If the six characters are above the tiles primary, the other characters will not be able to move them (not pushing)

6 - If the teams finish the quest they will receive an experience bonus x2 for 3 days.

7 - If the teams finish the quest this can not re-enter the quest.

I thank you in advance to all who comment on the subject
I am willing to wait as long as necessary.
 
1.5 - When three characters step on three tiles at a time, it would create three monsters, but if the same persons or one step on the tile again, no more monsters will appear.
 
When both levers are pushed, two tps appear (I guess inside the little room of the map). What happens when you enter them?
 
What I mean is if there is more to do when they are tped: is there a room where they have to do something or they just get back to temple or something like that?
 
when the two teams are transported to different areas. each have a lever to open area. when the first team opens the first lever activates a teleport, but can not enter until the other team also open the lever. to open the two levers may enter the teleports and equipment will be sent to another room.
 
I hope this works:
Infection of the blob lever.lua:
Code:
local poses = {{x=xxx,y=yyy,z=zz},
			   {x=xxx,y=yyy,z=zz},
			   {x=xxx,y=yyy,z=zz},
			   {x=xxx,y=yyy,z=zz},
			   {x=xxx,y=yyy,z=zz},
			   {x=xxx,y=yyy,z=zz}}

local toposes = {{x=xxx,y=yyy,z=zz},
			     {x=xxx,y=yyy,z=zz},
			     {x=xxx,y=yyy,z=zz},
			     {x=xxx,y=yyy,z=zz},
			     {x=xxx,y=yyy,z=zz},
			     {x=xxx,y=yyy,z=zz}}

function onUse(cid,item)
	
	local mage = 0
	local knight = 0
	local paladin = 0
	local team1 = false
	local team2 = false
	
	for i=1,3 do
		if getPlayerVocation(getThingFromPos(poses[i]).uid) == 1 or getPlayerVocation(getThingFromPos(poses[i]).uid) == 2 then
			mage = mage+1
		elseif getPlayerVocation(getThingFromPos(poses[i]).uid) == 3 then
			paladin = paladin+1
		elseif getPlayerVocation(getThingFromPos(poses[i]).uid) == 4 then
			knight = knight+1
		end
	end
	if mage == 1 and paladin == 1 and knight == 1 then team1 = true end
	mage = 0
	knight = 0
	paladin = 0
	for i=4,6 do
		if getPlayerVocation(getThingFromPos(poses[i]).uid) == 1 or getPlayerVocation(getThingFromPos(poses[i]).uid) == 2 then
			mage = mage+1
		elseif getPlayerVocation(getThingFromPos(poses[i]).uid) == 3 then
			paladin = paladin+1
		elseif getPlayerVocation(getThingFromPos(poses[i]).uid) == 4 then
			knight = knight+1
		end
	end
	if mage == 1 and paladin == 1 and knight == 1 then team2 = true end	
	if team1 == true and team2 == true then
		doSendMagicEffect(getThingPosition(cid),CONST_ME_POFF)
		doTeleportThing(cid, {x=xxx,y=yyy,z=zz})
		doSendMagicEffect(getThingPosition(cid),CONST_ME_TELEPORT)	
		for i=1,6 do
			doTeleportThing(getThingFromPos(poses[i]).uid, toposes[i])
			doSendMagicEffect(poses[i],CONST_ME_POFF)
			doSendMagicEffect(toposes[i],CONST_ME_TELEPORT)
		end
	end
	return TRUE
end
Just edit poses and toposes.
Infection of the blob lever2.lua:
Code:
local leversposes = {{x=xxx,y=yyy,z=zz},
					 {x=xxx,y=yyy,z=zz}}

local tppos = {x=xxx,y=yyy,z=zz}

function removeTp()
	doRemoveItem(tppos)
end


function onUse(cid,item)
	if getThingFromPos(leversposes[1]).itemid == 1946 and getThingFromPos(leversposes[2]).itemid == 1946 then
		doCreateTeleport(1387, {x=xxx,y=yyy,z=zz}, tppos)
		addEvent(removeTp,3600000)
	end
	return TRUE
end
Edit leversposes with the poses of both levers that have to be pushed in the room with the monsters and edit tppos to the pos of the tp.
In doCreateTeleport(1387, {x=xxx,y=yyy,z=zz}, tppos) chagne {x=xxx,y=yyy,z=zz} with the destination pos of the tp.
Infection of the blob tile.lua:
Code:
local montersposes = {{x=xxx,y=yyy,z=zz},
					  {x=xxx,y=yyy,z=zz},
					  {x=xxx,y=yyy,z=zz}}

function onStepIn(cid)
	if getCreatureStorage(cid, 1967) < 1 then
		for i=1,3 do
			doCreateMonster("MONSTERNAME", monstersposes[i])
			doSendMagicEffect(monstersposes[i],CONST_ME_POISONAREA)
		end
		doCreatureSetStorage(cid, 1967, 1)
	end
	return TRUE
end
Edit monstersposes with the poses of the monsters that appear.
Infection of the blob movement.lua:
Code:
local playersthatentered = 0
local tppos = {x=xxx,y=yyy,z=zz}

function onStepIn(cid)
	playersthatentered = playersthatentered+1
	if playersthatentered == 6 then
		doRemoveItem(tppos)
		stopEvent(removeTp)
		playersthatentered = 0
	end
	return TRUE
end
Edit tppos and put the same tppos as in the previous script.
That's all the lua. Now the XML:
Actions.xml:
Code:
	<action uniqueid="UNIQUEID" event="script" value="infection of the blob lever.lua"/>
	<action uniqueid="ANOTHERUNIQUEID" event="script" value="infection of the blob lever2.lua"/>
Replace UNIQUEID nad ANOTHERUNIQUEID with two different uniqueids.
Movements.xml:
Code:
	<movevent type="StepIn" itemid="TILEID" event="script" value="infection of the blob tile.lua"/>
	<movevent type="StepIn" itemid="TILEUNDERTPID" event="script" value="infection of the blob movement.lua"/>
Replace TILEID with the tile itemid which when you step in it monsters appear and repalce TILEUNDERTPID with the tile itemid that is under the tp that appears when you activate both levers.
That's it and good luck (so that it works :p) ;)
If anything is not clear or doesn't work just ask/tell me :D
 
Back
Top