Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ACMD(do_toggle_costume)
- {
- char arg1[256];
- one_argument(argument, arg1, sizeof(arg1));
- if (!arg1) return;
- EParts toSetPart = PART_MAX_NUM;
- CItem* pItem;
- switch(arg1) {
- case 1 :
- toSetPart = PART_HAIR;
- pItem = ch->GetWear(WEAR_COSTUME_HAIR);
- break;
- case 2 :
- toSetPart = PART_BODY;
- pItem = ch->GetWear(WEAR_COSTUME_BODY);
- break;
- case 3 :
- toSetPart = PART_WEAPON;
- pItem = ch->GetWear(WEAR_COSTUME_WEAPON);
- break;
- }
- if (ch->IsPolymorphed()) return;
- if (!pItem) return;
- if (PART_MAX_NUM == toSetPart) return;
- DWORD toSetValue = pItem->GetVnum();
- toSetValue = pFryzura->GetValue(3);
- bool b = ch->GetFlag("costume_tgl.part" + arg1);
- ch->SetQuestFlag("costume_tgl.part" + arg1, b ? 0 : 1);
- ch->SetPart((BYTE)toSetPart, b ? 0 : toSetValue);
- ch->UpdatePacket();
- ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT(b ? "OFF" : "ON"));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement