lavix
New Member
- Reaction score
- 0
- Author
- lavix
- Contributors
- N/A
- Quickbar Entry
-
javascript:localStorage.setItem("lavix:TribalWars:mapLock", JSON.stringify(TWMap.pos));
javascript:TWMap.map.setPos(...JSON.parse(localStorage.getItem("lavix:TribalWars:mapLock")))
javascript:document.location.replace($("#village_switch_left").attr("href") + "#" + JSON.parse(localStorage.getItem("lavix:TribalWars:mapLock")).join(";"))
javascript:document.location.replace($("#village_switch_right").attr("href") + "#" + JSON.parse(localStorage.getItem("lavix:TribalWars:mapLock")).join(";"))
Hi 
I would like to use some basic map utilities that can make sending attacks manually a bit simpler.
The script does not do much, it allows the user to bookmark / save the current map position and return to it without refreshing the page. It can be useful when sending attacks on players (I wrote the script as a request), to defend a certain location or just to check out a certain position quickly.
The code for saving the position:
The code for returning to the saved position:
Additional use cases, but these are probably best solved with the "Center Map On Village" / Beacon functionality.
I would like to use some basic map utilities that can make sending attacks manually a bit simpler.
The script does not do much, it allows the user to bookmark / save the current map position and return to it without refreshing the page. It can be useful when sending attacks on players (I wrote the script as a request), to defend a certain location or just to check out a certain position quickly.
The code for saving the position:
Code:
javascript:localStorage.setItem("lavix:TribalWars:mapLock", JSON.stringify(TWMap.pos));
The code for returning to the saved position:
Code:
javascript:TWMap.map.setPos(...JSON.parse(localStorage.getItem("lavix:TribalWars:mapLock")));
Additional use cases, but these are probably best solved with the "Center Map On Village" / Beacon functionality.
Code:
javascript:document.location.replace($("#village_switch_left").attr("href") + "#" + JSON.parse(localStorage.getItem("lavix:TribalWars:mapLock")).join(";"))
javascript:document.location.replace($("#village_switch_right").attr("href") + "#" + JSON.parse(localStorage.getItem("lavix:TribalWars:mapLock")).join(";"))
Last edited:
Upvote
0