forked from DanielHazzard/Cure-Please
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathItems.cs
157 lines (137 loc) · 5.44 KB
/
Items.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace CurePlease
{
public partial class Form1
{
public class Items
{
// private List<int> TempItemListIDs;
// #region Item Enums
// public enum TempUsableItems : int
// {
// LucidEtherI = 5827,
// LucidEtherII = 5828,
// LucidEtherIII = 5829,
// /*ManaMist = 5833,
// ManaPowder = 4255,
// DustyEther = 5432,
// DustyElixir = 5433,
// LucidElixirI = 5830,
// LucidElixirII = 5831,*/
// Megalixir = 4254
// }
// public enum UsableMPItems : int
// {
// Mulsum = 4156,
// Ether = 4128,
// Ether1 = 4129,
// Ether2 = 4130,
// Ehter3 = 4131,
// HiEther = 4132,
// HiEther1 = 4133,
// HiEther2 = 4134,
// HiEther3 = 4135,
// /*Elixir = ,
// ElixirVitae = ,
// VileElixir = ,
// HiElixir = ,
// VileElixir1 = */
// }
// public enum UsableMPMedicatedItems : int
// {
// //
// }
// #endregion
// public Items()
// {
// this.TempItemListIDs = new List<int>();
// this.GetTempItems();
// // Usage:
// }
// private List<int> GetTempItems ()
// {
// for (byte i = 1; i <= _ELITEAPIPL.Item.TemporaryCount; i++)
// {
// foreach (var tempUsableItem in Enum.GetValues(typeof(TempUsableItems)))
// {
// if (_ELITEAPIPL.Item.GetTempItemIDByIndex(i) == (int)tempUsableItem)
// {
// this.TempItemListIDs.Add(_ELITEAPIPL.Item.GetTempItemIDByIndex(i));
// }
// }
// }
// return this.TempItemListIDs;
// }
// private bool HasTempItem (TempUsableItems tempitemname)
// {
// if (_ELITEAPIPL.Item.GetTempItemCount((ushort)Enum.Parse(typeof(TempUsableItems), tempitemname.ToString())) > 0)
// {
// return true;
// }
// return false;
// }
// public void TempItemUsageDetermination ()
// {
// // Only continue if we have the option to use low MP items selected
// if (!Properties.Settings.Default.lowMPuseitem)
// return;
// // Don't use items if your weakened
// if (_ELITEAPIPL.Player.StatusEffects.Any(status => status == StatusEffect.Weakness))
// {
// return;
// }
// int mpcurrent = _ELITEAPIPL.Player.MPCurrent;
// int mpmax = _ELITEAPIPL.Player.MPMax;
// int mppcurrent = _ELITEAPIPL.Player.MPPCurrent;
// if (mpcurrent + 1000 < mpmax)
// {
// if (this.HasTempItem(TempUsableItems.LucidEtherIII))
// {
// this.UseItem(TempUsableItems.LucidEtherIII);
// Thread.Sleep(1500);
// }
// }
// else if (( mpcurrent + 500 ) < mpmax)
// {
// if (this.HasTempItem(TempUsableItems.LucidEtherII))
// {
// this.UseItem(TempUsableItems.LucidEtherII);
// Thread.Sleep(1500);
// }
// }
// else if (mppcurrent + 250 < mpmax)
// {
// if (this.HasTempItem(TempUsableItems.LucidEtherI))
// {
// this.UseItem(TempUsableItems.LucidEtherI);
// Thread.Sleep(1500);
// }
// }
// // If we are out of MP then we need to use the megaelixir
// else if (mpcurrent <= Properties.Settings.Default.mpMinCastValue)
// {
// if (this.HasTempItem(TempUsableItems.Megalixir))
// {
// this.UseItem(TempUsableItems.Megalixir);
// Thread.Sleep(3500);
// }
// }
// }
// private void UseItem(TempUsableItems item)
// {
// if (_ELITEAPIPL.Player.Status == Status.Standing && this.HasTempItem(item))
// {
// _ELITEAPIPL.ThirdParty.SendString(string.Format("/item {0} <me>", FFACE.ParseResources.GetItemName((int)Enum.Parse(typeof(TempUsableItems), item.ToString()))));
// }
// }
// private int GetMPPfromInt()
// {
// return ((_ELITEAPIPL.Player.MPCurrent/_ELITEAPIPL.Player.MPMax)*100);
// }
}
}
}