+3

Hotkeys for planting and building, please!

Krobble 4 years ago updated by Ondre 3 years ago 1

Planting crops with clicking only is a drag! Give us a hotkey for selecting different building pieces.

Thank you!

+1

here is Mic's snippet for wanderers.
guide:
1. press f12
2. go to "sources"

3. open 'left navigator' 

4. click 'add snippet'

5. paste code into the new snippet

6. right click on snippet
7. run


Q: plant food
1: recruit a soldier

2: equip hammer

3: equip top shield

4: equip top helmet

5: equip hidden wizard hat

6: equip scythe

7: stay on meadow

num 1: build a wall 

num 2: build a tower

num 3: build a gate

num 4: build a wood storage

num 5: build a food storage

num 6: build a well

num 7: plant a tree

num 8: builda a catapault

num 9: top level --- useless for non-weaponry upgrades.
cg
Enjoy guys.

CODE:

//-------------------------------------------------------------------

document.addEventListener("keyup", Hotkeys);

function Hotkeys(e) {

if (e.keyCode ===49) {//1
CLIENT.Game.action.set("recruit","member");
}

else if (e.keyCode ===50 ) {//2
CLIENT.Game.action.set("equip","hammer");
}
else if (e.keyCode ===51 ) {//3
CLIENT.Game.action.set("equip","steel_shield");
}

else if (e.keyCode === 52) {//4
CLIENT.Game.action.set("equip","legion_helmet");
}
else if (e.keyCode === 53) {//5
CLIENT.Game.action.set("equip","wizard_hat");
}
else if (e.keyCode === 54) {//6
CLIENT.Game.action.set("equip","scythe");
}
else if (e.keyCode ===55) {//7
CLIENT.Game.action.set("stay","stay");
}



else if (e.keyCode === 81) {//q
CLIENT.Game.action.set("PlantAPlant","corn");
}
else if (e.keyCode === 103) {//num7
CLIENT.Game.action.set("PlantAPlant","tree_plant");
}


else if (e.keyCode === 97) {//num1
CLIENT.Game.action.set("buildWall","stone_wall");
}
else if (e.keyCode === 98) {//num2
CLIENT.Game.action.set("buildOnNode","stone_tower");
}
else if (e.keyCode === 99) {//num3
CLIENT.Game.action.set("buildOnWall","stone_gate");
}

else if (e.keyCode === 100) {//num4
CLIENT.Game.action.set("buildAnywhere","wood_storage");
}
else if (e.keyCode === 101) {//num5
CLIENT.Game.action.set("buildAnywhere","food_storage");
}
else if (e.keyCode ===102) {//num6
CLIENT.Game.action.set("buildOnMeadow","well");
}
else if (e.keyCode ===104) {//num8
CLIENT.Game.action.set("buildAnywhere","stationary_catapult");
}
else if (e.keyCode ===105) {//num9
maxLvlUp();
//cs();
}
}

function maxLvlUp(){

for(let i=0;i<23;i++){
app.game.levelUp();
}
}
//-------------------------------------------------------------------------------