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

Access to door

Avengar

New Member
Joined
Jun 28, 2010
Messages
10
Reaction score
0
Hi there. I wanted to ask you for some script i really need.

It shall work like that:
I have item let's say id 2005 and i use it on dead body of a boss (no matter who killed him), and then i have access to open door on pos or with action id or with unique id( it doesn't matter with what just must work).Thanks in advance for help:)
 
actions/actions.xml:
XML:
<action itemid="2005" script="corpse.lua"/>

actions/scripts:
Lua:
local cyko = {
	corpseid = {corpseid1, corpseid2, corpseid3}, --put here the id of corpse even the rotten!
	storage = 5555 --put a unused storage!
}

function onUse(cid, item, fromPosition, itemEx, toPosition) 
	if isInArray(cyko.corpseid, itemEx.itemid) == TRUE and getCreatureStorage(cid, cyko.storage) == -1 then 
		doCreatureSetStorage(cid, cyko.storage, 1)
		doSendMagicEffect(toPosition,65)
		end
	return true
end

For the door, check this:
http://otland.net/f479/how-doors-138592/
 
Back
Top