Jump to content

bWolfie

Members
  • Content Count

    848
  • Joined

  • Last visited

  • Days Won

    34

Everything posted by bWolfie

  1. IT'S NOT EMAIL PROTECTED deletearray($@partymembername$[0]);
  2. Hm well now you got a few more columns in your sql table. To get those party members, you can do this: Add this... below .@PN$ = ... deletearray($@partymembername$[0]); getpartymember(.@PID, 0); Run this SQL query to add the table to your DB... CREATE TABLE IF NOT EXISTS `Orcs` ( `party_id` INT(11) NOT NULL DEFAULT '0', `party_name` VARCHAR(24) NOT NULL, `name1` VARCHAR(24) NOT NULL, `name2` VARCHAR(24) NOT NULL, `name3` VARCHAR(24) NOT NULL, `name4` VARCHAR(24) NOT NULL, `name5` VARCHAR(24) NOT NULL, `time` VARCHAR(24) NOT NULL DEFAULT '00:00:00', `date` DATE NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE = MyISAM DEFAULT CHARSET=latin1;) Replace your current insert query with this: query_sql("INSERT INTO `Orcs` VALUES (" + .@PID + ", '" + escape_sql(.@PN$) + "', '" + escape_sql($@partymembername$[0] + "', '" + escape_sql($@partymembername$[1] + "', '" + escape_sql($@partymembername$[2] + "', '" + escape_sql($@partymembername$[3] + "', '" + escape_sql($@partymembername$[4] + "', '" + .@time$ + "', NOW())");
  3. Hm okay, was wondering since a server I played long ago had a command which would open a command prompt then initiate a ping test. Cyro in the Discord server linked an old source release on rathena re: ping command. I will check it out and investigate. https://rathena.org/board/files/file/2770-ping-ip-address/
  4. Hi, I am wondering if it is possible for a client to force open something? I am interested in having an atcommand which can open a command prompt and initiate some commands. Thanks
  5. First create a table, perhaps called orcs_memory Btw, this is just off the top of my head. I cannot confirm works. Create table with the following columns: party_id (needs to be integer) party_name (needs to be string) time (needs to be string) Then, the moment your instance completes, you can the add following script: .@PID = getcharid(CHAR_ID_PARTY); .@PN$ = getpartyname(.@PID); .@time$ = ...(I wrote in the last post how to get this) query_sql("INSERT INTO `orcs_memory` VALUES (" + .@PID + ", '" + escape_sql(.@PN$) + "', '" + .@time$ + "')"); And then for your npc, the sql query: prontera,150,150,3 script Orcs Memory Rank CLEAR_NPC,{ query_sql("SELECT `party_name`, `time` FROM `orcs_memory` ORDER BY `time` ASC LIMIT 10", .@pname$, .@rank$); mes("Orcs Memory Rank"); for (.@i = 0; .@i < getarraysize(.@rank$); ++.@i) mes("" + .@pname$[.@i] + " - " + .@rank$[.@i] + ""); close; }
  6. Before I start, I need to let you know a few things about my potential solution. I have never tried this before. I don't know how initnpctimer() interacts with instance NPCs. I don't have time to test. This might help you get started / understanding the process. // Add this NPC script to the OrcsMemory.txt instance script. 2@orcs,1,1,0 script Orcs_Memory_Timer FAKE_NPC,{ end; } /************* * Notes ************** Immediately after the instance is created, add this line below it: initnpctimer("Orcs_Memory_Timer"); I don't know how the Orc's Memory instance ends, but when it ends (maybe you need to add an event for when the mob is killed), add these lines: stopnpctimer("Orcs_Memory_Timer"); .@time = getnpctimer("Orcs_Memory_Timer") / 1000; if (.@time < $Orcs_Memory_Record) { // This next bit will display time as 00:00:00 format .@hour$ = .@time % (24*60*60) / (60*60) + ""; .@min$ = .@time % (24*60*60) % (60*60) / (60) + ""; .@sec$ = .@time % (24*60*60) % (60*60) % (60) + ""; .@time$ = "" +(getstrlen(.@hour$) == 1 ? "0" : "")+ "" + .@hour$ + ":" +(getstrlen(.@min$) == 1 ? "0" : "")+ "" + .@min$ + ":" +(getstrlen(.@sec$) == 1 ? "0" : "")+ "" + .@sec$ + ""; announce("The " + getpartyname(CHAR_ID_PARTY) + " party cleared the dungeon in " + .@time$ + ", a new record!", bc_all); $Orcs_Memory_Record = .@time; } You will need to set the $Orcs_Memory_Timer to something really high before the first party does the instance. This is so the first party to clear the dungeon will be the first record. I advise going in-game and using the following atcommand: @set $Orcs_Memory_Timer 1000000000 (that's 1 billion seconds lol) *************/
  7. I remember there is a plugin that does this. If I recall, it is sellitem2: https://github.com/dastgir/HPM-Plugins
  8. I suggest adding support for the following: @mapflag atcommand @mapinfo atcommand getmapflag script command removemapflag scriptcommand setmapflag script command
  9. Wondering if anybody could update this plugin? Seems it no longer works. nohomunc.c: In function ‘clif_parse_LoadEndAck_post’: nohomunc.c:62:21: warning: variable ‘hd’ set but not used [-Wunused-but-set-variable] struct homun_data *hd; ^ nohomunc.c: In function ‘homunculus_call_post’: nohomunc.c:85:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (retVal___ = true) { ^ nohomunc.c:79:21: warning: variable ‘hd’ set but not used [-Wunused-but-set-variable] struct homun_data *hd; ^ nohomunc.c: In function ‘homunculus_create_post’: nohomunc.c:104:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (retVal___ = true) { ^ nohomunc.c:97:21: warning: variable ‘hd’ set but not used [-Wunused-but-set-variable] struct homun_data *hd;
  10. bWolfie

    New life for RO

    I wish you the best of luck. I cannot offer anything but this. As Dastgir writes below, this is a dream project for any RO person out there. Not having to rely on client releases would be awesome.
  11. According to npc.c, this is how array values for OnBuyItem/OnSellItem are genereated. Maybe you can work something out from it. //npc_buylist for script-controlled shops. int npc_buylist_sub(struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd) { char npc_ev[EVENT_NAME_LENGTH]; int i; int key_nameid = 0; int key_amount = 0; nullpo_ret(item_list); nullpo_ret(nd); // discard old contents script->cleararray_pc(sd, "@bought_nameid", (void*)0); script->cleararray_pc(sd, "@bought_quantity", (void*)0); // save list of bought items for (i = 0; i < VECTOR_LENGTH(*item_list); i++) { struct itemlist_entry *entry = &VECTOR_INDEX(*item_list, i); intptr_t nameid = entry->id; intptr_t amount = entry->amount; script->setarray_pc(sd, "@bought_nameid", i, (void *)nameid, &key_nameid); script->setarray_pc(sd, "@bought_quantity", i, (void *)amount, &key_amount); } // invoke event snprintf(npc_ev, ARRAYLENGTH(npc_ev), "%s::OnBuyItem", nd->exname); npc->event(sd, npc_ev, 0); return 0; }
  12. DASTGIR THE HERO WE NEED BUT ALSO THE ONE WE DESERVE
  13. I'm trying to use npcshopattach() on a shop in another script. Can this be done? Always returns false. if (npcshopattach("My_Shop") == false) mes("FALSE"); else mes("TRUE"); close; And in another script: - trader My_Shop FAKE_NPC,{ OnInit: tradertype(NST_CUSTOM); sellitem(Red_Potion, 1); end; OnCountFunds: setcurrency(countitem(Orange_Potion)); end; OnPayFunds: if (countitem(Orange_Potion) < @price) end; delitem(Orange_Potion, @price); purchaseok(); end; }
  14. wow happy to see an old suggestion finally get its share haha
  15. If you need 2015 client, you will have to not need mail system. I think maybe 2015-05-13 is an okay one. I don't remember when Doram support starts.
  16. Hm okay. Thanks Smoke. I was hoping not to use a long if or switch statement, but I guess it can't be avoided
  17. Sadly still triggering for 1-1 class like Swordman, Mage, Taekwon.
  18. Hi, I want to use the eA Job System to check an 'if' statement, having some trouble. I want the statement to check: If user is fully advanced class (e.g. Lord Knight, Paladin) OR user is at the end of the baby line (e.g. Baby Knight, Baby Hunter). User is NOT first class (can the classes above). This is my script. .@eac = eaclass(); // if (2-1/2-2 + rebirth OR 2-1/2-2 + baby BUT NOT FIRST CLASS) if (.@eac&EAJL_2&(EAJL_UPPER|EAJL_BABY)) { dothis(); }
  19. does it matter? maybe they want to add a counter for each time player trades. or bring a mes() window.
  20. Just found out I need to hold shift to go to next line line without skipping.
  21. Ordinal Suffix Function File Name: Ordinal Suffix File Submitter: Myriad File Submitted: 5 June 2017 File Category: Quests, Shops, Functions & Algorithms Releases Ever been constructing a string and wanted to turn 1 into 1st? Or 2 -> 2nd? Well, there is now an answer! I call it 'Ordinal Suffix'. It adds a suffix to the end of your number using the callfunc() script command. Example below: .@first = 1; .@second = 2; mes("That's the " + callfunc("Ordinal_Suffix", .@first) + " time you told me that!"); // Will return "That's the 1st time you told me that!" mes("That's the " + callfunc("Ordinal_Suffix", .@second) + " time you told me that!"); // Will return "That's the 2nd time you told me that!" mes("That's the " + callfunc("Ordinal_Suffix", 11) + " time you told me that!"); // Will return "That's the 11th time you told me that!" → Special cases such as '11th', '12th' and '13th' are accounted for. → Can only be used with integers. → Works for all possible numbers (except 0 will return 0th, not sure what that is supposed to be). Script can be 'downloaded' at this pastebin link: https://pastebin.com/6Z5k1S70
  22. Bumping this to say I found the solution and wanted to post it for future users. In channel.c, find: clif->messagecolor_self(sd->fd, COLOR_RED, msg_sd(sd,1455)); Replace with: char output[150]; sprintf(output, msg_txt(1550), DIFF_TICK(sd->hchsysch_tick + chan->msg_delay*1000, timer->gettick()) / 1000); // "You cannot send a message to this channel for another %d seconds." clif->messagecolor_self(sd->fd, COLOR_RED, output); In messages.conf, create a new custom message. In the example above, 1550 was used. You should use whatever the next available one is. 1550: You cannot send a message to this channel for another %d seconds.
  23. Hm I just noticed mob_skill_db.txt is not included in any db2sql conversions. Is this a mistake, or reason behind it?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.