• 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] Flying System with Broom

Lee Weii

New Member
Joined
Aug 19, 2008
Messages
41
Reaction score
1
I need one scripts thats fly with broom, like on harry potter :D, and if you take off of belt-slot you will fall to the ground and lose life.

Thanks.
 
Wow hard , dont think it's that possible , but i think they can do.
i think first you have to make the broom like a creature to move and stuff then the script to fly.
 
I remeber awhile ago, There was a script released that when you used a Broom it wud set you +5 floors onto invisible tiles. And you could walk around etc.
 
chris77 helped me
I'm begginer in script, i'll twy to make this.

But i need know how to make, for exemple : Send Player to z=1 off your position, if player is in x=1000 y=1000 z=7 send only the z to ground 1.
don't change x and y.
 
Simple...
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local charpos = getPlayerPosition(cid)
	if charpos.z >= 2 and charpos.z <= 7 then
		doTeleportThing(cid, {x=charpos.x, y=charpos.y, z=1}, FALSE)
		doSendMagicEffect({x=charpos.x, y=charpos.y, z=1}, CONST_ME_MAGIC_GREEN)
	end
	return TRUE
end
 
Thanks, helped-me alot.

Edited :

Hey man, can you add a line that's execute when player take off the broom he goes to z=7 ?
 
Last edited:
IN RME is one RED, but is a movement, when you take off of your hand, to be easier, you down to z=7. ;D

ID : 2324
 
Last edited:
simple...while i make it, start spamming tile ID 460? (the invisible red tile) on the top floor, make sure nothing else is on that floor.
 
Lua:
local config = {
	invisfloor = 1, --will teleport to this level of "z"
	groupaccess = 0, --set if you want a minimun group access
	denied = "You are not authorized to use this"
}
local pos = getPlayerPosition(cid)

function onEquip(cid, item, slot) 
	if getPlayerGroupId(cid) < config.groupaccess then
		doPlayerSendCancel(cid, denied)
		return false
	end
	
	if pos.z == config.invisfloor then
		print('Player: '..getCreatureName(cid)..' has tried to equip a broom at the highest altitude... [X= '..pos.x..' Y= '..pos.y..' Z= '..pos.z.. ']')
		doPlayerSendCancel(cid, 'Please contact a staff member!')
		return false
	end
	
	doTeleportThing(cid, {x=pos.x, y=pos.y, z=config.invisfloor}, false)
	doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN)
	return true
end
	
function onDeEquip(cid, item, slot)
	if getPlayerGroupId(cid) < config.groupaccess then
		doPlayerSendCancel(cid, denied)
		return false
	end
	
	if pos.z ~= config.invisfloor then
		print('Player: '..getCreatureName(cid)..' has tried to deEquip a broom in a nonflying zone... [X= '..pos.x..' Y= '..pos.y..' Z= '..pos.z.. ']')
		doPlayerSendCancel(cid, 'Please contact a staff member!')
		return false
	end
	
	doTeleportThing(cid, {x=pos.x, y=pos.y, z=1}, false)
	doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN)
	return true
end

made it fast and untested, few known bugs just by making it...players can fly up and then fly down to spots they shouldnt be able to get to because it doesnt check, I can fix this but I dont have the time. Ask someone if you dunno how to install.
 
Back
Top Bottom