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

Movements - Bug

Haate

John Ever Stone
Joined
Apr 2, 2010
Messages
113
Reaction score
1
Location
Ełk
Hi, all users otland!
I have got problems with script.

Code:
<movevent event="StepIn" actionid="7777" script="premiumbridge.lua" />

Code:
function onStepIn(cid, item, pos) 

local newPos = {x=(dir == 1 and  pos.x-1 or dir == 3 and pos.x+1 or pos.x), y=pos.y, z=pos.z}

if isPlayer(cid) == TRUE then
   if isPremium(cid) == TRUE then
   else
   doPlayerSendTextMessage(cid,"Only premium can go across bridge!")
   doTeleportThing(cid,newpos)
   doSendMagicEffect(npos,2)
   end
end
end

and

Code:
	<movevent event="StepIn" actionid="9977" script="tp.lua" />

Code:
function onStepIn(cid, item, pos)
if item.actionid == 9977 then

local pos = getPlayerPosition(cid)
local tppos = {x=2571, y=2705, z=8}

doTeleportThing(cid,tppos)
doPlayerSendTextMessage(cid, 19, "Wpadłeś w ukrytą dziurę!")

end
return 1
end

Two same bugs:

TFS isn't show BUGS.
When I stand on tile with action id: 7777 without premium it don't do.


Sorry for my really good English :peace:

The Forgotten Server, version 0.3.6 (Crying Damson)
 
Last edited:
Code:
	<movevent type="StepIn" actionid="7777" event="script" value="premiumbridge.lua"/>
Code:
function onStepIn(cid, item, position, fromPosition) 
	if isPlayer(cid) and not isPremium(cid) then
		doTeleportThing(cid, fromPosition, true)
		doCreatureSay(cid, "Only premium can go across bridge!", TALKTYPE_ORANGE_1, false, cid)
	end
end
Code:
	<movevent type="StepIn" actionid="9977" event="script" value="tp.lua"/>
Code:
function onStepIn(cid, item, position, fromPosition)
	doTeleportThing(cid, {x=2571, y=2705, z=8})
	doSendMagicEffect({x=2571, y=2705, z=8}, CONST_ME_TELEPORT)
	doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Wpadłeś w ukrytą dziurę!")
end
 
Thanks for fast and good help, script isn't has got bugs.

I give your reputation. I sure give you more reputation when I can!

P.S. Subject to close.
 
Last edited:
Back
Top