Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
1 2 3 4 5 … 18 Next »
Release Genesis Warp Chip
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Release Genesis Warp Chip
17-08-2022, 05:23 PM,
#1
Avorius Offline
Valued donator and member
****
Posts: 128
Threads: 47
Joined: Dec 2015
Genesis Warp Chip
Hello all,

I recently updated my old warp chip to and thought I should share it here, as I did with the last variation. Its pretty easy to use, 
and free for anyone to modify (but not release/give out claiming it's your own)


Current commands:
Code:
/warp to <location> /warp rotate <angle> /warp back/return /warp here/me

The code for the Starfall will be below, and a text file attached so everyone has an option of how they want to download it. Its also on my Starfall Shared under 'Shared > George > Public > GenesisWarpChip.txt'


Code:
--@name Genesis Warp Chip --@author George --@class processor --@dependency STEAM_0:0:145101342 libs/mcs.txt --@dependency STEAM_0:0:145101342 genesismainframe/libs/gm-locations.txt sv --@dependency STEAM_0:0:145101342 genesismainframe/libs/gm-wirelinks.txt sv require("libs/mcs.txt") --[[ --TO BE ADDED-- -Precision warping -Drive switching -Any other fancy suggestions ]] ---------------------------------------------------- MCSVars["ChatTag"] = "Genesis Warp Module" MCSVars["TagColour"] = Color(100,255,125) MCSVars["ChatColour"] = Color(255,255,255) MCSVars["ChatPrefix"] = "/" ---------------------------------------------------- drives = { wirelinks["bsg_drive"], wirelinks["sg_hyperdrive"], wirelinks["quantum_slipstream_drive"], wirelinks["ship_drive"], wirelinks["spore_drive"], wirelinks["st_warp_drive"] } aDrive = drives[1] -- drives[1] will always be default locMatch = Vector() locName = "" function locFinder(loc) local isMatch = false for k, v in pairs(WarpVecs) do if string.find(k:lower(), loc:lower()) ~= nil and not isMatch then --Removing capitals during the find isMatch = true locName = k locMatch = v end end if not isMatch then broadcast("Could not find suitable location with key '"..loc.."', please try again") locMatch = Vector() return end end prevLoc = Vector() ogAngle = aDrive[1]:entity():ang() warpReturn = false function warpControl(state,x) if aDrive[1] ~= nil then if state == "warp" then if x ~= Vector(0,0,0) then prevLoc = aDrive[1]:entity():pos() broadcast("Engaging drive. Jumping to: ",MCSVars["TagColour"],locName,MCSVars["ChatColour"],".") aDrive[1]["Destination"] = x aDrive[1]["Activate"] = 1 end elseif state == "here" then if not stargate.locationJammed(ents.owner():pos()) then prevLoc = aDrive[1]:entity():pos() broadcast("Engaging drive. Jumping to you.") aDrive[1]["Destination"] = ents.owner():pos() aDrive[1]["Activate"] = 1 end elseif state == "back" then if prevLoc ~= Vector() and not warpReturn then broadcast("Engaging Drive. Returning to previous location.") aDrive[1]["Destination"] = Vector(prevLoc) aDrive[1]["Activate"] = 1 warpReturn = true else broadcast("You don't have a previous location to jump to.") end elseif state == "rotate" then if x ~= nil then broadcast("Engaging Drive. Rotating ship by "..x.."°.") aDrive[1]["Destination"] = aDrive[1]:entity():pos() aDrive[1]["Angle Offset"] = Angle(aDrive[1]:entity():ang().p, tonumber(x), aDrive[1]:entity():ang().r) aDrive[1]["Activate"] = 1 aDrive[1]["Angle Offset"] = Angle() end elseif state == "up" or state == "down" or state == "left" or state == "right" or state == "forward" or state == "backward" then broadcast("Precision movement offline. To be fixed soon.") end else broadcast(Color(255,50,50),"WARNING >> ",MCSVars["ChatColour"], "Ship does not have a valid Warp Drive.") end end createCMD("warp", function(a1,a2) if aDrive[1] ~= nil then if a1 ~= nil then if a1 == "to" then if a2 ~= nil then locFinder(a2) warpControl("warp",locMatch) end elseif a1 == "here" or a1 == "me" then warpControl("here") elseif a1 == "back" or a1 == "return" then warpControl("back") elseif a1 == "rotate" then if a2 ~= nil then warpControl("rotate",a2) end elseif a1 == "up" then if a2 ~= nil then warpControl("up",a2) end elseif a1 == "down" then if a2 ~= nil then warpControl("down",a2) end elseif a1 == "left" then if a2 ~= nil then warpControl("left",a2) end elseif a1 == "right" then if a2 ~= nil then warpControl("right",a2) end elseif a1 == "forward" then if a2 ~= nil then warpControl("forward",a2) end elseif a1 == "backward" then if a2 ~= nil then warpControl("backward",a2) end end end end end,"w")


Attached Files
.txt   genesiswarpchip.txt (Size: 3.84 KB / Downloads: 2)


Find
Reply
18-08-2022, 08:02 PM,
#2
Avorius Offline
Valued donator and member
****
Posts: 128
Threads: 47
Joined: Dec 2015
RE: Genesis Warp Chip
As I forgot to add this in the post, please contact me on discord (Avorius#6114) or in-game if there are any problems with the script.


Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.