Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts-888
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vee4
ygopro-scripts-888
Commits
eaddd940
Commit
eaddd940
authored
Oct 02, 2021
by
salix5
Committed by
GitHub
Oct 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add GetID() (#1708)
parent
e9452e66
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
utility.lua
utility.lua
+9
-0
No files found.
utility.lua
View file @
eaddd940
...
...
@@ -4,6 +4,15 @@ POS_FACEUP_DEFENCE=POS_FACEUP_DEFENSE
POS_FACEDOWN_DEFENCE
=
POS_FACEDOWN_DEFENSE
RACE_CYBERS
=
RACE_CYBERSE
function
GetID
()
local
str
=
string.match
(
debug.getinfo
(
2
,
"S"
)[
"source"
],
"c%d+%.lua"
)
str
=
string.sub
(
str
,
1
,
string.len
(
str
)
-
4
)
local
scard
=
_G
[
str
]
local
id
=
tonumber
(
string.sub
(
str
,
2
))
local
offset
=
id
<
100000000
and
1
or
100
return
scard
,
id
,
offset
end
--the lua version of the bit32 lib, which is deprecated in lua 5.3
bit
=
{}
function
bit
.
band
(
a
,
b
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment