• 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 fast script [EASY] +repp

Cloow

Active Member
Joined
May 10, 2010
Messages
1,086
Reaction score
35
Hello, i've created this script just now. I want so if you walk into a certain title you get teleported. No console errors, when i walk into the title nothing heppens.

Code:
local t = 
{
      pos = {x=5002, y=4965, z=6},	  
}

function onStepIn(cid, item, frompos, itemEx, topos)
    if item.itemuid == 88712 then
  doTeleportThing(cid, t.pos)
    end
 return TRUE
 end



Help
 
well the error there is item.itemuid -> item.uid
anyways you do not have to redeclare that since that is done at .xml

in the map you know you have to set the uniqueid number to the item/tile w/e
Lua:
local t = 
{
    pos = {x=5002, y=4965, z=6},      
}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    if isPlayer(cid) then
        doTeleportThing(cid, t.pos)
    end
    return true
end
 
Or
Lua:
local t = 
{
      pos = {x=5002, y=4965, z=6},	  
}

function onStepIn(cid, item, frompos, itemEx, topos)
    if item.uid == 88712 then
  doTeleportThing(cid, t.pos)
    end
 return TRUE
 end
Problem was "item.itemuid Red shouldn't be there.
 
And what should be in .xml then ? Since i have this <movevent type="StepIn" itemuid="88712" event="script" value="npcsale.lua"/> now
 
With Cloow's script you don't need to edit unique id in your script, cuz when you use it it doesn't check uid, it checks if you are a player.
Both of scripts above should work.
 
Wierd, seems not to working still.

<movevent type="StepIn" itemuid="7462" event="script" value="npcsale.lua"/>


local t =
{
pos = {x=5002, y=4965, z=6},
}

function onStepIn(cid, item, frompos, itemEx, topos)
if item.uid == 7462 then
doTeleportThing(cid, t.pos)
end
return TRUE
end
 
And what should be in .xml then ? Since i have this <movevent type="StepIn" itemuid="88712" event="script" value="npcsale.lua"/> now
aff subscribed notification is not working :s

if you will use mine then
Code:
<movevent type="StepIn" uniqueid="88712" event="script" value="npcsale.lua"/>
don't need to redeclare uid at script! where is the necessity?
 
Back
Top