Closed illarum closed 9 years ago
Go to the bin folder from CoCSharp.Server an create the file: default_village.json
Paste the following json:
{"buildings":[{"data":1000001,"lvl":0,"x":21,"y":20},{"data":1000004,"lvl":0,"x":20,"y":16,"res_time":8770},{"data":1000000,"lvl":0,"x":26,"y":19,"units":[],"storage_type":0},{"data":1000015,"lvl":0,"x":18,"y":20},{"data":1000014,"lvl":0,"locked":true,"x":25,"y":32}],"obstacles":[{"data":8000007,"x":5,"y":13},{"data":8000007,"x":15,"y":29},{"data":8000008,"x":7,"y":7},{"data":8000005,"x":29,"y":4},{"data":8000006,"x":15,"y":37},{"data":8000000,"x":20,"y":4},{"data":8000008,"x":15,"y":22},{"data":8000005,"x":37,"y":18},{"data":8000007,"x":6,"y":4},{"data":8000003,"x":26,"y":10},{"data":8000004,"x":21,"y":9},{"data":8000008,"x":32,"y":21},{"data":8000005,"x":20,"y":36},{"data":8000003,"x":29,"y":34},{"data":8000005,"x":5,"y":29},{"data":8000005,"x":8,"y":10},{"data":8000005,"x":5,"y":17},{"data":8000002,"x":4,"y":33},{"data":8000002,"x":5,"y":21},{"data":8000002,"x":10,"y":32},{"data":8000008,"x":5,"y":37},{"data":8000001,"x":9,"y":4},{"data":8000001,"x":13,"y":31},{"data":8000001,"x":7,"y":35},{"data":8000007,"x":4,"y":9},{"data":8000004,"x":9,"y":23},{"data":8000004,"x":6,"y":26},{"data":8000003,"x":35,"y":21},{"data":8000005,"x":32,"y":28},{"data":8000005,"x":34,"y":13},{"data":8000001,"x":14,"y":18},{"data":8000001,"x":35,"y":5},{"data":8000012,"x":24,"y":30},{"data":8000012,"x":31,"y":10},{"data":8000010,"x":26,"y":38},{"data":8000010,"x":14,"y":5},{"data":8000013,"x":34,"y":33},{"data":8000013,"x":13,"y":9},{"data":8000014,"x":10,"y":17},{"data":8000014,"x":24,"y":7},{"data":8000006,"x":36,"y":26},{"data":8000011,"x":23,"y":34},{"data":8000011,"x":24,"y":37},{"data":8000000,"x":27,"y":35},{"data":8000000,"x":25,"y":35},{"data":8000000,"x":26,"y":30},{"data":8000007,"x":23,"y":32},{"data":8000001,"x":28,"y":31},{"data":8000014,"x":28,"y":29}],"traps":[],"decos":[],"respawnVars":{"secondsFromLastRespawn":0,"respawnSeed":1529463799,"obstacleClearCounter":0},"cooldowns":[],"newShopBuildings":[1,0,1,1,1,1,1,0,2,0,0,0,0,0,1,5,0,0,0,0,0,0,0,0,0,0,0,0],"newShopTraps":[0,0,0,0,0,0,0],"newShopDecos":[1,4,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"last_league_rank":0,"last_league_shuffle":0,"last_news_seen":-1,"edit_mode_shown":false}
i hope it helps
Thank you. It works!
default_village.json is not there because I am not taking the server development seriously. Sorry about that. ^^'
No problem. I'm trying to port cocdp over to python, so this project was a big help overall for me! Thanks!
But isn't cocdp written in python already?
I mean a complete python script, because I don't know how to implement / open sockets and such with the scripts provided in cocdp. Would you know how to do that using the preexisting python scripts? I'm trying to make the two rc4 sockets and login and then make another two sockets, basically what's in your C# code but in python. Thanks
It shouldn't be that difficult to use the scripts, take a look at unpack.py or xorstream.py. You should get the idea from there on how to use them because they are well made in my opinion.
The problem with those is that it doesn't actually open a stream - I don't think. It just unpacks/decodes it and I'm not entirely sure how to implement them within a real stream
Ok, good luck with your project! :]
Thank you
Hold on, does it start the xorstream for login? Then opens two rc4's?
The 'xorstream' is just the two RC4 stream. One for encryption and the other one decryption, you need those stream always for decrypting and encrypting the network traffic.
Thanks. I will try using the functions provided (makerc4, xor stuff) to do it, but I have little knowledge on how to use them
Or to sum it up, the 'xorstream' is a stream of bytes that you must XOR with data to either encrypt or decrypt it.
I feel like you have no idea of what you're doing, do you?
Hello. If I run CoCSharp.server project, it errors and tells me that I do not have a defaultvillage.json. I've looked in the files and can not find it either. Thanks!