Jump to content
  • 0
Sign in to follow this  
mleo1

Where can I find this in database?, and how to read

Question

1 answer to this question

Recommended Posts

  • 0

Your answer is hidden inside doc/script_commands.txt, inside the getitem2 description:

 

If you still want to try creating a named item with this command because
'getnameditem' won't do it for you cause it's too limited, you can do it
like this. Careful, minor magic ahead.

 // First, let's get an ID of a character who's name will be on the
 // item. Only an existing character's name may be there.
 // Let's assume our character is 'Adam' and find his ID.

 set @charid,getcharid(0,"Adam");

 // Now we split the character ID number into two portions with a
 // binary shift operation. If you don't understand what this does,
 // just copy it.

 set @card3, @charid & 65535;
 set @card4, @charid >> 16;

 // If you're inscribing non-equipment, @card1 must be 254.
 // Arrows are also not equipment. :)
 set @card1,254;

 // For named equipment, card2 means the Star Crumbs and elemental
 // crystals used to make this equipment. For everything else, it's 0.

 set @card2,0;

 // Now, let's give the character who invoked the script some
 // Adam's Apples:

 getitem2 512,1,1,0,0,@card1,@card2,@card3,@card4;

This wasn't tested with all possible items, so I can't give any promises,
experiment first before relying on it.

To create equipment, continue this example it like this:

 // We've already have card3 and card4 loaded with correct
 // values so we'll just set up card1 and card2 with data
 // for an Ice Stiletto.

 // If you're inscribing equipment, @card1 must be 255.
 set @card1,255;

 // That's the number of star crumbs in a weapon.
 set @sc,2;

 // That's the number of elemental property of the weapon.
 set @ele,1;

 // And that's the wacky formula that makes them into
 // a single number.  
 set @card2,@ele+((@sc*5)<<8);

 // That will make us an Adam's +2 VVS Ice Stiletto:

 getitem2 1216,1,1,2,0,@card1,@card2,@card3,@card4;

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.