Jump to content

Haziel

Content Moderator
  • Posts

    639
  • Joined

  • Last visited

  • Days Won

    93

Posts posted by Haziel

  1. When a player selects an option on a menu, a temporary variable is set until the npc finishes to run.
    If the first option is chosen, it sets @menu to 1, if the second one, it sets @menu to 2.

    Since Portuguese were 0 and English were 1 on your original setting, I just got the value of the @menu variable and took 1 from it, so:

    If he selects the first option, the #language variable will be set to @menu - 1, @menu is currently 1 and we need it to be zero.
    Same for english, second option will return @menu 2, and we need it to be 1, so, @menu - 1 works for both cases.

  2. Oh, well.

    new_zone02,98,30,1	script	Language Changer	412,{
    OnPCLoginEvent:
    	mes "^0000FF[Tradutor]^000000";
    	mes " * Por favor escolha o Idioma:";
    	mes " * Please choose a language:";
    	next;
    	
    	switch(select("Português:English")){
    		set #language, @menu - 1;
    		next;
    	
    		case 1:
    			mes "^0000FF[Tradutor]^000000";
    			mes "Obrigado.";
    			mes "Divirta-se no Servidor HonorBR.";
    			close;
    		case 2:
    			mes "^0000FF[Translator]^000000";
    			mes "Thank you.";
    			mes "Have fun on HonorBR Server.";
    			close;
    	}
    }

    This one seems to work nicely, I just optimized it a bit.
    Avoiding the 'menu' command that is obsolete by now.
     

  3. Two things: First, the viewID must be the same as the ID on your sprite set in weapontable.
    Secondly, there's ID ranges for each kind of weapon.

     

     Weapon Sprite Solution (Renewal Clients <= 2012-04-10a & Main Clients <= 2012-07-10a)
    
    For these clients, Weapons are limited to use a range of Item IDs hardcoded in the clientn for each type. For e.g.
    
    1265,Bloody_Roar,Bloody Roar,4,,10,1000,120,,1,0,4096,7,2,34,4,75,1,16,{ bonus bIgnoreDefRace,RC_DemiHuman; bonus bFlee,-160; bonus bFlee2,-160; bonus bNoRegen,1; bonus bNoRegen,2; },{},{}
    1266,Test,Test,4,4000,2000,10,165,,1,0,4096,7,2,34,3,33,1,16,{}
    
    // 1-Handed Axes
    1301,Axe,Axe,4,500,,800,38,,1,3,8803555,7,2,2,1,3,1,6,{}
    
    Here the item 1266 is a custom katar and it does show up as a katar (if you have the proper sprite files ofcourse). but if i use some id like say 22000, client wont display it. So what is the range of item ids you can use? Look below:
    
        One handed Swords = 1100-1149, 13400-13499
        Two handed Swords = 1150-1199, 21000-21999 
    
        Knives, Daggers etc = 1200-1249, 13000-13099
        Katars = 1250-1299 ; Has 35 free IDs 
    
        One handed Axes = 1300-1349; Has 43 free IDs
        Two handed Axes = 1350-1399; Has 32 free IDs 
    
        One handed Spears = 1400-1449; Has 34 free IDs
        Two Handed Spears = 1450-1471, 1474-1499 
    
        Maces = 1500-1549, 16000-16999
        Books = 1550-1599 ; Has only 2 IDs.
        Knuckles = 1800-1899 ; Has 95 free IDs 
    
        One Handed Staves/Rods = 1600-1699; Has 79 free IDs
        Two Handed Staves/Rods = 1472,1473,2000-2099 
    
        Bows = 1700-1749, 18100-18499
        Guitars = 1900-1949 ; Has 32 free IDs
        Whips = 1950-1999 ; Has 130 free IDs 
    
        Handguns = 13100-13149
        Other guns = 13150-13199 
    
        Ninja weapons = 13300-13399 
    
    The number of unused Item IDs left known for a range has also been mentioned above. Best practice to follow check in your range in official db before adding custom weapon.
    Weapon Sprite Solution (For New Clients)
    
    For new clients the view id system is also applicable to client. To add a custom weapon you need to first edit a file called weapontable.lub in your data folder
    
    data/luafiles514/lua files/datainfo/weapontable.lub
    
    I will be adding Oriental_Sword which will be a 1-Handed sword. Open weapontable.lub. First you will see a table called Weapon_IDs. Take note of the first 30 values in this table - these are the only available Weapon types in the client right now.
    
    Anyways go to the last entry which should be for Wizardy Staff = 97. You can use a view id after that like shown below
    
     WEAPONTYPE_Oriental_Sword = 98,
    
    Come down and you see the next table called WeaponNameTable. Here is where you add your sprite name suffix.
    What do i mean by that? Its the last part in your weapon sprite & act file. Before it used to be _<Item ID>.
    
    data/sprite/<job dependent folder>/<job dependent prefix>_<gender><weapon suffix>.spr
    
    OK Back to topic. so I add my entry like shown below.
    
    [Weapon_IDs.WEAPONTYPE_Oriental_Sword] = "Oriental"
    
    Lastly come down further in weapontable.lub and you see the last table called Expansion_Weapon_IDs.
    Remember the 30 types i told you to take note of ? here we assign one of those to our custom (like a mapping or connection).
    Since mine is a 1-Handed Sword I specify it like below.
    
    [Weapon_IDs.WEAPONTYPE_Oriental_Sword] = Weapon_IDs.WPCLASS_WEAPONTYPE_SWORD 
    
    Now for the most important part. For our client to actually pick up all these details we need to provide the view id which we used in Weapon_IDs table as the ClassNum value in ItemInfo.lua. Check the ItemInfo.lub format shown above for details.
    
    With this your weapon sprite will become visible while attacking. 

     

    • Upvote 1
    • Love 1
  4. Zoom bug is caused by the size of the sprite, surpassing the 180px in any dimension will occurs on that.
    It also seems your sprite is misaligned aswell, but on headgears-wing it rarely will be aligned since every class has its own pose, which means: for the Lord Knight, which has a straight pose, it may looks good, but not for the alchemist which leans a bit to the right.

  5. That's the infamous Cliping Effect:

    On 12/11/2011 at 6:46 PM, Aerie said:

    3) How fix the Cliping Effect ?

    Operation to make each time you modify your maps when done.

    You'll need a hexadecimal editor for realize this. Example : http://www.pspad.com/en/ (freeware)

    Select your *.rsw files and open it with your hexadecimal editor :

    fin1.jpg

    Look to 3rd column, first line. Here 0201, modify to 0109 and save !

    Don't forget : BrowEdit always saves your map in 0x201 version. Each time you'll save your map, you must restart this manipulation.

     

    • Upvote 1
  6. Not a sample script, but the command you're looking for:

    *getequipid({<equipment slot>,<char_id>})
    
    This function returns the item ID of the item slot that calls the script
    on the invoking character or the specified equipment slot. If nothing is
    equipped there, it returns -1.
    Valid equipment slots are:
    
    EQI_COMPOUND_ON (-1)      - Item slot that calls this script (In context of item script)
    EQI_ACC_L (0)             - Accessory 1
    EQI_ACC_R (1)             - Accessory 2
    EQI_SHOES (2)             - Footgear (shoes, boots)
    EQI_GARMENT (3)           - Garment (mufflers, hoods, manteaux)
    EQI_HEAD_LOW (4)          - Lower Headgear (beards, some masks)
    EQI_HEAD_MID (5)          - Middle Headgear (masks, glasses)
    EQI_HEAD_TOP (6)          - Upper Headgear
    EQI_ARMOR (7)             - Armor (jackets, robes)
    EQI_HAND_L (8)            - Left hand (weapons, shields)
    EQI_HAND_R (9)            - Right hand (weapons)
    EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
    EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
    EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
    EQI_COSTUME_GARMENT (13)  - Costume Garment
    EQI_AMMO (14)    		  - Arrow/Ammunition
    EQI_SHADOW_ARMOR (15)     - Shadow Armor
    EQI_SHADOW_WEAPON (16)    - Shadow Weapon
    EQI_SHADOW_SHIELD (17)    - Shadow Shield
    EQI_SHADOW_SHOES (18)     - Shadow Shoes
    EQI_SHADOW_ACC_R (19)     - Shadow Accessory 2
    EQI_SHADOW_ACC_L (20)     - Shadow Accessory 1
    
    Notice that a few items occupy several equipment slots, and if the character is
    wearing such an item, 'getequipid' will return its ID number for either slot.
    
    Can be used to check if you have something equipped, or if you haven't got
    something equipped:
    
    	if (getequipid(EQI_HEAD_TOP) == 2234)
    		mes "What a lovely Tiara you have on";
    	else
    		mes "Come back when you have a Tiara on";
    	close;
    
    You can also use it to make sure people don't pass a point before removing an
    item totally from them. Let's say you don't want people to wear Legion Plate
    armor, but also don't want them to equip if after the check, you would do this:
    
    	if (getequipid(EQI_ARMOR) == 2341 || getequipid(EQI_ARMOR) == 2342) {
    		mes "You are wearing some Legion Plate Armor, please drop that in your stash before continuing";
    		close;
    	}
    	// the || is used as an or argument, there is 2341 and 2342 cause there are
    	// two different legion plate armors, one with a slot one without.
    
    	if (countitem(2341) > 0 || countitem(2432) > 0) {
    		mes "You have some Legion Plate Armor in your inventory, please drop that in your stash before continuing";
    		close;
    	}
    	mes "I will lets you pass.";
    	close2;
    	warp "place",50,50;
    	end;
    
    ---------------------------------------

     

    • Love 1
  7. Quote

    I really hate the handles on the third iteration, but it matches the collection image more, I also think the blue potion can use a color tweak, but, what do you guys think?

    Yeah, the best ones imo are the ones with the handle.

    Quote

    - Should I lose the greenish-blue tint on the bottle?

    I guess you could look up the RO colour palette, each colour is applied in 6 to 8 tones on RO sprites.

    Quote

    - How can I improve them?

    There's no secret apart of studying the original ones and trying to replicate the shading techniques, trial and error will be always your friend.

    Quote

    Additionally, how do I attach pictures to my post?

    You must upload your images to any image hoster website (such as imgur) or downloading ShareX that does that automatically and just leave the link on your post and it will autoformat the the picture itself.

    Afterall, good effort there, keep improving!

  8. Well, because the 'signature' isn't bound to the item, it's a 'link' between the item and the character who signed it.
    So, when you get a variable and uses the math to make a getitem2 sign a item you're actually telling the script to link the signature tha a characters name.

    For it to work the way you want it, you would have to create a source mod similar to wjat people do with those BG consumable items, that extract the 'character name' from a dummy actually non-existent pre-determined character, or make a system where on special accounts, every guild created generates a character with the same name (and ID to make it easier) to link the item to it.

     

    • Like 1
  9. The abra_db is pretty straightfoward, it explains really well how it works.

    // Hocus-Pocus (Abracadabra) Castable Skills Database
    //
    // Structure of Database:
    // SkillID,DummyName,ProbabilityPerLvl
    //
    // 01. SkillID                  Skill ID to be casted by hocus pocus.
    // 02. DummyName                Name of the skill (informative, not used by server).
    // 03. ProbabilityPerLvl        Not a rate! Chance at which the skill is selected compared
    //                              with other entries probabilties
    //
    // NOTE:
    // - The skill is picked at random from the entire database and then tested for rate. If it
    //   does not succeed at that rate, another skill is picked and tested. This continues
    //   until a skill succeeds. Abracadabra-specific skills have a different chance to occur
    //   depending on skill level used. All other skills have an equal chance and appear from
    //   level 1 onward.
    // - To remove entry by importing, put "clear" (without quotes) in DummyName

    In short, it's not set as a percentage, but in 'tiers'.
    For your best luck it is for the best that you pick a skill that appears as much as you wanted 'Class-Change' to be casted and copy its values to it.

    Abracadabra specific skills has different chances by skill level by the way.

×
×
  • Create New...