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

Touch stone and touch second one.

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hello.

I want to make an script:
- You need to touch stone (you can touch the stone if you have Storage = 5540, 1) after you have 10 seconds to touch second stone.
- If you dont touch second stone with the time (10 seconds) you must start the "touching" again
- After touched second stone you got storage 5540, 3 and blue message in console

Anyone can do it ?
 
stupidly easy, but whatever

On First Stone
Code:
local temporaryTimeStorage = 20000
local time = 10 --In Seconds

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerStorageValue(cid, 5540) == 1 then
        setPlayerStorageValue(cid, temporaryTimeStorage, os.time() + time)
    end
    return true
end

On Second Stone
Code:
local temporaryTimeStorage = 20000

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerStorageValue(cid, 5540) == 1 and getPlayerStorageValue(cid, temporaryTimeStorage) > os.time() then
        setPlayerStorageValue(cid, 5540, 3)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This code is so easy even my 10 year old sister could do it!!")
    end
    return true
end

gosh, some people don't even try
 
Back
Top