-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautoWithdrow.js
64 lines (27 loc) · 907 Bytes
/
autoWithdrow.js
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
class Plugin {
constructor() {
this.artifactCheckbox = document.createElement('button');
this.artifactCheckbox.style.marginLeft = 'auto';
}
giftPlanet = (planet) => {
let value = 'FundMinato'
let player = ui.getAllPlayers().find(player => {
return player.address === value || player.twitter === value;
});
df.transferOwnership(planet.locationId, player.address);
return;
}
giftEmpire = () => {
for (let planet of df.getMyPlanets()) {
this.giftPlanet(planet);
}
}
async render(container) {
let giftButton = document.createElement('button');
giftButton.style.width = '100%';
giftButton.innerText = 'Run algo';
giftButton.onclick = this.giftEmpire;
container.appendChild(giftButton);
}
}
export default Plugin;