Blizzard / s2client-api

StarCraft II Client - C++ library supported on Windows, Linux and Mac designed for building scripted bots and research using the SC2API.
MIT License
1.66k stars 281 forks source link

Accepting opponent surrender #205

Open luka-papez opened 7 years ago

luka-papez commented 7 years ago

Sometimes a message pops up saying "A.I. wishes to surrender, do you accept?" and then by clicking yes the game is ended with a Victory.

Is it possible to accept this surrender from code?

It would be useful to end the games more quickly.

cumttang commented 6 years ago

I also want to know the answer. Anybody could give us a hand? :)

N00byEdge commented 6 years ago

I'd like this to be a thing, but your should put up a warning to not only train your bots versus something that will give up.

luka-papez commented 6 years ago

https://github.com/Blizzard/s2client-proto/issues/82

alkurbatov commented 6 years ago

HI @luka-papez Unfortunately it doesn't work: 'GetChatMessages' returns empty vector when the computer enemy says 'gg'.

Probably I did something wrong. If you curious my implementation can be found here: https://github.com/alkurbatov/suvorov-bot/commit/02e3786c6f3a88e42da0adde747d63e8de4f69af