E: code to docela dost kazi, tak jsem provizorne nahodil syntax higlighter a hodil jsem to do skladiste sem
,movepotions
Enjoy!
Kód: Vybrat vše
using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.Runtime;
using Phoenix.WorldData;
// made by Leny-m
namespace Scripts.DarkParadise
{
public class MovePotions
{
int size = 6;
[Command]
public void movePotions(){
UO.Print("Choose source container");
UOItem from = new UOItem(UIManager.TargetObject());
UO.Print("Choose target container");
UOItem to = new UOItem(UIManager.TargetObject());
UOItem[] potions = new UOItem[size];
potions[0] = World.Player.Backpack.AllItems.FindType(0x0F09,0x0003); // tmr
potions[1] = World.Player.Backpack.AllItems.FindType(0x0F0C,0x0000); // gh
potions[2] = World.Player.Backpack.AllItems.FindType(0x0F09,0x0000); // gs
potions[3] = World.Player.Backpack.AllItems.FindType(0x0F0B,0x0000); // tr
potions[4] = World.Player.Backpack.AllItems.FindType(0x0F07,0x0000); // gc
potions[5] = World.Player.Backpack.AllItems.FindType(0x0F0C,0x0025); // gb
ushort x = 15;
ushort y = 15;
for(int i = 0; i < size; i++)
{
x += 10;
int amount = UO.Count(potions[i].Graphic, potions[i].Color);
UO.Print("Moving {2} x {0}, {1}", potions[i].Graphic, potions[i].Color, amount);
for(int j = 0; j < amount; j++)
{
UOItem found = from.AllItems.FindType(potions[i].Graphic, potions[i].Color);
found.Move(0, to, x, y);
UO.Wait(250);
}
}
}
}
}