- else if (stricmp(cmd, "WEAPON") == 0)
- {
- if (!isAdmin(user))
- {
- notice(s_GameServ, u, "Admins Only!");
- return;
- }
- else
- {
- if (!cmd2)
- {
- notice(s_GameServ, u, "SYNTAX: /msg %S SET [NAME] WEAPON <NUMBER>");
- return;
- }
-
- target->stats->weapon = stringtoint(cmd2);
-
- if (target->stats->weapon < 0)
- target->stats->weapon = 0;
- else if (target->stats->weapon >= WNA)
- target->stats->weapon = WNA - 1;
- notice(s_GameServ, u, "Weapon set to %s", weapons[target->stats->weapon]);
- return;
- }
- }
- else if (stricmp(cmd, "ARMOR") == 0)
- {
- if (!isAdmin(user))
- {
- notice(s_GameServ, u, "Admins Only!");
- return;
- }
- else
- {
- if (!cmd2)
- {
- notice(s_GameServ, u, "SYNTAX: /msg %S SET [NAME] ARMOR <NUMBER>");
- return;
- }
- target->stats->armor = stringtoint(cmd2);
-
- if (target->stats->armor < 0)
- target->stats->armor = 0;
- else if (target->stats->armor >= WNA)
- target->stats->armor = WNA - 1;
-
- notice(s_GameServ, u, "Armor set to %s", armors[target->stats->armor]);
- return;
- }
- }
- else if (stricmp(cmd, "HP") == 0 && stricmp(cmd2, "POTIONS") == 0)
- {
- if (!isAdmin(user))
- {
- notice(s_GameServ, u, "Admins Only!");
- return;
- }
- else
- {
- cmd2 = strtok(NULL, " ");
- if (!cmd2)
- {
- notice(s_GameServ, u, "SYNTAX: /msg %S SET [NAME] HP POTIONS <NUMBER>");
- return;
- }
- target->stats->inventory.setHP(abs(stringtoint(cmd2)));
-
- notice(s_GameServ, u, "HP Potions set to %d", target->stats->inventory.HP());
- return;
- }
- }
- else if (stricmp(cmd, "HEALING") == 0 && stricmp(cmd2, "POTIONS") == 0)
- {
- if (!isAdmin(user))
- {
- notice(s_GameServ, u, "Admins Only!");
- return;
- }
- else
- {
- cmd2 = strtok(NULL, " ");
- if (!cmd2)
- {
- notice(s_GameServ, u, "SYNTAX: /msg %S SET [NAME] HEALING POTIONS <NUMBER>");
- return;
- }
- target->stats->inventory.setHealing(abs(stringtoint(cmd2)));
- notice(s_GameServ, u, "Healing Potions set to %d", target->stats->inventory.Healing());
- return;
- }
- }
- else if (stricmp(cmd, "STRENGTH") == 0 && stricmp(cmd2, "POTIONS") == 0)
- {
- if (!isAdmin(user))
- {
- notice(s_GameServ, u, "Admins Only!");
- return;
- }
- else
- {
- cmd2 = strtok(NULL, " ");
- if (!cmd2)
- {
- notice(s_GameServ, u, "SYNTAX: /msg %S SET [NAME] STRENGTH POTIONS <NUMBER>");
- return;
- }
- target->stats->inventory.setStrength(abs(stringtoint(cmd2)));
- notice(s_GameServ, u, "Strength Potions set to %d", target->stats->inventory.Strength());
- return;
- }
- }
- else if (stricmp(cmd, "DEFENSE") == 0 && stricmp(cmd2, "POTIONS") == 0)
- {
- if (!isAdmin(user))
- {
- notice(s_GameServ, u, "Admins Only!");
- return;
- }
- else
- {
- cmd2 = strtok(NULL, " ");
- if (!cmd2)
- {
- notice(s_GameServ, u, "SYNTAX: /msg %S SET [NAME] DEFENSE POTIONS <NUMBER>");
- return;
- }
- target->stats->inventory.setDefense(abs(stringtoint(cmd2)));
- notice(s_GameServ, u, "Defense Potions set to %d", target->stats->inventory.Defense());
- return;
- }
- }