IceYGO / windbot

A C# bot for ygopro, compatible with the ygosharp server.
MIT License
80 stars 103 forks source link

GameBehaviors.cs RegisterPackets #14

Open OhnkytaBlabdey opened 6 years ago

OhnkytaBlabdey commented 6 years ago

What are these functions used for? Can these functions response to the server directly?

OhnkytaBlabdey commented 6 years ago

one more question. does the packet contains all the StoC information? i mean information such as select hint, and the contained cards/options/positions or so, that can be selected...

mercury233 commented 6 years ago

Them add handler for game messages. Must send response if required.

YGOPro don't send all informations for an "operation for user" in one STOC message. For example, this script will send MSG_HINT and MSG_SELECT_CARD.

Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c83764718.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)

So the bot need to get information from those messages both.