lupus Posted July 2, 2014 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 43 Reputation: 0 Joined: 01/19/13 Last Seen: September 24, 2018 Share Posted July 2, 2014 Hello! I would like a sample script that can validate if a gun is made by a blacksmith or not. I'm thinking of creating a system unique to enchant weapons made by blacksmiths. But I found no function to do this validation. Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 2, 2014 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 2, 2014 Read getitem2 in docs/script_commands to enchant an item *getitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};*getitem2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};This command will give an amount of specified items to the invoking character.If an optional account ID is specified, and the target character is currentlyonline, items will be created in their inventory instead. If they are notonline, nothing will happen. It works essentially the same as 'getitem' (it evenworks for negative ID numbers the same way) but is a lot more flexible.Those parameters that are different from 'getitem' are:identify - Whether you want the item to be identified (1) or not (0).refine - For how many pluses will it be refined. It will not let you refine an item higher than the max refine.attribute - Whether the item is broken (1) or not (0).card1,2,3,4 - If you want a card compound to it, place the card ID number into the specific card slot.Card1-card4 values are also used to store name information for named items, aswell as the elemental property of weapons and armor. You can create a named itemin this manner, however, if you just need a named piece of standard equipment,it is much easier to the 'getnameditem' function instead.You will need to keep these values if you want to destroy and then perfectlyrecreate a named item, for this see 'getinventorylist'.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 likethis. 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. @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. @card3 = @charid & 65535; @card4 = @charid >> 16; // If you're inscribing non-equipment, @card1 must be 254. // Arrows are also not equipment. @card1 = 254; // For named equipment, card2 means the Star Crumbs and elemental // crystals used to make this equipment. For everything else, it's 0. @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. @card1 = 255; // That's the number of star crumbs in a weapon. @sc = 2; // That's the number of elemental property of the weapon. @ele = 1; // And that's the wacky formula that makes them into // a single number. @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;Experiment with the number of star crumbs - I'm not certain just how much willwork most and what it depends on. The valid element numbers are: 1 - Ice, 2 - Earth 3 - Fire 4 - Wind.You can, apparently, even create duplicates of the same pet egg with thiscommand, creating a pet which is the same, but simultaneously exists in twoeggs, and may hatch from either, although, I'm not sure what kind of a mess willthis really cause. to check if an item is made by someone, same thing as above check if @card4 > 150000, if so it's an item named .@char_id = @card3 + ( @card4 << 16 ) to retrieve the char id Quote Link to comment Share on other sites More sharing options...
lupus Posted July 2, 2014 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 43 Reputation: 0 Joined: 01/19/13 Last Seen: September 24, 2018 Author Share Posted July 2, 2014 (edited) .... No spare no slot to add enchantments correct? Edited July 2, 2014 by lupus Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 2, 2014 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 2, 2014 yes btw slot 1 is busy with // If you're inscribing equipment, @card1 must be 255. @card1 = 255; the enchant is made in slot 2 Quote Link to comment Share on other sites More sharing options...
lupus Posted July 2, 2014 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 43 Reputation: 0 Joined: 01/19/13 Last Seen: September 24, 2018 Author Share Posted July 2, 2014 (edited) So do not add any buff to the weapons namedSlot 2 have script tooo // And that's the wacky formula that makes them into // a single number. @card2 = @ele+((@sc*5)<<8); I can then give that correct? Renew in weapons made by blacksmith were very off the game, I wanted to create enchants them, so they returned to be more valued. but it is not possible for all. Edited July 2, 2014 by lupus Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 3, 2014 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 3, 2014 By enchant you mean sth like insert a card in a slot of an named item? if so you can't Quote Link to comment Share on other sites More sharing options...
lupus Posted July 3, 2014 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 43 Reputation: 0 Joined: 01/19/13 Last Seen: September 24, 2018 Author Share Posted July 3, 2014 Yeah I was going to separate some of the enchant malangdo and they are species of runes / cards that go in the card slot. Is there another way to do this? Quote Link to comment Share on other sites More sharing options...
Question
lupus
Hello! I would like a sample script that can validate if a gun is made by a blacksmith or not. I'm thinking of creating a system unique to enchant weapons made by blacksmiths. But I found no function to do this validation.
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.