SphereCommunity
Training Room Stones - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Training Room Stones (/Thread-Training-Room-Stones)

Pages: 1 2


Training Room Stones - htid4life - 07-22-2014 12:55 PM

hey guys i made a script for training stones.. basically they dclick stone n go into training room when 2hrs is up they exit..

Here is what i have it works...

Code:
[itemdef i_Training_stone_enter]
name=Training Stone (2hr)
id=i_grave_stone
type=t_normal

on=@create
color=047

on=@dclick
if <tag0.inuse>
src.sysMessage @55 Training Room In Use!
src.sysmessage @55  mins Remaining! // <<--- remaining Time here
return 1
endif
src.go=<tag0.traingo>
tag0.inuse=1
serv.newitem=i_teleport_training
new.link=<uid>
new.equip
new.timer=60
src.events=+e_training_room
return 1

[itemdef i_Training_stone_exit]
name=Exit Lose Your Spot
id=i_grave_stone
type=t_normal

on=@create
color=055

on=@dclick
src.findid.i_teleport_training.link.tag0.inuse=
src.findid.i_teleport_training.remove
src.go=5216,1208
src.events=-e_training_room
return 1



[events e_training_room]
on=@click
message @55 [Training]

on=@logout
IF (<findid.i_teleport_training>)
findid.i_teleport_training.link.tag0.inuse=
findid.i_teleport_training.remove
go=5216,1208
events=-e_training_room
ENDIF


[ITEMDEF i_teleport_training]
NAME=training delay
ID=i_handr_1
TYPE=T_EQ_SCRIPT

ON=@Create
    ATTR=attr_invis|attr_decay

ON=@Equip
    TIMER=1
    
ON=@Timer
    CONT.go=5216,1208    
    cont.events=-e_training_room
    cont.findid.i_teleport_training.link.tag0.inuse=
    cont.sysmessage = @55 Your Training Time Is Up!
    serv.log <cont.name> just left After 2hrs
    remove
    return 1



[EOF]

thing is when someone dclicks the enter stone i want it to show how long is remaining.. im confused on this part lol


RE: Training Room Stones - Extreme - 07-22-2014 01:13 PM

Show for who? Who dclick the stone?
src.sysmessage @55 <TIMER> mins Remaining! // <<--- remaining Time here


RE: Training Room Stones - htid4life - 07-22-2014 01:21 PM

yea tryed that but theres no timer on the stone its on the player whos already training.


RE: Training Room Stones - Extreme - 07-22-2014 01:56 PM

Then save the uid of player on stone and check the memory timer.


RE: Training Room Stones - XuN - 07-22-2014 05:25 PM

Code:
on=@dclick
if <tag0.inuse>
src.sysMessage @55 Training Room In Use!
src.sysmessage @55 <eval <uid.<tag.inuse>.findid.i_teleport_training.timer>/60> mins Remaining! // <<--- remaining Time here
return 1
endif
src.go=<tag0.traingo>
tag0.inuse=<src>  // Change 1 to the UID of the player entering.
serv.newitem=i_teleport_training
new.link=<uid>
new.equip
new.timer=60
src.events=+e_training_room
return 1



RE: Training Room Stones - htid4life - 07-22-2014 07:38 PM

nice thanks guys!

works really good


RE: Training Room Stones - Extreme - 07-23-2014 01:47 AM

(07-22-2014 05:25 PM)XuN Wrote:  
Code:
on=@dclick
if <tag0.inuse>
src.sysMessage @55 Training Room In Use!
src.sysmessage @55 <eval <uid.<tag.inuse>.findid.i_teleport_training.timer>/60> mins Remaining! // <<--- remaining Time here
return 1
endif
src.go=<tag0.traingo>
tag0.inuse=<src>  // Change 1 to the UID of the player entering.
serv.newitem=i_teleport_training
new.link=<uid>
new.equip
new.timer=60
src.events=+e_training_room
return 1

All replies with 'done' things will force him to always come ask for the finished script.
I always give the tips, its the necessary to do himself.
If he don't understand the tip, he can ask again then I explain better.

I'm not complaining, just trying to make they learn.


RE: Training Room Stones - htid4life - 07-23-2014 02:57 AM

And this is the help section but its always great to learn from what is completed for you... im grateful for all the help i can get.. as you can see i fully created the script above with help from you guys on parts i couldnt do i tryed to link and stuff i wouldnt of asked if i wasnt in need of help...

Any way thanks guys i will try complete stuff my self..

thanks again XUN & Extreme


RE: Training Room Stones - Extreme - 07-23-2014 03:34 AM

(07-23-2014 02:57 AM)htid4life Wrote:  And this is the help section but its always great to learn from what is completed for you... im grateful for all the help i can get.. as you can see i fully created the script above with help from you guys on parts i couldnt do i tryed to link and stuff i wouldnt of asked if i wasnt in need of help...

Any way thanks guys i will try complete stuff my self..

thanks again XUN & Extreme

Hey buddy, don't worry about ask anything.
I know you tried to fix yourself but for the good learning we should ask like this: "how do I get the timer from player who used the stone?".

As you see I gave you the tip "Then save the uid of player on stone and check the memory timer."
Of course XuN answered before you 'try' but I don't blame it.

One question: did you understand my tip? It shouldn't be hard for you because you know sphere language, but the idea can be confused.

I'm so so sorry if my last post seemed rude.


RE: Training Room Stones - htid4life - 07-23-2014 03:54 AM

Its all good.Smile

i did understand thank you and nothing rude have been said .

thanks again.