SphereCommunity
Timer For a Travel Stone Etc.. How Do I Make It Have The Person Wait?? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Expired/Outdated Versions (/Forum-Expired-Outdated-Versions)
+--- Forum: Sphere 51a Help (/Forum-Sphere-51a-Help)
+--- Thread: Timer For a Travel Stone Etc.. How Do I Make It Have The Person Wait?? (/Thread-Timer-For-a-Travel-Stone-Etc-How-Do-I-Make-It-Have-The-Person-Wait)



Timer For a Travel Stone Etc.. How Do I Make It Have The Person Wait?? - Admin Drew - 04-30-2015 01:09 PM

Hi I just want to do something simple with a timer but not sure how. So I want it so you have to wait a few seconds or however long before you can use an item again. Say you Dclick on a stone.. I want it to tell the player they have to wait to be able to use it again 10 seconds. Any help would really be appreciated!

ONTRIGGER=DCLICK

TIMER=10 //seconds

SRC.MESSEGE=You have to wait 10 seconds to use the item


//Not sure how to do this )= Would really appreciate help with a timer delay! It's for 51a.
IF (<timer>=) possibly?? I have no clue
Thanks


RE: Timer For a Travel Stone Etc.. How Do I Make It Have The Person Wait?? - XuN - 05-02-2015 06:44 PM

Does 51a have tags? can't remember.

If so:

ONTRIGGER=DCLICK

if (0<tag.AlreadyUsed>)
src.message You have to wait <timer> seconds to use the item again. //not sure anyway if you can use the <timer> like this Big Grin
else
your code
endif


ONTRIGGER=TIMER
tag.AlreadyUsed //clearing the tag


RE: Timer For a Travel Stone Etc.. How Do I Make It Have The Person Wait?? - Rizz - 05-09-2015 08:26 AM

51a doesn't have tags.
You can improve the sphere 51a capabilites (and use something like a tag) using the lil from fallout.

I suggest you to use some items propriety such as morex morey morez more1 more2 instead of tags (bcuz you don't have) in the code suggested by XuN


RE: Timer For a Travel Stone Etc.. How Do I Make It Have The Person Wait?? - evening - 05-10-2015 03:28 PM

ontrigger=dclick
if (<morez> == 0)
src.message ??????
morez=0
timer=1
else
src.message ??????
endif


ontrigger=timer
if (<morez> < 10)
morez = <morez> +1
else
morez=0
timer=-1
go ?????
endif
timer=1
return 1


RE: Timer For a Travel Stone Etc.. How Do I Make It Have The Person Wait?? - jdchixin - 09-29-2016 03:54 PM

I think you want player use Travel stone, after once Travel , must wait 10 seconds.
it's very easy,you need make a record on the player.

ONTIGGER=DCLICK
if <src.findid.0xxxx.timer> < 1
src.go xxx,xxx,xxx
src.findid.0xxx.timer=10
return 1
else
src.say You must wait for <src.findid.0xxx.timer>.
return 1
endif


RE: Timer For a Travel Stone Etc.. How Do I Make It Have The Person Wait?? - x77x - 10-04-2016 07:52 AM

back in the old days we used coins for everything

Code:
[7868]
ID=0eed
ATTR=090
TYPE=0
NAME=tele coin

ONTRIGGER=TIMER
IF (<LINK.RESTEST 1 07869>) || (<LINK.RESTEST 1 07870>) || (<LINK.RESTEST 1 07871>) || (<LINK.RESTEST 1 07872>)
    LINK.GO 5163,1768,0
    LINK.SYSMESSAGE #0033,3, Welcome to the Sky Bar!
        LINK=04FFFFFFF
        REMOVE
    RETURN 1
    ELSE
    LINK.SYSMESSAGE Where did your membership card go?
        LINK=04FFFFFFF
        REMOVE
    RETURN 1
    ENDIF


[7869]
ID=1423
//ID=1f17 Spok, Graham, Dennis, Lewis Therin, Cd???, Warchild
//Beeswax
NAME=Platinum Membership Card
COLOR=835
WEIGHT=3
TYPE=1676
ATTR=24
PILE=0

CATEGORY=DRAGONS OF TIME ITEMS
SUBSECTION=Membership
DESCRIPTION=Platinum Membership Card


[TRIG 1676]
ONTRIGGER=DCLICK
SRC.GMMENU 13
RETURN 1

    //IF <SRC.RESTEST 1 07869>
    //SRC.SAY I'm Going To The Sky Bar!
    //SRC.GO 5163,1768,0
    //SRC.SYSMESSAGE #0033,3, Welcome to the Sky Bar!
    //RETURN 1
    //ELSE
    //SRC.SYSMESSAGE=You Do Not Have A Platinum Membership Card.
    //RETURN 1

[GMMENU 13]
Dragons of Time Sky Bar VIP Lounge
ON=Let's Go!
IF (<SRC.RESTEST 1 07869>) || (<SRC.RESTEST 1 07870>) || (<SRC.RESTEST 1 07871>) || (<SRC.RESTEST 1 07872>)
SAY I'm Going To The Sky Bar!
NEWITEM 07868 //ID of the stuck coin
ACT.LINK=<SRC.SERIAL>
ACT.TIMER=10
SYSMESSAGE #0481,3,You will be teleported to the Sky Bar in 10 seconds...
ELSE
SRC.SYSMESSAGE=You must have the membership card in your backpack...
RETURN 1
ENDIF