Zirius
Members-
Content Count
261 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Zirius
-
Hello! I am using 20120410, and wondering why are the shields not showing? I patched using Nemo I tried extracting the sprites from http://ratemyserver.net/index.php?page=riot_bible_section§ion=5 to my own grf, but still now showing. Should there be lua/lub file need? Because I am still using .txt files. Thanks!
-
Compiling "make sql" with only MariaDB dependencies
Zirius replied to Zirius's question in Database Requests
Thanks bro! -
Can you make a source patch file for @storeitem plugin?
Zirius replied to Zirius's question in Source Requests
src/map/atcommand.c Find "ACMD(send)", Add above: ACMD(storeitem) { struct map_session_data *pl_sd; struct item item_tmp; struct item_data *item_data; char item_name[ITEM_NAME_LENGTH]; char character[NAME_LENGTH]; int number = 0, item_id; int get_count, i, pet_id, ref = 0; memset(item_name, '0', sizeof(item_name)); if (!message || !*message || sscanf(message, "%49s %d %d %23[^n]", item_name, &number, &ref, character) < 4) { clif->message(fd, "(usage: @storeitem <item name or ID> <quantity> <refine> <char name>)."); return false; } if( ref < 0 || ref > MAX_REFINE ) { char output_p[124]; sprintf(output_p,"<refine> %d is out of bounds, limit is 0~%d. @storeitem failed.",ref,MAX_REFINE); clif->message(fd,output_p); return false; } if (number <= 0) number = 1; item_id = 0; if ((item_data = itemdb->search_name(item_name)) != NULL || (item_data = itemdb->exists(atoi(item_name))) != NULL) item_id = item_data->nameid; else { clif->message(fd, atcommand->msg_table[19]); // Invalid item ID or name. return false; } /* only weapon (4) and armors (5) can refine, refineable item db field also applies */ if( ( item_data->type != 4 && item_data->type != 5 ) || item_data->flag.no_refine ) ref = 0; get_count = number; if (!itemdb->isstackable2(item_data)) { get_count = 1; } pet_id = pet->search_petDB_index(item_id, PET_EGG); if (item_data->type == 4 || item_data->type == 5 || item_data->type == 7 || item_data->type == 8) { get_count = 1; } if ((pl_sd = map->nick2sd(character)) != NULL) { if (pc_get_group_level(sd) >= pc_get_group_level(pl_sd)) { // you can add items only to groups of equal or lower level for (i = 0; i < number; i += get_count) { if (pet_id >= 0) { pl_sd->catch_target_class = pet->db[pet_id].class_; intif->create_pet(pl_sd->status.account_id, pl_sd->status.char_id, (short)pet->db[pet_id].class_, (short)mob->db(pet->db[pet_id].class_)->lv, (short)pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate, 100, 0, 1, pet->db[pet_id].jname); } else { memset(&item_tmp, 0, sizeof(item_tmp)); item_tmp.nameid = item_id; item_tmp.identify = 1; item_tmp.refine = ref; storage->open(pl_sd);/* without open/close procedure the client requires you to relog to access storage properly */ storage->additem(pl_sd, &item_tmp, get_count); storage->close(pl_sd); } } //clif->message(fd, "Item has been added to your inventory."); } else { clif->message(fd, atcommand->msg_table[81]); // Your GM level don't authorise you to do this action on this player. return false; } } else { clif->message(fd, atcommand->msg_table[3]); // Character not found. return false; } return true;} Find: "ACMD_DEF(costume),", Add below: ACMD_DEF(storeitem), -
is there a script or trick I can do to get the variable of players? Suppose we have ,PCDieEvent:, I wanna get .@lastmission of killed and killerid players. I wanna do this because I will need to compare their variables. Thanks!
-
Hello! Since I am having trouble making @storeitem works on my CentOS as plugin. Can somebody convert the following code into something that would work inside atcommand.c. So that I won't be needing anymore plugin tweaks. // Copyright (c) Hercules Dev Team, licensed under GNU GPL.// See the LICENSE file// Sample Hercules Plugin#include <stdio.h>#include <string.h>#include <stdlib.h>#include "../common/HPMi.h"#include "../map/atcommand.h"#include "../map/clif.h"#include "../map/itemdb.h"#include "../map/map.h"#include "../map/intif.h"#include "../map/status.h"#include "../map/unit.h"#include "../map/mob.h"#include "../map/pet.h"#include "../map/pc.h"#include "../map/storage.h"#include "../common/HPMDataCheck.h"/* Designed by Beowulf/Nightroad, HPM port by [Ind/Hercules] */HPExport struct hplugin_info pinfo = { "@storeitem", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated)};ACMD(storeitem) { struct map_session_data *pl_sd; struct item item_tmp; struct item_data *item_data; char item_name[ITEM_NAME_LENGTH]; char character[NAME_LENGTH]; int number = 0, item_id; int get_count, i, pet_id, ref = 0; memset(item_name, '0', sizeof(item_name)); if (!message || !*message || sscanf(message, "%49s %d %d %23[^n]", item_name, &number, &ref, character) < 4) { clif->message(fd, "(usage: @storeitem <item name or ID> <quantity> <refine> <char name>)."); return false; } if( ref < 0 || ref > MAX_REFINE ) { char output_p[124]; sprintf(output_p,"<refine> %d is out of bounds, limit is 0~%d. @storeitem failed.",ref,MAX_REFINE); clif->message(fd,output_p); return false; } if (number <= 0) number = 1; item_id = 0; if ((item_data = itemdb->search_name(item_name)) != NULL || (item_data = itemdb->exists(atoi(item_name))) != NULL) item_id = item_data->nameid; else { clif->message(fd, atcommand->msg_table[19]); // Invalid item ID or name. return false; } /* only weapon (4) and armors (5) can refine, refineable item db field also applies */ if( ( item_data->type != 4 && item_data->type != 5 ) || item_data->flag.no_refine ) ref = 0; get_count = number; if (!itemdb->isstackable2(item_data)) { get_count = 1; } pet_id = pet->search_petDB_index(item_id, PET_EGG); if (item_data->type == 4 || item_data->type == 5 || item_data->type == 7 || item_data->type == 8) { get_count = 1; } if ((pl_sd = map->nick2sd(character)) != NULL) { if (pc_get_group_level(sd) >= pc_get_group_level(pl_sd)) { // you can add items only to groups of equal or lower level for (i = 0; i < number; i += get_count) { if (pet_id >= 0) { pl_sd->catch_target_class = pet->db[pet_id].class_; intif->create_pet(pl_sd->status.account_id, pl_sd->status.char_id, (short)pet->db[pet_id].class_, (short)mob->db(pet->db[pet_id].class_)->lv, (short)pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate, 100, 0, 1, pet->db[pet_id].jname); } else { memset(&item_tmp, 0, sizeof(item_tmp)); item_tmp.nameid = item_id; item_tmp.identify = 1; item_tmp.refine = ref; storage->open(pl_sd);/* without open/close procedure the client requires you to relog to access storage properly */ storage->additem(pl_sd, &item_tmp, get_count); storage->close(pl_sd); } } //clif->message(fd, "Item has been added to your inventory."); } else { clif->message(fd, atcommand->msg_table[81]); // Your GM level don't authorise you to do this action on this player. return false; } } else { clif->message(fd, atcommand->msg_table[3]); // Character not found. return false; } return true;}HPExport void plugin_init (void) { atcommand = GET_SYMBOL("atcommand"); storage = GET_SYMBOL("storage"); clif = GET_SYMBOL("clif"); pc = GET_SYMBOL("pc"); map = GET_SYMBOL("map"); itemdb = GET_SYMBOL("itemdb"); intif = GET_SYMBOL("intif"); pet = GET_SYMBOL("pet"); mob = GET_SYMBOL("mob"); unit = GET_SYMBOL("unit"); addAtcommand("storeitem",storeitem);} Thanks!
-
Thanks! I'm not aware that reCaptcha is already bypassable. But actually, I cannot find any program you are referring to. If still they dont code, they can do like, if mes appear, they will be alerted by sound on pc, which can help them to see npc chat on openkore, and the npc message will be somethijg like, <LINK> recaptcha link </LINK> and so, making the link visible to openkore, so they can open up that link, enter recaptcha, and continue botting. But that stops botting if the player is not online. After all, the big use of bot is if the user is not in front of his PC. Hence, majority of the job is done. There could be lots of improvement to that antibot. I believe external captcha is key to prevent these bots.
-
still can bot, remember, those links are sended by mes command which are read by openkore, and they can see link, go to that link, and enter captcha. But I agree,it would be demotivational. Bro, I wanna know how could still be bypassable by bot. reCaptcha is an external captcha. Unless, openkore could create script that answers reCaptcha successfully.
-
Is there a equivalent function of in_array() in Hercules? I am trying to make a script that records to an array maps at which a character went, then i wanna do a script that triggers if a specific map is inside the array. Thanks!
-
Bro, can you please check, I diffed via Nemo, I did not diff "Read Data Folder First" But, without the clientinfo.xml inside data folder, my client won't connect. But pretty sure it is ready my multiple grf and my custom data.ini I am using 20120410 client.
-
One option is, have a copy of old MD5 password, use MD5 generator and convert your preferred password for him/her put the generated password to his login data via SQL login via new password, inspect then return his old password.
-
Why am I having this error on my CentOS? in works on windows. I already added in to makefile.in, make plugins output: *** No rule to make target `@storeitem', needed by `all'. Stop.make: *** [plugins] Error 2 Thanks!
-
@whodrops LIST to only show items that are dropped by mobs
Zirius posted a question in Source Requests
I think this would be great feature for Hercules. On @whodrops Knife, Hercules would first list all "Knife" items from item_db, composed of Knife_,Knife__, etc. The thing is, I don't think players are interested at knowing items that are not even dropped by mobs (unless otherwise specified by @whodrops ID), so I think there should be no more reason to show them, plus there's @iteminfo to do that. What the current script does, is list all the items that has the keyword knife, then one by one get the names and drop chance of each. What I think should be better (though I think more resource consuming), pull all the items that are listed on the mob drops in mob_db, then from that list, start searching. This way, @whodrops will not show any more of those Rental Boxes, etc. I'd been playing with that atcommand.c for sometime now, and can't get it work. LOL. Thanks! Add. I think the better way is, for the herc to create a cache at init, to list all items under mob_db. Then @whodrops, it would retrieve only items inside that cache. The cache would be refreshed/regenerated upon @reloaditemdb/@reloadmobdb Thanks! -
Is *bAddMonsterDropItem rate affected by item_rate_adddrop
Zirius replied to Zirius's question in General Server Support
So, official doesn't use it right? Thanks! -
@fontcolor showing unnecessary logging effect?
Zirius replied to Zirius's question in Client-Side Support
I will just bump this topic for the last time. I tried creating a local Herc from scratch and client from scratch. Re-set-up them all up. But same thing happens. Am I the only one? -
Is *bAddMonsterDropItem rate affected by item_rate_adddrop
Zirius posted a question in General Server Support
battle/drops.conf says: // The rate adjustment for card-granted item drops.item_rate_adddrop: 100item_drop_add_min: 1item_drop_add_max: 10000 I am just wondering if it should affect *bAddMonsterDropItem Is it the same as official? Thanks! -
Compiling "make sql" with only MariaDB dependencies
Zirius replied to Zirius's question in Database Requests
I'll confirm this as soon as I free up another server of mine. Thanks! -
Which should I use "break" / "continue" ? Snapping out of while and check var again
Zirius replied to Zirius's question in Script Support
I think I need sleep now. My coding is getting very bad. LOL. Thank you very much! -
Hello! I got this script: prontera,155,180,4 script This eynt working#2 1_ETC_01,{ if (da_var < 3 ) { while (da_var < 3) { switch(da_var) { case 0: mes "you hit 0"; da_var = 1; next; break; case 1: mes "you hit 1"; da_var = 2; next; break; case 2: mes "you hit 2"; da_var = 3; mes "Do you want to proceed?"; next; break; case 3: mes "you hit 3"; da_var = 4; next; break; } } } else { mes "you hit rock bottom"; close; }}basically, what it does is: a player talks to it and sets the variable "da_var" window by window until it reach "da_var" = 4. What I wish is once it goes to "da_var =4", the NPC would say: "you hit rock bottom" without re-talking to it again. If you test the script, it would get stuck at "you hit 3" and will never go to "you hit rock bottom", unless you re-talk to it. Hope somebody can help. Thanks!
-
@fontcolor showing unnecessary logging effect?
Zirius replied to Zirius's question in Client-Side Support
OMG OMG. I just learned that @fontcolor also removes GM sprites temporarily. I am on GM sprites, then I type a string with @fontcolor activated, for a short time the GM sprite disappeared, showing a normal job. then, goes back on GM sprite.. Here's a video: View My Video -
@fontcolor showing unnecessary logging effect?
Zirius replied to Zirius's question in Client-Side Support
Thanks mam. Gonna ask a mod to move this to client. Thank you very much mam. -
how do you replace packet keys on 20140115 ?
Zirius replied to Zirius's question in Client-Side Support
Eh Why? what error did u get with the patcher Packet First Key Encryption: Failed in part 1. I think that means NEMO can't find the hex? Though my tortoise says I am still updated. LOL. I just learned you are the developer of the program. (thumbs up!) Btw, I want to report a minor feature bug. If you load the client, and apply a patch where NEMO fails, says like above, the patch applied counter becomes -1. Its nothing though, just want to inform anyway. LOL. Sorry, seems like I just need to update my nemo. what a shame. though, GIT said I'm updated. -
how do you replace packet keys on 20140115 ?
Zirius replied to Zirius's question in Client-Side Support
thanks thanks thanks! -
@fontcolor showing unnecessary logging effect?
Zirius replied to Zirius's question in Client-Side Support
(using 20140115) Waa starting to think it is not client based. Mam (or anybody), can you please confirm my GIT is same as yours? ACMD(fontcolor) { unsigned char k; unsigned short msg_len = 1; char mout[40]; if( !message || !*message ) { for( k = 0; k < hChSys.colors_count; k++ ) { msg_len += sprintf(mout, "[ %s ] : %s",command,hChSys.colors_name[k]); WFIFOHEAD(fd,msg_len + 12); WFIFOW(fd,0) = 0x2C1; WFIFOW(fd,2) = msg_len + 12; WFIFOL(fd,4) = 0; WFIFOL(fd,8) = hChSys.colors[k]; safestrncpy((char*)WFIFOP(fd,12), mout, msg_len); WFIFOSET(fd, msg_len + 12); } return false; } if( message[0] == '0' ) { sd->fontcolor = 0; return true; } for( k = 0; k < hChSys.colors_count; k++ ) { if( strcmpi(message,hChSys.colors_name[k]) == 0 ) break; } if( k == hChSys.colors_count ) { sprintf(atcmd_output, msg_txt(1411), message);// Unknown color '%s' clif->message(fd, atcmd_output); return false; } sd->fontcolor = k + 1; msg_len += sprintf(mout, "Color changed to '%s'",hChSys.colors_name[k]); WFIFOHEAD(fd,msg_len + 12); WFIFOW(fd,0) = 0x2C1; WFIFOW(fd,2) = msg_len + 12; WFIFOL(fd,4) = 0; WFIFOL(fd,8) = hChSys.colors[k]; safestrncpy((char*)WFIFOP(fd,12), mout, msg_len); WFIFOSET(fd, msg_len + 12); return true;} Why is my characters doing that. -
Compiling "make sql" with only MariaDB dependencies
Zirius replied to Zirius's question in Database Requests
Not used mariadb, but it seems like, mariadb supports mysql, so you can use it(I dont think it will error out) Yes man, I am using it with my Herc in my windows platform via XAMPP. And I can assure you it works wayyyyy tooo faster that mySQL. My issue is, on my *nix server, I cannot compile herc because it would need mysql dev. So you would need to install mySQL. which actually consumes memory wayyyy toooo big than MariaDB uses. So, if anyone knows any MariaDB package that can replace what Herc compiling needs, that would be great. Thanks man! -
wew! Beat me to it. I am supposed to also update the plugin. Btw, the old plugin is not yet configured to stack stackable items. Find: if( ( item_data->type != 4 && item_data->type != 5 ) || item_data->flag.no_refine ) ref = 0; get_count = number; Add after: if (!itemdb->isstackable2(item_data)) { get_count = 1; } For now, create_pet() seems to be attached to player only. So, putting it to storage fails.