Added /slap - /slap <player> [dmg].

^ Seems buggy ATM, only smacks you in one direction and seems to ignore tile collision.
This commit is contained in:
Deathmax 2011-06-02 23:14:23 +08:00
parent 098841e7e9
commit 17c6fa8e87
2 changed files with 37 additions and 25 deletions

View file

@ -273,7 +273,6 @@ namespace TShockAPI
tileThreshold[i] = 0;
}
}
//writestuff();
}
/*
@ -418,6 +417,12 @@ namespace TShockAPI
NetMessage.SendData(44, i, -1, "", plr, (float)1, (float)9999999, (float)0);
}
public static void SendDataAll(int type, int ignore = -1, string text = "", int num = 0, float f1 = 0f, float f2 = 0f, float f3 = 0f)
{
for (int i = 0; i < Main.player.Length; i++)
NetMessage.SendData(type, i, ignore, text, num, f1, f2, f3);
}
//TODO : Notify the player if there is more than one match. (or do we want a First() kinda thing?)
public static int GetNPCID(string name, bool exact = false)
{
@ -465,29 +470,5 @@ namespace TShockAPI
}
return false;
}
public static void writestuff()
{
NPC npc = new NPC();
string[] npclist = new string[44];
int h = 0;
for (int i = 1; i < 44; i++)
{
npc.SetDefaults(i);
//npclist[h++] = string.Format("{0} - {1} - {2} - {3} - {4} - {5} - {6} - {7}", i, npc.name, npc.townNPC, npc.boss, npc.noGravity, npc.lifeMax, npc.damage, npc.defense);
npclist[h++] = string.Format("{0}\t-\t{1}\t-\t{2}\t-\t{3}\t-\t{4}\t-\t{5}\t-\t{6}\t-\t{7}", i, npc.name, npc.townNPC, npc.boss, npc.noGravity, npc.lifeMax, npc.damage, npc.defense);
}
File.WriteAllLines("npclist.txt", npclist);
Item item = new Item();
string[] itemlist = new string[236];
h = 0;
for (int i = 1; i < 236; i++)
{
item.SetDefaults(i);
//itemlist[h++] = string.Format("{0} - {1} - {2} - {3}", i, item.name, item.maxStack, item.rare);
itemlist[h++] = string.Format("{0}\t-\t{1}\t-\t{2}\t-\t{3}", i, item.name, item.maxStack, item.rare);
}
File.WriteAllLines("itemlist.txt", itemlist);
}
}
}