d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > General Archive > gah! help with the cube
Add Reply New Topic
Banned
Posts: 25
Joined: Sep 26 2002
Gold: 64.60
Oct 1 2002 07:12pm
i cant open my damn cube, here is the code im using

[CODE]
function locateItem(who, itemcode, loc) {
start=getItem();
if(start) do
{
if(itemcode==start.code && loc==start.state)
{
if(who) if(start.state<3)
{
punit=start.getParent();
if(punit) if(punit.name==who.name) return start;
} else return start;
}
} while(start.getNext());
}

function main(){
cub = locateItem(me,"box",0);
if(cub) {
print("Found the cube in your inventory!!, Transmuting now...");
print(cub.itemloc);
cub.interact(1);
delay(300);
cub.interact(1);
}
}

[/CODE]
Retired Moderator
Posts: 538
Joined: Sep 24 2002
Gold: 327.00
Oct 2 2002 12:48am
What about
[CODE]var cube=getItem("box");
if (cube) {
cube.interact(1);
}[/CODE]
Member
Posts: 1,223
Joined: Sep 30 2002
Gold: 0.00
Oct 2 2002 01:15am
ya i can't get it to work either :/

[CODE]
// open cube
print("Opening Cube");
cube = getItem("box", 100);
cube.interact(1);

// put leg in cube
print("Putting leg into cube");
leg.interact();
while(!me.itemoncursor) delay(100);
leg.move(0,0,3);
delay(2000);

// put tome in cube
print("putting tome into cube");
tome = getItem("tbk", 100);
tome.interact();
while(!me.itemoncursor) delay(100);
tome.move(1,0,3);
delay(2000);

// transmute
print("Transmuting.. cross your fingers!");
//cube.interact(1);
raw("send 4f180000000000");
[/CODE]

note it's in the middle of my script so there's more error checking than that :)

it works if I manually open it after it starts putting the items in it, but it doesn't want to open it by itself.
Admin
Posts: 24,821
Joined: Sep 24 2002
Gold: 47,512.72
Trader: Trusted
Oct 2 2002 07:35am
This has been fixed, will come out with beta 17.
Member
Posts: 1,223
Joined: Sep 30 2002
Gold: 0.00
Oct 2 2002 11:17am
yay thanks :D
Go Back To General Archive Topic List
Add Reply New Topic