[CmdAttribute(
"&player",
(uint)ePrivLevel.GM,
"Various Admin/GM commands to edit characters.",
"/player name <newName>",
"/player lastname <change|reset> <newLastName>",
"/player level <newLevel>",
"/player realm <newRealm>",
"/player model <change|reset> <modelid>",
"/player money <copp|silv|gold|plat|mith> <amount>",
"/player rps <amount>",
"/player bps <amount>",
"/player stat <typeofStat> <value>",
"/player friend <list|playerName>",
"/player respec <all|line> <lineName>",
"/player kill <albs|mids|hibs|self|all>", // if realm not specified, it will kill target.
"/player rez <albs|mids|hibs|self|all>", // if realm not specified, it will rez target.
"/player jump <group|guild|cg> <name>", // to jump a group to you, just type in a player's name and his or her entire group will come with.
"/player kick <all>",
"/player save <all>",
"/player purge",
"/player update",
"/player info",
"/player showgroup",
"/player showeffects",
//VaNaTiC->
"/player showinv equip|backpack|vault|detail <slot>")]
//VaNaTiC<-
//VaNaTiC->
case "showinv":
{
GamePlayer player = client.Player.TargetObject as GamePlayer;
if (player == null)
{
client.Out.SendMessage("You need a valid target!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
return 0;
}
IGameInventory inv = player.Inventory;
if ( inv == null )
{
client.Out.SendMessage("That player has no inventory!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
return 0;
}
ArrayList text = new ArrayList();
if (args.Length == 3 && args[2] == "equip")
{
foreach (InventoryItem item in inv.EquippedItems)
text.Add("- "+SlotPositionToString(item.SlotPosition) + ": " + InventoryItemToString(item));
client.Out.SendCustomTextWindow("Player Equippment", text);
}
else if (args.Length == 3 && args[2] == "backpack")
{
for ( eInventorySlot iSlot = eInventorySlot.FirstBackpack; iSlot <= eInventorySlot.LastBackpack; iSlot++ )
{
InventoryItem item = inv.GetItem(iSlot);
if ( item != null )
text.Add("- "+SlotPositionToString(item.SlotPosition) + ": " + InventoryItemToString(item));
}
client.Out.SendCustomTextWindow("Player Backpack", text);
}
else if (args.Length == 3 && args[2] == "vault")
{
for ( eInventorySlot iSlot = eInventorySlot.FirstVault; iSlot <= eInventorySlot.LastVault; iSlot++ )
{
InventoryItem item = inv.GetItem(iSlot);
if ( item != null )
text.Add("- "+SlotPositionToString(item.SlotPosition) + ": " + InventoryItemToString(item));
}
client.Out.SendCustomTextWindow("Player Vault", text);
}
else if ( args.Length == 4 && args[2] == "detail" )
{
try
{
eInventorySlot iSlot = (eInventorySlot)Convert.ToInt32(args[3]);
InventoryItem item = inv.GetItem(iSlot);
if ( item != null )
client.Out.SendMessage("ITEM-INFO "+SlotPositionToString(item.SlotPosition) + ": " + InventoryItemToDetailString(item), eChatType.CT_System, eChatLoc.CL_SystemWindow);
else
client.Out.SendMessage("ITEM-INFO cannot be found!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
}
catch (Exception)
{
return DisplaySyntax(client);
}
}
else
return DisplaySyntax(client);
break;
}
//VaNaTiC<-
//VaNaTiC->
/// <summary>
/// Returns a short info-string with count of an InventoryItem
/// </summary>
/// <param name="item">The InventoryItem</param>
/// <param name="return">the string-info</param>
private string InventoryItemToString(InventoryItem item)
{
if ( item == null )
return "NULL";
return Convert.ToString(item.Count)+"x "+item.Name;
}
//VaNaTiC<-
//VaNaTiC->
/// <summary>
/// Returns a detailed info-string of an InventoryItem
/// </summary>
/// <param name="item">The InventoryItem</param>
/// <param name="return">the string-info</param>
private string InventoryItemToDetailString(InventoryItem item)
{
if ( item == null )
return "NULL";
// Std.Info
String s = Convert.ToString(item.Count)+"x "+item.Name+" ("+
"ID:"+Convert.ToString(item.Id_nb)+
" Lvl:"+Convert.ToString(item.Level)+
" Model:"+Convert.ToString(item.Model)+
" Cond.:"+Convert.ToString(item.Condition)+"/"+Convert.ToString(item.MaxCondition)+
" Dura.:"+Convert.ToString(item.Durability)+"/"+Convert.ToString(item.MaxDurability);
if ( item.Object_Type != 0 )
s = s + " ObjTyp:"+Convert.ToString((eObjectType)item.Object_Type);
if ( item.DPS_AF > 0 )
s = s + " DPS/AF:"+Convert.ToString(item.DPS_AF);
if ( item.SPD_ABS > 0 )
s = s + " SPD/ABS:"+Convert.ToString(item.SPD_ABS);
if ( item.Weight > 0 )
s = s + " Weight:"+Convert.ToString(item.Weight);
if ( item.Value != 0 )
s = s + " Value:"+Convert.ToString(item.Value);
if ( item.Effect != 0 )
s = s + " Effect:"+Convert.ToString(item.Effect);
if ( item.Emblem != 0 )
s = s + " Emblem:"+Convert.ToString(item.Emblem);
if ( item.Realm == 0 )
s = s + " Realm:ALL";
else if ( item.Realm == 1 )
s = s + " Realm:Alb";
else if ( item.Realm == 2 )
s = s + " Realm:Mid";
else if ( item.Realm == 3 )
s = s + " Realm:Hib";
else
s = s + " Realm:???";
if ( item.Type_Damage != 0 )
s = s + " DmgTyp:"+Convert.ToString((eDamageType)item.Type_Damage);
if ( item.CrafterName != null && item.CrafterName != "" )
s = s + " Crafter:"+item.CrafterName;
if ( item.SpellID != 0 )
s = s + " Spell0:"+Convert.ToString(item.SpellID)+"="+Convert.ToString(item.Charges)+"/"+Convert.ToString(item.MaxCharges);
if ( item.SpellID != 0 )
s = s + " Spell1:"+Convert.ToString(item.SpellID1)+"="+Convert.ToString(item.Charges1)+"/"+Convert.ToString(item.MaxCharges1);
if ( item.SpellID != 0 )
s = s + " Proc0:"+Convert.ToString(item.ProcSpellID);
if ( item.ProcSpellID1 != 0 )
s = s + " Proc1:"+Convert.ToString(item.ProcSpellID1);
if ( item.PoisonSpellID != 0 )
s = s + " Poison:"+Convert.ToString(item.PoisonSpellID)+"="+Convert.ToString(item.PoisonCharges)+"/"+Convert.ToString(item.PoisonMaxCharges);
// Boni-Info
for ( int i = 0; i <= 11; i++ )
{
int iType = -1, iAmount = -1;
switch ( i )
{
case 0: { iType = 0;/*no public property for m_bonusType!!!*/ iAmount = item.Bonus; break; }
case 1: { iType = item.Bonus1Type; iAmount = item.Bonus1; break; }
case 2: { iType = item.Bonus2Type; iAmount = item.Bonus2; break; }
case 3: { iType = item.Bonus3Type; iAmount = item.Bonus3; break; }
case 4: { iType = item.Bonus4Type; iAmount = item.Bonus4; break; }
case 5: { iType = item.Bonus5Type; iAmount = item.Bonus5; break; }
case 6: { iType = item.Bonus6Type; iAmount = item.Bonus6; break; }
case 7: { iType = item.Bonus7Type; iAmount = item.Bonus7; break; }
case 8: { iType = item.Bonus8Type; iAmount = item.Bonus8; break; }
case 9: { iType = item.Bonus9Type; iAmount = item.Bonus9; break; }
case 10: { iType = item.Bonus10Type; iAmount = item.Bonus10; break; }
case 11: { iType = item.ExtraBonusType; iAmount = item.ExtraBonus; break; }
//default: { iType = -1; iAmount = -1; }
}
if ( iType != -1 && iType != 0 && iAmount != 0 )
s = s +
(i == 11 ? " BonE" : " Bon"+Convert.ToString(i)) + ":" +
PropertyToString((eProperty)iType)+
(iAmount < 0 ? "-" : "+") + Convert.ToString(iAmount);
}
// And return
return s + ")";
}
//VaNaTiC<-
//VaNaTiC->
/// <summary>
/// Returns the eInventorySlot as textual representation
/// </summary>
/// <param name="iSlotPos">eInventorySlot from item.SlotPosition()</param>
/// <param name="return">the string-representation of the InvSlot-position</param>
private string SlotPositionToString(int iSlotPos)
{
if ( iSlotPos >= (int)eInventorySlot.FirstBackpack && iSlotPos <= (int)eInventorySlot.LastBackpack )
return "["+Convert.ToString(iSlotPos)+"]Backpack"+Convert.ToString(iSlotPos-(int)eInventorySlot.FirstBackpack);
else if ( iSlotPos >= (int)eInventorySlot.FirstVault && iSlotPos <= (int)eInventorySlot.LastVault )
return "["+Convert.ToString(iSlotPos)+"]Vault"+Convert.ToString(iSlotPos-(int)eInventorySlot.FirstVault);
else
switch ( iSlotPos )
{
case -6: return "[-6]LastEmptyQuiver";
case -5: return "[-5]FirstEmptyQuiver";
case -4: return "[-4]LastEmptyVault";
case -3: return "[-3]FirstEmptyVault";
case -2: return "[-2]LastEmptyBackpack";
case -1: return "[-1]FirstEmptyBackpack";
case 0: return "[0]Invalid";
case 1: return "[1]Ground";
//case 7: return "[7]Min_Inv";
case 7: return "[7]HorseArmor";
case 8: return "[8]HorseBarding";
case 9: return "[9]Horse";
//case 10: return "[10]MinEquipable";
case 10: return "[10]RightHandWeapon";
case 11: return "[11]LeftHandWeapon";
case 12: return "[12]TwoHandWeapon";
case 13: return "[13]DistanceWeapon";
case 14: return "[14]FirstQuiver";
case 15: return "[15]SecondQuiver";
case 16: return "[16]ThirdQuiver";
case 17: return "[17]FourthQuiver";
case 21: return "[21]HeadArmor";
case 22: return "[22]HandsArmor";
case 23: return "[23]FeetArmor";
case 24: return "[24]Jewellery";
case 25: return "[25]TorsoArmor";
case 26: return "[26]Cloak";
case 27: return "[27]LegsArmos";
case 28: return "[28]ArmsArmor";
case 29: return "[29]Neck";
case 32: return "[32]Waist";
case 33: return "[33]LeftBracer";
case 34: return "[34]RightBracer";
case 35: return "[35]LeftRing";
case 36: return "[36]RightRing";
//case 36: return "[36]MaxEquipable";
//FirstBackpack = 40,
//LastBackpack = 79,
case 80: return "[80]Mithril";
case 81: return "[81]Platinum";
case 82: return "[82]Gold";
case 83: return "[83]Silver";
case 84: return "[84]Copper";
case 100: return "[100]PlayerPaperDoll";
//FirstVault = 110,
//LastVault = 149,
//Max_Inv = 149,
//Consignment_First = 150,
//Consignment_last = 249,
//FirstFixLoot = 256, //You can define drops that will ALWAYS occur (eg quest drops etc.)
//LastFixLoot = 356, //100 drops should be enough ... if not, just raise this var, we have thousands free
//LootPagesStart = 500, //Let's say each loot page is 100 slots in size, lots of space for random drops
// money slots changed since 178
case 500: return "[500]Mithril";
case 501: return "[501]Platinum";
case 502: return "[502]Gold";
case 503: return "[503]Silver";
case 504: return "[504]Copper";
case 600: return "[600]NewPlayerPaperDoll";
default: return "Invalid Slot Position";
}// switch iSlotPos
}
//VaNaTiC<-
//VaNaTiC->
/// <summary>
/// Returns the eProperty as textual representation
/// </summary>
/// <param name="prop">eProperty from item.***Type()</param>
/// <param name="return">the string-representation of the property</param>
private string PropertyToString(eProperty prop)
{
switch ( (byte)prop )
{
case 0: return "???";
case 1: return "STR";
case 2: return "DEX";
case 3: return "CON";
case 4: return "QUI";
case 5: return "INT";
case 6: return "PIE";
case 7: return "EMP";
case 8: return "CHA";
case 9: return "MaxMana";
case 10: return "MaxHealth";
case 11: return "(R)Body";
case 12: return "(R)Cold";
case 13: return "(R)Crush";
case 14: return "(R)Energy";
case 15: return "(R)Heat";
case 16: return "(R)Matter";
case 17: return "(R)Slash";
case 18: return "(R)Spirit";
case 19: return "(R)Thrust";
case 20: return "(S)2H";
case 21: return "(S)Body";
case 22: return "(S)Chants";
case 23: return "(S)CS";
case 24: return "(S)Crossbow";
case 25: return "(S)Crush";
case 26: return "(S)DeathServ.";
case 27: return "(S)DeathSight";
case 28: return "(S)DW";
case 29: return "(S)Earth";
case 30: return "(S)Enhanc.";
case 31: return "(S)Envenom";
case 32: return "(S)Fire";
case 33: return "(S)Flexible";
case 34: return "(S)Crossbow";
case 35: return "(S)Cold";
case 36: return "(S)Instruments";
case 37: return "(S)Longbows";
case 38: return "(S)Matter";
case 39: return "(S)PainWork.";
case 40: return "(S)Parry";
case 41: return "(S)Polearms";
case 42: return "(S)Rejuv.";
case 43: return "(S)Shields";
case 44: return "(S)Slash";
case 45: return "(S)Smite";
case 46: return "(S)SoulRend.";
case 47: return "(S)Spirit";
case 48: return "(S)Staff";
case 49: return "(S)Stealth";
case 50: return "(S)Thrust";
case 51: return "(S)Wind";
case 52: return "(S)Sword";
case 53: return "(S)Hammer";
case 54: return "(S)Axe";
case 55: return "(S)LeftAxe";
case 56: return "(S)Spear";
case 57: return "(S)Mending";
case 58: return "(S)Augment.";
case 59: return "(S)CaveMagic";
case 60: return "(S)Darkness";
case 61: return "(S)Suppress";
case 62: return "(S)Runecarv";
case 63: return "(S)Stormcall";
case 64: return "(S)BeastCraft";
case 65: return "(S)Light";
case 66: return "(S)Void";
case 67: return "(S)Mana";
case 68: return "(S)Composite";
case 69: return "(S)Battlesongs";
case 70: return "(S)Enchant.";
//case 71: return "(S)...";
case 72: return "(S)Blades";
case 73: return "(S)Blunt";
case 74: return "(S)Piercing";
case 75: return "(S)LargeWeap.";
case 76: return "(S)Menta.";
case 77: return "(S)Regrowth";
case 78: return "(S)Nurture";
case 79: return "(S)Nature";
case 80: return "(S)Music";
case 81: return "(S)CeltDual";
case 82: return "(S)CeltSpear";
case 83: return "(S)Recurvedbow";
case 84: return "(S)Valor";
case 85: return "(S)Subterra.";
case 86: return "(S)BoneArmy";
case 87: return "(S)Verdant";
case 88: return "(S)Creeping";
case 89: return "(S)Arboreal";
case 90: return "(S)Sythe";
case 91: return "(S)ThrownWeap";
case 92: return "(S)HandToHand";
case 93: return "(S)Shortbow";
case 94: return "(S)Pacific.";
case 95: return "(S)Savagery";
case 96: return "(S)Nightshade";
case 97: return "(S)Pathfind.";
case 98: return "(S)Summoning";
case 99: return "(S)Dementia";
case 100: return "(S)ShadowMast.";
case 101: return "(S)Vamp.Embrace";
case 102: return "(S)Eth.Shriek";
case 103: return "(S)Phant.Wail";
case 104: return "(S)Spec.Force";
case 105: return "(S)OdinsWill";
case 106: return "(S)Cursing";
case 107: return "(S)Hexing";
case 108: return "(S)Witchcraft";
case 120: return "(F)Darkness.";
case 121: return "(F)Suppresion";
case 122: return "(F)Runecarving";
case 123: return "(F)Spirit";
case 124: return "(F)Fire";
case 125: return "(F)Air";
case 126: return "(F)Cold";
case 127: return "(F)Earth";
case 128: return "(F)Light";
case 129: return "(F)Body";
case 130: return "(F)Matter";
//case 131: return "(F)Mind";
case 132: return "(F)Mind";
case 133: return "(F)Void";
case 134: return "(F)Mana";
case 135: return "(F)Enchant.";
case 136: return "(F)Menta.";
case 137: return "(F)Summon.";
case 138: return "(F)BoneArmy";
case 139: return "(F)PainWork.";
case 140: return "(F)DeathSight";
case 141: return "(F)SeathServ.";
case 142: return "(F)Verdant";
case 143: return "(F)Creep.Path";
case 144: return "(F)Arboreal";
case 157: return "(F)Ether.Shriek/DPS";
case 158: return "(F)Phant.Wail/MagicABS";
case 159: return "(F)Spec.Force";
case 160: return "(F)Cursing";
case 161: return "(F)Hexing";
case 162: return "(F)Witchcraft";
case 145: return "MaxSpeed";
case 147: return "MaxConc.";
case 148: return "AF";
case 149: return "ABS";
case 150: return "HealthReg";
case 151: return "PowerReg";
case 152: return "EnduReg";
case 153: return "SpellRange";
case 154: return "ArcherRange";
case 155: return "MeleeSpeed";
case 156: return "Acuity";
//case 157: return "DPS";
//case 158: return "MagicABS";
case 163: return "(S)AllMagic";
case 164: return "(S)AllMelee";
case 165: return "(F)AllLevels";
case 167: return "(S)AllDW";
case 168: return "(S)AllArchery";
case 166: return "Liv.Eff.Lvl.";
case 169: return "(C)Evade";
case 170: return "(C)Block";
case 171: return "(C)Parry";
case 172: return "Fatig.Cons.";
case 175: return "(C)Fumble";
case 173: return "MeleeDmg";
case 174: return "RangedDmg";
case 176: return "MezzDura";
case 177: return "StunDura";
case 178: return "SpeedDecDura";
case 179: return "BT-Reinf.";
case 180: return "Def.Bonus";
case 182: return "Neg.Reduc.";
case 183: return "PieceAblative";
case 184: return "React.StyleDmg";
case 185: return "SpellPowerCosts";
case 186: return "StyleCosts";
case 187: return "ToHit";
case 188: return "ArcherSpeed";
case 189: return "ArrowRecov.";
case 190: return "Buff-Effect.";
case 191: return "CastSpeed";
case 192: return "DeathExpLoss";
case 193: return "DebuffEffect.";
case 194: return "Fatigue";
case 195: return "HealEffect.";
case 196: return "PowerPool";
case 197: return "ResistPierce";
case 198: return "SpellDmg";
case 199: return "SpellDura";
case 200: return "StyleDmg";
case 201: return "StrCap";
case 202: return "DexCap";
case 203: return "ConCap";
case 204: return "QuiCap";
case 205: return "IntCap";
case 206: return "PieCap";
case 207: return "EmpCap";
case 208: return "ChaCap";
case 209: return "AcuCap";
case 210: return "MaxHealthCap";
case 211: return "PowerPoolCap";
case 212: return "(S)Weapon";
case 213: return "(S)All";
case 214: return "(C)Crit.Melee";
case 215: return "(C)Crit.Archer";
case 216: return "(C)Crit.Spell";
case 217: return "WaterSpeed";
}
return "NULL";
}
//VaNaTiC<-
Return to “%s” DOL Development Discussion
Users browsing this forum: No registered users and 1 guest