-
Content Count
848 -
Joined
-
Last visited
-
Days Won
34
Posts posted by bWolfie
-
-
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
-
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; }
-
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) *************/
-
I remember there is a plugin that does this. If I recall, it is sellitem2: https://github.com/dastgir/HPM-Plugins
-
I suggest adding support for the following:
- @mapflag atcommand
- @mapinfo atcommand
- getmapflag script command
- removemapflag scriptcommand
- setmapflag script command
-
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;
-
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.
-
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; }
-
DASTGIR THE HERO WE NEED BUT ALSO THE ONE WE DESERVE
-
17 minutes ago, Dastgir said:Because it's trader script and not shop.
You cannot use npcshopattach with trader scripts.
o i c
thanks for quick response. shame -
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; }
-
9 hours ago, kyeme said:My old suggestion here:
wow happy to see an old suggestion finally get its share haha
-
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.
-
Hm okay. Thanks Smoke. I was hoping not to use a long if or switch statement, but I guess it can't be avoided
-
19 minutes ago, Smoke said:// if (2-1/2-2 + rebirth OR 2-1/2-2 + baby BUT NOT FIRST CLASS) if ((.@eac & (EAJL_2_1 | EAJL_2_2)) && (.@eac & EAJL_BABY || .@eac & EAJL_UPPER)) { dothis(); }
Something like this?
Sadly still triggering for 1-1 class like Swordman, Mage, Taekwon.
-
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(); }
-
25 minutes ago, meko said:What exactly would that function be needed for?
does it matter? maybe they want to add a counter for each time player trades. or bring a mes() window.
-
-
Ordinal Suffix Function
File Name: Ordinal Suffix
File Submitter: Myriad
File Submitted: 5 June 2017
File Category: Quests, Shops, Functions & Algorithms ReleasesEver 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
-
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.
-
Hm I just noticed mob_skill_db.txt is not included in any db2sql conversions. Is this a mistake, or reason behind it?
-
Let me rephrase my question...
How do I send clifmessage->so it can send a number to %d in messages.conf?
-
Very nice, haven't updated my herc files in a while, glad to see some awesome changes. Thanks for the summary.
I concur. Last updated Herc October 2016, seems there's tons of new stuff since then. In the process of getting up to speed.
I suggest stay on your version updated one seems very unstable.
Actually there was an issue with item cloning; but this was resolved
Thanks for the advice. I go commit by commit since our server has messy custom code everywhere, so not too much of an issue to review what we are putting in.
-
I was thinking, how about a disabled_status mapflag or map zone conf?
How it would work is whenever 'SC_STATUS' is specified in that mapflag (or map zone?), it will automatically end or not allow that status to take place.
Example hypothetical mapflag:
prtg_cas01 mapflag nostatus SC_ASSUMPTIO
In this instance, when on the map prtg_cas01, even if a player can use a skill which does this status (i.e. Assumptio, High Priest Skill), the status will not take effect.
And any new players entering this map will automatically lose SC_ASSUMPTIO.
Or it could work in map_zone_db.conf. This example would do the same as above for Blessing and Assumptio statuses.
disabled_status: { SC_ASSUMPTIO: true SC_BLESSING: true }
Erm, just throwing an idea I thought of out there. Let me know what you guys think.
Even if it's not suitable for official herc, maybe it will inspire someone
Can a client force open another program?
in Client-Side Support
Posted
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/