Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if((!strcmp(myCommand, "killcount")))
- {
- char *itemList[4] =
- {
- "Sealed J-Sword",
- "Lame D'Argent",
- "Limiter",
- "Swordsman Lore"
- };
- char item = -1;
- char found = 0;
- unsigned kills = 0;
- for(ch = 0; ch < client->character.inventoryUse; ch++)
- {
- // require the item to be equipped
- if(client->character.inventory[ch].flags & 0x08)
- {
- if(client->character.inventory[ch].item.data[0] == 0x00)
- {
- // Weapons
- if(client->character.inventory[ch].item.data[1] == 0x33)
- {
- // Sealed J-Sword
- item = 0;
- found = 1;
- }
- else if(client->character.inventory[ch].item.data[1] == 0xAB)
- {
- // Lame D'Argent
- item = 1;
- found = 1;
- }
- }
- else if(client->character.inventory[ch].item.data[0] == 1 && client->character.inventory[ch].item.data[1] == 0x03)
- {
- // Armor -> Units
- if(client->character.inventory[ch].item.data[2] == 0x4D)
- {
- // Limiter
- item = 2;
- found = 1;
- }
- else if(client->character.inventory[ch].item.data[2] == 0x4F)
- {
- // Swordsman Lore
- item = 3;
- found = 1;
- }
- }
- }
- if(item != -1)
- {
- char buffer[50];
- kills = swapendian(*(unsigned short*)&client->character.inventory[ch].item.data[10]) - 0x8000;
- if(kills < 0 || kills > 0x8000)
- {
- sprintf(buffer, "%u %s: Error", ch + 1, itemList[item]);
- SendB0(buffer, client);
- }
- else
- {
- sprintf(buffer, "%u %s: %u", ch + 1, itemList[item], kills);
- SendB0(buffer, client);
- }
- item = -1;
- kills = 0;
- }
- }
- if(!found)
- {
- Send0(client, "No sealed item equipped");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement