Teleport Script Creator

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
oldstuff
Expert Cheater
Expert Cheater
Posts: 477
Joined: Thu Apr 06, 2017 6:53 pm
Reputation: 188

Teleport Script Creator

Post by oldstuff »

OPs - Wasn't sure if this should go here or tutorials section. Please move is in wrong forum.

First off I SUCK at Lua! I am just learning so please don't blast me on how bad the code might be. I spent hours researching to come up with this. If there's a better way though please feel free to post in the comments. I would love to learn new ways to do things. But for my limited knowledge this is working pretty well for me and I thought others might get some use out of it

So I've been trying to learn some Lua and need to make this script for my Borderlands 3 table. I need to make hundreds of teleport scripts for all the locations to 100% complete each map. IE: Teleport Location of each ECHO log, all drop pods.. and so on.

I started off copying my script and pasting in each X Y and Z Cord for each script. As you can imagine this takes forever when doing thousands of teleport locations. So I spent some time reading up on Lua and created a script that will will write the teleport script for you and populate your X Y and Z Coords for you into the script. At this point all you need to do is go to the location you to save. Run the script. Copy all and paste all into a new auto assembly script and your done. Name it whatever you want and you have your teleport to that location done.

Of course you need you X Y Z pointers for this to work.. and change the pointers in the script so it works with your pointers.

Right now the script is setup to Never X the box in CE.. This saves the user from having to X the script twice.. once to use once to uncheck.. but this can be removed if you dont like it .. Just remove this line ---> print "return 'nop'"

I also included a timer option you could use instead.. Just comment out the return nop and remove the comment for the timer. This is set to Uncheck the box after 500ms.. but you can change that to any time you want

There is also a return 'nop' at the end of the script to make sure this creator script never gets Xed.. Reason for this is because I have it setup on a Hotkey so all I have to do it hit a button to populate the script. If you dont like this you can remove that line as well.

Anyways heres the script:

Code: Select all

{$lua}
if syntaxcheck then return end
[ENABLE]
GetLuaEngine().MenuItem5.doClick() -- Clears Lua Engine


print"{$lua}"
print"[ENABLE]"
print""


 -- <-Change All pointers to your X Y and Z Cords -> --
XCoord = "[[[[player1]+168]+118]+4D0]+220" -- Do Not Remove The "
YCoord = "[[[[player1]+168]+118]+4D0]+224" -- Do Not Remove The "
ZCoord = "[[[[player1]+168]+118]+4D0]+228" -- Do Not Remove The "

 X = "writeFloat('"..XCoord.."',"..(readFloat(""..XCoord.."")..") -- X Coord") -- Store Pointer To X
print (X)    -- Print X String

 Y = "writeFloat('"..YCoord.."',"..(readFloat(""..YCoord.."")..") -- Y Coord") -- Store Pointer To Y
print (Y)   -- Print Y String

 Z = "writeFloat('"..ZCoord.."',"..(readFloat(""..ZCoord.."")..") -- Z Coord") -- Store Pointer To Z
print (Z)   -- Print Z String

print ""

--(Optional) Makes Script Activate But Remain Unchecked So you Can Use Again With Hotkey And Not Have To Uncheck First In New Script
--print "return 'nop'"

--Another option to Auto Un X Box.. This would allow you to Un X after a set amount of time. This is set to 500ms - Change to whatever timer you want
print [[if not syntaxcheck then
 synchronize(function()
   local t = createTimer()
   t.Interval,t.OnTimer = 500,function(tm)
     tm.Destroy()
     memrec.Active = false
   end
 end)
end]]
print""
print"[DISABLE]"

-- (Optional) Makes Script Activate But Remain Unchecked So you Can Use Again With Hotkey And Not Have To Uncheck First
return 'nop'

-- (Optional) Could use timer instead
--if not syntaxcheck then
-- synchronize(function()
--   local t = createTimer()
--   t.Interval,t.OnTimer = 500,function(tm)
--     tm.Destroy()
--     memrec.Active = false
--   end
-- end)
--end




[DISABLE]

What output look like with return 'nop':

Code: Select all

{$lua} 
[ENABLE] 
 
writeFloat('[[[[player1]+168]+118]+4D0]+220',-81061.3828125) -- X Cord 
writeFloat('[[[[player1]+168]+118]+4D0]+224',-72719.5078125) -- Y Cord 
writeFloat('[[[[player1]+168]+118]+4D0]+228',2889.3981933594) -- Z Cord 
 
return 'nop' 
[DISABLE] 
And output with timer:

Code: Select all

{$lua} 
[ENABLE] 
 
writeFloat('[[[[player1]+168]+118]+4D0]+220',-81061.3828125) -- X Cord 
writeFloat('[[[[player1]+168]+118]+4D0]+224',-72719.5078125) -- Y Cord 
writeFloat('[[[[player1]+168]+118]+4D0]+228',2889.3981933594) -- Z Cord 
 
if not syntaxcheck then
 synchronize(function()
   local t = createTimer()
   t.Interval,t.OnTimer = 500,function(tm)
     tm.Destroy()
     memrec.Active = false
   end
 end)
end 
[DISABLE] 
Simply copy and paste to a new auto assembly window and save you new teleport script
This works great if you have a ton of teleport scripts to make

UPDATE: Teleport Script V2

Special thanks to ShyTwig16 for all his help creating this new version and all the help he's given me in learning more about Lua

This new script will create a new Teleport to: script to you cheat table every time you click on it.
All you need to do is change you X,Y,Z Pointers in the script and (Optional) Change the location is sends the new save locations to

I tried to document most every line in the script for those that are trying to learn Lua and want to know how the script works.
If I got something wrong in the documentation I apologies as I am still learning all this myself.

I am also leaving the old script here incase someone would rather have the Lua Engine print version instead.

Here is the code to the new script and can also be downloaded below:

Code: Select all

{$lua}
if syntaxcheck then return end
[ENABLE]
local script = {}                -- Creates container (script) so we have a container to store script in using table.insert(script,)

table.insert(script, "{$lua}")   -- Sending {$lua} To New script
table.insert(script, "[ENABLE]") -- Sending DISABLE To New script
table.insert(script, "")         -- Sending Space To New Script

 -- <-Change All 3 Pointers Match Your X Y and Z Pointers -> --
XCoord = "[[[[player1]+168]+118]+4D0]+220" -- Do Not Remove The "
YCoord = "[[[[player1]+168]+118]+4D0]+224" -- Do Not Remove The "
ZCoord = "[[[[player1]+168]+118]+4D0]+228" -- Do Not Remove The "

 X = "writeFloat('"..XCoord.."',"..(readFloat(""..XCoord.."")..") -- X Coord") -- Store Pointer To X
table.insert(script, X)           -- Send Value Of What's Inside X To New Script Because We Don't Have "" Around X To Define It As A String

 Y = "writeFloat('"..YCoord.."',"..(readFloat(""..YCoord.."")..") -- Y Coord") -- Store Pointer To Y
table.insert(script, Y)           -- Send Value Of What's Inside Y To New Script Because We Don't Have "" Around Y To Define It As A String

 Z = "writeFloat('"..ZCoord.."',"..(readFloat(""..ZCoord.."")..") -- Z Coord") -- Store Pointer To Z
table.insert(script, Z)           -- Send Value Of What's Inside Z To New Script Because We Don't Have "" Around Z To Define It As A String

table.insert(script, "")          -- Sending Space To New Script



-- This will disable the script after 500ms so you dont have to keep unchecking it (adds this timer to saved script)
-- Sends timer To New Script Everything Between [[ ]]
table.insert(script, [[if not syntaxcheck then
 synchronize(function()
   local t = createTimer()
   t.Interval,t.OnTimer = 500,function(tm)
     tm.Destroy()
     memrec.Active = false
   end
 end)
end]])

table.insert(script, "")          -- Sending Space To New Script
table.insert(script, "[DISABLE]") -- Sending DISABLE To New script

MRLoc = AddressList.getMemoryRecordByDescription('Teleport Location Saver') -- Where You Want Saves To Go and put into MRLoc

local mr = AddressList.createMemoryRecord() -- Creates Memory Record (New Entry In CE) and stored it into mr
mr.Type = vtAutoAssembler                   -- Makes mr (New Entry) An Auto Assembler Script
mr.appendToEntry(MRLoc)                     -- adds MRloc (Locations Script Will GO) to mr (New Script)
mr.Description = 'Teleport to: '            -- Name of mr (New Script)
mr.Script = table.concat(script, '\n')      -- Sends Everything with Table.insert (script,) to mr (New Script)

-- This will disable the script after 500ms so you dont have to keep unchecking it (Timer For This Script)
if not syntaxcheck then
 synchronize(function()
   local t = createTimer()
   t.Interval,t.OnTimer = 500,function(tm)
     tm.Destroy()
     memrec.Active = false        -- This Is The Part Of The Timer That Unchecks The Script
   end
 end)
end


[DISABLE] 
I added a download below with this script already in a Cheat Table for you. Just edit it to work for your table
Attachments
Teleport_Creator _Create-Save-Script-Version.CT
Creates A New Teleport Script In Cheat Table Version
(3.25 KiB) Downloaded 357 times
Teleport Creator.CT
Print To Lua Engine Version
(2.3 KiB) Downloaded 303 times
Last edited by oldstuff on Fri Jan 07, 2022 2:20 pm, edited 5 times in total.

oldstuff
Expert Cheater
Expert Cheater
Posts: 477
Joined: Thu Apr 06, 2017 6:53 pm
Reputation: 188

Re: Automated Teleport Script Creator

Post by oldstuff »

Wow.. you just put my tiny little script to shame lol. Haha thanks bud. This will be fun to mess with.

ShyTwig16
Expert Cheater
Expert Cheater
Posts: 335
Joined: Thu Apr 06, 2017 7:14 pm
Reputation: 20

Re: Automated Teleport Script Creator

Post by ShyTwig16 »

Yellowsub wrote:
Thu Jan 06, 2022 4:57 pm
Wow.. you just put my tiny little script to shame lol. Haha thanks bud. This will be fun to mess with.
No shame in learning, you should see some of my first tables and scripts. I took years to get to the point of writing something like this, and I'm sure there are others with more experience that could point out flaws in the modules/code.

oldstuff
Expert Cheater
Expert Cheater
Posts: 477
Joined: Thu Apr 06, 2017 6:53 pm
Reputation: 188

Re: Automated Teleport Script Creator

Post by oldstuff »

ShyTwig16 wrote:
Thu Jan 06, 2022 6:53 pm
Yellowsub wrote:
Thu Jan 06, 2022 4:57 pm
Wow.. you just put my tiny little script to shame lol. Haha thanks bud. This will be fun to mess with.
No shame in learning, you should see some of my first tables and scripts. I took years to get to the point of writing something like this, and I'm sure there are others with more experience that could point out flaws in the modules/code.
Yea I've been trying to learn as you see above. A week ago that was over my head lol. Someday I'll get there 😁. As always, appreciate your help and input

oldstuff
Expert Cheater
Expert Cheater
Posts: 477
Joined: Thu Apr 06, 2017 6:53 pm
Reputation: 188

Re: Automated Teleport Script Creator

Post by oldstuff »

ShyTwig16 wrote:
Thu Jan 06, 2022 6:53 pm
Yellowsub wrote:
Thu Jan 06, 2022 4:57 pm
Wow.. you just put my tiny little script to shame lol. Haha thanks bud. This will be fun to mess with.
No shame in learning, you should see some of my first tables and scripts. I took years to get to the point of writing something like this, and I'm sure there are others with more experience that could point out flaws in the modules/code.
Fixed my original script to make it a bit cleaner and now only need to edit the X Y and Z Pointer.. was able to concatenate the script down after a little trial and error.. Think its a lot nicer this way

ShyTwig16
Expert Cheater
Expert Cheater
Posts: 335
Joined: Thu Apr 06, 2017 7:14 pm
Reputation: 20

Re: Teleport Script Creator

Post by ShyTwig16 »

Yellowsub wrote:
Thu Jan 06, 2022 10:18 pm
...
Fixed my original script to make it a bit cleaner and now only need to edit the X Y and Z Pointer.. was able to concatenate the script down after a little trial and error.. Think its a lot nicer this way
You could even set it up to auto create a script for you then you'd only have to edit the description to a location name.

Code: Select all

{$lua}
if syntaxcheck then return end
[ENABLE]
local script = { }

table.insert(script, "{$lua}")
table.insert(script, "[ENABLE]")
table.insert(script, "")

 -- <-Change All pointers to your X Y and Z Cords -> --
XCoord = "[[[[player1]+168]+118]+4D0]+220" -- Do Not Remove The "
YCoord = "[[[[player1]+168]+118]+4D0]+224" -- Do Not Remove The "
ZCoord = "[[[[player1]+168]+118]+4D0]+228" -- Do Not Remove The "

 X = "writeFloat('"..XCoord.."',"..(readFloat(""..XCoord.."")..") -- X Coord") -- Store Pointer To X
table.insert(script, X)    -- Print X String

 Y = "writeFloat('"..YCoord.."',"..(readFloat(""..YCoord.."")..") -- Y Coord") -- Store Pointer To Y
table.insert(script, Y)   -- Print Y String

 Z = "writeFloat('"..ZCoord.."',"..(readFloat(""..ZCoord.."")..") -- Z Coord") -- Store Pointer To Z
table.insert(script, Z)   -- Print Z String

table.insert(script, "")

--(Optional) Makes Script Activate But Remain Unchecked So you Can Use Again With Hotkey And Not Have To Uncheck First In New Script
--table.insert(script, "return 'nop'")

--Another option to Auto Un X Box.. This would allow you to Un X after a set amount of time. This is set to 500ms - Change to whatever timer you want
table.insert(script, [[if not syntaxcheck then
 synchronize(function()
   local t = createTimer()
   t.Interval,t.OnTimer = 500,function(tm)
     tm.Destroy()
     memrec.Active = false
   end
 end)
end]])

table.insert(script, "")
table.insert(script, "[DISABLE]")

local mr = AddressList.createMemoryRecord()
mr.Description = 'Teleport to: '
mr.Type = vtAutoAssembler
mr.Script = table.concat(script, '\n')

-- (Optional) Makes Script Activate But Remain Unchecked So you Can Use Again With Hotkey And Not Have To Uncheck First
return 'nop'

-- (Optional) Could use timer instead
--if not syntaxcheck then
-- synchronize(function()
--   local t = createTimer()
--   t.Interval,t.OnTimer = 500,function(tm)
--     tm.Destroy()
--     memrec.Active = false
--   end
-- end)
--end


[DISABLE]

oldstuff
Expert Cheater
Expert Cheater
Posts: 477
Joined: Thu Apr 06, 2017 6:53 pm
Reputation: 188

Re: Teleport Script Creator

Post by oldstuff »

ShyTwig16 wrote:
Thu Jan 06, 2022 11:44 pm
Yellowsub wrote:
Thu Jan 06, 2022 10:18 pm
...
Fixed my original script to make it a bit cleaner and now only need to edit the X Y and Z Pointer.. was able to concatenate the script down after a little trial and error.. Think its a lot nicer this way
You could even set it up to auto create a script for you then you'd only have to edit the description to a location name.

Code: Select all

{$lua}
if syntaxcheck then return end
[ENABLE]
local script = { }

table.insert(script, "{$lua}")
table.insert(script, "[ENABLE]")
table.insert(script, "")

 -- <-Change All pointers to your X Y and Z Cords -> --
XCoord = "[[[[player1]+168]+118]+4D0]+220" -- Do Not Remove The "
YCoord = "[[[[player1]+168]+118]+4D0]+224" -- Do Not Remove The "
ZCoord = "[[[[player1]+168]+118]+4D0]+228" -- Do Not Remove The "

 X = "writeFloat('"..XCoord.."',"..(readFloat(""..XCoord.."")..") -- X Coord") -- Store Pointer To X
table.insert(script, X)    -- Print X String

 Y = "writeFloat('"..YCoord.."',"..(readFloat(""..YCoord.."")..") -- Y Coord") -- Store Pointer To Y
table.insert(script, Y)   -- Print Y String

 Z = "writeFloat('"..ZCoord.."',"..(readFloat(""..ZCoord.."")..") -- Z Coord") -- Store Pointer To Z
table.insert(script, Z)   -- Print Z String

table.insert(script, "")

--(Optional) Makes Script Activate But Remain Unchecked So you Can Use Again With Hotkey And Not Have To Uncheck First In New Script
--table.insert(script, "return 'nop'")

--Another option to Auto Un X Box.. This would allow you to Un X after a set amount of time. This is set to 500ms - Change to whatever timer you want
table.insert(script, [[if not syntaxcheck then
 synchronize(function()
   local t = createTimer()
   t.Interval,t.OnTimer = 500,function(tm)
     tm.Destroy()
     memrec.Active = false
   end
 end)
end]])

table.insert(script, "")
table.insert(script, "[DISABLE]")

local mr = AddressList.createMemoryRecord()
mr.Description = 'Teleport to: '
mr.Type = vtAutoAssembler
mr.Script = table.concat(script, '\n')

-- (Optional) Makes Script Activate But Remain Unchecked So you Can Use Again With Hotkey And Not Have To Uncheck First
return 'nop'

-- (Optional) Could use timer instead
--if not syntaxcheck then
-- synchronize(function()
--   local t = createTimer()
--   t.Interval,t.OnTimer = 500,function(tm)
--     tm.Destroy()
--     memrec.Active = false
--   end
-- end)
--end


[DISABLE]
You read my mind man.. Thats Exactly what i was working on lol.. I was trying to figure out the memory record and how to get it to send all the information i needed to the new table without popping an error.. I got this far and was getting stumped lol.. I just couldnt figure out how to get it to write the entire script to a new record lol.. Thank you.. Saved me a ton of time. Gonna go try it now

Code: Select all

MR=SaveTeleport.createMemoryRecord();
MR.Description= 'TeleportSave'
  MR.Type=vtAutoAssembler
  MR.Script = X

oldstuff
Expert Cheater
Expert Cheater
Posts: 477
Joined: Thu Apr 06, 2017 6:53 pm
Reputation: 188

Re: Teleport Script Creator

Post by oldstuff »

Yellowsub wrote:
Fri Jan 07, 2022 12:13 am
ShyTwig16 wrote:
Thu Jan 06, 2022 11:44 pm
Yellowsub wrote:
Thu Jan 06, 2022 10:18 pm
...
Fixed my original script to make it a bit cleaner and now only need to edit the X Y and Z Pointer.. was able to concatenate the script down after a little trial and error.. Think its a lot nicer this way
You could even set it up to auto create a script for you then you'd only have to edit the description to a location name.

Code: Select all

{$lua}
if syntaxcheck then return end
[ENABLE]
local script = { }

table.insert(script, "{$lua}")
table.insert(script, "[ENABLE]")
table.insert(script, "")

 -- <-Change All pointers to your X Y and Z Cords -> --
XCoord = "[[[[player1]+168]+118]+4D0]+220" -- Do Not Remove The "
YCoord = "[[[[player1]+168]+118]+4D0]+224" -- Do Not Remove The "
ZCoord = "[[[[player1]+168]+118]+4D0]+228" -- Do Not Remove The "

 X = "writeFloat('"..XCoord.."',"..(readFloat(""..XCoord.."")..") -- X Coord") -- Store Pointer To X
table.insert(script, X)    -- Print X String

 Y = "writeFloat('"..YCoord.."',"..(readFloat(""..YCoord.."")..") -- Y Coord") -- Store Pointer To Y
table.insert(script, Y)   -- Print Y String

 Z = "writeFloat('"..ZCoord.."',"..(readFloat(""..ZCoord.."")..") -- Z Coord") -- Store Pointer To Z
table.insert(script, Z)   -- Print Z String

table.insert(script, "")

--(Optional) Makes Script Activate But Remain Unchecked So you Can Use Again With Hotkey And Not Have To Uncheck First In New Script
--table.insert(script, "return 'nop'")

--Another option to Auto Un X Box.. This would allow you to Un X after a set amount of time. This is set to 500ms - Change to whatever timer you want
table.insert(script, [[if not syntaxcheck then
 synchronize(function()
   local t = createTimer()
   t.Interval,t.OnTimer = 500,function(tm)
     tm.Destroy()
     memrec.Active = false
   end
 end)
end]])

table.insert(script, "")
table.insert(script, "[DISABLE]")

local mr = AddressList.createMemoryRecord()
mr.Description = 'Teleport to: '
mr.Type = vtAutoAssembler
mr.Script = table.concat(script, '\n')

-- (Optional) Makes Script Activate But Remain Unchecked So you Can Use Again With Hotkey And Not Have To Uncheck First
return 'nop'

-- (Optional) Could use timer instead
--if not syntaxcheck then
-- synchronize(function()
--   local t = createTimer()
--   t.Interval,t.OnTimer = 500,function(tm)
--     tm.Destroy()
--     memrec.Active = false
--   end
-- end)
--end


[DISABLE]
You read my mind man.. Thats Exactly what i was working on lol.. I was trying to figure out the memory record and how to get it to send all the information i needed to the new table without popping an error.. I got this far and was getting stumped lol.. I just couldnt figure out how to get it to write the entire script to a new record lol.. Thank you.. Saved me a ton of time. Gonna go try it now

Code: Select all

MR=SaveTeleport.createMemoryRecord();
MR.Description= 'TeleportSave'
  MR.Type=vtAutoAssembler
  MR.Script = X
Ohh I see how it works.. You use table.insert(script, "") To suck up everything you want then send table.concat(script, '\n') to MR

Bro.. your mind is a dictionary!

oldstuff
Expert Cheater
Expert Cheater
Posts: 477
Joined: Thu Apr 06, 2017 6:53 pm
Reputation: 188

Re: Teleport Script Creator

Post by oldstuff »

I had to remove the nop at the end to get it to stop throwing an error.. but its cool, I wanted to use the timer anyways..
Man I cant thank you enough.. Seriously, ive learned more Lua from you than i have from all the searching and tutorials ive done.. I cant thank you enough.. This is exactly what i was trying to do!

ShyTwig16
Expert Cheater
Expert Cheater
Posts: 335
Joined: Thu Apr 06, 2017 7:14 pm
Reputation: 20

Re: Teleport Script Creator

Post by ShyTwig16 »

Yellowsub wrote:
Fri Jan 07, 2022 12:16 am
...

Ohh I see how it works.. You use table.insert(script, "") To suck up everything you want then send table.concat(script, '\n') to MR

Bro.. your mind is a dictionary!
It's not really needed here. But the main reason I use the "table.concat" is that in a heavy loop string concatenation can be slow, basically lua creates a new string every time a string is concatenated. Where as using "table.concat" only does it once and it's actually designed to speed up concatenation. Again not a big deal for small things but I have started to make a habit of using it.
Yellowsub wrote:
Fri Jan 07, 2022 12:21 am
I had to remove the nop at the end to get it to stop throwing an error.. but its cool, I wanted to use the timer anyways..
...
For sharing the code it makes sense to add the timer like you do. But in your table you might even make a function in the table lua script, or in a parent MR. Then just call that function passing the "memrec" object in the teleporter scripts, should help cut down the table's final table size a little; plus if you change how you do that later it will only require to change the function.
Yellowsub wrote:
Fri Jan 07, 2022 12:21 am
...
Man I cant thank you enough.. Seriously, ive learned more Lua from you than i have from all the searching and tutorials ive done.. I cant thank you enough.. This is exactly what i was trying to do!
Not a problem, some times it's just refreshing to help someone willing to put in some effort to just try things out and experiment.

And that I2CETLua module has a lot more than a teleporter, I was just afraid of breaking something if I separated things without testing it. Feel free to poke around and see what you can figure out, my favorite is the "ctState" one, it saves and loads table state; i.e. which MRs are activated and even values for MRs starting with "auto set". Makes testing a lot easier, and if you have a crash when working on something it makes reenabling scripts a lot faster.
Image
EDIT: Just to clarify it saves the state of scripts no matter what the description is, "auto set" is only needed for value MRs.

oldstuff
Expert Cheater
Expert Cheater
Posts: 477
Joined: Thu Apr 06, 2017 6:53 pm
Reputation: 188

Re: Teleport Script Creator

Post by oldstuff »

ShyTwig16 wrote:
Fri Jan 07, 2022 1:28 am
Yellowsub wrote:
Fri Jan 07, 2022 12:16 am
...

Ohh I see how it works.. You use table.insert(script, "") To suck up everything you want then send table.concat(script, '\n') to MR

Bro.. your mind is a dictionary!
It's not really needed here. But the main reason I use the "table.concat" is that in a heavy loop string concatenation can be slow, basically lua creates a new string every time a string is concatenated. Where as using "table.concat" only does it once and it's actually designed to speed up concatenation. Again not a big deal for small things but I have started to make a habit of using it.
Yellowsub wrote:
Fri Jan 07, 2022 12:21 am
I had to remove the nop at the end to get it to stop throwing an error.. but its cool, I wanted to use the timer anyways..
...
For sharing the code it makes sense to add the timer like you do. But in your table you might even make a function in the table lua script, or in a parent MR. Then just call that function passing the "memrec" object in the teleporter scripts, should help cut down the table's final table size a little; plus if you change how you do that later it will only require to change the function.
Yellowsub wrote:
Fri Jan 07, 2022 12:21 am
...
Man I cant thank you enough.. Seriously, ive learned more Lua from you than i have from all the searching and tutorials ive done.. I cant thank you enough.. This is exactly what i was trying to do!
Not a problem, some times it's just refreshing to help someone willing to put in some effort to just try things out and experiment.

And that I2CETLua module has a lot more than a teleporter, I was just afraid of breaking something if I separated things without testing it. Feel free to poke around and see what you can figure out, my favorite is the "ctState" one, it saves and loads table state; i.e. which MRs are activated and even values for MRs starting with "auto set". Makes testing a lot easier, and if you have a crash when working on something it makes reenabling scripts a lot faster.
Image
Holly crap thats awesome.. I have yet to mess with it as i have to try and get this table finished up first.. Step 1 was to get the teleport script working the way i needed it to so i can save a bunch of work.

I did take a look at the script some.. but it was so far over my head i figured i should mess with it later when i have more time to play around.
I will defiantly be playing with it once i get this table finished up.

Thanks again for everything sir. You really have saved me a ton of time and ive learned so much :)

ShyTwig16
Expert Cheater
Expert Cheater
Posts: 335
Joined: Thu Apr 06, 2017 7:14 pm
Reputation: 20

Re: Teleport Script Creator

Post by ShyTwig16 »

Yellowsub wrote:
Fri Jan 07, 2022 1:43 am
...

Holly crap thats awesome.. I have yet to mess with it as i have to try and get this table finished up first.. Step 1 was to get the teleport script working the way i needed it to so i can save a bunch of work.

I did take a look at the script some.. but it was so far over my head i figured i should mess with it later when i have more time to play around.
I will defiantly be playing with it once i get this table finished up.

Thanks again for everything sir. You really have saved me a ton of time and ive learned so much :)
Just to clarify it saves the state of scripts no matter what the description is, "auto set" is only needed for value MRs.

Totally understand, you have a hell of a table and looks like many are already waiting for the final release. As you can see I even used your findings for the rarity values in my own table.

And one of these days I'll post the lua module as a CT tool set with more info but still writing the documentation and wanted to do more testing with actual games before a full release. Just thought it might help with learning and maybe some inspiration.

oldstuff
Expert Cheater
Expert Cheater
Posts: 477
Joined: Thu Apr 06, 2017 6:53 pm
Reputation: 188

Re: Teleport Script Creator

Post by oldstuff »

ShyTwig16 wrote:
Fri Jan 07, 2022 1:52 am
Yellowsub wrote:
Fri Jan 07, 2022 1:43 am
...

Holly crap thats awesome.. I have yet to mess with it as i have to try and get this table finished up first.. Step 1 was to get the teleport script working the way i needed it to so i can save a bunch of work.

I did take a look at the script some.. but it was so far over my head i figured i should mess with it later when i have more time to play around.
I will defiantly be playing with it once i get this table finished up.

Thanks again for everything sir. You really have saved me a ton of time and ive learned so much :)
Just to clarify it saves the state of scripts no matter what the description is, "auto set" is only needed for value MRs.

Totally understand, you have a hell of a table and looks like many are already waiting for the final release. As you can see I even used your findings for the rarity values in my own table.

And one of these days I'll post the lua module as a CT tool set with more info but still writing the documentation and wanted to do more testing with actual games before a full release. Just thought it might help with learning and maybe some inspiration.
Your more than welcome to take anything from any of my tables and add them to yours.

And I agree. Im looking forward to going through it all and seeing what i can learn and ideas I get 😁

Post Reply

Who is online

Users browsing this forum: No registered users