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

Can anyone make me a script like shown on this thread?

luke55

New Member
Joined
Apr 25, 2010
Messages
66
Reaction score
0
Can anyone make a script like this:
(I realised I posted it in the wrong section before woops lol)
- A tile is used to take you into a spawn (Example a wooden floor)
- You need "Sniper gloves" which are CONSUMED upon entering the tile
- If you are accepted you have a time limit in which you can re-enter (1hour for the door to remain active otherwise you need another pair of Sniper gloves)
- If you have the sniper gloves it says "Welcome to the Huntsman Quest, you have only ONE hour to use the tile then it magically-locks" and tp's you to X Y Z
- If you DO NOT have the sniper Gloves it says "You do not have the required item from a specific huntsman in these lands, come back after you have acquired it" and teleports you back to X Y Z
 
Bump
And I made a script:
Code:
local ItemEnterId = 2137
local pos = {x=32258, y=32224, z=7}
function onStepIn(cid, item, position, fromPosition)
    if isPlayer(cid) == TRUE then
        if getPlayerItemCount(cid, ItenEnterId) >= 1 then
             doTeleportThing(cid, pos, TRUE)
             doSendMagicEffect(pos, 10)
        else
            doTeleportThing(cid, fromPosition, TRUE)
			doSendMagicEffect(position, 10)
        end
    end
    return TRUE
end

How can I make it consume the item instead of letting it keep it?
+rep to anyone that helps
 
To make the item dissapear use this code:
Lua:
local ItemEnterId = 2137
local pos = {x=32258, y=32224, z=7}
function onStepIn(cid, item, position, fromPosition)
    if isPlayer(cid) == TRUE then
        if getPlayerItemCount(cid, ItemEnterId) >= 1 then
             doTeleportThing(cid, pos, TRUE)
             doSendMagicEffect(pos, 10)
             doRemoveItem(ItemEnterId, 1)
        else
            doTeleportThing(cid, fromPosition, TRUE)
			doSendMagicEffect(position, 10)
        end
    end
    return TRUE
end

Hope this works :D
 
To make the item dissapear use this code:
Lua:
local ItemEnterId = 2137
local pos = {x=32258, y=32224, z=7}
function onStepIn(cid, item, position, fromPosition)
    if isPlayer(cid) == TRUE then
        if getPlayerItemCount(cid, ItemEnterId) >= 1 then
             doTeleportThing(cid, pos, TRUE)
             doSendMagicEffect(pos, 10)
             doRemoveItem(ItemEnterId, 1)
        else
            doTeleportThing(cid, fromPosition, TRUE)
			doSendMagicEffect(position, 10)
        end
    end
    return TRUE
end

Hope this works :D

Sorry for the long reply -
I get an error in my console saying "luaDoRemoveItem: item not found" yet I have the item and the correct ID D:
 
Back
Top