Page 1 of 1

how move something from BoxA to BoxB?

Posted: 21.01.2015 0:01
by verbin
function mvitem():integer;
var
BoxA,BoxB,Temp:word;
begin
if FindType($9aa,Ground) > 0 then
//there FindQuantity is 2
BoxA := FimdItem;
//now, how do find other Box?
UseObject(BoxA); //But System Tell Me Object Not Found?
FindItem($1bf2,BoxA) //I Have some $1bf2 in this box,but can't find
Temp := Finditem;
MoveItem(Temp,10,BoxB,0,0,0);//this not source?only destination? how affirm source box?
end;
i understand Delphi , don't tell me about syntax error,this only draft

Re: how move something from BoxA to BoxB?

Posted: 21.01.2015 1:04
by drabadan

Code: Select all

function mvitem() :integer;
var
 BoxA, BoxB, Temp : Cardinal; //Mistake! BoxA and BoxB must be Cardinal, word is for types of items, Cardinals for IDs;
begin 
 if FindType($9aa, Ground) > 0 then
 //there FindQuantity is 2
  BoxA := FindItem;
 //now, how do find other Box?
 UseObject(BoxA); //But System Tell Me Object Not Found?
 FindType($1bf2, BoxA) //To find smth you need FindType(Object Type : Word; Container where to look : Cardinal);
 Temp := Finditem;
 BoxB := Backpack; //initializing BoxB with Id of self's backpack;
 MoveItem(Temp, 10, BoxB,0,0,0); //Source box is'nt needed for affirming becouse of using ID of Item;
end;

Re: how move something from BoxA to BoxB?

Posted: 21.01.2015 1:10
by drabadan
drabadan wrote:

Code: Select all

function mvitem() :integer;
var
 BoxA, BoxB, Temp : Cardinal; //Mistake! BoxA and BoxB must be Cardinal, word is for types of items, Cardinals for IDs;
begin 
 if FindType($9aa, Ground) > 0 then
 //there FindQuantity is 2
  BoxA := FindItem;
 //now, how do find other Box?
 UseObject(BoxA); //But System Tell Me Object Not Found?
 FindType($1bf2, BoxA) //To find smth you need FindType(Object Type : Word; Container where to look : Cardinal);
 Temp := Finditem;
 BoxB := Backpack; //initializing BoxB with Id of self's backpack;
 MoveItem(Temp, 10, BoxB,0,0,0); //Source box is'nt needed for affirming becouse of using ID of Item;
 Result := 1;
end;
How would i do that:

Code: Select all

function mvitem() : Integer;
var
 BoxA : Cardinal;
begin
 BoxA := 0;
 if FindType($9aa, Ground) > 0 then
  BoxA := FindItem;
 if BoxA <> 0 then 
  if FindType($1bf2, BoxA) > 0 then
   if MoveItem(FindItem, 10, Backpack, 0,0,0) then
    Wait(600)
   else
    Wait(50);
end;

Re: how move something from BoxA to BoxB?

Posted: 21.01.2015 1:20
by drabadan
drabadan wrote:
drabadan wrote:

Code: Select all

function mvitem() :integer;
var
 BoxA, BoxB, Temp : Cardinal; //Mistake! BoxA and BoxB must be Cardinal, word is for types of items, Cardinals for IDs;
begin 
 if FindType($9aa, Ground) > 0 then
 //there FindQuantity is 2
  BoxA := FindItem;
 //now, how do find other Box?
 UseObject(BoxA); //But System Tell Me Object Not Found?
 FindType($1bf2, BoxA) //To find smth you need FindType(Object Type : Word; Container where to look : Cardinal);
 Temp := Finditem;
 BoxB := Backpack; //initializing BoxB with Id of self's backpack;
 MoveItem(Temp, 10, BoxB,0,0,0); //Source box is'nt needed for affirming becouse of using ID of Item;
 Result := 1;
end;
How would i do that:

Code: Select all

function mvitem() : Integer;
var
 BoxA : Cardinal;
begin
 BoxA := 0;
 if FindType($9aa, Ground) > 0 then
  BoxA := FindItem;
 if BoxA <> 0 then 
  if FindType($1bf2, BoxA) > 0 then
   if MoveItem(FindItem, 10, Backpack, 0,0,0) then
    Wait(600)
   else
    Wait(50);
end;
But this is a very bad coding example. Maybe you should try to explaine what you want to see with the words, and we will try to interpritate that in code. In more or less propper way...

Re: how move something from BoxA to BoxB?

Posted: 21.01.2015 1:35
by verbin
thank for response me
but i don't move item to my backpack
i want move item from BoxA to BoxB
findtype only find BoxA,how find BoxB?

Re: how move something from BoxA to BoxB?

Posted: 21.01.2015 1:48
by verbin
and how debug scripts?
i check "Enable Debug Mode"
and press F7 or F8 or F9
scripts not run or not stop in breakpoint

Re: how move something from BoxA to BoxB?

Posted: 21.01.2015 1:52
by verbin
drabadan wrote:
drabadan wrote:
drabadan wrote:

Code: Select all

function mvitem() :integer;
var
 BoxA, BoxB, Temp : Cardinal; //Mistake! BoxA and BoxB must be Cardinal, word is for types of items, Cardinals for IDs;
begin 
 if FindType($9aa, Ground) > 0 then
 //there FindQuantity is 2
  BoxA := FindItem;
 //now, how do find other Box?
 UseObject(BoxA); //But System Tell Me Object Not Found?
 FindType($1bf2, BoxA) //To find smth you need FindType(Object Type : Word; Container where to look : Cardinal);
 Temp := Finditem;
 BoxB := Backpack; //initializing BoxB with Id of self's backpack;
 MoveItem(Temp, 10, BoxB,0,0,0); //Source box is'nt needed for affirming becouse of using ID of Item;
 Result := 1;
end;
How would i do that:

Code: Select all

function mvitem() : Integer;
var
 BoxA : Cardinal;
begin
 BoxA := 0;
 if FindType($9aa, Ground) > 0 then
  BoxA := FindItem;
 if BoxA <> 0 then 
  if FindType($1bf2, BoxA) > 0 then
   if MoveItem(FindItem, 10, Backpack, 0,0,0) then
    Wait(600)
   else
    Wait(50);
end;
But this is a very bad coding example. Maybe you should try to explaine what you want to see with the words, and we will try to interpritate that in code. In more or less propper way...
this just draft,Express the meaning of probably