-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
443 lines (421 loc) · 24.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
<!DOCTYPE html>
<html lang="en">
<head>
<title>CSGOFloat</title>
<meta name="description" content="Free & Open Source Tool/API to get the Float Value and Paint Index of any CS:GO skin!">
<meta name="keywords" content="csgo, float, api, market float, counter-strike: global offensive, cs:go, csgo market, csgo inventory, steam, tradeup, extension, contract">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script async="" src="//www.google-analytics.com/analytics.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js" defer></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.2.0/socket.io.min.js" defer></script>
<script src="public/floatparse.js" defer></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" async defer>
<link rel="stylesheet" type="text/css" href="public/main.css" defer>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-69413620-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<div>
<nav class="navbar navbar-default navbar-static-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="spacing"><a style="outline: none" data-toggle="modal" href="#help"><span class="glyphicon glyphicon-info-sign spacing-icon" aria-hidden="true"></span>Help</a></li>
<li class="spacing"><a style="outline: none" data-toggle="modal" href="#api"><span class="glyphicon glyphicon-wrench spacing-icon" aria-hidden="true"></span>API</a></li>
<li class="spacing"><a href="https://github.com/Step7750/CSGOFloat"><span class="glyphicon glyphicon-globe spacing-icon" aria-hidden="true"></span>Github</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><span class="glyphicon glyphicon-cloud-download spacing-icon" aria-hidden="true"></span>Extension<span class="caret"></span></a>
<ul class="dropdown-menu" style="font-size: 20px;">
<li><a href="https://chrome.google.com/webstore/detail/csgofloat-market-checker/jjicbefpemnphinccgikpdaagjebbnhg?hl=en">Chrome Extension</a></li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/csgofloat/">Firefox Add-on</a></li>
</ul>
</li>
<li class="spacing"><a href="https://db.csgofloat.com"><span class="glyphicon glyphicon-book spacing-icon" aria-hidden="true"></span>Database</a></li>
<li class="spacing"><a style="outline: none" data-toggle="modal" href="#email"><span class="glyphicon glyphicon-envelope spacing-icon" aria-hidden="true"></span>Contact Us</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
</div>
<div class="modal fade" id="help" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<center><h4 class="modal-title">How To Use CSGO Float</h4></center>
</div>
<div class="modal-body">
<p>
CSGOFloat can provide the wear value (float value) and paint index of any gun if you have the inspect link. The float value of a gun defines the texture wear, there are different ranges for different wear values:
</p>
<center>
<div class="list-group">
<a href="#" class="list-group-item active">
Float Wear Ranges
</a>
<a href="#" class="list-group-item">0.00 - 0.07 | Factory New</a>
<a href="#" class="list-group-item">0.07 - 0.15 | Minimal Wear</a>
<a href="#" class="list-group-item">0.15 - 0.38 | Field-Tested</a>
<a href="#" class="list-group-item">0.38 - 0.45 | Well-Worn</a>
<a href="#" class="list-group-item">0.45 - 1.00 | Battle-Scarred</a>
</div>
</center>
<p>
<b>NOTE</b>: Some skins have a max and min float value. For example, the AK-47 Redline has a minimum float of 0.10 and maximum float of 0.70. Don't worry, this info will also be sent to you when the lookup is processed.
</p>
<h2>How to Use</h2>
<p>
<br>
<b>Step 1</b>: Find the inspect link of the desired gun off of Steam Community Market (or any inspect link)
</p>
<img src="public/inspect_demo_1.png" style="width: 100%" alt="How to get the Inspect Link">
<p>
<br>
<b>Step 2</b>: Paste the inspect link into the site's main search bar and click "Lookup"
</p>
<img src="public/inspect_demo_2.png" style="width: 100%" alt="How to get the Inspect Link">
<p>
<br>
<b>Step 3</b>: You will get put into a queue, and once your request gets processed, the item data will be displayed. The red "line" on the green progress bar shows the wear in comparison to the possible wear range of that skin. The more left it is (towards the minimum), the better the texture wear on the skin is.
</p>
<img src="public/inspect_demo_3.png" style="width: 100%" alt="How to get the Inspect Link">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="api" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<center><h4 class="modal-title">CSGOFloat Market API</h4></center>
</div>
<div class="modal-body">
<p>
<b>NOTE:</b> You can only have one pending request per IP at a time!
</p>
<p>
CSGOFloat now has a free unlimited API for fetching item data. If you'd like to implement your own custom API, check out the Github repo!
</p>
<h2>How to Use</h2>
<p></p>
<center>URL Endpoint: <code>https://api.csgofloat.com</code></center>
<br>
<code>GET /</code>
<br>
<center>
<table class="table" style="margin-top: 10px;">
<tbody>
<tr>
<th>Parameter</th>
<th>Description</th>
</tr>
<tr>
<td>s</td>
<td>Optional: If an inventory item, fill out this parameter from the inspect URL</td>
</tr>
<tr>
<td>a</td>
<td>Required: Inspect URL "a" param</td>
</tr>
<tr>
<td>d</td>
<td>Required: Inspect URL "d" param</td>
</tr>
<tr>
<td>m</td>
<td>Optional: If a market item, fill out this parameter from the inspect URL</td>
</tr>
</tbody>
</table>
</center>
Examples:
<p>
</p><pre>https://api.csgofloat.com/?m=563330426657599553&a=6710760926&d=9406593057029549017</pre>
or (market item)
<pre>https://api.csgofloat.com/?s=76561198084749846&a=6777992090&d=3378412659870065794</pre>
<p></p>
<br>
or you can send the inspect URL and we'll parse it
<center>
<table class="table" style="margin-top: 10px;">
<tbody>
<tr>
<th>Parameter</th>
<th>Description</th>
</tr>
<tr>
<td>url</td>
<td>Required: Inspect URL of the CSGO item</td>
</tr>
</tbody>
</table>
</center>
Examples:
<p>
</p><pre>https://api.csgofloat.com/?url=steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S76561198084749846A698323590D7935523998312483177</pre>
or (market item)
<pre>https://api.csgofloat.com/?url=steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20M625254122282020305A6760346663D30614827701953021</pre>
<p></p>
<p></p>
<br>
<h2>Reply</h2>
<p>
The reply of this API is based upon <a href="https://github.com/SteamRE/SteamKit/blob/master/Resources/Protobufs/csgo/cstrike15_gcmessages.proto#L674">this CSGO protobuf</a>. I recommend looking at the Github in order to understand how some of these parameters work.
</p><center>
<table class="table" style="margin-top: 10px;">
<tbody>
<tr>
<th>Attribute</th>
<th>Data Type</th>
<th>Description</th>
</tr>
<tr>
<td>itemid</td>
<td>uint32</td>
<td>Item ID</td>
</tr>
<tr>
<td>defindex</td>
<td>uint32</td>
<td>Weapon ID</td>
</tr>
<tr>
<td>paintindex</td>
<td>uint32</td>
<td>Paint ID of the weapon (skin)</td>
</tr>
<tr>
<td>rarity</td>
<td>uint32</td>
<td>Rarity value of the weapon</td>
</tr>
<tr>
<td>quality</td>
<td>uint32</td>
<td>Quality of the weapon</td>
</tr>
<tr>
<td>paintwear</td>
<td>uint32</td>
<td>Wear of the exterior of the skin</td>
</tr>
<tr>
<td>paintseed</td>
<td>uint32</td>
<td>Seed for the RNG that defines how to place the skin texture</td>
</tr>
<tr>
<td>killeatervalue</td>
<td>uint32</td>
<td>If the item is StatTrak, this is the amount of kills</td>
</tr>
<tr>
<td>customname</td>
<td>string</td>
<td>If the item has a nametag, this is the custom name</td>
</tr>
<tr>
<td>stickers</td>
<td>array</td>
<td>Contains data on the placement of stickers</td>
</tr>
<tr>
<td>origin</td>
<td>uint32</td>
<td>Origin ID of the weapon</td>
</tr>
<tr>
<td>floatvalue</td>
<td>float</td>
<td>Exterior wear of the skin in its float representation</td>
</tr>
<tr>
<td>imageurl</td>
<td>string</td>
<td>Optional: Image of the item</td>
</tr>
<tr>
<td>min</td>
<td>float</td>
<td>Minimum wear of the skin</td>
</tr>
<tr>
<td>max</td>
<td>float</td>
<td>Maximum wear of the skin</td>
</tr>
<tr>
<td>itemid_int</td>
<td>uint32</td>
<td>ID of the item</td>
</tr>
<tr>
<td>item_name</td>
<td>uint32</td>
<td>Optional: Name of the skin</td>
</tr>
<tr>
<td>weapon_type</td>
<td>string</td>
<td>Weapon type name</td>
</tr>
</tbody>
</table>
</center>
<p></p>
<pre align="left">
{
"iteminfo": {
"accountid": null,
"itemid": {
"low": -1811942502,
"high": 1,
"unsigned": true
},
"defindex": 32,
"paintindex": 389,
"rarity": 6,
"quality": 4,
"paintwear": 1039973876,
"paintseed": 933,
"killeaterscoretype": null,
"killeatervalue": null,
"customname": null,
"stickers": [],
"inventory": 3221225475,
"origin": 4,
"questid": null,
"dropreason": null,
"floatvalue": 0.12340918183326721,
"imageurl": "http://media.steampowered.com/apps/730/icons/econ/default_generated/weapon_hkp2000_cu_p2000_fire_elemental_light_large.1e57d4d9f1c51e613c1923377aa55fab4b0ab1bc.png",
"min": "0.000000",
"max": "0.600000",
"itemid_int": 2483024794,
"item_name": "Fire Elemental",
"s": "76561198084749846",
"a": "6777992090",
"d": "3378412659870065794",
"m": "0",
"market": false,
"weapon_type": "P2000"
}
}
</pre>
<h2>Errors</h2>
<p>The API might be unstable at times, so it is important that you handle the errors correctly.</p>
<h3>Error Codes</h3>
<table class="table" style="margin-top: 10px; text-align: left;">
<tbody>
<tr>
<th>Code</th>
<th>Description</th>
</tr>
<tr>
<td>1</td>
<td>Improper Parameter Structure</td>
</tr>
<tr>
<td>2</td>
<td>Invalid Inspect Link Structure</td>
</tr>
<tr>
<td>3</td>
<td>You may only have one pending request at a time</td>
</tr>
<tr>
<td>4</td>
<td>Valve's servers didn't reply in time</td>
</tr>
<tr>
<td>5</td>
<td>Valve's servers appear to be offline, please try again later!</td>
</tr>
</tbody>
</table>
Example Error
<pre align="left">
{
"error": "Valve's servers didn't reply",
"code": 4
}
</pre>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="email" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" style="display: none;">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<center><h4 class="modal-title">Contact Us</h4></center>
</div>
<div class="modal-body">
<h2>Support through Steam</h2>
<h4>(Please comment on their profile before adding them)</h4>
<h3><small>General Support</small><br><a href="http://steamcommunity.com/profiles/76561198066173602">perplex</a></h3>
<h3><small>Backend/Other Inquiries</small><br><a href="http://steamcommunity.com/id/Step7750/">Step7750</a></h3>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="center_div">
<div class="inner" style="">
<div style="color: white;">Advertisement</div>
<a href="https://cs.money?s=float">
<img id="banner" alt="CS.Money Automated Trading Site" title="CS.Money Automated Trading Site" draggable="false">
</a>
<div class="alert alert-info alert-dismissible" role="alert" style="margin-bottom: 20px;">
<button type="button" class="close" data-dismiss="alert" aria-label="Close" style="right: 0px;"><span aria-hidden="true">×</span></button>
Check out our new <strong><a href="https://db.csgofloat.com">CS:GO Item Database</a></strong> with over 200 million skins!
</div>
<img src="public/logo.png" id="img_center" draggable="false"></img>
<center>
<div style="width: 100%; margin-top: 20px; margin-bottom: 10px;">
<div class="input-group" id="singlelookup">
<input type="text" class="form-control" placeholder="Inspect Link" id="input_url">
<span class="input-group-btn">
<button class="btn btn-default" type="button" onclick="lookup()"><span class="glyphicon glyphicon-search" aria-hidden="true"></span> Lookup</button>
</span>
</div>
</div>
</center>
<noscript>
<center>
Your browser doesn't seem to support JavaScript :( You can click <a href="https://www.enable-javascript.com/">here</a> for how to enable it
</center>
</noscript>
<div id="messages"></div>
</div>
</div>
</body>
</html>