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

Entering Tp by items X

Mera Mero

Guess Who?
Joined
Dec 27, 2014
Messages
417
Reaction score
86
Greeting otlanders, this is first script for me :) ,may someone need it ,this simple required items to enter this tp TESTED ON 0.3.6 AND WORKING GOOD
Movements,scripts,lua
Code:
local itemid1 = 2157
local itemid2 = 9971
local itemid3 = 2160

function onStepIn(cid, item, position, fromPosition)
if not isPlayer(cid) then
return true
end
if getPlayerItemCount(cid, itemid1) >= 12 and getPlayerItemCount(cid, itemid2) >= 20 and getPlayerItemCount(cid, itemid3) >= 30 then
doPlayerRemoveItem(cid, itemid1, 12)
doPlayerRemoveItem(cid, itemid2, 20)
doPlayerRemoveItem(cid, itemid3, 30)
doTeleportThing(cid, {x=1003,y=1002,z=7}, true)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "TELEPORTED")
else
doTeleportThing(cid, fromPosition, false)
doPlayerSendCancel(cid, "You need 50 Crystal Coins To Go IN!")
end
return true
end
EDITED WORKING GOOD NOW
 
Last edited:
Greeting otlanders, this is first script for me :) ,may someone need it ,this simple required items to enter this tp
Movements,scripts,lua
Code:
local itemid1 = 2157  <----- item id
local itemid2 = 9971 <---- item id
local itemid3 = 2160 <----item id
function onStepIn(cid, item, position, fromPosition)
if (isPlayer(cid) and doPlayerRemoveItem(cid, itemid1, 12) and <----- 12,20,15 is amount that will need to enter the tp
doPlayerRemoveItem(cid, itemid2, 20)and
doPlayerRemoveItem(cid, itemid3, 15)) then
doTeleportThing(cid, {x=1003,y=1002,z=7}, true) <---------- teleport position
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "TELEPORTED")
else
doPlayerSendCancel(cid, "MESSAGE OF CANCEL IF YOU DON'T HAVE THIS ITEMS")
doTeleportThing(cid, fromPosition)
end
return true
end
congratz :D
 
Got Script if I Used On Statue It Take xx Item And Give Outfit Like Skullhunter?
 
u can also use isinarray and loops for make it easy to configurate
 
u can also use isinarray and loops for make it easy to configurate
i'm trying to do my best :p but i don't have good tutorial to learn from it :p
EDITED
i've got problem now when i enter the teleport and i don't have enough item id like i made to enter the tp need item id 2160/2157/9971 stackable items but if i don't have enough of them the tp takes the rest and don't tp me any solve for it?
 
Last edited:
sorry for duplicate reply but i made this and found myself tp for free Oo
Code:
local itemid1 = 2157
local itemid2 = 9971
local itemid3 = 2160
function onStepIn(cid, item, position, fromPosition)
if (isPlayer(cid) and getPlayerItemCount(cid, itemid1, 12) and
getPlayerItemCount(cid, itemid2, 20)and
getPlayerItemCount(cid, itemid3, 15)) then
doTeleportThing(cid, {x=1003,y=1002,z=7}, true)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "TELEPORTED")
else
doPlayerSendCancel(cid, "You need 50 Crystal Coins To Go IN!")
doTeleportThing(cid, fromPosition)
end
return true
end
 
Change the structure, for example:
Code:
getPlayerItemCount(cid, itemid1, 12)
to:
Code:
getPlayerItemCount(cid, itemid1) >= 12

And also you must add after:
Code:
doPlayerRemoveItem(cid, itemid1, 12)
 
Change the structure, for example:
Code:
getPlayerItemCount(cid, itemid1, 12)
to:
Code:
getPlayerItemCount(cid, itemid1) >= 12

And also you must add after:
Code:
doPlayerRemoveItem(cid, itemid1, 12)
mmm this script now checking items only and don't remove items and tp for free :( btw i tried to add doremoveitem but got errors
Code:
local itemid1 = 2157
local itemid2 = 9971
local itemid3 = 2160
function onStepIn(cid, item, position, fromPosition)
if (isPlayer(cid) and getPlayerItemCount(cid, itemid1) >= 12 and
getPlayerItemCount(cid, itemid2) >= 20 and
getPlayerItemCount(cid, itemid3) >= 30 ) then
doTeleportThing(cid, {x=1003,y=1002,z=7}, true)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "TELEPORTED")
else
doPlayerSendCancel(cid, "You need 50 Crystal Coins To Go IN!")
doTeleportThing(cid, fromPosition)
end
return true
end
 
mmm this script now checking items only and don't remove items and tp for free :( btw i tried to add doremoveitem but got errors
Code:
local itemid1 = 2157
local itemid2 = 9971
local itemid3 = 2160
function onStepIn(cid, item, position, fromPosition)
if (isPlayer(cid) and getPlayerItemCount(cid, itemid1) >= 12 and
getPlayerItemCount(cid, itemid2) >= 20 and
getPlayerItemCount(cid, itemid3) >= 30 ) then
doTeleportThing(cid, {x=1003,y=1002,z=7}, true)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "TELEPORTED")
else
doPlayerSendCancel(cid, "You need 50 Crystal Coins To Go IN!")
doTeleportThing(cid, fromPosition)
end
return true
end
Code:
local itemid1 = 2157
local itemid2 = 9971
local itemid3 = 2160

function onStepIn(cid, item, position, fromPosition)
if not isPlayer(cid) then
return true
end
if getPlayerItemCount(cid, itemid1) >= 12 and getPlayerItemCount(cid, itemid2) >= 20 and getPlayerItemCount(cid, itemid3) >= 30 then
    doPlayerRemoveItem(cid, itemid1, 12)
    doPlayerRemoveItem(cid, itemid2, 20)
    doPlayerRemoveItem(cid, itemid3, 30)
    doTeleportThing(cid, {x=1003,y=1002,z=7}, true)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "TELEPORTED")
else
    doTeleportThing(cid, fromPosition, false)
    doPlayerSendCancel(cid, "You need 50 Crystal Coins To Go IN!")
end
return true
end
 
Code:
local itemid1 = 2157
local itemid2 = 9971
local itemid3 = 2160

function onStepIn(cid, item, position, fromPosition)
if not isPlayer(cid) then
return true
end
if getPlayerItemCount(cid, itemid1) >= 12 and getPlayerItemCount(cid, itemid2) >= 20 and getPlayerItemCount(cid, itemid3) >= 30 then
    doPlayerRemoveItem(cid, itemid1, 12)
    doPlayerRemoveItem(cid, itemid2, 20)
    doPlayerRemoveItem(cid, itemid3, 30)
    doTeleportThing(cid, {x=1003,y=1002,z=7}, true)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "TELEPORTED")
else
    doTeleportThing(cid, fromPosition, false)
    doPlayerSendCancel(cid, "You need 50 Crystal Coins To Go IN!")
end
return true
end
thx i've made it like you did but i added and after doplayerremoveitem :S thats was the error but thx anyway :oops:
 
Greeting otlanders, this is first script for me :) ,may someone need it ,this simple required items to enter this tp TESTED ON 0.3.6 AND WORKING GOOD
Movements,scripts,lua
Code:
local itemid1 = 2157
local itemid2 = 9971
local itemid3 = 2160

function onStepIn(cid, item, position, fromPosition)
if not isPlayer(cid) then
return true
end
if getPlayerItemCount(cid, itemid1) >= 12 and getPlayerItemCount(cid, itemid2) >= 20 and getPlayerItemCount(cid, itemid3) >= 30 then
doPlayerRemoveItem(cid, itemid1, 12)
doPlayerRemoveItem(cid, itemid2, 20)
doPlayerRemoveItem(cid, itemid3, 30)
doTeleportThing(cid, {x=1003,y=1002,z=7}, true)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "TELEPORTED")
else
doTeleportThing(cid, fromPosition, false)
doPlayerSendCancel(cid, "You need 50 Crystal Coins To Go IN!")
end
return true
end
EDITED WORKING GOOD NOW
where to put it? and what to write in the xml of the script? for example if its in actions
 
where to put it? and what to write in the xml of the script? for example if its in actions
It's a movevent.

XML:
<movevent type="StepIn" uniqueid="XXXX" event="script" value="XXXX.lua"/>
 
It's a movevent.

XML:
<movevent type="StepIn" uniqueid="XXXX" event="script" value="XXXX.lua"/>
and i should give the tp coridnations? or only in the file? i read that it should be 0,0,0 and the floor has the uniqueid its correct?
 
Back
Top