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
Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7
how move something from BoxA to BoxB?
Re: how move something from BoxA to BoxB?
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?
How would i do that: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;
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?
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...drabadan wrote:How would i do that: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;
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?
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?
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?
and how debug scripts?
i check "Enable Debug Mode"
and press F7 or F8 or F9
scripts not run or not stop in breakpoint
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?
this just draft,Express the meaning of probablydrabadan wrote: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...drabadan wrote:How would i do that: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;
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;