Jump to content

alkhaleej

Members
  • Posts

    58
  • Joined

  • Last visited

Posts posted by alkhaleej

  1. Btw, I managed to solve this one. Note that I did not diff'd my client with: Load LUA before LUB

    1. weapontable.lub:

    Weapon_IDs = {

    WEAPONTYPE_Oriental_Black_Sword = 1200,
    WeaponNameTable = {
    [Weapon_IDs.WEAPONTYPE_Oriental_Black_Sword] = "_1200",
    Expansion_Weapon_IDs = {
    [Weapon_IDs.WEAPONTYPE_Oriental_Black_Sword] = Weapon_IDs.WEAPONTYPE_SHORTSWORD,
    2. itemInfo.lub:
    ClassNum = 1200
    3. Followed other guides from

    Custom_weapons View from DB Structure

  2. Why not just put weapon cards into that special shoe through an npc, and make shoe wearable only by tk? No need for all the db changes or functions

    Hmm, I was only thinking of three things:

    1. Taekwons can put weapon cards only for footgear equipment.

    2. Taekwons are not allowed anymore to use footgear cards for footgear.

    3. All other jobs cannot use weapon cards for footgear equipment.

    Btw, I revised the script to this and it is working:

    function	script	ShoesCheck	{
    	if( class == Job_Taekwon ) {
    		callfunc "ShoesTaekwon"; }
    	else {
    		callfunc "ShoesOthers"; }
    }
    
    function	script	ShoesErrorMsg	{
    	message strcharinfo(0),"The card(s)/combination of cards compounded with this footgear is/are forbidden.";
    	unequip EQI_SHOES;
    	end;
    }
    
    function	script	ShoesTaekwon	{
    	query_sql("SELECT id FROM `item_db_re` WHERE type='6' AND equip_script LIKE '%shoes%'", .@card_list);
    		for (set .@i,0; .@i < 200; set .@i,.@i+1) {
    			if( getequipcardid (EQI_SHOES,0) == .@card_list[.@i] || getequipcardid (EQI_SHOES,1) == .@card_list[.@i] || getequipcardid (EQI_SHOES,2) == .@card_list[.@i] || getequipcardid (EQI_SHOES,3) == .@card_list[.@i] ) {
    				callfunc "ShoesErrorMsg";
    		}
    	}
    	end;
    }
    
    function	script	ShoesOthers	{
    	query_sql("SELECT id FROM `item_db_re` WHERE type='6' AND equip_script LIKE '%weapon%'", .@card_list);
    		for (set .@i,0; .@i < 200; set .@i,.@i+1) {
    			if( getequipcardid (EQI_SHOES,0) == .@card_list[.@i] || getequipcardid (EQI_SHOES,1) == .@card_list[.@i] || getequipcardid (EQI_SHOES,2) == .@card_list[.@i] || getequipcardid (EQI_SHOES,3) == .@card_list[.@i] ) {
    				callfunc "ShoesErrorMsg";
    		}
    	}
    	end;
    }
  3. Hi all,

    I have made a custom shoes [4]. This shoe is only available to Taekwon.

    Also, I have changed all weapon and footgear cards' equip_locations to 66 and executed 2 SQL queries for this purpose:

    UPDATE item_db_re
    SET equip_locations='66', equip_script='callfunc( "ShoesCheck" ); /*weapon*/'
    WHERE type='6' AND equip_locations='2';
    UPDATE item_db_re
    SET equip_locations='66', equip_script='callfunc( "ShoesCheck" ); /*shoes*/'
    WHERE type='6' AND equip_locations='64';
    I have modified my script for the following purpose:

    ----> ShoesErrorMsg will trigger when the following conditions are met:

    1. If a Taekwon wears a shoe with a footgear card in any of its slot.

    2. If any class other than Taekwon wears a shoe with a weapon card in any of its slot.

    And here is my script:

    function	script	ShoesCheck	{
    	if( class == Job_Taekwon ) {
    		callfunc "ShoesTaekwon"; }
    	else {
    		callfunc "ShoesOthers"; }
    }
    
    function	script	ShoesErrorMsg	{
    	message strcharinfo(0),"The card(s)/combination of cards compounded with this footgear is/are forbidden.";
    	unequip EQI_SHOES;
    	end;
    }
    
    function	script	ShoesTaekwon	{
    	query_sql("SELECT id FROM `item_db_re` WHERE type='6' AND equip_script LIKE '%shoes%'", .@card_list);
    		set .@size,getarraysize( .@card_list );
    		while( .@i < .@size ){
    			if( getequipcardid (EQI_SHOES,0) == .@card_list[.@i] || getequipcardid (EQI_SHOES,1) == .@card_list[.@i] || getequipcardid (EQI_SHOES,2) == .@card_list[.@i] || getequipcardid (EQI_SHOES,3) == .@card_list[.@i] ) {
    				callfunc "ShoesErrorMsg";
    			}
    				set .@i,.@i + 1;
    			}
    				return;
    }
    
    function	script	ShoesOthers	{
    	query_sql("SELECT id FROM `item_db_re` WHERE type='6' AND equip_script LIKE '%weapon%'", .@card_list);
    		set .@size,getarraysize( .@card_list );
    		while( .@i < .@size ){
    			if( getequipcardid (EQI_SHOES,0) == .@card_list[.@i] || getequipcardid (EQI_SHOES,1) == .@card_list[.@i] || getequipcardid (EQI_SHOES,2) == .@card_list[.@i] || getequipcardid (EQI_SHOES,3) == .@card_list[.@i] ) {
    				callfunc "ShoesErrorMsg";
    			}
    				set .@i,.@i + 1;
    			}
    				return;
    }
    ----> While on other jobs other than Taekwon:

    Script works fine.

    but

    ----> While on Taekwon class:

    When I tested a shoe with a weapon card compounded in it, the script fails to achieve its purpose.

  4. Hi Sir Emistry,

    Thank you for this. I tried this already and I've incorporated what I want and changed to this:

    function	script	ShoesCheck	{
    	setarray .@card_list,4009,4038,4050,4070,4097,4100,4107,4123,4131,4151,4160,4164,4168,4186,4199,4200,4204,4208,4221,4235,4236,4239,4244,4245,4249,4257,4267,4275,4290,4319,4352,4376,4378,4381,4396,4417,4435,4441,4467,4478,4482,4488,4490,4495,4498,4504,4532,4539;
    		set .@size,getarraysize( .@card_list );
    		while( .@i < .@size ){
    			if( getequipcardid (EQI_SHOES,0) == .@card_list[.@i] || getequipcardid (EQI_SHOES,1) == .@card_list[.@i] || getequipcardid (EQI_SHOES,2) == .@card_list[.@i] || getequipcardid (EQI_SHOES,3) == .@card_list[.@i] ) {
    				callfunc "ShoesErrorMsg";
    			}
    				set .@i,.@i + 1;
    			}
    				return;
    }
  5. Hi guys,

    I have this script which I made:

    function script ShoesDeny {
    setarray .CardListTk[0],4009,4038,4050,4070,4097,4100,4107,4123,4131,4151,4160,4164,4168,4186,4199,4200,4204,4208,4221,4235,4236,4239,4244,4245,4249,4257,4267,4275,4290,4319,4352,4376,4378,4381,4396,4417,4435,4441,4467,4478,4482,4488,4490,4495,4498,4504,4532,4539;
    for( set .@i, 0; .@i < GetArraySize(.CardListTk); set .@i, .@i + 1 ) {
    if( getequipcardid (EQI_SHOES,0) == .CardListTk[.@i] || getequipcardid (EQI_SHOES,1) == .CardListTk[.@i] || getequipcardid (EQI_SHOES,2) == .CardListTk[.@i] || getequipcardid (EQI_SHOES,3) == .CardListTk[.@i] ) {
    callfunc "ShoesErrorMsg";
    } else {
    end; }
    }
    I am really new in this stuff.

    Initially, I've made all the cards with:

    equip_locations = 2 (Right hand) to equip_locations = 66 (Right hand + Shoes)
    and made a special foot gear item with [4] slots.

    This is a part of my check on all players if they will wear any footgear with weapon cards.

    The script does not do its intended purpose. Anyone who can help me with this?

  6. I had been searching too long now for this one problem re: 2012-07-16 client - intended weapon sprite for weapons are not showing - be it custom or official ones like [Wing Staff].

     

    Before I was using 2012-04-10 client and all intended sprites for weapons are showing - official and customs for that matter; until I've changed to a newer client which is the 2012-07-16.

     

    Now the problem is - all my custom sprites are showing base sprites for all weapon types.

     

    Here is a sample item from my itemInfo.lub:

     

      [1200] = {
            unidentifiedDisplayName = "Dagger",
            unidentifiedResourceName = "oriental_black_sword",
            unidentifiedDescriptionName = {
                "Unidentified item, can be identified with [Magnifier]."
            },
            identifiedDisplayName = "Oriental Black Sword",
            identifiedResourceName = "oriental_black_sword",
            identifiedDescriptionName = {
                "[^FF0000Oriental Black Sword^000000]",
                "[^008800Guillotine Cross^000000]",
                "Not yet implemented.",
                "[^008800Genetic^000000]",
                "Not yet implemented.",
                "[^008800Mechanic^000000]",
                "Not yet implemented.",
                "[^008800Shadow Chaser^000000]",
                "Auto-cast ^008800Level 10 Hell Judgement^000000 when using ^008800Feint Bomb^000000.",
                "Nerfs variable cast time of ^008800Feint Bomb^000000 and increases its damage by 1000%.",
                "Class :^777777 Dagger^000000",
                "Attack :^777777 50^000000",
                "Weight :^777777 0^000000",
                "Weapon Level :^777777 3^000000",
                "Required Level :^777777 80^000000",
                "Applicable Job :^777777 Guillotine Cross, Genetic, Mechanic, Shadow Chaser^000000"
            },
            slotCount = 4,
            ClassNum = 1
        },
    
     
    sprites location:
     
    data   \   sprite   \Àΰ£Á·  \¾î¼¼½Å
    
     
    sprite file names
     
    ¾î¼¼½Å_³²_1200.spr
    ¾î¼¼½Å_³²_1200.act
    
    

     

    sql item_db

     

    (1200, 'Oriental Black Sword', 'Oriental Black Sword', 4, NULL, NULL, 0, '50', NULL, 1, 4, 398336, 8, 2, 2, 3, '80', 1, 1, '{ if(BaseJob==Job_Rogue) { bonus4 bAutoSpellOnSkill,"SC_FEINTBOMB","NPC_HELLJUDGEMENT",10,1000; bonus2 bSkillVariableCast,"SC_FEINTBOMB",-1000; bonus2 bSkillAtk,"SC_FEINTBOMB",1000; } }', NULL, NULL);
    

     

    I am curious also of the weapontable.lub because i can see similar numbers there pertaining to the sprite names of the official weapons that show another sprite aside from the base weapon sprites.

     

    Also, when I diffed my client, I unchecked the

    Load LUA before LUB
    

    option and used *.lub extension inside my luafiles folder.

  7. i cannot get the item. i can see it on my custom shop but once i will acquire it, it does not go to my inventory.
     
    Server msg:

    : DB error - data of field 'nameid' was truncated.
    [Debug]: column - 1
    [Debug]: data - type=UNSIGNED MYSQL_TYPE_LONG, length=2
    [Debug]: buffer - type=MYSQL_TYPE_SHORT, length=2

     

    What I did:
     

    on src\map\itemdb.h:

     

    I changed

     #define MAX_ITEMDB 0x8000
     
    to
     
    #define MAX_ITEMDB 0x10000

     

    and

     

    struct item_data {
        uint16 nameid;
        char name[iTEM_NAME_LENGTH],jname[iTEM_NAME_LENGTH];
     
    to
     
    struct item_data {
        uint32 nameid;
        char name[iTEM_NAME_LENGTH],jname[iTEM_NAME_LENGTH];

     

    I used item IDs starting from 50000

    • Upvote 1
  8. Please help in may array:

    prontera mapflag loadevent
    morocc mapflag loadevent
    geffen mapflag loadevent
    payon mapflag loadevent
    alberta mapflag loadevent
    izlude mapflag loadevent
    aldebaran mapflag loadevent
    xmas mapflag loadevent
    comodo mapflag loadevent
    yuno mapflag loadevent
    amatsu mapflag loadevent
    gonryun mapflag loadevent
    umbala mapflag loadevent
    niflheim mapflag loadevent
    louyang mapflag loadevent
    new_1-1 mapflag loadevent
    sec_pri mapflag loadevent
    jawaii mapflag loadevent
    ayothaya mapflag loadevent
    einbroch mapflag loadevent
    lighthalzen mapflag loadevent
    einbech mapflag loadevent
    hugel mapflag loadevent
    rachel mapflag loadevent
    veins mapflag loadevent
    moscovia mapflag loadevent
    mid_camp mapflag loadevent
    manuk mapflag loadevent
    splendide mapflag loadevent
    brasilis mapflag loadevent
    dicastes01 mapflag loadevent
    mora mapflag loadevent
    dewata mapflag loadevent
    malangdo mapflag loadevent
    malaya mapflag loadevent
    eclage mapflag loadevent
    
    - script ach_0021_to_0056 -1,{
    OnInit:
    setarray $scriptcount$[0],"21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56";
    setarray $@maptown$[0],"prontera","morocc","geffen","payon","alberta","izlude","aldebaran","xmas","comodo","yuno","amatsu","gonryun","umbala","niflheim","louyang","new_1-1","sec_pri","jawaii","ayothaya","einbroch","lighthalzen","einbech","hugel","rachel","veins","moscovia","mid_camp","manuk","splendide","brasilis","dicastes01","mora","dewata","malangdo","malaya","eclage";
    end;
    OnPCLoadMapEvent:
    for(set @d,0; @d < getarraysize($@maptown$); set @d,@d+1);
    set donecheck,"a_done_" + $scriptcount$[@d];
    set delcheck,"$a_del_" + $scriptcount$[@d] + "$";
    if(donecheck == 1 || delcheck == "y") end; if(strcharinfo(3) == $@maptown$[@d]) callfunc "achieve",$scriptcount$[@d];
    end;
    }

    it is giving out error on mapserver:

    script:op_2: invalid data for operator C_EQ
    [Debug]: Data: number value=0
    [Debug]: Data: string value="y"
    [Debug]: Source (NPC): ach_0021_to_0056 (invisible/not on a map

    I think I have a problem with my donecheck and delcheck string concatenation. I'm new in this.

  9. Adding it now and testing.

    [sql]: DB error - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' `kills` VALUES('1002','1') FROM `custom_drop_rate` WHERE `char_id`='150000'' at line 1

    I think the problem is:

     {query_sql"INSERT INTO `mob_id`,`kills` VALUES('"+@mobid+"','1') FROM `custom_drop_rate` WHERE `char_id`='"+getcharid(0)+"'"; goto iDropItemLoop;}

    So I tried to change it to:

     {query_sql"INSERT INTO `custom_drop_rate`(`mob_id`,`kills`) VALUES('"+@mobid+"','1') WHERE `char_id`='"+getcharid(0)+"'"; goto iDropItemLoop;}

    but still the same.

  10. 2. I kill another poring - all of its item drop rate will have a total increase of 0.01%

    Erm I would just like to ask if the script does the above conditions with a detailed example:

    Poring Drops based on kro renewal rates:

    Apple 10%

    Apple 1.5%

    Unripe Apple 0.2%

    Empty Bottle 15%

    Jellopy 70%

    Sticky Mucus 4%

    Knife [4] 1%

    Poring Card 0.01%

    Each successful kill of Poring adds 0.01% on all of the item it drops. So at 9,999 kills of porings, I will get definitely one poring card since each kill adds 0.01% for all items (Poring will drop its card by 100% chance). By that time also, Poring will drop Knife [4] at 100.99% and Jellopy at 169.99%. To sum it up we increase all drop rates for 1 monster with a fixed amount of % each kill.

  11. query_sql"IF EXISTS(SELECT * FROM `custom_drop_rate` WHERE `char_id`='"+getcharid(0)+"', `mob_id`='"+killedrid+"') ||

    UPDATE `custom_drop_rate` SET `kills` = `kills` + 1 WHERE `char_id`='"+getcharid(0)+"', `mob_id`='"+killedrid+"' ||

    ELSE INSERT INTO `custom_drop_rate` VALUES ('"+getcharid(0)+"', '"+killedrid+"', 1)";

    I just made this up I am a noob at this. I've just read some articles pertaining to SQL syntaxes. But I am getting errors. Can anyone suggest where I am wrong? Additionally, || - is this correct to have the query continue on the next line?

  12. Thanks GmOcean. I'll test this right now. I will let u know the results soon.

    Erm, it is not updating the sql table custom_drop_table.

    I think the script needs an update function perhaps?

    By the way, am I correct that the script needs a right curly after the first end; ?

    - script CustomDropRates -1,{

    OnNPCKillEvent:

    callfunc "DropItemRate";

    end;

    }

×
×
  • Create New...