Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getfrombank(what, amount, color){ // what is string mask like "0x123|0x321"
- Orion.Say('bank');
- Orion.Wait(2000);
- var objs = Orion.FindType(what, color, lastcontainer, '', '2'); // Orion.GetSerial(lastcontainer)
- for (var i = 0; i < objs.length; i++){
- var obj = Orion.FindObject(objs[i]);
- if (obj){
- if (obj.Count() > amount)
- Orion.MoveItem(objs[i], amount, backpack );
- if (amount >= obj.Count())
- Orion.MoveItem(objs[i], obj.Count(), backpack );
- Orion.Wait(Orion.Random(1000,2000));
- }
- }
- }
- function bowcraft2(){
- //var pila = Orion.FindType('0x1034','0xFFFF' ,backpack, '', '5');
- var iter = 0;
- while (true){
- var gump = Orion.GetLastGump();
- if (gump){
- var texts = gump.TextList();
- if (texts[texts.length-1] == 'You create the item.' ||
- texts[texts.length-1] == 'You create an exceptional quality item.' ||
- texts[texts.length-1] == 'You failed to create the item, and some of your materials are lost.' ||
- texts[texts.length-1] == 'You recycle several items.'
- ){
- Orion.Wait(50);
- Orion.UseObject(Orion.FindType('0x1034','0xFFFF' ,backpack, '', '5')[0]);
- Orion.WaitGump(Orion.CreateGumpHook('7'));
- iter = 0;
- }
- else if (texts[texts.length-1] == "You don't have the resources required to make that item." || Player.Weight() > (Player.MaxWeight()-20)){
- Orion.UseObject(Orion.FindType('0x1034','0xFFFF' ,backpack, '', '5')[0]); // переделайте на usetype я не знал что она есть
- Orion.WaitGump(Orion.CreateGumpHook('3')) // recicle to resources
- Orion.WaitTargetObject(self);
- Orion.Wait(1500);
- iter = 0;
- }
- else if (texts[texts.length-1] == "You have worn out your tool."){
- //var pila = Orion.FindType('0x1034','0xFFFF' ,backpack, '', '5');
- Orion.UseObject(Orion.FindType('0x1034','0xFFFF' ,backpack, '', '5')[0]);
- Orion.WaitGump(Orion.CreateGumpHook('7'));
- iter = 0;
- }
- }
- if (Player.Weight() > (Player.MaxWeight()-20)){
- Orion.UseObject(Orion.FindType('0x1034','0xFFFF' ,backpack, '', '5')[0]);
- Orion.WaitGump(Orion.CreateGumpHook('3')) // recicle to resources
- Orion.WaitTargetObject(self);
- Orion.Wait(1500);
- iter = 0;
- }
- if (Player.Weight() < 100){
- getfrombank(0x1BD7, 500, 0xffff);
- Orion.Wait(2000);
- iter = 0;
- }
- iter++;
- Orion.Wait(500);
- if (iter > 10){
- iter = 0;
- Orion.UseObject(Orion.FindType('0x1034','0xFFFF' ,backpack, '', '5')[0]);
- Orion.WaitGump(Orion.CreateGumpHook('7'));
- }
- }
- //playbzzz();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement