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

Solved add to script kill monsters and.. (SOLVED)

tompan

Member
Joined
Dec 13, 2008
Messages
646
Reaction score
23
Location
Sweden
wasnt so hard after all xd

heres the script if anyone else needs it!
Lua:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition)
local event = 10
local name = ("test")
local pos = {x = 78, y = 445, z = 7}
 
local fromPos = {x = 65, y = 440, z = 7} 
local toPos = {x= 80, y = 450, z = 7}
 
	if not isPlayer(cid) then
		return true
	end
 
	local amount = 0
	for x = fromPos.x, toPos.x do
		for y = fromPos.y, toPos.y do
			for z = fromPos.z, toPos.z do
				if isPlayer(getTopCreature({x=x,y=y,z=z}).uid) then
					amount = amount+1
				end	
			end
		end
	end
	if amount >= 1 or getGlobalStorageValue(5000) >= 2 then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Someone is already in the room.")
		doTeleportThing(cid,fromPosition)
	else
	for x = fromPos.x, toPos.x do
		for y = fromPos.y, toPos.y do
			for z = fromPos.z, toPos.z do
			local explosionArea = {x=x, y=y, z=z}
			local getCreatures = getTopCreature(explosionArea).uid
				doSendMagicEffect(explosionArea, CONST_ME_FIREATTACK)
				if(isCreature(getCreatures) == TRUE) then
					doCreatureAddHealth(getCreatures, -getCreatureHealth(getCreatures))
				end
			end
		end
	end	
		doTeleportThing(cid,pos)
		setGlobalStorageValue(5000,2)
		event = addEvent(setGlobalStorageValue,85000,5000,1)
	      	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome to hell..")
			executeRaid(name)
		event = addEvent (doCreatureSay,1000,cid,"Prepare your selfs!!",TALKTYPE_ORANGE_1)
		event = addEvent (doCreatureSay,8000,cid,"FIRST INCOME!!",TALKTYPE_ORANGE_1)
		event = addEvent (doCreatureSay,18000,cid,"SECOND INCOME!!",TALKTYPE_ORANGE_1)
		event = addEvent (doCreatureSay,30000,cid,"THIRD INCOME!!",TALKTYPE_ORANGE_1)
		event = addEvent (doCreatureSay,60000,cid,"PREPARE FOR THE LAST INCOME!!!",TALKTYPE_ORANGE_1)

	end
 
 
 
local partylist = getPartyMembers(cid)
   	if not isPlayer or not partylist then 
		return true
   	end
 
	for _, party in ipairs(partylist) do 
 
			 if getCreatureCondition(party,CONDITION_INFIGHT) == false then
			else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Someone in your party  are pz locked.")
			doPlayerSendTextMessage(party, MESSAGE_INFO_DESCR, "Someone in your party  are pz locked.")
			return false
			end
    		doTeleportThing(party, getCreaturePosition(cid))
     		doSendMagicEffect(getCreaturePosition(party), math.random(0, CONST_ME_LAST))
      		doPlayerSendTextMessage(party, MESSAGE_INFO_DESCR, "Your team has been teleported by "..getCreatureName(cid)..".")
 
 
   	end
 
      	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "All players in the party have been teleported to you.")
 
    	return true
 
 
 
end
 
Last edited:
Back
Top