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

Lua Broken Whirlpools

Demonkil

Beginner Mapper
Joined
Dec 21, 2007
Messages
468
Reaction score
12
Well i have looked at the script and checked my map editor and everything seems ok but when you try to goto quaras at yalahar the whirlpools are just walkable (you just walk on them and nothing happens), here are the scripts.

Code:
function onStepIn(cid, item, position) 
	if item.actionid == 7801 then
			doTeleportThing(cid,{x=747, y=581, z=9})
			doSendMagicEffect({x=747, y=581, z=9},10)
	elseif item.actionid == 7802 then
			doTeleportThing(cid,{x=748, y=581, z=9})
			doSendMagicEffect({x=748, y=581, z=9},10)
	elseif item.actionid == 7803 then
			doTeleportThing(cid,{x=747, y=582, z=9})
			doSendMagicEffect({x=747, y=582, z=9},10)
	elseif item.actionid == 7804 then
			doTeleportThing(cid,{x=748, y=582, z=9})
			doSendMagicEffect({x=748, y=582, z=9},10)
	end
	return TRUE
end

and in movements

Code:
		<!--- Sunken Quarter Whirlpools -->
			<movevent event="StepIn" actionid="7801" script="whirlpools.lua" />
			<movevent event="StepIn" actionid="7802" script="whirlpools.lua" />
			<movevent event="StepIn" actionid="7803" script="whirlpools.lua" />
			<movevent event="StepIn" actionid="7804" script="whirlpools.lua" />
 
Well i have looked at the script and checked my map editor and everything seems ok but when you try to goto quaras at yalahar the whirlpools are just walkable (you just walk on them and nothing happens), here are the scripts.

Code:
function onStepIn(cid, item, position) 
	if item.actionid == 7801 then
			doTeleportThing(cid,{x=747, y=581, z=9})
			doSendMagicEffect({x=747, y=581, z=9},10)
	elseif item.actionid == 7802 then
			doTeleportThing(cid,{x=748, y=581, z=9})
			doSendMagicEffect({x=748, y=581, z=9},10)
	elseif item.actionid == 7803 then
			doTeleportThing(cid,{x=747, y=582, z=9})
			doSendMagicEffect({x=747, y=582, z=9},10)
	elseif item.actionid == 7804 then
			doTeleportThing(cid,{x=748, y=582, z=9})
			doSendMagicEffect({x=748, y=582, z=9},10)
	end
	return TRUE
end

and in movements

Code:
		<!--- Sunken Quarter Whirlpools -->
			<movevent event="StepIn" actionid="7801" script="whirlpools.lua" />
			<movevent event="StepIn" actionid="7802" script="whirlpools.lua" />
			<movevent event="StepIn" actionid="7803" script="whirlpools.lua" />
			<movevent event="StepIn" actionid="7804" script="whirlpools.lua" />

You could add "stairs" that allows you to walk down, right? :)
 
As expected, the developer of your project didn't fix movements.xml:
Code:
		<!--- Sunken Quarter Whirlpools -->
			<movevent type="StepIn" actionid="7801" event="script" value="whirlpools.lua" />
			<movevent type="StepIn" actionid="7802" event="script" value="whirlpools.lua" />
			<movevent type="StepIn" actionid="7803" event="script" value="whirlpools.lua" />
			<movevent type="StepIn" actionid="7804" event="script" value="whirlpools.lua" />
 
Better use this script :D mine possible not work becouse im noob :D but this one will if work will by better :)

Lua:
local config = {
    d = 7801
	a = 7802
	m = 7803
	n = 7804  
	}


function onStepIn(cid, item, position, fromposition) 
	if item.actionid == config.d then
			-- doTeleportThing(cid,{x=747, y=581, z=9})
			doSendMagicEffect(fromPosition,10)
	elseif item.actionid == config.a then
			-- doTeleportThing(cid,{x=748, y=581, z=9})
			doSendMagicEffect(fromPosition,10)
	elseif item.actionid == config.m then
			-- doTeleportThing(cid,{x=747, y=582, z=9})
			doSendMagicEffect(fromPosition,10)
	elseif item.actionid == config.n then
			-- doTeleportThing(cid,{x=748, y=582, z=9})
			doSendMagicEffect(fromPosition,10)
	end
	return TRUE
end

Not tested Ofcourse :D
 
Better use this script :D mine possible not work becouse im noob :D but this one will if work will by better :)

Lua:
local config = {
    d = 7801
	a = 7802
	m = 7803
	n = 7804  
	}


function onStepIn(cid, item, position, fromposition) 
	if item.actionid == config.d then
			-- doTeleportThing(cid,{x=747, y=581, z=9})
			doSendMagicEffect(fromPosition,10)
	elseif item.actionid == config.a then
			-- doTeleportThing(cid,{x=748, y=581, z=9})
			doSendMagicEffect(fromPosition,10)
	elseif item.actionid == config.m then
			-- doTeleportThing(cid,{x=747, y=582, z=9})
			doSendMagicEffect(fromPosition,10)
	elseif item.actionid == config.n then
			-- doTeleportThing(cid,{x=748, y=582, z=9})
			doSendMagicEffect(fromPosition,10)
	end
	return TRUE
end

Not tested Ofcourse :D
input:3: '}' expected (to close '{' at line 1) near 'a'
You forgot commas (,) in the table, also your script wouldn't teleport the player.
 
i gues now should by okey :D

Lua:
local config = {
    d = 7801,
	a = 7802,
	m = 7803,
	n = 7804  
	}


function onStepIn(cid, item, position, fromposition) 
	if item.actionid == config.d then
			doTeleportThing(cid,{x=747, y=581, z=9})
			doSendMagicEffect(fromPosition,10)
	elseif item.actionid == config.a then
			doTeleportThing(cid,{x=748, y=581, z=9})
			doSendMagicEffect(fromPosition,10)
	elseif item.actionid == config.m then
			doTeleportThing(cid,{x=747, y=582, z=9})
			doSendMagicEffect(fromPosition,10)
	elseif item.actionid == config.n then
			doTeleportThing(cid,{x=748, y=582, z=9})
			doSendMagicEffect(fromPosition,10)
	end
	return TRUE
end
 
i gues now should by okey :D

Lua:
local config = {
    d = 7801,
	a = 7802,
	m = 7803,
	n = 7804  
	}


function onStepIn(cid, item, position, fromposition) 
	if item.actionid == config.d then
			doTeleportThing(cid,{x=747, y=581, z=9})
			doSendMagicEffect(fromPosition,10)
	elseif item.actionid == config.a then
			doTeleportThing(cid,{x=748, y=581, z=9})
			doSendMagicEffect(fromPosition,10)
	elseif item.actionid == config.m then
			doTeleportThing(cid,{x=747, y=582, z=9})
			doSendMagicEffect(fromPosition,10)
	elseif item.actionid == config.n then
			doTeleportThing(cid,{x=748, y=582, z=9})
			doSendMagicEffect(fromPosition,10)
	end
	return TRUE
end
Yes, but there's still no point in adding config there, you only made the script longer :S
 
Back
Top