Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/31/19 in all areas

  1. I was able to reproduce it. I will share info about this vulnerability with developers. But in few days. I am not at home now. ?
    3 points
  2. My client will crash after I feed my homunculus. No missing sprites shown or error on map server. My hash version is : 54b2cf3215e6f2eeeb6ff304be11dd9ee3e13b3f My client version is : 2018-06-20eRagexeRE Hopefully someone can help me with this problem. Thanks.
    2 points
  3. wtf why do it so complicated, rAthena can do the same with unit controller script commands ( hercules mob controller script commands are broken that's why I couldn't say anything there, but over here is working perfectly fine ) function script camp_fire { monster "this", -1,-1, "--ja--", 1002, 1, ""; .@mobid = $@mobid; setunitdata .@mobid, UMOB_DMGIMMUNE, true; setunitdata .@mobid, UMOB_MODE, MD_STATUS_IMMUNE|MD_SKILL_IMMUNE|MD_KNOCKBACK_IMMUNE; getunitdata .@mobid, .@unitdata; for ( .@i = 0; .@i < 5; ++.@i ) { areapercentheal mapid2name(.@unitdata[UMOB_MAPID]), .@unitdata[UMOB_X]-5, .@unitdata[UMOB_Y]-5, .@unitdata[UMOB_X]+5, .@unitdata[UMOB_Y]+5, 10,1; sleep 1000; } unitkill .@mobid; end; } ok back to topic, well asking for buff and so on needs duplicates, yeah need source modification src/custom/script.inc | 197 ++++++++++++++++++++++++++++++++++++++++++++++ src/custom/script_def.inc | 3 + src/map/npc.cpp | 11 +-- src/map/npc.hpp | 10 +++ 4 files changed, 213 insertions(+), 8 deletions(-) diff --git a/src/custom/script.inc b/src/custom/script.inc index 839b990cb..70926e0a8 100644 --- a/src/custom/script.inc +++ b/src/custom/script.inc @@ -17,3 +17,200 @@ // script_pushint(st,1); // return 0; //} + +/*========================================== + * Duplicate any npc on live server + * duplicatenpc "<Source NPC name>","<New NPC shown name>","<New NPC hidden name>","<mapname>",<map_x>,<map_y>,<dir>{, spriteid{, map_xs, map_ys}}}; + *------------------------------------------*/ +BUILDIN_FUNC(duplicatenpc) +{ + int map_x = script_getnum(st, 6); + int map_y = script_getnum(st, 7); + int dir = script_getnum(st, 8); + int spriteid, map_xs = -1, map_ys = -1, sourceid, type, mapid, i; + const char *sourcename = script_getstr(st, 2); + const char *new_shown_name = script_getstr(st, 3); + const char *new_hidden_name = script_getstr(st, 4); + const char *mapname = script_getstr(st, 5); + + char new_npc_name[24] = ""; + struct npc_data *nd_source, *nd_target; + + if(script_hasdata(st, 10)) + map_xs = (script_getnum(st, 10) < -1) ? -1 : script_getnum(st, 10); + + if(script_hasdata(st, 11)) + map_ys = (script_getnum(st, 11) < -1) ? -1 : script_getnum(st, 10); + + if(map_xs == -1 && map_ys != -1) + map_xs = 0; + + if(map_xs != - 1 && map_ys == -1) + map_ys = 0; + + if(strlen(new_shown_name) + strlen(new_hidden_name) > NAME_LENGTH) { + ShowError("buildin_duplicatenpc: New NPC shown name + New NPC hidden name is too long (max %d chars). (%s)\n", sourcename, NAME_LENGTH); + script_pushint(st, 0); + return SCRIPT_CMD_FAILURE; + } + + nd_source = npc_name2id(sourcename); + + if(script_hasdata(st, 9)) + spriteid = (script_getnum(st, 9) < -1) ? -1 : script_getnum(st, 9); + else + spriteid = nd_source->class_; + + if(nd_source == NULL) { + ShowError("buildin_duplicatenpc: original npc not found for duplicate. (%s)\n", sourcename); + script_pushint(st, 0); + return SCRIPT_CMD_FAILURE; + } + + sourceid = nd_source->bl.id; + type = nd_source->subtype; + mapid = map_mapname2mapid(mapname); + + if(mapid < 0) { + ShowError("buildin_duplicatenpc: target map not found. (%s)\n", mapname); + script_pushint(st, 0); + return SCRIPT_CMD_FAILURE; + } + + CREATE(nd_target, struct npc_data, 1); + + strcat(new_npc_name, new_shown_name); + strncat(new_npc_name, "#", 1); + strncat(new_npc_name, new_hidden_name, strlen(new_hidden_name)); + + safestrncpy(nd_target->name, new_npc_name , sizeof(nd_target->name)); + safestrncpy(nd_target->exname, new_npc_name, sizeof(nd_target->exname)); + + nd_target->bl.prev = nd_target->bl.next = NULL; + nd_target->bl.m = mapid; + nd_target->bl.x = map_x; + nd_target->bl.y = map_y; + nd_target->bl.id = npc_get_new_npc_id(); + nd_target->class_ = spriteid; + nd_target->speed = 200; + nd_target->src_id = sourceid; + nd_target->bl.type = BL_NPC; + nd_target->subtype = (enum npc_subtype)type; + + switch(type) { + case NPCTYPE_SCRIPT: + nd_target->u.scr.xs = map_xs; + nd_target->u.scr.ys = map_ys; + nd_target->u.scr.script = nd_source->u.scr.script; + nd_target->u.scr.label_list = nd_source->u.scr.label_list; + nd_target->u.scr.label_list_num = nd_source->u.scr.label_list_num; + break; + case NPCTYPE_SHOP: + case NPCTYPE_CASHSHOP: + case NPCTYPE_ITEMSHOP: + case NPCTYPE_POINTSHOP: + case NPCTYPE_MARKETSHOP: + nd_target->u.shop.shop_item = nd_source->u.shop.shop_item; + nd_target->u.shop.count = nd_source->u.shop.count; + break; + case NPCTYPE_WARP: + if( !battle_config.warp_point_debug ) + nd_target->class_ = JT_WARPNPC; + else + nd_target->class_ = JT_GUILD_FLAG; + nd_target->u.warp.xs = map_xs; + nd_target->u.warp.ys = map_ys; + nd_target->u.warp.mapindex = nd_source->u.warp.mapindex; + nd_target->u.warp.x = nd_source->u.warp.x; + nd_target->u.warp.y = nd_source->u.warp.y; + nd_target->trigger_on_hidden = nd_source->trigger_on_hidden; + break; + } + + map_addnpc(mapid, nd_target); + status_change_init(&nd_target->bl); + unit_dataset(&nd_target->bl); + nd_target->ud.dir = dir; + npc_setcells(nd_target); + map_addblock(&nd_target->bl); + + if(spriteid >= 0) { + status_set_viewdata(&nd_target->bl, nd_target->class_); + clif_spawn(&nd_target->bl); + } + + strdb_put(npcname_db, nd_target->exname, nd_target); + + if(type == NPCTYPE_SCRIPT) { + for (i = 0; i < nd_target->u.scr.label_list_num; i++) { + char* lname = nd_target->u.scr.label_list[i].name; + int pos = nd_target->u.scr.label_list[i].pos; + + if ((lname[0] == 'O' || lname[0] == 'o') && (lname[1] == 'N' || lname[1] == 'n')) { + struct event_data* ev; + char buf[NAME_LENGTH*2+3]; + snprintf(buf, ARRAYLENGTH(buf), "%s::%s", nd_target->exname, lname); + + CREATE(ev, struct event_data, 1); + ev->nd = nd_target; + ev->pos = pos; + if(strdb_put(ev_db, buf, ev)) + ShowWarning("npc_parse_duplicate : duplicate event %s (%s)\n", buf, nd_target->name); + } + } + + for (i = 0; i < nd_target->u.scr.label_list_num; i++) { + int t = 0, k = 0; + char *lname = nd_target->u.scr.label_list[i].name; + int pos = nd_target->u.scr.label_list[i].pos; + if (sscanf(lname, "OnTimer%d%n", &t, &k) == 1 && lname[k] == '\0') { + struct npc_timerevent_list *te = nd_target->u.scr.timer_event; + int j, k = nd_target->u.scr.timeramount; + if (te == NULL) + te = (struct npc_timerevent_list *)aMalloc(sizeof(struct npc_timerevent_list)); + else + te = (struct npc_timerevent_list *)aRealloc( te, sizeof(struct npc_timerevent_list) * (k+1) ); + for (j = 0; j < k; j++) { + if (te[j].timer > t) { + memmove(te+j+1, te+j, sizeof(struct npc_timerevent_list)*(k-j)); + break; + } + } + te[j].timer = t; + te[j].pos = pos; + nd_target->u.scr.timer_event = te; + nd_target->u.scr.timeramount++; + } + } + nd_target->u.scr.timerid = INVALID_TIMER; + } + + script_pushint(st, 1); + return SCRIPT_CMD_SUCCESS; +} + +/*========================================== + * Remove any npc duplicate on live server + * duplicateremove "<NPC name>"; + *------------------------------------------*/ +BUILDIN_FUNC(duplicateremove) +{ + struct npc_data *nd; + + if(script_hasdata(st, 2)) { + nd = npc_name2id(script_getstr(st, 2)); + if(nd == NULL) { + script_pushint(st, -1); + return SCRIPT_CMD_FAILURE; + } + } else + nd = (struct npc_data *)map_id2bl(st->oid); + + if(!nd->src_id) + npc_unload_duplicates(nd); + else + npc_unload(nd,true); + + script_pushint(st, 1); + return SCRIPT_CMD_SUCCESS; +} \ No newline at end of file diff --git a/src/custom/script_def.inc b/src/custom/script_def.inc index 886399273..177e5cf1a 100644 --- a/src/custom/script_def.inc +++ b/src/custom/script_def.inc @@ -9,3 +9,6 @@ **/ //BUILDIN_DEF(example,""), + +BUILDIN_DEF(duplicatenpc, "ssssiii???"), +BUILDIN_DEF(duplicateremove, "?"), \ No newline at end of file diff --git a/src/map/npc.cpp b/src/map/npc.cpp index 64ae5a361..cfecfcfa7 100644 --- a/src/map/npc.cpp +++ b/src/map/npc.cpp @@ -85,13 +85,8 @@ int npc_get_new_npc_id(void) { } } -static DBMap* ev_db; // const char* event_name -> struct event_data* -static DBMap* npcname_db; // const char* npc_name -> struct npc_data* - -struct event_data { - struct npc_data *nd; - int pos; -}; +DBMap* ev_db; // const char* event_name -> struct event_data* +DBMap* npcname_db; // const char* npc_name -> struct npc_data* static struct eri *timer_event_ers; //For the npc timer data. [Skotlex] @@ -2140,7 +2135,7 @@ static int npc_unload_ev(DBKey key, DBData *data, va_list ap) //Chk if npc matches src_id, then unload. //Sub-function used to find duplicates. -static int npc_unload_dup_sub(struct npc_data* nd, va_list args) +int npc_unload_dup_sub(struct npc_data* nd, va_list args) { int src_id; diff --git a/src/map/npc.hpp b/src/map/npc.hpp index ee496ad9e..6d054dcab 100644 --- a/src/map/npc.hpp +++ b/src/map/npc.hpp @@ -108,6 +108,14 @@ struct npc_data { struct eri; extern struct eri *npc_sc_display_ers; +extern DBMap* ev_db; // const char* event_name -> struct event_data* +extern DBMap* npcname_db; // const char* npc_name -> struct npc_data* + +struct event_data { + struct npc_data *nd; + int pos; +}; + #define START_NPC_NUM 110000000 enum e_job_types @@ -1241,6 +1249,8 @@ int npc_instanceinit(struct npc_data* nd); int npc_instancedestroy(struct npc_data* nd); int npc_cashshop_buy(struct map_session_data *sd, unsigned short nameid, int amount, int points); +int npc_unload_dup_sub(struct npc_data *nd, va_list args); + void npc_shop_currency_type(struct map_session_data *sd, struct npc_data *nd, int cost[2], bool display); extern struct npc_data* fake_nd; function script qwerty { // run this from item getmapxy .@map$, .@x, .@y, BL_PC; duplicatenpc "Kafra_Follower", "Kafra_Follower", $@kafra_follower +"", .@map$, .@x, .@y, DIR_SOUTH, 1_F_MARIA; addtimer 1, "Kafra_Follower#"+ $@kafra_follower +"::OnStart"; ++$@kafra_follower; return; } - script Kafra_Follower FAKE_NPC,{ .@id = atoi( strnpcinfo(2) ); if ( .masteraid[.@id] != getcharid(3) ) { mes "already have a master"; close; } mes "do whatever you like to me ^.^"; next; if ( select("buff", "open storage") == 1 ) { specialeffect2 EF_INCAGILITY; sc_start SC_INCREASEAGI,240000,10; specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10; close; } close2; openstorage; end; OnStart: .@id = atoi( strnpcinfo(2) ); .masteraid[.@id] = getcharid(3); npcspeed 150; while ( .masteraid[.@id] ) { attachrid .masteraid[.@id]; getmapxy .@map$, .@x, .@y, BL_PC; getmapxy .@map1$, .@x1, .@y1, BL_NPC; if ( .@map$ != .@map1$ || distance( .@x, .@y, .@x1, .@y1 ) > 15 ) { while ( checkcell( .@map$, .@x2 = .@x + rand(-2,2), .@y2 = .@y + rand(-2,2), cell_chknopass ) ); unitwarp getnpcid(0), .@map$, .@x2, .@y2; } else if ( distance( .@x, .@y, .@x1, .@y1 ) > 5 ) { while ( checkcell( .@map$, .@x2 = .@x + rand(-2,2), .@y2 = .@y + rand(-2,2), cell_chknopass ) ); npcwalkto .@x2, .@y2; } sleep 250; } duplicateremove strnpcinfo(0); end; OnPCLogoutEvent: .@aid = getcharid(3); while ( countinarray( .masteraid, .@aid ) ) { .@id = inarray( .masteraid, .@aid ); .masteraid[.@id] = 0; } end; }
    2 points
  4. Hello, I'm Haziel. I've been a graphic artist for over 15 years. I've made commissions for several Ragnarök Servers and also, worked on the production of some Indie Games either as Concept or Pixel Artist. Spriter is my main role on game development but I'm also able to perform as Designer, Mapper and Programmer, drop me a PM if you're interested in any of those services. For the previews below, keep in mind: Headgears, Garments, Equipment, Weapon/Shield and Monsters. Headgears Divine Headgear Set A Gem Themed Headgear Set carrying the theme of mystical stones, targeted for each of the main class branches. Dragon Headgear Set In a similar fashion of the previous one, having one main headgear targeted to fit certain classes. Equipment Divergent Set The Divergent Set concept is based on evolution. After meeting some requirements, the player would be able to evolve the basic Divergent Equipment (grey-ish blue), to one of 8 different forms: Demon (Purple), Dragon (Green), Fox (Orange), Ox (Black), Phoenix (Red), Shark (Skyline Blue), Tiger (Yellow) and Wolf (White). Each one with its own properties. The Helmet has it's own appearances while the other equipment will have it's colour changed. Arcane Set The Arcane Set was meant to be a magical bundle of equipment with four options of headgears for combining, it also has a Weapon compatible with Wizards, Sages and their evolutions. Sacred Set Initially, the Sacred Shield was requested, then, a Swordsman Equipment set, I mixed both things and expanded it to an 8-piece Equipment Set. Plate themed, this one is intended for Knights, Crusaders and their respective evolutions, but can be used by any Class. The Shield is currently only available for Crusaders and evolutions but can be adapted for any Class, although a specific Diff from NEMO is required to implement it. An alternative Cursed theme is also available. Elemental Auras Four Aura-like headgears and four monsters/pets to go along the theme. Anime/Show/Game Themed Gears Anime/Game Themed Gears Miscellaneous Gears made based on some Anime/Game characters and/or artefacts. Above, Megaman X and Zero Helmets from Megaman X franchise, Dying Will from Katekyo Hitman Reborn anime, Kaneki Mask from Tokyo Ghoul anime. Sword Art Online 2 Headgears/Garments and 3 Weapons based on the Manga/Anime Sword Art Online. Elucidator and Dark Repulser both are available for Knights and Evolutions, Kirito Weapons for Assassins and Evolutions. Event Gears Valentine's Day Halloween Halloween Package includes 5 Headgears with matching Garments and also the Wicked Set, composed of 2 Headgears and a Garment. Auras 32bit Headgear Auras All of them available in 12 colours. Monsters Defence Turrets Those are monsters meant to be summoned and attack anything that goes near. Originally intended to be WoE-related. Untear, Unseal, Unnes & Undine My take on the concept of evolutive Pets, can also be used as monsters. Miscellaneous Monsters Situational mobs to be used in Custom Maps/Quests. Trickster Collection My own take on Trickster Online conversions. Christmas Boss: Evil Santa Meant for Christmas Events, this boss has some weirdly strong Reindeers as minions! Sword Art Online Collection Overlord Collection RE: Zero Collection Bosses Big Bosses Really Big Bosses VIP Badges Those were intended to be exclusive to certain VIP levels, there are alternate versions for PVP purposes. Logo Headgears I also offer the service of recreating a server's Logo in a promotional Headgear. Headgear Edits Examples of minor works I usually receive requests for, that may be, from little corrections or addition of details to recolours and mixing of headgears. Above, a symbolic gift to Nova and his request about a Sunglass equipped on the lower slot. Garments/Robes Garments are visual items Gravity made on Jan/05 of 2011, but even Gravity itself didn't make much of them. They're equipped on Cape or Costume Cape slot and must be made Class by Class to fit perfectly on each movement. Different from Headgears, they are layered correctly behind the character and does not stay floating around it as some custom content out there. Official examples of it are the Archangel Wings and the Adventurer's Backpack. Wing-Themed Collection My current Wing collection consists of several themes divided on Insect, Feathered, Leather and Other categories. Suitable for all classes. Classes Relics A garment bundle created to illustrate an attribute of each class branch in RO. Miscellaneous Garment Collection Another set of Custom Garments, but with another kind of thematic, instead of the usual wings. Weapons Weapons Weapons are specific for classes, but can be adapted to multiple at once. Miscellaneous Equipment Sets These have no visual appearance, are only intended as common gear. Freebies Headgears Garments Monsters Freebies Click on the preview image to be redirected to download thread! Freebies will be posted weekly! Rules 1. DO NOT steal my work, it takes hours, days, sometimes weeks to be made, don't claim it yours. 2. DO NOT redistribute, mirror or redistribute my work. 3. DO NOT edit my work without my permission, It includes recolours. 4. DO NOT remove my signature included among my files, be respectful. 5. DO use my works as Donation Rewards, be kind and just ask me first. Additional Information • I'm a Freelancer and my work is for sale, contact me by PM, Facebook, Discord, E-Mail ([email protected]) or Skype (hyering) if you're interested. • I'll not edit or modify other Artists' work without their permission, be sure to have it before asking. • I do take references on Sprites from TalesWeaver, Trickster and other sources, but I'll not redistribute raw materials or teach how to get it. • Feel free to contact me speaking English or Spanish. I can also understand Portuguese at a certain level. • I'm not a master or a know-it-all, I'll share my knowledge when I feel appropriate to do so.
    1 point
  5. December Digest 2018 The following digest covers the month of December 2018. Staff Changes: None Development Highlights: CORE: Fixed possible string out of bounds in configurations (9dbd3cb) Corrected White Imprison and reflected damage (40a4edc4) Corrected vector issue (2f5e1203) Fixed Renewal bBaseAtk readparam returning wrong value (32c68c73) Fixed clearing of sp_vanish_race (4cff45b8) Fixed missing login date for guild members (18f9574a) Fixed Skill Damage Database parsing (2d4a5949) Fixed pre-renewal atk (e8a7daec) Fixed homunculus auto feed for broken luas (9183a54a) Fixed SU_GROOMING while being frozen (7fa903ce) Fixed CN Meteor and Lunatic Carrot Beat damage (faee0cde) Fixed zero termination for bg messages (742232d5) Corrected some Summoner skills (570c07d5) Removed deprecated SI constants from src (e3dd6238) Fixed wrong replacements of CD_CURRENT_ECONOMY (732059ac) Unified infinite tick usage (016d15b7) Corrected AutospellOnSkill (75aef6a5) Fixed autobonus removal (fb81e2d7) Switched supported client to Ragexe (ec3b7077) Fixed unknown map in character select (1c987de7) Added support for viewpointvalue command (49444912) Corrected some statuses and Mado Gear interaction (0d816975) Added support for 64bit ticks (01f61cfa, 46138645) Added a missing check to TK_HIGHJUMP (63bfd611) Fixed reloadmobdb status calculation (8e58f2ce) Initial Release of Equipment Switch (818ff109, f5f377a7) DATABASE: Updated Lasagna Boss spawn (9f24814a) Changed equippable jobs for some items in pre-re/item_db.txt (93cf1881) Changed Thanatos gears to Thanos in item_db.txt (f5b546d6) Corrected job mask of some items (818f35ab) SCRIPT: Ghost Palace instance NPC name fixes (b87a1758) Fixed Taekwon Jobchanger Location (200b55e0) OTHERS: Fixed a documentation typo for bDropAddClass (9f880768) Disabled iterator sanity checks on VS (7c271d7e) Added epoll support on linux (eb2e40c3) List of Contributors: @4144, @admkakaroto, @aleos89, @Atemo, @AzarthMZintos, @Balferian, @Encon21, @Everade, @exneval, @Haikenz, @laziem, @Lemongrass3310, @MathReaper, @mrjnumber1, @nubspixel, @Playtester, @RadianFord, @reunite-ro, @Rolfxx, @secretdataz, @teededung, @Tokeiburu, @vstumpf, @whupdo, @yoonjunho72, @zackdreaver January Digest 2019 The following digest covers the month of January 2019 Staff Changes: None Development Highlights: CORE: Fixed Full Blast delay on attack and using items (4ec0c010) Corrected item bonus FixedCastRate (59593652) Fixed Reflect Damage not reflecting damage (7282dd87) Adjusted reload item database (444d7394) Refactored achievement conditions (4706115d) Fixed points command using negative numbers (6c1d1a84) Fixed a few more leftovers from 64bit tick (a5fc39e0) Corrected skills that give bonuses while sitting (b1865b31) Fixed CDP not failing when haven't met the requirements (a9f868f8) Corrected a few potential crash points (6c864927) Fixed a crash from MVP Ladder Warper (db3267a8) Updated Quagmire status removal list (626c2b7f) Disconnect player on map-server switch failure (19eef173c) Corrected status attack's element (298cfefd2) DATABASE: Corrected Honor Token weight (246dd2aa) Corrected Faceworm Larva Card bonus (1d0a2238) Corrected Cat Ear Beret bonus (6c6baff1) Fixed Costume Pocketwatch Hair Ornament location (394b16b8) Corrected Palace Guard Cap bonus (24c121b7) Added missing Costume Flying Galapago (f49c68f7) Fixed duration for items 12274 and 12275 (39906dac2) Corrected Shadow Staff script error (8839fe95) Corrected Owl Viscount Silk Hat script error (ec305337) Fixed pre-re Barricade HP value (d5ca1c73) Corrected Card/Enchant Combos (6bea2da3) Item db update (9cd9cab2) Update re/item_trade.txt based on itemmoveinfov5 (54b2cf32) Corrected Sarah's Battle Robe bonus (9d272f8f) Corrected Sling Item bonuses (fe12d6f0) SCRIPT: Added Clothing Effect Removal Service (8ed8fd1a) Change Magic Gear Master NPC name to Mado Gear Armourer for Renter Merchants (02c69f64) Added new Rebellion Shops (f3bb7e4b) Fixed wrong exp values on 13.1 and 13.2 quests and other minor fixes (c96671fc) Removed noicewall mapflag from several instance maps (79dffbd7) Updated OnTouch Royal messenger NPC (53498865) Updated NPC locations according client's navi file (b1b9720f) Fixed variable typo in agit_main_se.txt (43b3bc08) Fixed Hunting Missions (ad960e47) OTHERS: Allow increasing connection limit on linux (8ae788b6) Add missing unit type documentation (de70e498) Added MS support for the function macro (e415e642) Changed skip into error (de8c707f) List of Contributors: @aleos89, @Angelic234, @Atemo, @attackjom, @Badarosk0, @Balferian, @bgamez23, @BrOgBr, @cydh, @Daegaladh, @danielbernard, @darhylism, @Everade, @Indigo000, @Kezzo, @laziem, @Lemongrass3110, @LunarSHINING, @mrjnumber1, @Normynator, @nubspixel, @RadianFord, @rAthenaCN, @sigtus, @teededung, @Tokeiburu, @zackdreaver
    1 point
  6. Make sure the item is sellable in NPC.. Check it at item_trade.txt
    1 point
  7. src/custom/atcommand.inc | 24 ++++++++++++++++++++++++ src/custom/atcommand_def.inc | 2 ++ 2 files changed, 26 insertions(+) diff --git a/src/custom/atcommand.inc b/src/custom/atcommand.inc index 9dd4a3856..44d8d7b11 100644 --- a/src/custom/atcommand.inc +++ b/src/custom/atcommand.inc @@ -17,3 +17,27 @@ // clif_specialeffect(&sd->bl, EF_HEARTCASTING, AREA); // return 0; //} + +ACMD_FUNC(custom) { + intif_broadcast( message, strlen(message) + 1, BC_DEFAULT ); + return 0; +} + +ACMD_FUNC(custom_item) { + char item_name[99]; + int number = 0; + struct item_data *item_data; + + if ( 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; + } + if ( (item_data = itemdb_searchname(item_name)) == NULL && (item_data = itemdb_exists(atoi(item_name))) == NULL ) { + clif_displaymessage(fd, msg_txt(sd,19)); // Invalid item ID or name. + return -1; + } + + safesnprintf( atcmd_output, CHAT_SIZE_MAX, "[ Quality Control ]: %s created %s(%d) with the %s command", sd->status.name, item_data->jname, item_data->nameid, command ); + intif_broadcast( atcmd_output, strlen(atcmd_output) + 1, BC_DEFAULT ); + return 0; +} \ No newline at end of file diff --git a/src/custom/atcommand_def.inc b/src/custom/atcommand_def.inc index 54d9e74ba..86acf41da 100644 --- a/src/custom/atcommand_def.inc +++ b/src/custom/atcommand_def.inc @@ -9,3 +9,5 @@ **/ //ACMD_DEF(newcommand), +ACMD_DEF(custom), +ACMD_DEF(custom_item), http://www.cplusplus.com/doc/tutorial/structures/ http://www.cplusplus.com/reference/cstdio/sscanf/ http://www.cplusplus.com/reference/cstdio/sprintf/ EDIT: apparently rAthena the client has a bug for char-command , the command repeat itself, due to the # symbol
    1 point
  8. yes , I have encounter the same issue at the same line in one of the server (it was beta test) and after the gepard is on the problem just disappear it make sense to be 3rd party software however I couldn't find what was the issue I think the best thing to do is make the delitem command return the number of the deleted items as extra check for those who done have any protection on their servers or does the script auto stop on fail , I just woke up xD
    1 point
×
×
  • Create New...