-
-
-
-
-
-
- /*
- uint8_t val1 = 0;
- uint8_t val2 = 0;
- uint8_t val3 = 0;
- uint16_t val4 = 0;
- uint16_t val5 = 0;
- // uint16_t val6 = 0;
- // uint8_t val7 = 0;
-
- bool SyntaxError = false;
- if(ArgC < 5)
- {
- SyntaxError = true;
- }
-
- if(IsArgNumeric(1) == false)
- SyntaxError = true;
- if(IsArgNumeric(2) == false)
- SyntaxError = true;
- if(IsArgNumeric(3) == false)
- SyntaxError = true;
- if(IsArgNumeric(4) == false)
- SyntaxError = true;
- if(IsArgNumeric(5) == false)
- SyntaxError = true;
- // if(IsArgNumeric(6) == false)
- // SyntaxError = true;
- // if(IsArgNumeric(7) == false)
- // SyntaxError = true;
-
- if(SyntaxError == true)
- {
- PMessage* tmpMsg1 = new PMessage(14);
-
- *tmpMsg1 << (uint8_t)0x13;
- *tmpMsg1 << (uint16_t)0x0000; // UDP ID placeholder
- *tmpMsg1 << (uint16_t)0x0000; // SessionID placeholder
- *tmpMsg1 << (uint8_t)0x08; // Len (static, always 0x08
- *tmpMsg1 << (uint8_t)0x03;
- *tmpMsg1 << (uint16_t)0x0000; // Sub UDP ID placeholder
- *tmpMsg1 << (uint8_t)0x26; // Command FADE AWAY CHAR (kinda ^^)
- *tmpMsg1 << (uint8_t)0x00;
- *tmpMsg1 << (uint8_t)0x10;
- *tmpMsg1 << (uint8_t)0x00;
- *tmpMsg1 << (uint8_t)0x80;
- ClientManager->UDPBroadcast(tmpMsg1, source);
- }
-
- val1 = (uint8_t)GetArgInt(1);
- val2 = (uint8_t)GetArgInt(2);
- val3 = (uint8_t)GetArgInt(3);
- val4 = (uint16_t)GetArgInt(4);
- val5 = (uint16_t)GetArgInt(5);
- // val7 = (uint16_t)GetArgInt(7);
-
- //tmpMsg = MsgBuilder->BuildCharUseQBSlotMsg1(source, 59);
- //source->SendUDPMessage(tmpMsg);
- //tmpMsg = NULL;
-
- PMessage* tmpMsg = new PMessage(29);
- *tmpMsg << (uint8_t)0x13;
- *tmpMsg << (uint16_t)0x0000;
- *tmpMsg << (uint16_t)0x0000;
- *tmpMsg << (uint8_t)0x16; // Message length
- *tmpMsg << (uint8_t)0x03;
- *tmpMsg << (uint16_t)0x0000;
- *tmpMsg << (uint8_t)0x1b;
- *tmpMsg << (uint8_t)0x00;
- *tmpMsg << (uint8_t)0x10;
- *tmpMsg << (uint8_t)0x00;
- *tmpMsg << (uint8_t)0x80;
- *tmpMsg << (uint8_t)0x19;
- *tmpMsg << (uint8_t)0x55;
- *tmpMsg << (uint8_t)0x74;
- *tmpMsg << (uint8_t)0x80;
- *tmpMsg << (uint8_t)0x82;
- *tmpMsg << (uint8_t)0xc2;
- *tmpMsg << (uint8_t)0x84;
- *tmpMsg << (uint8_t)val1;
- *tmpMsg << (uint8_t)val2;
- *tmpMsg << (uint8_t)val3;
- *tmpMsg << (uint16_t)val4;
- *tmpMsg << (uint16_t)val5;
- // *tmpMsg << (uint8_t)0x69;
- // *tmpMsg << (uint8_t)0x00;
-
- ClientManager->UDPBroadcast(tmpMsg, source);
-
- // ***************************
- bool SyntaxError = false;
- if(ArgC < 1)
- {
- SyntaxError = true;
- }
-
- if(IsArgNumeric(1) == false)
- SyntaxError = true;
-
- if(SyntaxError == true)
- {
- Chat->send(source, CHAT_DIRECT, "Usage", "@test <id>");
- return;
- }
-
- uint16_t itemID;
- char effStr[128];
- PMessage* tmpMsg;
-
- itemID = (uint16_t)GetArgInt(1);
-
- source->GetChar()->SetItemInHand(itemID);
-
- tmpMsg = MsgBuilder->BuildCharHelloMsg(source);
- ClientManager->UDPBroadcast(tmpMsg, source);
- snprintf(effStr, 127, "Item in hand changes to value %d", itemID);
- effStr[127] = '\0';
- Chat->send(source, CHAT_DIRECT, "System", effStr);
- ===========================================================================
- uint16_t ItemToSpawn = 0;
- uint8_t Quality = 0;
- uint8_t Stack = 0;
-
- bool SyntaxError = false;
- if(ArgC < 3)
- {
- SyntaxError = true;
- }
- else
- {
- if(IsArgNumeric(1) == true)
- {
- ItemToSpawn = (uint16_t)GetArgInt(1);
- if(ItemToSpawn == 0)
- {
- SyntaxError = true;
- }
- }
- else
- {
- SyntaxError = true;
- }
-
- if(IsArgNumeric(2) == true)
- {
- Quality = (uint8_t)GetArgInt(2);
- if(Quality == 0)
- {
- SyntaxError = true;
- }
- }
- else
- {
- SyntaxError = true;
- }
-
- if(IsArgNumeric(3) == true)
- {
- Stack = (uint8_t)GetArgInt(3);
- if(Stack == 0)
- {
- SyntaxError = true;
- }
- }
- else
- {
- SyntaxError = true;
- }
- }
- if(SyntaxError == true)
- {
- Chat->send(source, CHAT_DIRECT, "Usage", "@test <itemID> <quality> <itemID>");
- return;
- }
- PMessage* tmpMsg = new PMessage(29);
- source->IncreaseUDP_ID();
- source->IncreaseTransactionID();
-
- *tmpMsg << (uint8_t)0x13;
- *tmpMsg << (uint16_t)source->GetUDP_ID();
- *tmpMsg << (uint16_t)source->GetSessionID();
- *tmpMsg << (uint8_t)0x16; // Message length
- *tmpMsg << (uint8_t)0x03;
- *tmpMsg << (uint16_t)source->GetUDP_ID();
- *tmpMsg << (uint8_t)0x1f;
- *tmpMsg << (uint16_t)source->GetLocalID();
- *tmpMsg << (uint8_t)0x25; // ??
- *tmpMsg << (uint8_t)0x13; // ??
- *tmpMsg << (uint16_t)source->GetTransactionID();
- *tmpMsg << (uint8_t)0x18; // ??
- *tmpMsg << (uint8_t)0x03; // ??
- *tmpMsg << (uint8_t)0x01; // ??
- *tmpMsg << (uint8_t)0x00; // ??
- *tmpMsg << (uint8_t)0x05; // ??
- *tmpMsg << (uint8_t)0x00; // ??
- *tmpMsg << ItemToSpawn;
- *tmpMsg << (uint8_t)0x02; // ??
- *tmpMsg << (uint8_t)0x01; // ??
- *tmpMsg << Quality;
- *tmpMsg << Stack;
-
-
- source->SendUDPMessage(tmpMsg);
- */