Destiny Weapon Inventory

Size
3,794 Kb
Views
26,312

How do I make an destiny weapon inventory?

What is a destiny weapon inventory? How do you make a destiny weapon inventory? This script and codes were developed by Chris Wachtman on 17 October 2022, Monday.

Destiny Weapon Inventory Previews

Destiny Weapon Inventory - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Destiny Weapon Inventory</title> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <div class="page-header"> <h1>Inventory</h1> <div class="alert alert-danger" id="ooh">Oooh... Your browser seems to be retarted. He can't use Web Storage.</div>
</div> <div class="row"> <div class="col-md-12"> <div> <input type="checkbox" data="all" class="all" checked="true">All Weapons <input type="checkbox" data="handCannon">Hand Cannon <input type="checkbox" data="scoutRifle">Scout Rifle <input type="checkbox" data="autoRifle">Auto Rifle <input type="checkbox" data="pulseRifle">Pulse Rifle <input type="checkbox" data="sniperRifle">Sniper Rifle <input type="checkbox" data="fusionRifle">Fusion Rifle <input type="checkbox" data="shotgun">Shotgun <input type="checkbox" data="machineGun">Machine Gun <input type="checkbox" data="rocketLauncher">Rocket Launcher </div> <div> <input type="checkbox" data="all" class="all" checked="true">All <input type="checkbox" data="void">Void <input type="checkbox" data="thermal">Thermal <input type="checkbox" data="arc">Arc <input type="checkbox" data="none">None </div> <div> <input type="checkbox" data="all" class="all" checked="true">All <input type="checkbox" data="exotic">Exotic <input type="checkbox" data="legendary">Legendary <input type="checkbox" data="rare">Rare <input type="checkbox" data="uncommon">Uncommon <input type="checkbox" data="common">Common </div> <div> <input type="checkbox" data="all" class="all" checked="true">All <input type="checkbox" data="warlock">Warlock <input type="checkbox" data="titan">Titan <input type="checkbox" data="hunter">Hunter <input type="checkbox" data="vault">Vault </div> </div> <div class="col-md-12"> New <input type="text" placeholder="Weapon Name"> <select name="new" id="new"> <option value="auto">Auto Rifle</option> <option value="pulse">Pulse Rifle</option> <option value="scout">Scout Rifle</option> <option value="hand">Hand Cannon</option> </select> <select name="new" id="new"> <option value="auto">Element</option> <option value="auto">None</option> <option value="pulse">Void</option> <option value="scout">Thermal</option> <option value="hand">Arc</option> </select> <input type="text" placeholder="Attack"> <select name="new" id="new"> <option value="auto">Rarity</option> <option value="auto">Exotic</option> <option value="pulse">Legendary</option> <option value="scout">Rare</option> <option value="hand">Uncommon</option> <option value="hand">Common</option> </select> <select name="new" id="new"> <option value="auto">Location</option> <option value="pulse">Warlock</option> <option value="scout">Titan</option> <option value="hand">Hunter</option> <option value="hand">Vault</option> </select> </div> <table id="list" class="table table-hover"> </table> <div class="col-md-6"> <h3>save a value</h3> <form action="#" class="form-inline"> <div class="form-group"> <input type="text" name="save" id="text" class="form-control" placeholder="save a value here..."> </div> <button id="set" class="btn btn-primary">save</button> </form> <hr> <h3>read the value</h3> <div class="alert alert-info" id="val"><i>nothing saved...</i></div> <button id="get" class="btn btn-success">get saved value</button> <button id="remove" class="btn btn-danger">clear the value</button> </div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Destiny Weapon Inventory - Script Codes CSS Codes

#yay, #ooh {display: none;}
tr{ display:table-row;
}
.handCannon tr[data-type="Hand Cannon"],
.scoutRifle tr[data-type="Scout Rifle"],
.autoRifle tr[data-type="Auto Rifle"],
.pulseRifle tr[data-type="Pulse Rifle"],
.fusionRifle tr[data-type="Fusion Rifle"],
.sniperRifle tr[data-type="Sniper Rifle"],
.shotgun tr[data-type="Shotgun"],
.rocketLauncher tr[data-type="Rocket Launcher"],
.machineGun tr[data-type="Machine Gun"],
.void tr[data-element="Void"],
.arc tr[data-element="Arc"],
.thermal tr[data-element="Thermal"],
.none tr[data-element="None"],
.warlock tr[data-location="Warlock"],
.titan tr[data-location="Titan"],
.hunter tr[data-location="Hunter"],
.vault tr[data-location="Vault"],
.exotic tr[data-rarity="Exotic"],
.legendary tr[data-rarity="Legendary"],
.rare tr[data-rarity="Rare"],
.uncommon tr[data-rarity="Uncommon"],
.common tr[data-rarity="Common"]
{ display:none;
}
.attack input{ width: 40px;
}

Destiny Weapon Inventory - Script Codes JS Codes

var json={"weapons": []};
/*var options={"options": [ { "name": "type", "type": "enum", "values": ["Auto Rifle", "Pulse Rifle", "Fusion Rifle", "Hand Cannon"] }, { "name": "element", "type": "enum", "values": ["Void", "Solar", "Arc", "None"] }, { "name": "attack", "type": "integer" }, { "name": "rarity", "type": "enum", "values": ["Common", "Uncommon", "Rare", "Legendary", "Exotic"] }, { "name": "location", "type": "enum", "values": ["Vault", "Warlock", "Hunter", "Titan", "Warlock 2", "Hunter 2", "Titan 2", "Warlock 3", "Hunter 3", "Titan 3"] } ]
};*/
/* Detect browser can use web storage */
if (!typeof(Storage) !== 'undefined') { $('#yay').fadeIn('slow');
} else { $('#ooh').fadeIn('slow');
}
/* set it */
$('#set').click(function() { var input = JSON.parse($('#text').val()); console.log(json.weapons); for(i in input.weapons){ json.weapons.push(input.weapons[i]); } localStorage.setItem("test", JSON.stringify(json)); update();
});
/* get it */
$('#get').click(function() { $('#val').text(localStorage.getItem("test")); update();
});
/* remove it */
$('#remove').click(function() { localStorage.removeItem("test"); update();
});
$( 'input[type="checkbox"]' ).change(function() { if($(this).attr("data")=="all"){ $(this).parent().find("input").each( function(){ console.log($(this)); $(this).prop( "checked", $( this ).parent().find(".all").prop( "checked" ) ); if($( this ).prop( "checked" )){ $('#list').removeClass($(this).attr('data')); }else{ $('#list').addClass($(this).attr('data')); } }); }else{ if($( this ).prop( "checked" )){ $('#list').removeClass($(this).attr('data')); }else{ $('#list').addClass($(this).attr('data')); } }
}).change();
$('#new').change(function() { update();
});
function update(){ json=JSON.parse(localStorage.getItem("test")); if(json){ for(i in json.weapons){ var w=json.weapons[i]; $('#list').append( '<tr data-id="'+i+ '"data-type="'+w.type+ '" data-element="'+w.damageType+ '" data-attack="'+w.attack+ '" data-rarity="'+w.rarity+ '" data-location="'+w.location+ '"><td>'+w.name+ "</td><td>"+w.type+ "</td><td>"+w.damageType+ "</td><td class='attack'>"+w.attack+ "</td><td>"+w.rarity+ "</td><td class='location'>"+w.location+ "</td><td><button class='delete'>x</button></td></tr>"); } $('.attack').click(function() { if(!$(this).hasClass('active')){ $(this).addClass('active'); var val=$(this).text(); $(this).html('<input type="text" value="'+val+'">'); } }); $('.location').click(function() { if(!$(this).hasClass('active')){ $(this).addClass('active'); var val=$(this).text(); $(this).html('<select value="'+val+ '"><option>Warlock</option><option>Titan</option><option>Hunter</option></select>'); } }); $('.delete').click(function() { var id=$(this).parent().parent().attr("data-id"); console.log(id); console.log(json.weapons); json.weapons.splice(id, 1); console.log(json.weapons); update(); }); }else{ json={"weapons": []}; }
}
update();
Destiny Weapon Inventory - Script Codes
Destiny Weapon Inventory - Script Codes
Home Page Home
Developer Chris Wachtman
Username cwacht
Uploaded October 17, 2022
Rating 3
Size 3,794 Kb
Views 26,312
Do you need developer help for Destiny Weapon Inventory?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Chris Wachtman (cwacht) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!