Jump to content

Lil Troll

Members
  • Posts

    276
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Lil Troll

  1. Hi rAthenian's, I really want to learn how to properly use getinventorylist command. I would like to do a script that store all of item information (Refine-rate, Cards, Item ID). Then retrieve and filtered using "getinventorylist" command. Then use the command, to create a group of arrays. Then would filter out which ones is need, by isequipped, or getequipid. I dont know how to start and do properly the script.
  2. Thanks for correcting me @Mad Walker. I edited the top post script already. @orochi just follow @Mad walker, guide.
  3. For the mean time just add your blacklisted items here.. Including rental items. setarray .blacklist,2307,2308,2309,2310; // Input items you wanted to ban. - script Armor Enchanting Tool -1,{ OnInit: npctalk "Powerful Enchanting Tool is Opened"; //OnInit: is needed for the script to work! } function script EnchMenu { getitem 17514,1; switch(select("[Enchant]:[Nothing]")) { Case 1: callfunc "ArmorEnchant"; next; Case 2: dispbottom "Nothing"; end; } } function script ArmorEnchant { setarray .@blacklist,2307,2308,2309,2310; // Input items you wanted to ban setarray .rate, 40,30,20,10; // rate of getting +1 is 40%, +2 is 30%, +3 is 20%, +4 is 10% .item_id = 7227; // item ID requirement use to enchant setarray .item_req, 3,5,7; // require 3 items to make 1st enchant, 5 items to make 2nd enchant ... while ( .rate[.@i] ) { .totalchance = .totalchance + .rate[.@i]; .@i++; } mes "[^0000FFArmor Enchant^000000]"; mes "Do you want to Enchat your ^0000FFArmor^000000?"; next; if ( select ( "Yes", "No" ) == 2 ) close; mes "[^0000FFArmor Enchant^000000]"; if ( !getequipisequiped( EQI_ARMOR ) ) { mes "You dont have any ^0000FFArmor^000000 that is being equipped."; close; } .@id = getequipid( EQI_ARMOR ); .@ref = getequiprefinerycnt( EQI_ARMOR ); .@card1 = getequipcardid( EQI_ARMOR, 0 ); .@card2 = getequipcardid( EQI_ARMOR, 1 ); .@card3 = getequipcardid( EQI_ARMOR, 2 ); .@card4 = getequipcardid( EQI_ARMOR, 3 ); set .@b,getarraysize(.@blacklist); for ( .@c = 0; .@c < .@b; .@c++ ) { //set .@e,.@blacklist[.@c]; if (isequipped(.@blacklist[.@c])) { mes "Its forbidden to enchant "+getitemname(.@blacklist[.@c])+"."; close; } } if ( .@card1 == 255 || .@card1 == 254 ) { mes "I can't enchant a signed equipment."; close; } if ( !.@card4 ) .@enchant = 0; else if ( !.@card3 ) .@enchant = 1; else if ( !.@card2 ) .@enchant = 2; else { mes "Sorry, this ^0000FFArmor^000000 has already been enchanted 3 times."; close; } if(countitem(.item_id)< .item_req[.@enchant]) { mes "Sorry, you need "+ .item_req[ .@enchant ] +" "+ getitemname( .item_id ) +" to enchant this armor."; close; } .@rand = rand(.totalchance); while ( ( .@rand = .@rand - .rate[.@r] ) >= 0 ) .@r++; .@o = rand(0,5); // orb of str/int/dex ... delitem .item_id, .item_req[ .@enchant ]; delitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, .@card4; if ( !.@card4 ) getitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, 4700 + .@o * 10 + .@r; else if ( !.@card3 ) getitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, 4700 + .@o * 10 + .@r, .@card4; else getitem2 .@id, 1,1, .@ref, 0, .@card1, 4700 + .@o * 10 + .@r, .@card3, .@card4; equip .@id; mes "Armor Enchancement successful !"; close; return; } If you wanted to modify it and get the expiretick of the rental item, you can modify your src click this link. If you wanted to modify this and change them to what ever placement you would like just modify this part. EQI_ARMOR : EQI_HEAD_TOP 1 EQI_ARMOR 2 EQI_HAND_L 3 EQI_HAND_R 4 EQI_GARMENT 5 EQI_SHOES 6 EQI_ACC_L 7 EQI_ACC_R 8 EQI_HEAD_MID 9 EQI_HEAD_LOW 10 EQI_COSTUME_HEAD_LOW 11 EQI_COSTUME_HEAD_MID 12 EQI_COSTUME_HEAD_TOP 13 EQI_COSTUME_GARMENT 14
  4. I cant make it work in the latest svn.
  5. i dont know if this will help, try changing skill.db from this: 46,-9,8,1,-1,0,0,10,2,no,0,0,0,weapon,0, AC_DOUBLE,Double Strafe to this: 46,-9,8,1,-1,0,0,10,3,no,0,0,0,weapon,0, AC_DOUBLE,Double Strafe Ohh i misread your post, i guess professional SRC modificators can help.
  6. Hi rAthenians! How can i make a custom sc_ command for buff, please help. I did try making stuff like based om SC_STRFOOD and add custom lines below it, but it doesnt work. Whats each lines Mean? Anyone knows hot to deal with this? status.c line 772: StatusIconChangeTable[SC_STRFOOD] = SI_FOODSTR; line 930: StatusChangeFlagTable[SC_STRFOOD] |= SCB_STR; line 4217: if(sc->data[SC_STRFOOD]) str += sc->data[SC_STRFOOD]->val1; line 6867: case SC_STRFOOD: if (sc->data[SC_FOOD_STR_CASH] && sc->data[SC_FOOD_STR_CASH]->val1 > val1) return 0; 110943: case SC_STRFOOD: in statuc.h line 238: SC_STRFOOD, skill.c line 6610: line 8006: case SC_STRFOOD: case SC_STRFOOD:
  7. Yes sir emistry, ill add that to my dynamic menu notes thanks!
  8. Greetings fellas! Anyone knows how to revert name back to normal? using this script? mes "blablablabla" menu ("yes",1nn,"revert",2nn) 1nn: set @charname$,"+strcharinfo(0)+"; set @title$,[TITLE]; query_sql "UPDATE `char` SET name,'"+escape_sql(@title$)"' '"+ escape_sql(@charname$) + "'; WHERE `name`='" + escape_sql(@charname$) + "'"; 2nn: ??
  9. Wow thanks again sir! This topic is very informative. I love you all!
  10. Is this correct sir? prontera,150,150,0 script Sample 100,{ .@check = ( countitem(501) ? 1 : 0 ); .@check1 = ( countitem (502) ? 2 : 0 ); .@check2 = ( countitem(503) ? 3 :0 ); .@check3 = ( countitem(504) ? 4: 0); if ( .@check && .@check1 && .@check2 && .@check3 ) select("1:2:3:4"); else end; } OMG Thanks for the fast reply sir's. @sir Patskie and @sir Skorm Super thanks! My problem will be solved in easiest manner thanks so much!!!
  11. Hi guys/gals! I really want to know how to make enable and disable menu (switch,select,menu[commands]) if you dont have a certain item requirements, or if statement. For example. [Menu 1] // Clickable you you have item 501 [Menu 2] // Clickable you you have item 501 [Menu 3] // Clickable you you have item 501 [Menu 4] // Clickable you you have item 501 or [Menu 1] // Clickable if statement = true [Menu 2] // Clickable if statement = true [Menu 3] // Clickable if statement = true [Menu 4] // Clickable if statement = true
  12. search in your data folder.
  13. I dont use iteminfo sir emistry, that only support 2013 clients and i cant make a working one, i only use 2012, i really wonder why this happend..
  14. Hi guys, its very weird, i use bot the same client (2012-04-10aRagexeRE.exe) and offline server trunk, in my lappy, the compounded item with 4 cards is Purple Color, In my desktop its only Golden Orange, i dont know how did i do that, anyone knows how to make 4sloted into purple to (2012-04-10aRagexeRE.exe)?
  15. Wow thanks sir patskie im really learning a lot, now i did produce this, but im having a lil problem, i dont know how to read the separate variables of the arraysize, here is the script.. ITEMS =15000,15001,15002,15003,15004 EXP = 1 , 2 , 3 , 4 , 5 setarray $EquipsArray[0],15000,1,15001,2,15002,3,15003,4,15004,5; set .@equip_exp,getarraysize($EquipsArray); while ( .@i < .@equip_exp ); if(!isequipped(.@eqiup_exp[.@i])) { set EquipNowExp,EquipNowExp+ 1 + .@equip_exp[.@i+1]; } else set EquipNowExp, EquipNowExp + 1; if ( EquipNowExp >= $EquipExpMax ) { set EquipLevel, EquipLevel + 1 ; set EquipNowExp, 0 ; dispbottom "Equip exp : " + EquipLevel + "" ; specialeffect2 410 ; } return ; } Or this one? Im very confused, i almost reach the answer... setarray $EquipsArray[0],2764,5317,2550,2443,2758; setarray $EquipExp[0], 1, 1, 1 ,1 ,1 ; .@equip_size = getarraysize( $EquipsArray ); .@equip_exp = getarraysize( $EquipExp ); set .@combo,getd(".@equip_size"+".@equip_exp"); for( .@i = 0; .@i < .@combo; .@i++ ) { if( !isequipped( .@combo[.@i] ) ){ set EquipNowExp,EquipNowExp + 1 + .@combo[.@i++]; } } Also this wont work: setarray $EquipsArray[0],15000,1,15001,2,15002,3,15003,4,15004,5; .@array_size = getarraysize( $EquipsArray ); while ( .@i < .@array_size ) { if( !isequipped(.@array_size[.@i])) { set EquipExp,EquipExp + 1 + .@array_size[.@i+1]; } }
  16. OMG! Thank you sir patskie!! You made my life easier! Anyways can you explain this? Please.. setarray .@items[0],15000,0,15001,100,15002,200; // <equip item>,<cast speed> .@item_size = getarraysize( .@items ); while ( .@i < .@item_size ) { mes .@items[.@i]+ " " +.@items[.@i+1]; .@i += 2; } so the mes is? 1500 0 1501 100 1502 200 i dont get it actually gonna try figuring this by my self and can i ask last question? How can i set also this? 0 = OFF 1 = ON Like this below? setarray .@f[0],0,OFF,1,ON; .@f = getarraysize( .@status ); if ( SwitchOn ) set SwitchBoxOn, 0 ; else set SwitchBoxOn, 1 ; { while ( .@i < .@status ) { dispbottom "Switch Box: "+.@status[.@i+1]+"; .@i + =2; {
  17. Wow thanks for the reply guys! Im really learning alot. Anyways I do have another question, Is there a way of combining this arrays into one, setarray $CastSpeed[0],0,100,200; setarray $EquipItem[0],15000,15001,15002; For example, if Equip $EquipItem it will give me $CastSpeed, based on their arrangements? .@combo = getarraysize( $EquipSpeed ); .@combo = getarraysize( $EquipItem ); for( .@i = 0; .@i < .@combo; .@i++ ) {while ( .@i < .@item_size ) { if ( !isequipped( .@combo[.@i] ) ) { dispbottom "Your Cast Speed Increase( .$EquipSpeed[.@i] ); } end; } Like the the script above? Sorry i dont know how to start properly and do that. Just like my reference creating a menu like this: set .@pro, getd(".pro"+.@menu+"["+@menu+"]"); set .@crf, getd(".crf"+.@menu+"["+@menu+"]"); set .@men, getd(".men"+.@menu+"["+@menu+"]"); set .@chn, getd(".chn"+.@menu+"["+@menu+"]"); OnInit: setarray .men0, 15000, 15001, 15001; setarray .crf0, 100 , 100 , 100 ; setarray .pro0, 15002, 15002, 15002; setarray .chn0, 100 , 100 , 100 ;
  18. WOW! A very quick response from sir Emistry gonna try using that, thanks now my scripting is going to level up again. Anyways whats this means? for( .@i = 0; .@i < .@item_size; .@i++ ){
  19. How can i make it properly work, for example i will set an arrays: setarray $ITEMS[0],15000,15001,15002,15003; Then for example i want to count that items in inventory if(countitem($Items,$Items[getarraysize($Items)])<1) { Then i want to make an statement of ifequipped if(isequipped($Items,$Items[getarraysize($Items)])==0) { Is that correct or? I Should set first? like this? set $Items,getarraysize($Items); if(countitem($Items)<1) { close } if(isequipped($Items)==0) { close } if(isequipped($Items)) { enter } I cant find any solution, sorry im really new to scripting, trying to learn things by observing, and learning tru trials/errors.
  20. You can wear items that are restricted but its bonuses doesn't affect wearers, observe for changes.
  21. 20000,Safety_Wall_Card,Safety Wall Card,6,20,,10,,,,,,,,16,,,,,{ skill "MG_SAFETYWALL",5; },{},{}
  22. Im trying to make a Fishing Ladder in my post: http://rathena.org/board/topic/86213-lil-troll-world-of-fishing/ Can anyone give me a simple PVP Ladder with Query so that I will dissect and will learn it.
  23. ///////////////////////////////////////////////////////////////////////// // LIL TROLL WORLD OF FISHING // ///////////////////////////////////////////////////////////////////////// // RATHENA SCRIPT // ///////////////////////////////////////////////////////////////////////// // Version 2.0 // ///////////////////////////////////////////////////////////////////////// // Features: // // Modified Fishing Script // // Automatic Realistic Fishing v.1.5 // // Fish Box (Reward Storage) // // Added Fish Diving // // Manual Fishing // // Fight Fishing v1 // // Fight Fishing v2 // // Fishing NPC (Fishing Guru) // // Fishing Ladder // // Fishing Manual ( Instructions with Statistics ) // // Fishing Shop // // Fishing Points / Level / Titles / Etc. // // Automatic Fishing V2 // // Idea/Concept: Combined all Fishing Scripts Known // // - Fight Fishing By Gaddameit // // - Fight Script By Mercurial // // - Fishing Script By Pnuema // // - Fishing Script By Grass0916 // ///////////////////////////////////////////////////////////////////////// To do: - Manual Fishing - Remove Bugs - Need to make the script less input - Improve the whole script - Fishing Ladder (Base on Level,Exp,Fish Caught,Fish Fight Wins) - Im not good at queries - Adding Customized Fish Sprite - Adding Fight Fishing BGM(cuttin) - Adding Automatic Realistic Fishing v2 - with if( !checkcell(.@m$,.@x,.@y,cell_chkwater) ) All done. Request: I really need a simple ladder with sql query so that i can learn from it and make own, fishing ladder, i really cant find a simple ones, other are very hard to understand. Please someone make me a simple ladder? Its the only thing left in the script i havent done yet. These are some variables in the script. Please can someone make a simple ladder for this variables so that i can make my own. And fishing this script completely. I figure out all off this! Yey! Its now semi complete, but I wont release the whole script, you can refer to this topic to see the script. http://rathena.org/board/topic/86736-utility-release-world-of-fishing/#entry219910
  24. Wow everytime i hear different cellwalk sounds give me goosebumps! Where you from, i really want to purchase that. Lets do pm.
×
×
  • Create New...