Jump to content

friomixx

Members
  • Posts

    18
  • Joined

  • Last visited

1 Follower

Profile Information

  • Gender
    Male
  • Location
    PH

Recent Profile Visitors

1559 profile views

friomixx's Achievements

Santa Poring

Santa Poring (3/15)

  • Collaborator
  • Dedicated
  • Conversation Starter
  • Reacting Well
  • First Post

Recent Badges

0

Reputation

  1. whenever @arealoot is disabled, and you try to pick up an item, you will be able to pick it up but it also displays the message You cannot get the item.
  2. i'm using searchstore, with the tick box checked for Include Similar Items, I'm not able to search due to too many result found message. Though I only have 4 Bows (2 Bows and 2 Composite Bows) that is currently in vending. Removing that I'm able to search for the specific item. is there a way for me to remove the default check in the tick box? or how to fix the issue I'm encountering regarding too many results. edit: the tick box works properly for Buy type.
  3. Hi, how to make @autotrade command useable for VIP only?
  4. switch( select( "Edit Party Member",/*"Required Item","Required Zeny",*/"^FF0000Start Event^000000" ) ){ Make sure to include Case 4, so your previous Case 4 will now become Case 2 Case 2: /* mes "Enter item ID :"; do{ input .@input; }while( getitemname( .@input ) == "null" ); mes "Enter Amount : "+getitemname( .@input ); mes "^777777( 0 ~ "+callfunc( "ValueConvert", 30000 )+" )^000000"; input $match_amount,0,30000; if( $match_amount ) set $match_itemid,.@input; break; Case 3: mes "Enter Zeny amount :"; mes "^777777( 0 ~ "+callfunc( "ValueConvert", 10000000 )+" )^000000"; input $zeny,0,10000000; break; Case 4:*/ if( $party_member < 1 ){ mes "^FF0000Invalid^000000. Minimum 1 Party Member."; }/*else if( !$match_amount && !$zeny ){ mes "^FF0000Invalid^000000. Required 1 item or Zeny."; }*/else{ if( $party_member /*&& ( $match_amount || $zeny )*/ && !.status ) set .status,1; end; if( $party_member /*&& ( $match_amount || $zeny )*/ && !.status ){
  5. try this .@r = callfunc ("mvp_maps",lastwarp$);
  6. --------------------------------------- *callfunc "<function>"{,<argument>,...<argument>}; *callfunc("<function>"{,<argument>,...<argument>}) This command lets you call up a function NPC. A function NPC can be called from any script on any map server. Using the 'return' command it will come back to the place that called it. place,50,50,6%TAB%script%TAB%Woman%TAB%115,{ mes "[Woman]" mes "Let's see if you win..."; callfunc "funcNPC"; mes "Well done, you have won!"; close; } function%TAB%script%TAB%funcNPC%TAB%{ .@win = rand(2); if (.@win == 0) return; mes "Sorry, you lost."; close; } You can pass arguments to your function - values telling it what exactly to do - which will be available there with getarg() (see 'getarg') Notice that returning is not mandatory, you can end execution right there. If you want to return a real value from inside your function NPC, it is better to write it in the function form, which will also work and will make the script generally cleaner: place,50,50,6%TAB%script%TAB%Man%TAB%115,{ mes "[Man]" mes "Gimme a number!"; next; input .@number; if (callfunc("OddFunc",.@number)) mes "It's Odd!"; close; } function%TAB%script%TAB%OddFunc%TAB%{ if (getarg(0)%2 == 0) return 0;// it's even return 1;// it's odd } Alternately, as of rAthena revision 15979 and 15981, user-defined functions may be called directly without the use of the 'callfunc' script command. function<tab>script<tab>SayHello<tab>{ mes "Hello " + getarg(0); return 0; } place,50,50,6<tab>script<tab>Man<tab>115,{ mes "[Man]"; SayHello strcharinfo(0); close; } Note: !! A user-defined function must be declared /before/ a script attempts to !! call it. That is to say, any functions should be placed above scripts or NPCs !! (or loaded in a separate file first) before attempting to call them directly. --------------------------------------- https://github.com/rathena/rathena/blob/master/doc/script_commands.txt
  7. thank you Winterfox for your help, will consider your suggestion in my scripts.
  8. Hi, Can anyone help me check my error? the goal of my script is to check if all members of the party are online and members of the same guild. as you can see in the screenshot, I'm able to reload the script, but whenever i tried to click the NPC, it now gives the error message.
  9. Hi, Can anyone help me, how should i patch my client? when i'm trying to view Euphy's Quest Shop, it is getting displayed like this. However, when using 2019-06-05 (i dont diff this client, i just downloaded it somewhere here in rathena but i can't remember the exact post) , i dont have any issue as showed below. Below are the patches i've selected for 2021-11-03 using Nemo. 8 Custom Window Title 9 Disable 1rag1 type parameters (Recommended) 13 Disable Ragexe Filename Check (Recommended) 14 Disable Hallucination Wavy Screen (Recommended) 18 Skip Service Selection Screen 23 Enable /who command (Recommended) 24 Fix Camera Angles (Recommended) 34 Enable /showname (Recommended) 35 Read Data Folder First 36 Always read msgstringtable.txt (Recommended) 38 Remove Gravity Ads (Recommended) 39 Remove Gravity Logo (Recommended) 41 Disable Nagle Algorithm (Recommended) 44 Translate Client (Recommended) 46 Use Normal Guild Brackets (Recommended) 47 Use Ragnarok Icon 48 Use Plain Text Descriptions (Recommended) 49 Enable Multiple GRFs (Recommended) 50 Skip License Screen 64 @ Bug Fix (Recommended) 65 Load Custom lua file instead of iteminfo*.lub (Recommended) 71 Ignore Resource Errors 73 Remove Hourly Announce (Recommended) 84 Remove Serial Display (Recommended) 90 Enable DNS Support (Recommended) 208 Restore Cash Shop Icon 213 Disable Help Message on Login (Recommended) 230 Always load Korea ExternalSettings lua file (Recommended) 231 Remove hardcoded address/port (Recommended) 232 Restore old login packet (Recommended) 234 Ignore Lua Errors 270 Change AchievementList*.lub path 271 Change MonsterSizeEffect*.lub path 272 Change Towninfo*.lub path 273 Change PetEvolutionCln*.lub path 274 Change Tipbox*.lub path 275 Change CheckAttendance*.lub path 276 Change OngoingQuestInfoList*.lub path 277 Change RecommendedQuestInfoList*.lub path 278 Change PrivateAirplane*.lub path 290 Hide build info in client (Recommended) 291 Hide packets from peek (Recommended) 307 Hide attendance button 308 Hide adventurer agency button 313 Change MapInfo*.lub path 326 Disable OTP Login Packet (Recommended) 338 Additional client validation (Recommended) 348 Send client flags to server (Recommended) 403 Ignore most errors 404 Use borderless mode in full screen (Recommended) 409 Add close button to game window 418 Hide reputation button 427 Check is servertype in xml file was set to correct value (Recommended) 429 Protect shorten and bold name flags
  10. Hi, How can I make my Large Baphomet Horn look like in the red circle below (picture is not mine)? I tried to follow the reply below, but it doesn't work on my 2021-11-03 client, or am i missing something aside from ones mentioned in the comment?
  11. Hi All, I'm trying to implement below diff for src/map/atcommand.cpp. This is to convert any headgear to costumes and vice versa. diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp index 43d6ad4d7d..e2897a48b5 100644 --- a/src/map/atcommand.cpp +++ b/src/map/atcommand.cpp @@ -1218,7 +1218,7 @@ ACMD_FUNC(heal) ACMD_FUNC(item) { char item_name[100]; - int number = 0, bound = BOUND_NONE; + int number = 0, bound = BOUND_NONE, costume = 0; char flag = 0; struct item item_tmp; struct item_data *item_data[10]; @@ -1267,6 +1267,27 @@ ACMD_FUNC(item) for(j--; j>=0; j--){ //produce items in list unsigned short item_id = item_data[j]->nameid; + if (!strcmpi(command + 1, "costumeitem")) + { + if (!battle_config.reserved_costume_id) + { + clif_displaymessage(fd, "Costume convertion is disable. Set a value for reserved_cosutme_id on your battle.conf file."); + return -1; + } + if (!(item_data[j]->equip&EQP_HEAD_LOW) && + !(item_data[j]->equip&EQP_HEAD_MID) && + !(item_data[j]->equip&EQP_HEAD_TOP) && + !(item_data[j]->equip&EQP_COSTUME_HEAD_LOW) && + !(item_data[j]->equip&EQP_COSTUME_HEAD_MID) && + !(item_data[j]->equip&EQP_COSTUME_HEAD_TOP) && + !(item_data[j]->equip&EQP_GARMENT) && + !(item_data[j]->equip&EQP_COSTUME_GARMENT)) + { + clif_displaymessage(fd, "You cannot costume this item. Costume only work for headgears."); + return -1; + } + costume = 1; + } //Check if it's stackable. if (!itemdb_isstackable2(item_data[j])) get_count = 1; @@ -1277,6 +1298,11 @@ ACMD_FUNC(item) memset(&item_tmp, 0, sizeof(item_tmp)); item_tmp.nameid = item_id; item_tmp.identify = 1; + if (costume == 1) { // Costume item + item_tmp.card[0] = CARD0_CREATE; + item_tmp.card[2] = GetWord(battle_config.reserved_costume_id, 0); + item_tmp.card[3] = GetWord(battle_config.reserved_costume_id, 1); + } item_tmp.bound = bound; if ((flag = pc_additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND))) clif_additem(sd, 0, 0, flag); however, after compiling, i received below errors. can you help me identify the fix for this errors? Below is the complete block code where I implemented the diffs. /*========================================== * @item command (usage: @item <itemdid1:itemid2:itemname:..> <quantity>) (modified by [Yor] for pet_egg) * @itembound command (usage: @itembound <name/id_of_item> <quantity> <bound_type>) *------------------------------------------*/ ACMD_FUNC(item) { char item_name[100]; //int number = 0, bound = BOUND_NONE; /*[GSF] begin convert headgear to costume*/ int number = 0, bound = BOUND_NONE, costume = 0; /*[GSF] end convert headgear to costume*/ char flag = 0; char *itemlist; nullpo_retr(-1, sd); memset(item_name, '\0', sizeof(item_name)); parent_cmd = atcommand_alias_db.checkAlias(command+1); if (!strcmpi(parent_cmd,"itembound")) { if (!message || !*message || ( sscanf(message, "\"%99[^\"]\" %11d %11d", item_name, &number, &bound) < 3 && sscanf(message, "%99s %11d %11d", item_name, &number, &bound) < 3)) { clif_displaymessage(fd, msg_txt(sd,295)); // Please enter an item name or ID (usage: @item <item name/ID> <quantity> <bound_type>). clif_displaymessage(fd, msg_txt(sd,298)); // Invalid bound type return -1; } if( bound <= BOUND_NONE || bound >= BOUND_MAX ) { clif_displaymessage(fd, msg_txt(sd,298)); // Invalid bound type return -1; } } else if (!message || !*message || ( sscanf(message, "\"%99[^\"]\" %11d", item_name, &number) < 1 && sscanf(message, "%99s %11d", item_name, &number) < 1 )) { clif_displaymessage(fd, msg_txt(sd,983)); // Please enter an item name or ID (usage: @item <item name/ID> <quantity>). return -1; } std::vector<std::shared_ptr<item_data>> items; itemlist = strtok(item_name, ":"); while( itemlist != nullptr ){ std::shared_ptr<item_data> item = item_db.searchname( itemlist ); if( item == nullptr ){ item = item_db.find( strtoul( itemlist, nullptr, 10 ) ); } if( item == nullptr ){ clif_displaymessage(fd, msg_txt(sd,19)); // Invalid item ID or name. return -1; } items.push_back( item ); itemlist = strtok(NULL, ":"); //next itemline } if (number <= 0) number = 1; int get_count = number; // Produce items in list for( const auto& item : items ){ t_itemid item_id = item->nameid; /*[GSF] begin convert headgear to costume*/ if (!strcmpi(command + 1, "costumeitem")) { if (!battle_config.reserved_costume_id) { clif_displaymessage(fd, "Costume convertion is disable. Set a value for reserved_cosutme_id on your battle.conf file."); return -1; } if (!(item_data[j]->equip&EQP_HEAD_LOW) && !(item_data[j]->equip&EQP_HEAD_MID) && !(item_data[j]->equip&EQP_HEAD_TOP) && !(item_data[j]->equip&EQP_COSTUME_HEAD_LOW) && !(item_data[j]->equip&EQP_COSTUME_HEAD_MID) && !(item_data[j]->equip&EQP_COSTUME_HEAD_TOP) && !(item_data[j]->equip&EQP_GARMENT) && !(item_data[j]->equip&EQP_COSTUME_GARMENT)) { clif_displaymessage(fd, "You cannot costume this item. Costume only work for headgears."); return -1; } costume = 1; } /*[GSF] end convert headgear to costume*/ //Check if it's stackable. if( !itemdb_isstackable2( item.get() ) ){ get_count = 1; } for( int i = 0; i < number; i += get_count ){ // if not pet egg if (!pet_create_egg(sd, item_id)) { struct item item_tmp = {}; item_tmp.nameid = item_id; item_tmp.identify = 1; /*[GSF] begin convert headgear to costume*/ if (costume == 1) { // Costume item item_tmp.card[0] = CARD0_CREATE; item_tmp.card[2] = GetWord(battle_config.reserved_costume_id, 0); item_tmp.card[3] = GetWord(battle_config.reserved_costume_id, 1); } /*[GSF] end convert headgear to costume*/ item_tmp.bound = bound; if ((flag = pc_additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND))) clif_additem(sd, 0, 0, flag); } } } if (flag == 0) clif_displaymessage(fd, msg_txt(sd,18)); // Item created. return 0; } next is for src/map/script.cpp with below error message, can i also ask for help to fix the error? Error C3861 'itemdb_searchname': identifier not found Below is the block code for above error message. /*=============================== * getcostumeitem <item id>; * getcostumeitem <"item name">; *===============================*/ BUILDIN_FUNC(getcostumeitem) { unsigned short nameid; struct item item_tmp; TBL_PC *sd; struct script_data *data; if (!script_rid2sd(sd)) { // No player attached. script_pushint(st, 0); return SCRIPT_CMD_SUCCESS; } data = script_getdata(st, 2); get_val(st, data); if (data_isstring(data)) { int ep; const char *name = conv_str(st, data); struct item_data *item_data = itemdb_searchname(name); if (item_data == NULL) { //Failed script_pushint(st, 0); return SCRIPT_CMD_SUCCESS; } ep = item_data->equip; if (!(ep&EQP_HEAD_LOW) && !(ep&EQP_HEAD_MID) && !(ep&EQP_HEAD_TOP) && !(ep&EQP_GARMENT)){ ShowError("buildin_getcostumeitem: Attempted to convert non-cosmetic item to costume."); return SCRIPT_CMD_FAILURE; } nameid = item_data->nameid; } else nameid = conv_num(st, data); if (!itemdb_exists(nameid)) { // Item does not exist. script_pushint(st, 0); return SCRIPT_CMD_SUCCESS; } memset(&item_tmp, 0, sizeof(item_tmp)); item_tmp.nameid = nameid; item_tmp.amount = 1; item_tmp.identify = 1; item_tmp.card[0] = CARD0_CREATE; item_tmp.card[2] = GetWord(battle_config.reserved_costume_id, 0); item_tmp.card[3] = GetWord(battle_config.reserved_costume_id, 1); if (pc_additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT)) { script_pushint(st, 0); return SCRIPT_CMD_SUCCESS; //Failed to add item, we will not drop if they don't fit } script_pushint(st, 1); return SCRIPT_CMD_SUCCESS; }
  12. thank you for the response, i already did, but still having same issue
  13. Hi All, I'm encountering below error messages after I diffed 2021-11-03 client using WARP. Can anyone help me how to solve this issues? For the data and System folder, i've used the ones available from GitHub - llchrisll/ROenglishRE: An unofficial english translation project for Korea Ragnarok Online (kRO). where i copied the renewal folder and it was over written by the files from Pre-Renewal. I'm also using the default sclientinfo.xml <?xml version="1.0" encoding="euc-kr" ?> <clientinfo> <desc>Ragnarok Client Information</desc> <servicetype>korea</servicetype> <servertype>sakray</servertype> <connection> <display>Local</display> <address>127.0.0.1</address> <port>6900</port> <version>55</version> <langtype>0</langtype> <registrationweb>www.ragnarok.com</registrationweb> <loading> <image>loading00.jpg</image> <image>loading01.jpg</image> <image>loading02.jpg</image> <image>loading03.jpg</image> <image>loading04.jpg</image> <image>loading05.jpg</image> <image>loading06.jpg</image> </loading> <aid> <admin>2000000</admin> </aid> </connection> </clientinfo> while below are the patches that i've selected. 2021-11-03_Ragexe_1635926200_patched.exe_session.yml
  14. is there a way to count as well those cards that are already attached in the item?
  15. Hi all, can i request for an npc that can track items that are mostly sold in npc and the count of each items sold.
×
×
  • Create New...