The Dink Network

Stupid boots.

April 18th 2010, 06:29 AM
dragon.gif
Quiztis
Peasant He/Him Sweden bloop
Life? What's that? Can I download it?! 
Will something similar to this work?

if (&cur_weapon == "s1-boots") //Supposed to be a number (1-16) for the inventory slots.
{
// do stuff
}


Or can I make a fixed spot for the boots in the inventory somehow?
April 18th 2010, 06:34 AM
burntree.gif
Fireball5
Peasant He/Him Australia
Let me heat that up for you... 
The only way for you to have a fxed position that the boots are in (that I kno of) is to replace all the items slots with placeholders like my Armour Demonstration.

I'm pretty sure you can check what item the player has equipped with DinkC anyway so unless you really needed to I probably wouldn't bother trying to fix the boots into one particular inventory slot.
April 18th 2010, 06:34 AM
dinkdead.gif
What do you want to do exactly? Have the boots give their speed boost all the time they are in the inventory, even when not equipped, check to see if Dink has the boots equipped or just check to to see if he owns them yet?
April 18th 2010, 06:38 AM
dragon.gif
Quiztis
Peasant He/Him Sweden bloop
Life? What's that? Can I download it?! 
It's for a savebot that checks for the boots:

void main( void )
{
sp_seq(&current_sprite, 449);
sp_sound(&current_sprite, 34);
sp_brain(&current_sprite, 6);
sp_hitpoints(&current_sprite, 0);
int &log = count_item("item-l");
if (&log > 0)
{
int &boo;
&boo = count_item("boots-s1");
if (&boo > 0)
{
// If (&cur_weapon == "boots-s1")
//{
set_dink_speed(2);
}
else
{
set_dink_speed(4);
}
}
//}
int &whe = count_item("item-l");
if (&whe > 0)
{
int &boo;
&boo = count_item("boots-s1");
if (&boo > 0)
{
// If (&cur_weapon == "boots-s1")
//{
set_dink_speed(2);
}
else
{
set_dink_speed(4);
}
}
}
//}

void hit( void )
{
 say("Die, strange machine that doesn't belong here!", 1);
}


If Dink is on the same screen as the savebot, when I equip the boots Dink speed will be set to fast. If I unequip them Dink's speed will still be fast even when he got his fists equipped. &whe and &log are heavy items that slows Dink down and &boo are the boots.
April 18th 2010, 06:42 AM
dragon.gif
Quiztis
Peasant He/Him Sweden bloop
Life? What's that? Can I download it?! 
It's a mess but I can't see any other way to fix it. Any suggestions on how to check whether Dink has te boots equipped or not?
April 18th 2010, 07:15 AM
dinkdead.gif
Use compare_weapon instead of count_item.
"count_item counts the number of items with the script "script" in the weapon/item inventory."
"compare_weapon returns '1' if the currently armed weapon is "script"."


&boo  = compare_weapon("boots-s1");
if (&boo == 1)

That's the same as
if (&cur_weapon == "boots-s1")

Which won't work