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

[Help] A script

furstwin

New Member
Joined
Aug 9, 2007
Messages
486
Reaction score
1
Location
Sweden
Code:
function onStepIn(cid, item, pos)
local stonePos = {x=257, y=388, z=9, stackpos=1}
local getstone = getThingfromPos(stonePos)  
if item.uid == 9039 then
if isMonster == TRUE then 
doRemoveItem(cid, getStone, 1)

function onStepOut(cid, item, pos)
if item.uid == 9039 then
doCreateItem(1304, 1, stonePos)

end
end
end
end
end

As the title says I want help with a script wich didnt work.. ;(

When a monster step on x position a rock will move, when he stepout a the rock will come back..

(Idk if this is neccesary but..)
Monster: Mummy
Stone ID: 1304
Positions: Doesnt matter, I can fix em'


Sincerely,
Furstwin.
 
Code:
local stonePos = {x=257, y=388, z=9, stackpos=1}
local getstone = getThingfromPos(stonePos)

function onStepIn(cid, item, pos)
if item.uid == 9039 then
	if isPlayer(cid) ~= TRUE then
		if getCreatureName(cid) == 'Mummy' then
			doRemoveItem(cid, getStone, 1)
		end
	end
end

function onStepOut(cid, item, pos)
	if item.uid == 9039 then
		doCreateItem(1304, 1, stonePos)
	end
end

Try something like this.
 
PHP:
local stonePos = {x=257, y=388, z=9, stackpos=1}

function onStepIn(cid, item, pos)
	local getStone = getThingfromPos(stonePos)
	if item.uid == 9039 then
		if isPlayer(cid) ~= TRUE then
			if getCreatureName(cid) == 'Mummy' then
				doRemoveItem(getStone.uid, 1)
			end
		end
	end
end

function onStepOut(cid, item, pos)
	if item.uid == 9039 then
		doCreateItem(1304, 1, stonePos)
	end
end

What about that one? ;>
 
Last edited:
Didnt work either ;\

Code:
	<movement event="StepIn" uniqueid="9039"  script="longsword.lua" />
	<movement event="StepOut" uniqueid="9039"  script="longsword.lua" />
right?
 
Code:
local stonePos = {x=257, y=388, z=9, stackpos=1}

function onStepIn(cid, item, pos)
    local getStone = getThingfromPos(stonePos)
    if item.uid == 9039 then
        if isPlayer(cid) ~= TRUE then
            if getCreatureName(cid) == "Mummy" then
                doRemoveItem(getStone.uid, 1)
            end
        end
    end
return 1
end

function onStepOut(cid, item, pos)
    if item.uid == 9039 then
        doCreateItem(1304, 1, stonePos)
    end
return 1
end

i was wondering why it shouldnt be a player and why should be a mummy =/?
 
Back
Top