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

Actions: When step on tile able to open door

Exotis

New Member
Joined
May 8, 2009
Messages
52
Reaction score
0
Ok so...I've been trying for about 3 hours and seems I suck at scripting...I'm looking for an action script that when I STEP on a tile at X position, I can open a quest door. Thanks for support! ^^
 
-- not tested --

Code:
function onStepIn(cid, item, position, fromPosition) 
            if item.actionid == [COLOR="Red"]58262[/COLOR] then 
            setPlayerStorageValue(cid,[COLOR="red"] 102503[/COLOR]) == 1  then         
            doCreatureSay(cid, "You now have the storage to open a quest door.", TALKTYPE_ORANGE_1) 
        end 
    return TRUE 
end

Same storage on the quest door
 
Aff...
[02/01/2010 10:02:59] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/Doors/cults.lua)
[02/01/2010 10:02:59] data/actions/scripts/Doors/cults.lua:3: unexpected symbol near '=='

and for the quest door I set the storage for the unique Id right? xd
 
Aff...
[02/01/2010 10:02:59] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/Doors/cults.lua)
[02/01/2010 10:02:59] data/actions/scripts/Doors/cults.lua:3: unexpected symbol near '=='

and for the quest door I set the storage for the unique Id right? xd

Code:
function onStepIn(cid, item, position, fromPosition) 
            if item.actionid == 58262 then 
            setPlayerStorageValue(cid, 102503) == 1 then         
            doCreatureSay(cid, "You now have the storage to open a quest door.", TALKTYPE_ORANGE_1) 
        end 
    return TRUE 
end

try that ^^ it was to big space at line three
 
Code:
local storage = 44311 -- Storage needed to enter door
function onStepIn(cid, item, fromPosition, toPosition)
	if(getPlayerStorageValue(cid, storage) == -1) then
		setPlayerStorageValue(cid, storage, 1)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You may now enter the door.")
	else
		doTeleportThing(cid, fromPosition)
		doPlayerSendCancel(cid, "You have already walked here.")
	end
	return true
end
 
Code:
function onStepIn(cid, item, position, fromPosition) 
            if item.actionid == 58262 then 
            setPlayerStorageValue(cid, 102503) == 1 then         
            doCreatureSay(cid, "You now have the storage to open a quest door.", TALKTYPE_ORANGE_1) 
        end 
    return TRUE 
end

try that ^^ it was to big space at line three

I still get the same error =/
 
Back
Top Bottom