To run the mod, run the code below in the console, I've checked it with the last game version I had (57-4-2-1a).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (doT) { | |
var templates = {}; | |
var scripts = Array.prototype.slice.call(document.getElementsByTagName('script')); // load all scripts | |
for (var i = 0; i < scripts.length; i++) { // filter out template script tags | |
var script = scripts[i]; | |
if (script.type == "text/dot-template") { | |
var name = script.id || script.getAttribute('name') || script.getAttribute('data-name'); | |
templates[name] = script.innerHTML; // store template for later use | |
script.parentNode.removeChild(script); // remove template from DOM | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Передаём веса в формате { potion:200, sword:15, unique_sword:1 } | |
*/ | |
function getRandom(weights) | |
{ | |
var total = calculateWeightsTotal(weights); // считаем суммарный вес | |
var rnd = Math.random() * total; // генерируем случайное число размером с максимальный вес | |
for (var s in weights) | |
{ |
Contract compiles successfully both in csc
and pravda dotnet
but fails to deploy on local node.
Stopping abci.socketClient for error: read tcp 127.0.0.1:59507->127.0.0.1:46658: wsarecv: An existing connection was forcibly closed by the remote host. module=abci-client connection=mempool
Compilation:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe poker.cs /reference:../pravda/dotnet/src/test/resources/expload.dll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let tx = (nonce, gasPrice, to, amount) => ({ | |
nonce: Web3.utils.toHex(nonce), | |
gasPrice: Web3.utils.toWei(gasPrice.toString(), 'gwei'), | |
gasLimit: "0x5208", | |
to, | |
value: Web3.utils.toWei(amount.toString()), | |
data: "0x", | |
chainId: 1 | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body class="layout-boxed navbar-top bg-black"> | |
<div class="flash-messages" style="display: none;"> | |
</div> | |
<!-- Main navbar --> | |
<div class="navbar navbar-fixed-top navbar-inverse bg-anco-blue-dark"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.scriptObject=document.createElement('script'); | |
this.scriptObject.type='text/javascript'; | |
this.scriptObject.src='https://html2canvas.hertzen.com/dist/html2canvas.js'; | |
var ssc = document.getElementsByTagName('script')[0]; | |
ssc.parentNode.insertBefore(this.scriptObject, ssc); | |
function screenshot(elem) | |
{ | |
return html2canvas(elem, {logging: true, profile: true, useCORS: true }) | |
} |