jump.tf Forums
Welcome B)

Offline / Listen Server Teleport Script

Rokio · 5 · 5564

Rokio

  • Administrator
  • Proficient
  • *****
    • Posts: 313
    • Frags: +1/-0
    • View Profile
Exile shared this great little script today in someone's stream.  Would be really useful for grinding or looking for trick jumps in a map, since you can store up to 5 different teleports by default.

It rebinds your Alt and F1-F5 keys and you use it by, for example, pressing Alt+F1 to store your location, and then F1 by itself to teleport back there. Alt+F2 to store a second location, and so on.

Code: [Select]
//Settings
sv_cheats 1
con_timestamp 0
con_logfile console.log

//Binds
bind F1 gotoPosition1
bind F2 gotoPosition2
bind F3 gotoPosition3
bind F4 gotoPosition4
bind F5 gotoPosition5
bind ALT +savePosition

//Code
alias +savePosition "bind F1 savePosition1; bind F2 savePosition2; bind F3 savePosition3; bind F4 savePosition4; bind F5 savePosition5"
alias -savePosition "bind F1 gotoPosition1; bind F2 gotoPosition2; bind F3 gotoPosition3; bind F4 gotoPosition4; bind F5 gotoPosition5"
alias resetLogfile "con_logfile console.log"
alias savePosition1 "con_logfile cfg/position1; getpos; resetLogfile;"
alias savePosition2 "con_logfile cfg/position2; getpos; resetLogfile;"
alias savePosition3 "con_logfile cfg/position3; getpos; resetLogfile;"
alias savePosition4 "con_logfile cfg/position4; getpos; resetLogfile;"
alias savePosition5 "con_logfile cfg/position5; getpos; resetLogfile;"
alias gotoPosition1 "exec position1.log"
alias gotoPosition2 "exec position2.log"
alias gotoPosition3 "exec position3.log"
alias gotoPosition4 "exec position4.log"
alias gotoPosition5 "exec position5.log"



Exile

  • Administrator
  • Advanced
  • *****
    • Posts: 664
    • Frags: +5/-0
  • fhhh
    • View Profile

ReMaXeD

  • Intermediate
  • ***
    • Posts: 175
    • Frags: +0/-0
  • Serious poster
    • View Profile
The script is nice but slightly flawed.

Thing is, when you save position to one of the binds too many times. The script starts freezing your game every time you teleport making you have to rejoin/remake the server.

To fix this, you need to delete the five position.cfg files the script makes in your cfg folder periodically.


duppy

  • Newbie
  • *
    • Posts: 18
    • Frags: +0/-0
    • View Profile
If one save/teleport is all you need, Jamien made an offline version.  I was hoping he'd post it, but he never did, and it didn't survive the forum backup it seems.

ja_tele.cfg (main script; make sure to change the key binds in here)
Code: [Select]
// http://forums.tf2jump.com/index.php/topic,722.0/topicseen.html
// I still have nightmares about that cat.
sv_cheats 1

//Customize key bindings here
bind kp_5 "savepoint"
bind p "teleport"

alias savepoint "exec ja_save"
alias teleport "ent_fire tele enable;wait 5;ent_fire tele disable"

ent_fire info_target addoutput "classname info_target_temp"
ent_fire trigger_teleport addoutput "classname tele_temp"
ent_fire !self addoutput "targetname player_me"

wait 10;give info_target
wait 10;give trigger_teleport

wait 15;ent_fire trigger_teleport addoutput "targetname tele"
wait 15;ent_fire info_target addoutput "classname anchor"
wait 20;ent_fire anchor addoutput "targetname anchor"

wait 20;ent_fire trigger_teleport disable
wait 20;ent_fire trigger_teleport addoutput "mins -100 -100 -100"
wait 20;ent_fire trigger_teleport addoutput "maxs 100 100 100"
wait 25;ent_fire trigger_teleport addoutput "solid 2"
wait 25;ent_fire trigger_teleport addoutput "spawnflags 1"
wait 25;ent_fire trigger_teleport addoutput "target teletarget"

wait 30;ent_fire anchor setparent player_me
wait 33;ent_fire trigger_teleport setparent anchor

ja_save.cfg (no need to modify this. this is exec'd automatically by ja_tele.cfg)
Code: [Select]
ent_fire teletarget kill
wait 10;give info_target
wait 15;ent_fire info_target addoutput "targetname teletarget"
wait 20;ent_orient teletarget

To start the script, you only need to do "exec ja_tele" in the developer console.
« Last Edit: March 25, 2014, 01:06:06 PM by duppy »