![]() |
|
Rozszerzony Protokół | Extended Protocol - Printable Version +- Ronit.GAMES (https://forum.ronit.games) +-- Forum: Ron Client (https://forum.ronit.games/forumdisplay.php?fid=69) +--- Forum: Tutorials / Poradniki (https://forum.ronit.games/forumdisplay.php?fid=82) +--- Thread: Rozszerzony Protokół | Extended Protocol (/showthread.php?tid=624) |
Rozszerzony Protokół | Extended Protocol - Nakeib - 20-09-2011 Polish Version: Użycie Protokołu Rozszerzonego: Ramka pakietu Protokołu Rozszerzonego: ExtProtSignal (1 bajt) + ProtID (1 bajt) + Data (n bajtów) ExtProtSignal - Sygnał Protokołu Rozszerzonego [zawsze 0x00] ProtID - Identyfikator Pakietu Data - Dane Pakietu Pakiet protokołu rozszerzonego posiada taką samą strukturę zarówno w kierunku klient-serwer, jak i w kierunku serwer-klient. Pakiety: Klient-Serwer: * SendRequestSpells - zapytanie o listę czarów ProtID: 0x01 Data: [brak] Serwer-Klient: * ParseStatusPeriods - informacje o czasie trwania ikon statusowych ProtID: 0x01 Data: SIZE(U8) + {SIZE razy}[ID(U8) + PERIOD(U32)] SIZE - ilość przesyłanych okresów ID - identyfikator statusu PERIOD - okres trwania statusu * ParseSpellsWindow - lista czarów ProtID: 0x02 Data: SIZE(U8) + {SIZE razy}[SPELLID(U8) + WORDS(STRING) + NAME(STRING)] SIZE - ilość czarów SPELLID - identyfikator czaru WORDS - zaklęcie czaru NAME - nazwa czaru * ParseScreenShot - wyzwalacz zrzutu ekranu ProtID: 0x03 Data: [brak] * ParseCreatureEquipment - informacje o ekwipunku gracza ProtID: 0x05 Data: CREATUREID(U32) + {10 razy}[THING(ITEM)] CREATUREID - identyfikator kreatury THING - itemID(U16) (+ count(U8) dla przedmiotów policzalnych, cieczy) przedmiotu * ParseSound - wyzwalacz dźwięku ProtID: 0x06 Data: SOUNDID(U32) + VOLUME(U8) + OFFSET(U8) SOUNDID - identyfikator dźwięku (plik custom<SOUNDID>.mp3) VOLUME - głośność (0-255) OFFSET - przesunięcie dźwięku lewo-prawo (0-200, 0 - lewy głośnik, 100 - środek, 200 - prawy głośnik) * ParseManageBot - zarządzanie botem ProtID: 0x07 Data: ENABLED(U8) ENABLED - status bota (włączony/wyłączony) * ParseScriptPacket - przekierowanie pakietu do skryptu ProtID: 0xFF Data: SCRIPTNAME(STRING) + SIZE(U16) + {SIZE razy}BYTES(U8) SCRIPTNAME - nazwa pliku ze skryptem SIZE - rozmiar pakietu BYTES - bajty pakietu przekierowanego do skryptu System świecenia przedmiotów Aplikacja RonClient posiada zaimplementowany system świecenia przedmiotów, który można wykorzystać do dowolnych celów (w projektach RonIT świecą się przedmioty ulepszone). By przedmiot się mienił, należy przesłać rozszerzoną informację o przedmiocie. Standardowa informacja o przedmiocie THING(ITEM) zawiera: itemID(U16) (+ count(U8) - dla przedmiotów policzalnych, bądź cieczy) Rozszerzona informacja o przedmiocie THINGEX(ITEM) zawiera: 0x0010(U16) + itemID(U16) + shine(U32) (+ count(U8) - dla przedmiotów policzalnych, bądź cieczy) gdzie: shine = STRENGTH(U8) + B(U8) + G(U8) + R(U8) najmłodsze trzy bajty zmiennej shine, to składowe koloru RGB, zaś najstarszy bajt, to siła świecenia (nie powinna przeraczać liczby 3). UWAGA: THINGEX można stosować zamiennie z THING. English Version: Using the Extended Protocol: Frame Protocol Extended package: ExtProtSignal (1 byte) + ProtID (1 byte) + Data (n bytes) ExtProtSignal - Enhanced Signal Protocol [always 0x00] ProtID - ID Package Data - Data Package Protocol extended package has the same structure in both the client-server, as well as server-client direction. Packages: Client-Server: * SendRequestSpells - query for the list of spells ProtID: 0x01 Data: [no] Server-Client: * ParseStatusPeriods - information about the duration of status icons ProtID: 0x01 Data: SIZE (U8) + {SIZE} times [ID (U8) + PERIOD (U32)] SIZE - number of transmitted periods ID - ID of the status PERIOD - the period status * ParseSpellsWindow - list of spells ProtID: 0x02 Data: SIZE (U8) + {SIZE} times [SPELLID (U8) + WORDS (STRING) + NAME (STRING)] SIZE - number of spells SPELLID - spell id WORDS - spell spell NAME - name of the spell * ParseScreenShot - snapshot release ProtID: 0x03 Data: [no] * ParseCreatureEquipment - information about the player's inventory ProtID: 0x05 Data: CREATUREID (U32) + {10 times} [THING (ITEM)] CREATUREID - ID creatures THING - itemID (U16) (+ count (U8) for countable items, liquid) of the object * ParseSound - sound trigger ProtID: 0x06 Data: SOUNDID(U32) + VOLUME(U8) + OFFSET(U8) SOUNDID - sound ID (file custom<SOUNDID>.mp3) VOLUME - sound volume (0-255) OFFSET - sound offset left-right (0-200, 0 - left speaker, 100 - middle, 200 - right speaker) * ParseManageBot - bot management ProtID: 0x07 Data: ENABLED(U8) ENABLED - bot status (on/off) * ParseScriptPacket - redirect packet to script ProtID: 0xFF Data: SCRIPTNAME(STRING) + SIZE(U16) + {SIZE razy}BYTES(U8) SCRIPTNAME - script file name SIZE - packet size BYTES - bytes of packet redirected to script The luminous objects The application has implemented a system RonClient luminous objects that can be used for any purpose (Ronit projects illuminate subjects improved). To object to steal, you must submit an extended information about this item. Standard information about an item THING (ITEM) provides: itemID (U16) (+ count (U8) - for countable objects or liquids) Extended information about an item THINGEX (ITEM) provides: 0x0010 (U16) + itemID (U16) + Shine (U32) (+ count (U8) - for countable objects or liquids) where: shine = STRENGTH (U8) + B (U8) + G (U8) + R (U8) the youngest three bytes of variable shine [/ b], the RGB color components, and the oldest byte is the power of light (not to przeraczać number 3). [b] NOTE: THINGEX may be used interchangeably with the THING. |