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

add mossy stone when walking on tile

tyngaste

New Member
Joined
Dec 2, 2008
Messages
223
Reaction score
0
Location
Sweden
hello i need help with this script its not working.

Code:
function onStepIn(cid, item, pos)
gatepos = {x=32176, y=31868, z=15, stackpos=1}
getgate = getThingfromPos(gatepos)

if item.uid == 1199 then
doCreateItem(1353,1,gatepos)
end
  return 1
  end

<movevent type="StepIn" itemid="407" event="script" value="Bansheequest\stonecreat.lua"/>

it should add mossy stone when walking on that tile but its not working and no errors anyone that could help me?
 
Lua:
function onStepIn(cid, item, position, fromPosition)
  local gatepos = {x=32176, y=31868, z=15, stackpos=1}
        doCreateItem(1353, 1, gatepos)
  return TRUE
end

Code:
<movevent type="StepIn" uniqueid="1199" event="script" value="Bansheequest\stonecreat.lua"/>
 
Last edited:
Lua:
function onStepIn(cid, item, position, fromPosition)
  local gatepos = {x=32176, y=31868, z=15, stackpos=1}
        doCreateItem(1353, 1, gatepos)
  return TRUE
end

Code:
<movevent type="StepIn" uniqueid="1199" event="script" value="Bansheequest\stonecreat.lua"/>

didnt work but when i changed
Code:
<movevent type="StepIn" uniqueid="1199" event="script" value="Bansheequest\stonecreat.lua"/>
to
Code:
<movevent type="StepIn" itemid="407" event="script" value="Bansheequest\stonecreat.lua"/>
it worked but it did add all time mossy stones even if i didnt go on that position.

only if walking on x=32176, y=31868, z=15 it should add 1 mossy stone

hope you can fix it.

thanks in advance
 
Last edited:
sorry, my bad.
try this

Lua:
function onStepIn(cid, item, position, fromPosition)
  local gatepos = {x=32176, y=31868, z=15, stackpos=1}
   local getThing = getThingfromPos(gatepos)
    if getThing.itemid == 1353 then
	doPlayerSendCancel(cid,"Sorry, not possible.")
      else
        doCreateItem(1353, 1, gatepos)
    end
  return TRUE
end
 
sorry, my bad.
try this

Lua:
function onStepIn(cid, item, position, fromPosition)
  local gatepos = {x=32176, y=31868, z=15, stackpos=1}
   local getThing = getThingfromPos(gatepos)
    if getThing.itemid == 1353 then
	doPlayerSendCancel(cid,"Sorry, not possible.")
      else
        doCreateItem(1353, 1, gatepos)
    end
  return TRUE
end

didnt work becouse i didnt have any uid on that tile lol :p, now it works thanks.
 

Similar threads

Back
Top Bottom