Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/23/12 in all areas

  1. E - Script Collection Last Update : September 10, 2013 Refine Function SQL Mission Board Monster Marching Vendor Control Advanced Stylist Coin Exchanger Doppelganger Race Of The Day Limited Items Multi Currency Shop Random News GM Online List Link Broken E-Inquiry DotA Runes Flower Counting Game Class Restriction Chain Quest Build Manager Misc Scripts : Freebies Script Card Trader Gold Room [ Pick Gold ] Gold Room [ Guild Tax ] Map Restriction [ GM Based ] Daily Reward Monthly Reward Monster Spawner Monster Summoner with Last Summoned Display Players Stats & Equipments 3rd Job Item Giver Exchanger [ Cashpoint to Coins ] Exchanger [ Poring Coin - Zeny ] Exchanger [ Points to Tickets ] Exchanger [ Item to Item ] Exchanger [ Item to Item ] Exchanger [ Multi Item to 1 Item ] Party Match Auto Ban Over Stats Users Soul Link Buff Kill Players gain Cash Points Party Members All Get Items [ Snippet ] Message Board Stalker Class Skill Reproduce NPC Multiple Selection Quest [ Template ] In-Game Item Rewarder In-Game Points Rewarder Invasion Event Custom Item Rate Status Point Seller [ Snippet ] Anti Bot Security Script Anti Bot Script [ Code / Question ] Item Combo Restriction [ LHZ Card ] Drop Item Upon Death PVP Switcher + Announcer [ Guild Master ] Rotating Waitingroom Messages +10 Refiner [ Specific Items ] Random Rate Item Exchanger MVP Invasion Premium Users [ Boost Rates ] Display Cutin Image upon Login Custom Randomed Box Items Kick GM during WOE Custom Crafting NPC Restrict Same IP [ Certain Map ] Coloured Items Exchanger Guild Master Changer Party Team PK Match Gambling Game IRC Channel Crafting NPC Guild Storage Restriction Stage Game [ Version 4 ] Monster Wiki Event [ Version 3 ] Special Thank you for my Tutor : Notes : I am a bit lazy to write all those Script Descriptions, i do believe that all of you able to get how this script works. Anyway, i will still doing my best to write the Updated Changelog or informations about the script as detail as possible. All the Scripts above are uploaded to Pastebin . Abide the Following Rule : Scripts Error / Not Working , you have to Explain it in Details. ( Add in Images / Modified Scripts ) Do not SPAM / BUMP in my Topic. Do not ask for Support stuffs for other Scripts in this Topic. Link Down , then drop [ @Emistry ] a message. I Reserved the Right for NOT Answering your Posts if you did not abide my Topic's Rules. Keep This In Your Mind : All the Scripts i distribute here are NOT FOR COMMERCIAL USES . DO NOT remove my Credits if you are using part of the scripts to modify your own. DO NOT re-release the scripts in any form / way. If you ♥ these Scripts , Click on to Vote this Topic up. Or you may also click on at above the Topic
    2 points
  2. Euphy's Scripts Disclaimer You may use, modify, and host all of my released scripts. You may not sell them, re-release them in any way (modified or otherwise), or remove the credits. < Event Manager > < Hunting Missions > < Queue System > < Euphy's WOE Controller > < All-In-One NPC > < Euphy's Quest Shop > < Euphy's Warper > < Item Rewards > < Custom Currency Multi-Shop > < Build Manager + > < Class Mastery System > < Class Specialization > < Badge System > < Guarantee Refine Ticket > < Item Fusion > < Euphy's MVP Ladder > < Card Trader > < NPC Duplicate Generator > < Auto-Potion >
    1 point
  3. src/map/itemdb.h find unsigned autoequip: 1; unsigned buyingstore : 1; } flag; short gm_lv_trade_override; //GM-level to override trade_restriction }; replace with unsigned autoequip: 1; unsigned buyingstore : 1; } flag; unsigned ann: 1;//annouce flag short gm_lv_trade_override; //GM-level to override trade_restriction }; src/map/item.c find /*==================================== * read all item-related databases *------------------------------------*/ add above /*==================================== * read item_announce.txt *------------------------------------*/ static bool itemdb_read_announce(char* fields[], int columns, int current) { unsigned short nameid; struct item_data* id; nameid = (unsigned short)strtoul(fields[0], NULL, 10); if( ( id = itemdb_exists(nameid) ) == NULL ) { ShowWarning("itemdb_read_announce: Unknow item id '%hu'.\n", nameid); return false; } id->ann=1; return true; } /*==================================== item.c find sv_readdb(db_path, DBPATH"item_trade.txt", ',', 3, 3, -1, &itemdb_read_itemtrade); sv_readdb(db_path, "item_delay.txt", ',', 2, 2, -1, &itemdb_read_itemdelay); sv_readdb(db_path, "item_buyingstore.txt", ',', 1, 1, -1, &itemdb_read_buyingstore); add after sv_readdb(db_path, "item_announce.txt", ',', 1, 1, -1, &itemdb_read_announce); src/map/mob.c find //A Rare Drop Global Announce by Lupus if( mvp_sd && drop_rate <= battle_config.rare_drop_announce ) { struct item_data *i_data; char message[128]; i_data = itemdb_search(ditem->item_data.nameid); sprintf (message, msg_txt(541), mvp_sd->status.name, md->name, i_data->jname, (float)drop_rate/100); //MSG: "'%s' won %s's %s (chance: %0.02f%%)" intif_broadcast(message,strlen(message)+1,0); } add after if(mvp_sd) {//specify drop item announce struct item_data *dd = NULL; char anme[128]; dd = itemdb_search(ditem->item_data.nameid); if(dd->ann==1){ sprintf (anme, msg_txt(541), mvp_sd->status.name, md->name, dd->jname, (float)drop_rate/100); //MSG: "'%s' won %s's %s (chance: %0.02f%%)" intif_broadcast(anme,strlen(anme)+1,0); } } find //A Rare MVP Drop Global Announce by Lupus if(temp<=battle_config.rare_drop_announce) { struct item_data *i_data; char message[128]; i_data = itemdb_exists(item.nameid); sprintf (message, msg_txt(541), mvp_sd->status.name, md->name, i_data->jname, temp/100.); //MSG: "'%s' won %s's %s (chance: %0.02f%%)" intif_broadcast(message,strlen(message)+1,0); } add after if(mvp_sd) {//specify drop item announce struct item_data *dd = NULL; char anme[128]; dd = itemdb_search(item.nameid); if(dd->ann==1){ sprintf (anme, msg_txt(541), mvp_sd->status.name, md->name, dd->jname, (float)temp/100); //MSG: "'%s' won %s's %s (chance: %0.02f%%)" intif_broadcast(anme,strlen(anme)+1,0); } } db/ create a doc named item_announce.txt //to set drop announce item id //@reloditemdb to reload all setting //format: item id //512 //501 //502 don't forgot to recompile sida.patch
    1 point
  4. This is a personal project i was working on while i was analyzing the ragnarok network protocol. It started several years ago, and could only read wpe .pac captures, and displayed some basic output of the network traffic. Now it displays 95% of all packets, and shows all the data structures inside each packet. furthermore, it now uses a dll injected into the client, which sends all packet data to the parser for real-time analysis The Parser can use diffrent modes to output or record data captured from the packets, the image above being "full_info" And this is a simple test showing a capture of NPC data, to reconstruct scripts in real-time and saves to file. This mode is intended to ease dialog capture from official servers with new npc's that rAthena does not have. But the main function is to analyze the network protocol,to see the order packets are transmitted and to allow new client features to be added quicker. I rewrote the parser at the begining of this year, with a more OOP based style, but some sources of packet data are not working/missing dll injection - working good capture with winpcap(taking packets direct from network card) - broken with bad connections, due to tcp retransmission, which i cannot figure out wpe .pac reading - still to be added back svn location : https://www.assembla...ubversion/nodes As with most of my projects, PHP needs to be installed as this is PHP Command line scripting. for this to work you have 2 options 1) edit the bat file, and change 'php' to the location of your php.exe 2) add your php folder to windows paths, so you can call php from anywhere.. http://www.php.net/manual/en/faq.installation.php#faq.installation.addtopath If anybody has any interest or wants to help improve, send me a message YomRawr <3
    1 point
  5. Likewise, it would've been nice if people on eA posted things on sites other than, say, Megaupload... :<
    1 point
  6. You never have to add constants in separate quotes, only variables, e.g. atcommand "@option " + 2; atcommand "@mute "+"200" +strcharinfo(0); Could be written as: atcommand "@option 2"; atcommand "@mute 200 "+strcharinfo(0);
    1 point
  7. why are we waiting for eA when we have rA now ? xD
    1 point
  8. You could create an extra group without any commands and then use: atcommand "@adjgroup <group id>"; and reset it after finishing your stuff.
    1 point
  9. This is great gonna test this...asap.. Suggestion: Skill like emergency call would be a nice addons to the project[Only Available on faction leader].. @changefactionleader <players name>- so any time player can transfer thier role..
    1 point
  10. Nice thanks Lilith for your dedication on this project.. Please guys click vote up ~ - Suggestion * There's a designated time example every 9:00am daily or scheduled - a monster faction will invade the city of some faction.. - it's also good if different faction has a designated place/city..
    1 point
  11. prontera,164,163,4<tab>script<tab>Event Coin Changer<tab>733,{ mes "[Event Coins Changer]"; mes "Hi ^ff8000"+strcharinfo(0)+"^000000, I can exchange your coins to higher coins."; mes "^C0C0C05 Bronze Coin = 1 Silver Coin^000000"; mes "^C9AE5D5 Silver Coin = 1 Gold Coin^000000"; mes "^8B65085 Gold Coin = 1 Platinum Coin^000000"; mes "What would you like to do?"; next; switch(select("Bronze Coin to Silver Coin","Silver Coin to Gold Coin","Gold Coin to Platinum Coin:Platinum Coin to Gold Coin:Gold Coin to Silver Coin:Silver Coin to Bronze Coin")) { case 1: mes "How many you want to exchange?"; next; input .@count; if (.@count == 0) close; // optional: if player enter 0 script will terminate if (countitem(673) < .@count*5) goto L_NE; delitem 673,.@count*5; getitem 675,.@count; close; case 2: mes "How many you want to exchange?"; next; input .@count; if (.@count == 0) close; // optional: if player enter 0 script will terminate if (countitem(675) < .@count*5) goto L_NE; delitem 675,.@count*5; getitem 671,.@count; close; case 3: mes "How many you want to exchange?"; next; input .@count; if (.@count == 0) close; // optional: if player enter 0 script will terminate if (countitem(671) < .@count*5) goto L_NE; delitem 671,.@count*5; getitem 677,.@count; close; case 4: mes "How many Coins do you want to exchange?"; next; input .@count; if (.@count == 0) close; // optional: if player enter 0 script will terminate if (countitem(677) < .@count) goto L_NE; delitem 677,.@count; getitem 671,.@count*5; close; case 5: mes "How many Coins do you want to exchange?"; next; input .@count; if (.@count == 0) close; // optional: if player enter 0 script will terminate if (countitem(671) < .@count) goto L_NE; delitem 671,.@count; getitem 675,.@count*5; close; case 6: mes "How many Coins do you want to exchange?"; next; input .@count; if (.@count == 0) close; // optional: if player enter 0 script will terminate if (countitem(675) < .@count) goto L_NE; delitem 675,.@count; getitem 673,.@count*5; close; } L_NE: mes "You don't have enough of this coin."; close; } Try this,I changed it for you.
    1 point
  12. packets then, it works fine in 2012-05-15 http://tinypic.com/r/29nuuts/6 Shows the new item shadow, and mob shadow Compilation of Features in New Client Video
    1 point
  13. corrected his post to add credits to earthlingz
    1 point
  14. Are you trying to connect the rAthena from "A Computer" to "B Computer" which has the MySQL DB? I have a server set up like this. All I had to do is change the Local Host IP (127.0.0.1) to the WAN IP of "B Computer" at inter_athena.conf. That's all.
    1 point
  15. For better Learning try an OOP programming language such as Java...I prefer JCreator LE cause the IDE is too limited that will challenge you to familiarize the different syntax.. Just to point out that you must learn the basics..and this will be your only weapon on different programming language..I promise you that...
    1 point
  16. @ Euphy - Regarding the Guarantee Ticket Refine - * its working now i just fix the delitem. - I want to share the script that i request on you.. [ Guarantee Refine Ticket ] - using the ticket to refine your weapons and armors. Itemlist: First go to npc/custom - make an npc name 'guarantee-ticket.txt' - paste this then go to npc/script_custom.conf put this npc: npc/custom/guarantee-ticket.txt - edit your db/re/item_db.txt and change it to this the script is good on mid-rate server .. pRO or philippine ragnarok is selling those guarantee ticket to refine there items ..
    1 point
  17. i just disabled it. im using current svn. .\npc\merchants\renters.txt Line 348 change prontera,163,178,4 script Magic Gear Master 105,{ to prontera,0,0,4 script Magic Gear Master 105,{
    1 point
  18. Возможно твой ехе вообще не читает с папки дата ? Попробуй название папки в других кодировках: АЇАъАОЕНЖдАМЅє или 유저인터페이스
    1 point
  19. Site down until further notice. Please check back in a few days!
    1 point
  20. 1 point
  21. Hi RaGERO, You can use this script; https://asurahosting...ols/bkup_sql.sh Just modify the values correctly, and make sure the backup directory you are saving it to... actually exists. To make a folder, you can use VNC or type the following command in the terminal... mkdir /DESTINATION/NEW_FOLDER To make the script executable, you can edit the properties in your SFTP client or do the following command in the terminal... cd /LOCATION/OF/SCRIPT chmod +x bkup_sql.sh Then finally, you need to add it to the cronjob; which would be like this... export EDITOR=/usr/bin/nano crontab -e Inside the crontab, you would need to input... 0 3 * * * /LOCATION/OF/SCRIPT/bkup_sql.sh Then just ctrl + c and save.
    1 point
  22. the WDGSkipPacketHeaderObfuscation.dll is definitely not from him
    1 point
  23. Please make babies with me Girl, watch your titties before they bloop out and stab someones eye out!
    1 point
  24. Facebook Avatar: 300x300px (it will shrink to 150x150px when used as the page avatar) Facebook Timeline Image: 850x315px Twitter Avatar: 128x128px Twitter Background Image: 1024x820px
    1 point
  25. Script Name: Package Item Trader Description: This script allows you to make the NPC to require multiple items and give multiple items. Version: 1.0 Syntax: callsub(ADD_PACKAGE,"Reward",<itemid,quantity,{itemid,quantity}...>,"Required",<itemid,quantity,{itemid,quantity}...>,"Zeny",zeny,PACKAGETITLE,CATEGORY); Keywords: Reward - this is an indicator that your adding items that the npc will give to the player Required - this is an indicator that your adding items that the player must give to the npc Zeny - this is an indicator that your requiring a zeny payment set the zeny to 0 if your dont want to require zeny payment. //Script Name: Package Item Trader //Developer: JayPee Mateo //Description: This is package item trade is where you can set the NPC to require multiple items and give multiple items also. //Version: 1.0 //Some Explanation: //LABEL or CALLSUB FUNCTION NAME: ADD_PACKAGE //Zeny Payment: If you dont want to not require a zeny set it to Zero (0) //PACKAGETITLE - what do you want to call that Package //CATEGORY - on what group does it belong just to be cleaner //Syntax:callsub(ADD_PACKAGE,"Reward",<itemid,quantity,{itemid,quantity}...>,"Required",<itemid,quantity,{itemid,quantity}...>,"Zeny",zeny,PACKAGETITLE,CATEGORY); //Script royal_room3,84,136,5 script Item Trader 70,{ //Initialized Variables: set .npcName$,"^FF3300[ Trader ]^000000"; set @ctr_id,1; set @selected,0; //Clear Values deletearray @selected_ctrid[0],128; deletearray .@tmp_CatArr$[0],128; //Initialized Packages //You must initialize the item packages after the clearing and intialization of the variables //Example 1: //Reward or Item to give:Rice Cake Stick(2 pcs), Traditional Rice Cake (1pc) and Neatly Sliced Rice Cake(3 pcs) //Item Requirements: Shining Stone (1) //Zeny Payment: 1z //Title is Example 1 //Category is Category1 callsub(ADD_PACKAGE,"Reward",555,1,556,2,557,3,"Required",640,1,"Zeny",1,"Example 1","Category1"); //Example 2: //Reward or Items the npc will give: Level 1 Frost Diver //Item Requirements: Rice Cake Stick(2 pcs), Traditional Rice Cake (1pc) and Neatly Sliced Rice Cake(3 pcs) //Zeny Payment: 0z or no required zeny //Title is Example 2 //Category is Category2 callsub(ADD_PACKAGE,"Reward",700,1,"Required",555,1,556,2,557,3,"Zeny",0,"Example 2","Category2"); set .@makeString$,""; for(set .@i,1; .@i<@ctr_id; set .@i,.@i+1) { set .@tmp_cat$,getd("."+.@i+"_category$"); if(.@makeString$ == "") { setarray .@tmp_CatArr$[getarraysize(.@tmp_CatArr$)],.@tmp_cat$; set .@makeString$,.@tmp_cat$; } else { if(compare(.@makeString$,.@tmp_cat$)==0) { setarray .@tmp_CatArr$[getarraysize(.@tmp_CatArr$)],.@tmp_cat$; set .@makeString$,.@makeString$+":"+.@tmp_cat$; } } } mes .npcName$; mes "Please choose the ^FF0000item category^000000:"; set @selected,select(.@makeString$); set .@tmp_cat$,.@tmp_CatArr$[@selected-1]; set .@hasValue,callsub(getCTRIDByCAT,.@tmp_cat$,@ctr_id); if(.@hasValue==1) { goto LIST_TITLES; } else mes "Weird....Nothing found!"; close; LIST_TITLES: next; mes .npcName$; mes "Kindly choose the ^FF0000item package^000000:"; set .@makeString$,""; for(set .@i,0; .@i<getarraysize(@selected_ctrid); set .@i,.@i+1) { if(.@makeString$ == "") { set .@tmp_cat$,getd("."+@selected_ctrid[.@i]+"_title$"); set .@makeString$,.@tmp_cat$; } else { set .@tmp_cat$,getd("."+@selected_ctrid[.@i]+"_title$"); set .@makeString$,.@makeString$+":"+.@tmp_cat$; } } set @selected,select(.@makeString$)-1; set .@tmp_cat$,getd("."+@selected_ctrid[@selected]+"_title$"); goto LIST_INFO; end; LIST_INFO: set .@tmp_CTRID,@selected_ctrid[@selected]; next; mes "^FF3300"+.@tmp_cat$+" Information^000000"; //List rewards mes "Reward:"; for(set .@i,0; .@i<getd("."+.@tmp_CTRID+"_rew_size"); set .@i,.@i+1) { set .@tmp_name$,getitemname(getd("."+.@tmp_CTRID+"_item_rew_id["+.@i+"]")); set .@tmp_quantity,getd("."+.@tmp_CTRID+"_item_rew_quantity["+.@i+"]"); mes "* "+.@tmp_name$+" - "+.@tmp_quantity+" pc(s)."; } mes "\n"; //List requirements mes "Requirements:"; for(set .@i,0; .@i<getd("."+.@tmp_CTRID+"_req_size"); set .@i,.@i+1) { set .@tmp_itemid,getd("."+.@tmp_CTRID+"_item_req_id["+.@i+"]"); set .@tmp_name$,getitemname(.@tmp_itemid); set .@tmp_quantity,getd("."+.@tmp_CTRID+"_item_req_quantity["+.@i+"]"); if(countitem(.@tmp_itemid)<.@tmp_quantity) setarray .@errors$[getarraysize(.@errors$)],.@tmp_name$+" -[ "+countitem(.@tmp_itemid)+" / "+.@tmp_quantity+" ]"; mes "* "+.@tmp_name$+" - "+.@tmp_quantity+" pc(s)."; } set .@tmp_zeny_req,getd("."+.@tmp_CTRID+"_zeny_req"); //Check if there is a zeny requirements if(.@tmp_zeny_req>0) mes "* Zeny - "+.@tmp_zeny_req+" z."; //Zenny Requirements: it will skip the zeny requirements if set to 0 if(Zeny<.@tmp_zeny_req && .@tmp_zeny_req>0) setarray .@errors$[ getarraysize(.@errors$)],"Zenny - ["+Zeny+"/ "+.@tmp_zeny_req+" ]"; switch(select("Claim Reward:I'll be back")) { case 1: next; mes "^FF3300"+.npcName$+" - Claim Reward^000000"; if(getarraysize(.@errors$)>0) { mes "You dont have all the required items:"; for(set .@i,0; .@i<getarraysize(.@errors$); set .@i,.@i+1) { mes (.@i+1)+".] "+.@errors$[.@i]; } close; } else { //Consuming all the requirements for(set .@i,0; .@i<getd("."+.@tmp_CTRID+"_req_size"); set .@i,.@i+1) { set .@tmp_itemid,getd("."+.@tmp_CTRID+"_item_req_id["+.@i+"]"); set .@tmp_quantity,getd("."+.@tmp_CTRID+"_item_req_quantity["+.@i+"]"); delitem .@tmp_itemid,.@tmp_quantity; } //Consuming the zeny if(.@tmp_zeny_req>0) set Zeny,Zeny-.@tmp_zeny_req+" z."; //Giving all the rewards mes "Rewards Given:"; for(set .@i,0; .@i<getd("."+.@tmp_CTRID+"_rew_size"); set .@i,.@i+1) { set .@tmp_itemid,getd("."+.@tmp_CTRID+"_item_rew_id["+.@i+"]"); set .@tmp_quantity,getd("."+.@tmp_CTRID+"_item_rew_quantity["+.@i+"]"); mes "* "+getitemname(.@tmp_itemid)+" - "+.@tmp_quantity+" pc(s)."; getitem .@tmp_itemid,.@tmp_quantity; } } mes "Here you go! Hope you enjoy the reward"; close; case 2: next; mes "^FF3300"+.npcName$+"^000000"; mes "Okay, bye!"; close; } end; ADD_PACKAGE: set .@keywordFinder,0; //This is the indicator if the keyword has been found set .@shift,0; //This is for itemid and quantity set .@pairChecker,0; //Checks if there are missing arguments example: itemid itemid quantity //Important Keywords //Reward = for the reward items //Required = for the required items //Zeny = if you want to specify a zenny //Returned Variables: //@ctr_id - is the number of packages produced //@ctr_id_rew_size = arraysize of the reward array; //@ctr_id_req_size = arraysize of the required array; //@ctr_id_item_rew_id[index] = arrayvariable of rewards itemid //@ctr_id_item_rew_quantity[index] = arrayvariable of rewards quantity //@ctr_id_item_req_id[index] = arrayvariable of required itemid //@ctr_id_item_req_quantity[index] = array variable of the required quantity //@ctr_id_zeny_req = zeny requirements this is not an array //@ctr_id_title$ = title of the package //@ctr_id_category$ = name of the group of the package //Check if the Reward keyword is found else report error if(""+getarg(0)!="Reward") { debugmes "The first argument for ADD_ITEM callsub function must be Reward. Error occur at counter id: "+@ctr_id; return 0; } //This will be use in the array index set .@tmp_loopctr,0; //Loop all the initialize requirements for(set .@add,1; .@add<getargcount(); set .@add,.@add+1) { //If Required keyword has been found break loop if(""+getarg(.@add)=="Required") { //Store the number value where the Required keyword has been found set .@keywordFinder,.@add; break; } if(.@shift==0) { if(getarg(.@add)==0) { debugmes "The item id for Reward and Requirements cannot be zero. Error occur at counter id: "+@ctr_id; end; } setd "."+@ctr_id+"_item_rew_id["+(.@tmp_loopctr)+"]",getarg(.@add); set .@shift,1; } else { if(getarg(.@add)==0) { debugmes "The quantity for items Reward and Requirements cannot be zero. Error occur at counter id: "+@ctr_id; end; } setd "."+@ctr_id+"_item_rew_quantity["+(.@tmp_loopctr)+"]",getarg(.@add); set .@tmp_loopctr,.@tmp_loopctr+1; set .@shift,0; } set .@pairChecker,.@pairChecker+1; } setd "."+@ctr_id+"_rew_size",.@pairChecker/2; //Store the arraysize of the Reward Items //If there are missing arguments in Rewards its either quantity or itemid //Check if the itemid and quantity match. //Error Example: 1100,111,111 //Right Example: 1100,111,1101,111 if(.@pairChecker%2==1) { debugmes "Missing arguments in Reward. Error Occured at counter id: "+@ctr_id; end; } //If Required Keyword has been found //it must not be equal to zero to verify that required keyword has been found if(.@keywordFinder == 0) { debugmes "No Required Keyword Found. Error occured at counter id: "+@ctr_id; end; } //Required Keyword set .@pairChecker,0; //Reset the pair checker set .@tmp_keywordFinder,.@keywordFinder; //Store the last keywordfinder value to a temporary variable set .@shift,0; //For itemid and quantity shifting //This will be use as the array index/key set .@tmp_loopctr,0; //Get all the Required Items for(set .@add,.@keywordFinder+1; .@add<getargcount(); set .@add,.@add+1) { //Check if the Zeny Keyword has been found else continue looping if(""+getarg(.@add)=="Zeny") { //Store the number value where the Required keyword has been found set .@keywordFinder,.@add; break; } if(.@shift == 0) { if(getarg(.@add)==0) { debugmes "The item id for Reward and Requirements cannot be zero. Error occur at counter id: "+@ctr_id; end; } setd "."+@ctr_id+"_item_req_id["+(.@tmp_loopctr)+"]",getarg(.@add); set .@shift,1; } else { if(getarg(.@add)==0) { debugmes "The quantity for items Reward and Requirements cannot be zero. Error occur at counter id: "+@ctr_id; end; } setd "."+@ctr_id+"_item_req_quantity["+(.@tmp_loopctr)+"]",getarg(.@add); set .@tmp_loopctr,.@tmp_loopctr+1; set .@shift,0; } set .@pairChecker,.@pairChecker+1; } setd "."+@ctr_id+"_req_size",.@pairChecker/2; //Array size of the required items //If there are missing arguments in Rewards its either quantity or itemid if(.@pairChecker%2==1) { debugmes "Missing arguments in Required Keyword. Error Occured at counter id: "+@ctr_id; end; } //If reward has not been found if(.@keywordFinder == .@tmp_keywordFinder) { debugmes "No Zeny Keyword Found. Error occured at counter id: "+@ctr_id; end; } //Zeny Keyword if(getarg(.@keywordFinder+1)<0) { debugmes "Negative Zeny Requirments Not Allowed. Error occured at counter id: "+@ctr_id; end; } setd "."+@ctr_id+"_zeny_req",getarg(.@keywordFinder+1); //Title if(""+getarg(.@keywordFinder+2)==""+0) { debugmes "Title Required. Error occured at counter id: "+@ctr_id; end; } setd "."+@ctr_id+"_title$",getarg(.@keywordFinder+2); //Category if(""+getarg(.@keywordFinder+3)==""+0) setd "."+@ctr_id+"_category$","Uncategorized"; else setd "."+@ctr_id+"_category$",getarg(.@keywordFinder+3); set @ctr_id,@ctr_id+1; return 1; //Return a 1 if success end; getCTRIDByCAT: //Getting the CTR ID's related to the assigned to a category //getarg(0) - is the category //getarg(1) - is the total ctr id set .@tmp_ctr,0; for(set .@i,1; .@i<getarg(1); set .@i,.@i+1) { set .@tmp_strcat$,getd("."+.@i+"_category$"); if(.@tmp_strcat$ == getarg(0)) { setarray @selected_ctrid[.@tmp_ctr],.@i; set .@tmp_ctr,.@tmp_ctr+1; } } if(getarraysize(@selected_ctrid)>0) return 1; //Return 1 if there is a CTRID's found return 0; end; }
    1 point
×
×
  • Create New...