lllll llll

Well-Known Member
Reaction score
65
Author
lllll llll
Contributors
N/A
Quickbar Entry
javascript:$.getScript("https://dl.dropboxusercontent.com/s/gijrksuvyynuzlp/resSender.js?dl=0");void(0);
Public?
Public
Hello, I created a script which allows you to send resources from many villages to many villages.


You can create and delete multiple panels, also panel's name can be renamed. All data are saved in browser's memory automatically.

Screenshot_18.png



'reserve merchants'= how many merchants you want to keep home
'min resources'= if you have in one village available 200000 wood, 190000 stone and 160000 iron and min resources is set to 150000 then from this village it will be sent 50000 wood, 40000 stone, 10000 iron
'max distance' = how far can merchants travel


Screenshot_19.png


Every target village will get the same amount of resources.
Screenshot_20.png


Few observations:
1) duplicate coordinates from origin and target are eliminated
2) ratio between each type of resources are maintained ( if you want 10k wood, 15k stone, and 5k iron, but you only have available 5k wood, 20k stone, 15k iron then you will be sending 5k wood 7.5k stone, 2.5k iron)
3) if you want to send resources for minting you should set 140k wood, 150k stone, 125k iron , which is (28k, 30k, 25k)x5
4) if target coord is your own village then you will be sending resources using mass request resources which means you can send all resources with 1 click
5) origin coord must be your own village, also origin coords must be in the current group otherwise you'll get an error
6) resources between xxx700-xxx000 will be rounded to xxx000, because if you have 3 merchants available and you want to send 2x1500 you need 4 merchants instead of 3

demo
 
Last edited:
Upvote 2

lllll llll

Well-Known Member
Reaction score
65
Hello,

It's possible to add this feature but it's quite complicated and i'm not sure it's worth spending time for that. I wanted to add this feature when i wrote it but i gave up to this idea because i had to make a particular case for own villages and i wanted the script to be as general as possible. Besides I have to take in consideration transports coming and for this I have to resubmit the script for approval, so pretty sure I won't make any updates for awhile.

What i do to avoid overflowing is to make sure warehouses have enough space before i send resources and combined with balancing resources by clusters is even better.
 

The Guide

Well-Known Member
Reaction score
40
Hello, I created a script which allows you to send resources from many villages to many villages.


You can create and delete multiple panels, also panel's name can be renamed. All data are saved in browser's memory automatically.




'reserve merchants'= how many merchants you want to keep home
'min resources'= if you have in one village available 200000 wood, 190000 stone and 160000 iron and min resources is set to 150000 then from this village it will be sent 50000 wood, 40000 stone, 10000 iron
'max distance' = how far can merchants travel




Every target village will get the same amount of resources.


Few observations:
1) duplicate coordinates from origin and target are eliminated
2) ratio between each type of resources are maintained ( if you want 10k wood, 15k stone, and 5k iron, but you only have available 5k wood, 20k stone, 15k iron then you will be sending 5k wood 7.5k stone, 2.5k iron)
3) if you want to send resources for minting you should set 140k wood, 150k stone, 125k iron , which is (28k, 30k, 25k)x5
4) if target coord is your own village then you will be sending resources using mass request resources which means you can send all resources with 1 click
5) origin coord must be your own village, also origin coords must be in the current group otherwise you'll get an error
6) resources between xxx700-xxx000 will be rounded to xxx000, because if you have 3 merchants available and you want to send 2x1500 you need 4 merchants instead of 3

demo


Could i ask you a favor, if you could adjust the script at all to send the average of all resources to a coordinate?

Say the village has 293500 wood 210000 clay 350000 iron, can you make it so it would automatically average it out?

I'm fine with having it all come from a single village.

The way i'm trying to optimize is to complete the action as quick as possible, averaging out so it doesn't entirely deplete the resources...

I'd be doing this on a Speed World, so time to enter in data and configure numbers would be time wasted. Not sure how in depth the change would be.
 

The Guide

Well-Known Member
Reaction score
40
Oz5MS8J.gif


I tried tthis today on romanian server and kept getting this error. Is it due to a language issue?
 

lllll llll

Well-Known Member
Reaction score
65
hello @TuRBo-x ,

the problem on speed world is that i'm not allowed to read the database more than 1 per hour and since on speed world a village can spawn really quick it might happen that in database this new village doesn't exist and the only solution to this problem is to instead of using coord(only target coordinate) it might work if it is used directly village's ID and currently is not implemented such an option.

how would you like the script to work on speed world? being able to set exactly how many resources to send or to send resources proportionally of each type from how many resources you have like 'The guide' wanted as well?
 

TuRBo-x

Active Member
Reaction score
13
hello @TuRBo-x ,

the problem on speed world is that i'm not allowed to read the database more than 1 per hour and since on speed world a village can spawn really quick it might happen that in database this new village doesn't exist and the only solution to this problem is to instead of using coord(only target coordinate) it might work if it is used directly village's ID and currently is not implemented such an option.

how would you like the script to work on speed world? being able to set exactly how many resources to send or to send resources proportionally of each type from how many resources you have like 'The guide' wanted as well?

I used it by wrong way , now it works ,also I tried it in a normal world not speed

thanks man it is a great script ;)
 

lllll llll

Well-Known Member
Reaction score
65
hello,

I made few updates to this script.

1) i added an option to select coords from a specific group
2) i added an option to not allow sending more resources than 95% of warehouse capacity
3) it's compatible with mobile app


If you don't want coords from a specific group then select 'none' and add your particular coords.

Screenshot_9.png



To avoid overflowing check this option, using this option you can actually push specific villages with resources.

Screenshot_7.png
 

TuRBo-x

Active Member
Reaction score
13
hello,

I made few updates to this script.

1) i added an option to select coords from a specific group
2) i added an option to not allow sending more resources than 95% of warehouse capacity
3) it's compatible with mobile app


If you don't want coords from a specific group then select 'none' and add your particular coords.




To avoid overflowing check this option, using this option you can actually push specific villages with resources.

the group system has been removed bro!?
 

Kyomaku

Active Member
Reaction score
4
Not working for me anymore today, something changed?

Update:
Checked on a different world and still worked there, went back to the original world and created a new tab and it started working again. But somehow, it wiped all of the tabs I had and just gave me a tab like this, which doesn't do anything.. but yeah, once I just created a new tab, the new tab worked.. Weird

1702048563553.png
 

RedAlert

Senior In-Game Staff
Tribal Wars Team
Senior
Team
Script Moderator
Reaction score
621
Anyone else having problems using this script? I can't do it in world 120 on the brazilian server

View attachment 12696
If that's the kind of error you are receiving seems like the data that needs to be saved in localStorage is bigger then what localStorage can store.

Sometimes clearing localStorage helps solving this issue, but it will happen again very likely. Clearing localStorage is not a fix in this case, is just a temporary patch.
 

Johnny Tapia

Active Member
Reaction score
5
If that's the kind of error you are receiving seems like the data that needs to be saved in localStorage is bigger then what localStorage can store.

Sometimes clearing localStorage helps solving this issue, but it will happen again very likely. Clearing localStorage is not a fix in this case, is just a temporary patch.

I tried in another browser and everything worked fine, thank you!
 
Top