Jump to content

Neo-Mind

Members
  • Posts

    806
  • Joined

  • Last visited

  • Days Won

    18

Posts posted by Neo-Mind

  1. To get the search and replace window press ctrl+h in Notepad++

    To replace items with only 1 slot to 4 slots

    In item_db.txt

    Find What: ^(\d\d*,.*),[1],0x

    Replace with: \1,4,0x

    In itemslotcounttable.txt

    Find what: (.*)#1#

    Replace with: \1#4#

    For replacing any item with slot to 4 slots

    In item_db.txt

    Find what: ^(\d\d*,.*),[123],0x

    Replace with: \1,4,0x

    In itemslotcounttable.txt

    Find What: (.*)#[123]#

    Replace with: \1#4#

    If you find items remaining with slots they are probably commented out.

  2. Challenge Accepted!!

    1) Open the item_db files in notepad++

    2) Search & Replace :

    a ) use regular expression mode

    b ) search string => ^(\d\d*,.*),1,0x

    c ) replace string => \1,4,0x

    d ) replace all in document

    3) Save

    Assumption: Job alone is specified in hexadecimal format (0x<hex digits>)

  3. OK i added the modifications i was talking about

    I dunno if this is the best way to go about this perhaps an expert can provide an input :-)

    /*
    create table castle_reward (
    guild_id int(11) primary key,
    claimed int(11)
    ); engine = innodb;
    */
    prontera,156,177,5    script    WoE Prize    100,{
       setcastledata "prtg_cas01", 1, getcharid(2); // debug
       if ( agitcheck() ) {
           mes "A war is currently in progress";
           mes "If your guild owned a castle ask your guild master to see me to claim the reward";
           close;
       }
       select "Kriemhild [Primary Castle]";
       if ( getcastledata( "prtg_cas01", 1) != getcharid(2) ) {
           mes "Your guild failed to take this castle";
           close;
       }
       if ( $castle_claimed[1] ) {
           mes "Your guild already received the reward for this castle";
           close;
       }
       if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) {
           mes "Ask your Guild Master to see me";
           close;
       }
       mes "receiving the reward for this castle";
       query_sql "select claimed from castle_reward where guild_id = "+ getcharid(2), .@claimed;
       if ( !.@claimed ) { // 1st time
           getitem 7960,200;
           getitem 12103,20;
           getitem 7959,20;
       }
       else if ( .@claimed == 1 ) { // 2nd time
           getitem 7960,250;
           getitem 12103,30;
           getitem 7959,30;
       }
       else { // 3rd time onwards
           getitem 7960,300;
           getitem 12103,40;
           getitem 7959,40;
       }
       set $castle_claimed[1], getcharid(2);
       query_sql "insert into castle_reward values ( "+ getcharid(2) +", 1 ) on duplicate key update claimed = claimed +1";
       close;
    OnAgitEnd:
       if ($castle_claimed[1] && $castle_claimed[1] != getcastledata("prtg_cas01",1) ) {
         // if there was a claim before then we need to reset incase different guild took castle this time.
         query_sql "update castle_reward set claimed = 0 where guild_id = "+ $castle_claimed[1];
       }
       set $castle_claimed[1], 0; // everytime woe ends the variable resets
       end;
    OnInit:
       waitingroom "Kriemhild Reward",0;
       end;
    }
    

  4. hahaha xD

    ok...

    Sryx script ...

    using $first, $second, $third variable

    however, that is actually not the really correct way

    because if let's say, the guild "ABC" conquer the castle, claimed the $first prize

    guild "DEF" conquer the castle on 2nd week, will be able to claimed the $second prize without even go through 1st set of reward

    and also, this part will definitely throw error

    OnAgitEnd:
    set $castle_claimed[1],
    set $castle_claimed[2],
    set $castle_claimed[3], 0; // everytime woe ends the variable resets

    make sure every sentence is enclosed with ";" semi-colon symbol

    mindstream script ...

    script might be working, but doesn't work to the concept of topic starter

    I believe what he is saying means

    if guild "ABC" conquer the castle for on the 1st week, can get 1st set of reward

    if guild "ABC" conquer that castle again on the 2nd week, then able to get 2nd set of the reward

    your script there actually allow the guild "ABC" able to reward 3 sets of reward in 1st try lol

    if I do this, I'll make use of SQL table instead of saving it with global permanent variable

    because if using global permanent variable, need to do something like

    setd "castle_claimed"+ getcharid(2), getd( "castle_claimed"+ getcharid(2) ) + 1;

    if ( getd( "castle_claimed"+ getcharid(2) ) == 1 ) < claim 1st set of reward >

    if ( getd( "castle_claimed"+ getcharid(2) ) == 2 ) < claim 2nd set of reward >

    if ( getd( "castle_claimed"+ getcharid(2) ) >= 3 ) < claim 3rd set of reward >

    which might actually able to build up quite a ton of variables in `mapreg` table

    /*
    create table castle_reward (
    guild_id int(11) primary key,
    claimed int(11)
    ); engine = innodb;
    */
    prontera,156,177,5	script	WoE Prize	100,{
    setcastledata "prtg_cas01", 1, getcharid(2); // debug
    if ( agitcheck() ) {
    	mes "A war is currently in progress";
    	mes "If your guild owned a castle ask your guild master to see me to claim the reward";
    	close;
    }
    select "Kriemhild [Primary Castle]";
    if ( getcastledata( "prtg_cas01", 1) != getcharid(2) ) {
    	mes "Your guild failed to take this castle";
    	close;
    }
    if ( $castle_claimed[1] ) {
    	mes "Your guild already received the reward for this castle";
    	close;
    }
    if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) {
    	mes "Ask your Guild Master to see me";
    	close;
    }
    mes "receiving the reward for this castle";
    query_sql "select claimed from castle_reward where guild_id = "+ getcharid(2), .@claimed;
    if ( !.@claimed ) { // 1st time
    	getitem 7960,200;
    	getitem 12103,20;
    	getitem 7959,20;
    }
    else if ( .@claimed == 1 ) { // 2nd time
    	getitem 7960,250;
    	getitem 12103,30;
    	getitem 7959,30;
    }
    else { // 3rd time onwards
    	getitem 7960,300;
    	getitem 12103,40;
    	getitem 7959,40;
    }
    set $castle_claimed[1], 1;
    query_sql "insert into castle_reward values ( "+ getcharid(2) +", 1 ) on duplicate key update claimed = claimed +1";
    close;
    OnAgitEnd:
    set $castle_claimed[1], 0; // everytime woe ends the variable resets
    end;
    OnInit:
    waitingroom "Kriemhild Reward",0;
    end;
    }

    Ah OK so that's what was intended ... my bad /pat

    damn i forgot to mention about this.....annie is this a same guild conquer? what i mean example "ABC" conquer today they will get 1st reward

    after that same "ABC" guild defend their castle and obviously get the reward for the second time and then for the next woe the "ABC" guild defend their castle again but they failed to defend "DEF" guild conquer the kriemhild so this will be their 1st attempt on the castle so are they gonna get 1st reward and so for the next woe again "DEF" defend their castle but "ABC" defeated them and conquer kriemhild again are they rewards is going back to 1 or its going to continue into reward 3? cause if you going back they already have 2 counts for holding an castle.

    Yep i just tested today and it continue what "ABC" have....it doesn't reset to 0 what i mean here is "ABC" have 2 counts already after getting back their castle their 2 counts added 1 counts so they proceed in reward 3 so i was thinking to reset their counts once their been defeated...

    bump

    bump

    OK how about this instead of setting castle_claimed to 1=>

     set $castle_claimed[1], getcastledata( "prtg_cas01", 1); 

    and

    
    
    OnAgitEnd:
       if ($castle_claimed[1] && $castle_claimed[1] != getcastledata("prtg_cas01",1) ) {
    query_sql "update castle_reward set claimed = 0 where guild_id = "+ $castle_claimed[1];
    }
    set $castle_claimed[1], 0; // everytime woe ends the variable resets
    end;
    

    Annie, Is there any specific reason to use array for castle_claimed?

  5. well there will definitely be folders for each class in the data.grf. It is not necessary for you to have all those classes in your own custom grf.

    If you want to add new weapon sprites for other classes then create the corresponding folder and add the sprite inside it. :)

  6. All weapon sprites are stored in subfolders of /data/sprite/Àΰ£Á·

    Each subfolder belongs to specific job. Following a list i compiled some time back (not all of this would be in there since some of them are not even supposed to hold weapons - for. e.g. the new mounts). But yeah you can find the class folder you need from below.

    Ninja = ´ÑÀÚ

    Mechanic_Mado = ¸¶µµ±â¾î

    Magician = ¸¶¹ý»ç

    Monk = ¸ùÅ©

    Monk_ = ¸ùÅ©_h

    Monk_Llama = ¸ùÅ©¾ËÆÄÄ«

    Summer = ¿©¸§

    Magician_Fox = ¿©¿ì¸¶¹ý»ç

    Warlock_Fox = ¿©¿ì¿ö·Ï

    Sage_Fox = ¿©¿ì¼¼ÀÌÁö

    Sorcerer_Fox = ¿©¿ì¼Ò¼­·¯

    Wizard_Fox = ¿©¿ìÀ§Àúµå

    Professor_Fox = ¿©¿ìÇÁ·ÎÆä¼­

    High_Wizard_Fox = ¿©¿ìÇÏÀÌÀ§Àúµå

    Alchemist = ¿¬±Ý¼ú»ç

    Alchemist_ = ¿¬±Ý¼ú»ç_h

    Alchemist_Pig = ¿¬±Ý¼ú»ç¸äµÅÁö

    GM = ¿î¿µÀÚ

    Baby_Robot_GM = ¿î¿µÀÚ2

    Wanderer = ¿ø´õ·¯

    Warlock = ¿ö·Ï

    Crusader_Peco = ±¸ÆäÄÚÅ©·ç¼¼ÀÌ´õ

    Royal_Guard_Gryphon = ±×¸®Æù°¡µå

    Knight = 񃯇

    Knight_ = 񃯇_h

    Archer = ±Ã¼ö

    Guillotine_Cross = ±æ·Îƾũ·Î½º

    Star_Gladiator_ = 񀬧

    Star_Gladiator = ±Ç¼ºÀ¶ÇÕ

    Star_Gladiator_Poring = ±Ç¼ºÆ÷¸µ

    Knight_Lion = »çÀÚ±â»ç

    Rune_Knight_Lion = »çÀڷ鳪ÀÌÆ®

    Lord_Knight_Lion = »çÀڷε峪ÀÌÆ®

    Royal_Guard_Lion = »çÀڷξⰡµå

    Crusader_Lion = »çÀÚÅ©·ç¼¼ÀÌ´õ

    Paladin_Lion = »çÀÚÆȶóµò

    Xmas = »êŸ

    Merchant = »óÀÎ

    Merchant_Pig = »óÀθäµÅÁö

    Royal_Guard = °¡µå

    Tuxedo = °áÈ¥

    Gunslinger = °Ç³Ê

    Mercenary_Swordsman = °Ë¿ëº´

    Swordsman = °Ë»ç

    Thief = µµµÏ

    Ninja_Frog = µÎ²¨ºñ´ÑÀÚ

    Soul_Linker_Frog = µÎ²¨ºñ¼Ò¿ï¸µÄ¿

    Ranger = ·¹ÀÎÁ®

    Ranger_Warg = ·¹ÀÎÁ®´Á´ë

    Rune_Knight = ·é³ªÀÌÆ®

    Rune_Knight_Dragon = ·é³ªÀÌÆ®»Ú¶ì

    Rune_Knight_Dragon2 = ·é³ªÀÌÆ®»Ú¶ì2

    Rune_Knight_Dragon3 = ·é³ªÀÌÆ®»Ú¶ì3

    Rune_Knight_Dragon4 = ·é³ªÀÌÆ®»Ú¶ì4

    Rune_Knight_Dragon5 = ·é³ªÀÌÆ®»Ú¶ì5

    Rogue = ·Î±×

    Rogue_ = ·Î±×_h

    Lord_Knight = ·Îµå³ªÀÌÆ®

    Lord_Knight_Peco = ·ÎµåÆäÄÚ

    Sage = ¼¼ÀÌÁö

    Sage_ = ¼¼ÀÌÁö_h

    Soul_Linker = ¼Ò¿ï¸µÄ¿

    Sorcerer = ¼Ò¼­·¯

    Acolyte = ¼ºÁ÷ÀÚ

    Acolyte_ = ¼ºÁ÷ÀÚ_h

    Shadow_Chaser = ½¦µµ¿ìüÀ̼­

    Shura = ½´¶ó

    Shura_Llama = ½´¶ó¾ËÆÄÄ«

    Super_Novice = ½´ÆÛ³ëºñ½º

    Super_Novice_Poring = ½´ÆÛ³ëºñ½ºÆ÷¸µ

    Crusader_Armored_Peco = ½ÅÆäÄÚÅ©·ç¼¼ÀÌ´õ

    Crusader_Armored_Peco_ = ½ÅÆäÄÚÅ©·ç¼¼ÀÌ´õ_h

    Sniper = ½º³ªÀÌÆÛ

    Stalker = ½ºÅäÄ¿

    Arch_Bishop = ¾ÆÅ©ºñ¼ó

    Arch_Bishop_Llama = ¾ÆÅ©ºñ¼ó¾ËÆÄÄ«

    Assassin = ¾î¼¼½Å

    Assassin_ = ¾î¼¼½Å_h

    Assassin_Cross = ¾î½Ø½ÅÅ©·Î½º

    Minstrel = ¹Î½ºÆ®·²

    Mechanic = ¹ÌÄÉ´Ð

    Mechanic_Pig = ¹ÌÄɴиäµÅÁö

    Bard = ¹Ùµå

    Bard_ = ¹Ùµå_h

    Novice_Poring = ³ëºñ½ºÆ÷¸µ

    Genetic = Á¦³×¸¯

    Genetic_Pig = Á¦³×¸¯¸äµÅÁö

    Dancer_Ostrich = Á¦³×¸¯¸äµÅÁö

    Blacksmith = Á¦Ã¶°ø

    Blacksmith_ = Á¦Ã¶°ø_h

    Blacksmith_Pig = Á¦Ã¶°ø¸äµÅÁö

    Champion = èÇÇ¿Â

    Champion_Llama = èÇǿ¾ËÆÄÄ«

    Wanderer_Ostrich = ŸÁ¶¿ø´õ·¯

    Archer_Ostrich = ŸÁ¶±Ã¼ö

    Ranger_Ostrich = ŸÁ¶·¹ÀÎÁ®

    Sniper_Ostrich = ŸÁ¶½º³ªÀÌÆÛ

    Minstrel_Ostrich = ŸÁ¶¹Î½ºÆ®·²

    Bard_Ostrich = ŸÁ¶¹Ùµå

    Gypsy_Ostrich = ŸÁ¶Â¤½Ã

    Clown_Ostrich = ŸÁ¶Å©¶ó¿î

    Hunter_Ostrich = ŸÁ¶ÇåÅÍ

    Mercenary_Spearman = â¿ëº´

    Wizard = À§Àúµå

    Wizard_ = À§Àúµå_h

    Creator = Å©¸®¿¡ÀÌÅÍ

    Creator_Pig = Å©¸®¿¡ÀÌÅ͸äµÅÁö

    Crusader = Å©·ç¼¼ÀÌ´õ

    Crusader_ = Å©·ç¼¼ÀÌ´õ_h

    Clown = Ŭ¶ó¿î

    Taekwon = űǼҳâ

    Taekwon_Poring = űǼҳâÆ÷¸µ

    Gunslinger_Peco = ÆäÄڰdzÊ

    Swordsman_Peco = ÆäÄÚ°Ë»ç

    Knight_Peco = ÆäÄÚÆäÄÚ_±â»ç

    Knight_Peco_ = ÆäÄÚÆäÄÚ_±â»ç_h

    Lord_Knight_Peco = ÆäÄÚÆȶóµò

    Lord_Knight = Æȶóµò

    Novice = Ãʺ¸ÀÚ

    Tuxedo = Åνõµ

    Guillotine_Cross_Hyena = Ä̺£·Î½º±æ·Îƾũ·Î½º

    Thief_Hyena = Ä̺£·Î½ºµµµÏ

    Rogue_Hyena = Ä̺£·Î½º·Î±×

    Shadow_Chaser_Hyena = Ä̺£·Î½º½¦µµ¿ìüÀ̼­

    Stalker_Hyena = Ä̺£·Î½º½ºÅäÄ¿

    Assassin_Hyena = Ä̺£·Î½º¾î½ê½Å

    Assassin_Cross_Hyena = Ä̺£·Î½º¾î½ê½ÅÅ©·Î½º

    Priest = ÇÁ¸®½ºÆ®

    Priest_ = ÇÁ¸®½ºÆ®_h

    Priest_Llama = ÇÁ¸®½ºÆ®¾ËÆÄÄ«

    Professor = ÇÁ·ÎÆä¼­

    Hunter = ÇåÅÍ

    Hunter_ = ÇåÅÍ_h

    High_Wizard = ÇÏÀÌÀ§Àúµå

    High_Priest = ÇÏÀÌÇÁ¸®

    High_Priest_Llama = ÇÏÀÌÇÁ¸®½ºÆ®¾ËÆÄÄ«

    Whitesmith = È­ÀÌÆ®½º¹Ì½º

    Whitesmith_Pig = È­ÀÌÆ®½º¹Ì½º¸äµÅÁö

    Kagerou_Frog = frog_kagerou

    Oboro_Frog = frog_oboro

    Kagerou = kagerou

    Acolyte_Llama = º¹»ç¾ËÆÄÄ«

    Oboro = oboro

    perhaps this should be added into the wiki /hmm

    • Upvote 1
  7. hmm how about this one . I modified some of the stuff in your code Sryx :-). Even i am newbie at rathena scripting :P

    zhakastia,112,61,5 script WoE Prize 835,{
    set $maxclaim , 3;
    if ( agitcheck() ) goto L_woeon;
    menu "Kriemhild [Primary Castle]",L_prtg_cas01;
    
    L_prtg_cas01:
    if ( getcastledata( "prtg_cas01", 1) != getcharid(2) ) goto L_not_owner;
    if ( $claimcount >= $maxclaim) goto L_claimed;
    if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) goto L_not_gm;
    
    L_default:
    mes "receiving the reward for this castle";
    switch ($claimcount) {
     case 0: {
    getitem 7960,200;
    getitem 12103,20;
    getitem 7959,20;
     }
     case 1: {
    getitem 7960,250;
    getitem 12103,30;
    getitem 7959,30;
     }
     case 2: {
    getitem 7960,300;
    getitem 12103,40;
    getitem 7959,40;
     }
    }
    set $claimcount, $claimcount + 1;
    close;
    
    L_woeon:
    mes "A war is currently in progress";
    mes "If your guild owned a castle ask your guild master to see me to claim the reward";
    close;
    
    L_not_owner:
    mes "Your guild failed to take this castle";
    mes "If your guild owned a castle ask your guild master to claim reward from me";
    close;
    
    L_claimed:
    mes "Your guild already received the reward for this castle";
    close;
    
    L_not_gm:
    mes "Ask your Guild Master to see me";
    close;
    
    OnAgitEnd:
    // everytime woe ends the variable resets
    set $claimcount, 0;
    end;
    
    OnInit:
    waitingroom "Kriemhild Reward",0;
    end;
    }
    

    Just thought that some of the variables were redundant. Also i have made it configurable (in case you wish to add more /delete one claim, you can modify the maxclaim value and modify the switch statement. Let me know if you see some issues in case you use this

×
×
  • Create New...