http://dl.dropbox.com/u/7651700/fena/Drinking.cs
,nalij / ,vypij
- akorat doplnte v hotkeych potiony
- napr ,nalij TMR ,vypij GH atd.
Kód: Vybrat vše
public struct TMR
{
public const ushort Keg_t = 0x1843;
public const ushort Keg_c = 0x0003;
public const ushort type = 0x0F09;
public const ushort color = 0x0003;
}
public struct GH
{
public const ushort Keg_t = 0x1843;
public const ushort Keg_c = 0x08A7;
public const ushort type = 0x0F0C;
public const ushort color = 0x0000;
}
public struct TR
{
public const ushort Keg_t = 0x1843;
public const ushort Keg_c = 0x014D;
public const ushort type = 0x0F0B;
public const ushort color = 0x0000;
}
public struct GC
{
public const ushort Keg_t = 0x1843;
public const ushort Keg_c = 0x0842;
public const ushort type = 0x0F07;
public const ushort color = 0x0000;
}
public struct GS
{
public const ushort Keg_t = 0x1843;
public const ushort Keg_c = 0x0481;
public const ushort type = 0x0F09;
public const ushort color = 0x0000;
}
public struct GB
{
public const ushort Keg_t = 0x1843;
public const ushort Keg_c = 0x0025;
public const ushort type = 0x0F0C;
public const ushort color = 0x0025;
}
public struct IV // invis
{
public const ushort type = 0x0F09;
public const ushort color = 0x0B77;
}
[Executable]
public void vypij(String napoj) //pije napoj podle jmena
{
switch (napoj)
{
case "GH":
if (UO.Count(GH.type) > 0)
{
UO.UseType(GH.type);
UO.Wait(500);
UO.Print(0x0435, "Zbyva " + UO.Count(GH.type) + " GH.");
}
else
{
UO.Print("Pruser, neni GH!!");
}
break;
case "TMR":
if (UO.Count(TMR.type, TMR.color) > 0)
{
UO.UseType(TMR.type, TMR.color);
UO.Wait(500);
UO.Print(0x0480, "Zbyva " + UO.Count(TMR.type, TMR.color) + " TMR.");
}
else
{
UO.Print("Pruser, neni TMR!!");
}
break;
case "TR":
if (UO.Count(TR.type) > 0)
{
UO.UseType(TR.type);
UO.Wait(500);
UO.Print("Zbyva " + UO.Count(TR.type) + " TR.");
}
else
{
UO.Print("Pruser, neni TR!!");
}
break;
case "GS":
if (UO.Count(GS.type, GS.color) > 0)
{
UO.UseType(GS.type, GS.color);
UO.Wait(500);
UO.Print(0x0481, "Zbyva " + UO.Count(GS.type, GS.color) + " GS.");
}
else
{
UO.Print("Pruser, neni GS!!");
}
break;
case "GC":
if (UO.Count(GC.type) > 0)
{
UO.UseType(GC.type);
UO.Wait(500);
UO.Print(0x0553, "Zbyva " + UO.Count(GC.type) + " GC.");
}
else
{
UO.Print("Pruser, neni GC!!");
}
break;
case "GB":
if (UO.Count(GB.type, GB.color) > 0)
{
UO.UseType(GB.type, GB.color);
UO.Wait(500);
UO.Print("Zbyva " + UO.Count(GB.type, GB.color) + " GB.");
}
else
{
UO.Print("Pruser, neni GB!!");
}
break;
case "IV":
if (UO.Count(IV.type, IV.color) > 0)
{
UO.UseType(IV.type, IV.color);
UO.Wait(500);
UO.Print("Zbyva " + UO.Count(IV.type, IV.color) + " Invisek.");
}
else
{
UO.Print("Pruser, neni Invis!!");
}
break;
default:
UO.PrintError("Spatne argumenty, nebo chybi napoj!! vypij \"jmeno_napoje\" (nalij \"TMR\"))");
break;
}
}
[Executable]
public void nalij(String napoj) //cepuje
{
UOItem kad;
UOItem lahve;
switch (napoj)
{
case "GH":
kad = World.Player.Backpack.AllItems.FindType(GH.Keg_t, GH.Keg_c);
if (kad.Serial != Serial.Invalid)
{
lahve = World.Player.Backpack.AllItems.FindType(0x0F0E);
if (lahve.Serial != Serial.Invalid)
{
World.Player.ChangeWarmode(WarmodeChange.Switch);
lahve.WaitTarget();
kad.Use();
UO.Print(0x0435, "Cepnuto GH");
}
else
{
UO.Print("Nemas lahvicky.");
}
}
else
{
UO.Print("Nemas kad s GH");
}
break;
case "GB":
kad = World.Player.Backpack.AllItems.FindType(GB.Keg_t, GB.Keg_c);
if (kad.Serial != Serial.Invalid)
{
lahve = World.Player.Backpack.AllItems.FindType(0x0F0E);
if (lahve.Serial != Serial.Invalid)
{
World.Player.ChangeWarmode(WarmodeChange.Switch);
lahve.WaitTarget();
kad.Use();
UO.Print(0x0435, "Cepnuto GB");
}
else
{
UO.Print("Nemas lahvicky.");
}
}
else
{
UO.Print("Nemas kad s GB");
}
break;
case "TMR":
kad = World.Player.Backpack.AllItems.FindType(TMR.Keg_t, TMR.Keg_c);
if (kad.Serial != Serial.Invalid)
{
lahve = World.Player.Backpack.AllItems.FindType(0x0F0E);
if (lahve.Serial != Serial.Invalid)
{
World.Player.ChangeWarmode(WarmodeChange.Switch);
lahve.WaitTarget();
kad.Use();
UO.Print(0x0480, "Cepnuto TMR");
}
else
{
UO.Print("Nemas lahvicky.");
}
}
else
{
UO.Print("Nemas kad s TMR");
}
break;
case "GC":
kad = World.Player.Backpack.AllItems.FindType(GC.Keg_t, GC.Keg_c);
if (kad.Serial != Serial.Invalid)
{
lahve = World.Player.Backpack.AllItems.FindType(0x0F0E);
if (lahve.Serial != Serial.Invalid)
{
World.Player.ChangeWarmode(WarmodeChange.Switch);
lahve.WaitTarget();
kad.Use();
UO.Print(0x0553, "Cepnuto GC");
}
else
{
UO.Print("Nemas lahvicky.");
}
}
else
{
UO.Print("Nemas kad s GC");
}
break;
case "GS":
kad = World.Player.Backpack.AllItems.FindType(GS.Keg_t, GS.Keg_c);
if (kad.Serial != Serial.Invalid)
{
lahve = World.Player.Backpack.AllItems.FindType(0x0F0E);
if (lahve.Serial != Serial.Invalid)
{
World.Player.ChangeWarmode(WarmodeChange.Switch);
lahve.WaitTarget();
kad.Use();
UO.Print(0x0481, "Cepnuto GS");
}
else
{
UO.Print("Nemas lahvicky.");
}
}
else
{
UO.Print("Nemas kad s GS");
}
break;
case "TR":
kad = World.Player.Backpack.AllItems.FindType(TR.Keg_t, TR.Keg_c);
if (kad.Serial != Serial.Invalid)
{
lahve = World.Player.Backpack.AllItems.FindType(0x0F0E);
if (lahve.Serial != Serial.Invalid)
{
World.Player.ChangeWarmode(WarmodeChange.Switch);
lahve.WaitTarget();
kad.Use();
UO.Print("Cepnuto TR");
}
else
{
UO.Print("Nemas lahvicky.");
}
}
else
{
UO.Print("Nemas kad s TR");
}
break;
default:
UO.PrintError("Spatne argumenty, nebo chybi napoj!! vypij \"jmeno_napoje\" (nalij \"TMR\"))");
break;
}
}