Jump to content

latheesan

Members
  • Content Count

    41
  • Joined

  • Last visited

  • Days Won

    1

latheesan last won the day on March 3 2023

latheesan had the most liked content!

About latheesan

  • Rank
    Advanced Member
  • Birthday 12/03/1987

Profile Information

  • Gender
    Male
  • Location:
    United Kingdom
  • Interests
    Ragnarok Online and Coding.
  • Emulator
    Hercules

Recent Profile Visitors

3884 profile views
  1. boa tarde manin eu gotaria de saber se esse editor de npc se tem algum tutorial dele em algum site porque ja rodei varios lugares de sites e nada quero aprender a consertar meus script de sala vip e devilsquare que tao com erro sane me dizer onde eu acho um video mostrando passo a passo em portugues

  2. Is there an NPC event I can use to detect when player enters a map? I want to prevent duel client on event maps, but to be able to do that, I need to first detect user entering a specific map. How can I go about doing this?
  3. Hi, Is it possible to change the GM's chat colour in the Channel System? I know you can change the colour of GM's chat in the normal chat system via NEMO patcher like this: How about for the Channel System? Could it be done with a simple plugin?
  4. Where does Thor Patcher keeps the list of installed patches? One of our player had the game client running (which made the grf in use, so the merge couldn't happen) and his patch is screwed up now and wish to re-apply it. I know in the old patcher I used, there was like a log file, where I can remove the last line and re-open the patcher and it will re-apply the last patch. Any ideas?
  5. Update #2 :- Okay, after a bit of tinkering around - I think I managed to solve it, but I feel like I may have hooked into the wrong function. Here's the working version: #include "common/hercules.h" #include "common/memmgr.h" #include "common/mmo.h" #include "common/socket.h" #include "common/strlib.h" #include "map/clif.h" #include "map/pc.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" #include <stdio.h> #include <stdlib.h> #include <string.h> HPExport struct hplugin_info pinfo = { "GM Impersonate", // Plugin name SERVER_TYPE_MAP, // Which server types this plugin works with? "1.0", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; bool my_pc_process_chat_message(bool retVal___, struct map_session_data *sd, const char *message) { if (retVal___ == true) { if (stristr(message, " ")) { clif->messagecolor_self(sd->fd, COLOR_RED, "Possible GM Impersonation Detected - you cannot use more than 3 spaces in chat."); return false; } if (stristr(message, " : ") || stristr(message, " ; ")) { clif->messagecolor_self(sd->fd, COLOR_RED, "Possible GM Impersonation Detected - you cannot use : or ; in chat."); return false; } } return true; } HPExport void plugin_init(void) { if (SERVER_TYPE == SERVER_TYPE_MAP) { addHookPost(pc, process_chat_message, my_pc_process_chat_message); } } This version appears to be working everywhere, not just chat rooms. Here's a demo of the detection working: But this appears to have created a side effect. When ever you use a at-command, it appears to executes the command and then show the at-command you typed. Here's what I mean. I used the command @who2 - it shows the output and then shows the command i typed Is pc->process_chat_message the wrong hook? If not, am I implementing the hook incorrectly? Update #3 - I've fixed the wierd side effect It was caused by me always returning true. The fix is this: bool my_pc_process_chat_message(bool retVal___, struct map_session_data *sd, const char *message) { if (retVal___ == true) { if (stristr(message, " ")) { clif->messagecolor_self(sd->fd, COLOR_RED, "Possible GM Impersonation Detected - you cannot use more than 3 spaces in chat."); return false; } if (stristr(message, " : ") || stristr(message, " ; ")) { clif->messagecolor_self(sd->fd, COLOR_RED, "Possible GM Impersonation Detected - you cannot use : or ; in chat."); return false; } } return retVal___; } silly typo.
  6. Thanks for that, I manage to salvage the code Annie posted and tried to compile and found out that "colormes" has an error: So, I replaced it with: messagecolor_self Now, I have a different error: This is what I have so far: http://pastebin.com/N0EMkui3 If I try to remove this line "session = GET_SYMBOL("session");" the plugin doesn't compile, I get this error: Any ideas? I am trying to compile in Visual Studio Community Edition 2015. Thanks. -------- UPDATE After many hours of tinkering, I finally got it to compile after realising the plugin system was updated. The code Annie posted was for old HPM system. So, I managed to update it like this (not sure if i am using the right hook): #include "common/hercules.h" /* Should always be the first Hercules file included! (if you don't make it first, you won't be able to use interfaces) */ #include "common/memmgr.h" #include "common/mmo.h" #include "common/socket.h" #include "common/strlib.h" #include "map/clif.h" #include "map/pc.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" /* should always be the last Hercules file included! (if you don't make it last, it'll intentionally break compile time) */ #include <stdio.h> #include <stdlib.h> #include <string.h> HPExport struct hplugin_info pinfo = { "gmimpersonate", // 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) }; bool my_clif_process_chat_message(const char* retVal___, struct map_session_data *sd, const struct packet_chat_message *packet, char *out_buf, int out_buflen) { if (retVal___ == true) { char* message = (char*)RFIFOP(sd->fd, 4) + strnlen(sd->status.name, NAME_LENGTH - 1) + 3; int i, l = strlen(message); for (i = 0; i <= l; i++) if (message[i] == 'xA0') message[i] = 'x20'; // replace Alt+0160 into [space] if (stristr(message, " ")) { clif->messagecolor_self(sd->fd, COLOR_RED, "You are only allowed to type maximum of 3 spaces in a dialog."); return false; } if (stristr(message, "x20x3Ax20") || stristr(message, "x20x3Bx20")) { // type " : " OR " ; " will be blocked clif->messagecolor_self(sd->fd, COLOR_RED, "You can't impersonate other players !"); return false; } } return true; } HPExport void plugin_init(void) { addHookPost(clif, process_chat_message, my_clif_process_chat_message); } Now, this plugin compiles. I've enabled it (gmimpersonate) in conf/plugins.conf and went in game to test it, does not appear to be working. Any idea what might be wrong? is "process_chat_message" wrong method to hook? I tried looking for "process_message" but it appears there is no hook for it.
  7. Hi All, I just found out about an interesting way scammers are scamming my players. If they used multiple spaces, they can pretend to be anyone (especially GM/Admin) and trick users to give their account details away or in worst case get them to install TeamViewer etc... Let me show you what I mean. If I am logged in user Adam for example and I want to impersonate gm Latheesan, as "Adam", this is what I would type in a chat room: Hi Latheesan : Hi, can you install TeamViewer and give me id/pass? In the game, here's a demo showing how this looks and renders: So, in a busy chat room, players can be easily tricked into thinking a GM/Admin is talking to them and they do what they are told (even tho there's an ad/warning plastered all over the game not to give out account details >.>) Anyway, now you know how it's done, is there a way to prevent this? The easiest solution I can think of is to prevent multiple spaces in chat. If this was in PHP, I would have used regex to replace multiple occurrences of spaces into one like this example: $input = 'Hi Latheesan : Hi, can you install TeamViewer and give me id/pass?'; $output = preg_replace('!\s+!', ' ', $input); Could effectively do something similar in Hercules as a plugin? Can someone help me out? I am pretty sure this should be standard in Hercules, i.e. not being able to use multiple spaces (atleast a config for it or something...)
  8. @@skyleo / @@Dastgir - thanks for your replies. I managed to get it working without using custom keys, i.e. using the official ones in the client: 0x290551EA, 0x2B952C75, 0x2D67669B Is this ill-advised? would it be better to use custom keys?
  9. I am using the client: 2014-10-22 The herc emu/db has been setup to use md5 pass, not plain text. I diffed my client using NEMO and un-ticked "Restore Login Window" Given my username: latheesan & password: 123456 I tried to launch my client like this: myclient.exe -t:e10adc3949ba59abbe56e057f20f883e 1rag1 latheesan I see the "Do you agree?" and when I click ok and select the service, it says "unregistered id" and doesn't seem to work. I even tried enabling the diff "Use SSO packet" and it hasn't helped. The login is correct by the way. If I use "Restore Login Window", I can login perfectly fine with the old login window in the client. But I want to use token based login. Any ideas? ------ UPDATE Never mind; figured it out after a few trial & error and looking at the server logs. The trick was to enable "Use SSO Packet" and disable "Restore login window" diffs and launch the client like this: myclient.exe -t:123456 latheesan 1rag1
  10. Hi, I am using the client: 2014-10-22b To use the Packet Obfuscation feature; I used the following site to create 3 unique keys and made sure it "Passed" the validation stage. Then I Patched my unpacked client using NEMO with the following options: 8 Custom Window Title 9 Disable 1rag1 type parameters (Recommended) 13 Disable Ragexe Filename Check (Recommended) 15 Disable HShield (Recommended) 20 Extend Chat Box 21 Extend Chat Room Box 22 Extend PM Box 23 Enable /who command (Recommended) 24 Fix Camera Angles (Recommended) 27 HKLM To HKCU 31 Increase Zoom Out 75% 33 Always Call SelectKoreaClientInfo() (Recommended) 34 Enable /showname (Recommended) 35 Read Data Folder First 36 Read msgstringtable.txt (Recommended) 37 Read questid2display.txt (Recommended) 38 Remove Gravity Ads (Recommended) 39 Remove Gravity Logo (Recommended) 40 Restore Login Window (Recommended) 41 Disable Nagle Algorithm (Recommended) 43 Always Use Email for Char Deletion 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) 53 Use Ascii on All LangTypes (Recommended) 64 @ Bug Fix (Recommended) 65 Load Custom lua file instead of iteminfo*.lub (Recommended) 69 Extend Npc Dialog Box 73 Remove Hourly Announce (Recommended) 84 Remove Serial Display (Recommended) 86 Only First Login Background 88 Allow space in guild name 90 Enable DNS Support (Recommended) 92 Packet First Key Encryption 93 Packet Second Key Encryption 94 Packet Third Key Encryption 97 Cancel to Login Window (Recommended) 213 Disable Help Message on Login (Recommended) Then I added the following line to my conf/import/battle_conf.txt to always use packet obfuscation: packet_obfuscation: 2 Finally, I modified src/map/packets.h and added the following lines to the end of the file, just before #endif /* _MAP_PACKETS_H */ line: packetKeys(0xFIRSTKEY,0xSECONDKEY,0xTHIRDKEY); Recompiled the server and launched the client and I could login and go to char selection window. When I select my char, I get disconnected and on the server window, I get the following output: [Warning]: clif_parse: Received unsupported packet (packet 0x5691 (0x215f), 19 bytes received), disconnecting session #7. [Info]: Closed connection from '92.xxx.xxx.xxx'. Any ideas what I might have done wrong? Or, did I miss a step somewhere? Thanks in advance for any help. Regards, Latheesan.
  11. A friend of mine brought this tool to my attention today: ~ Link not Needed ~ This tool is able to somehow dupe item in all types of emulator. Has anyone from Herc community heard of this? Perhaps looked into how this works? Is it possible to block this?
  12. Hello and pardon my ignorance, but I saw this list here: http://herc.ws/board/topic/3554-ragnarok-episode-timeline/ Which episode of Ragnarok Online is implemented by the latest hercules git repo? Since Episode 15.2 : Memory Record is listed here, is that the latest herc offers? or am I wrong to assume that?
×
×
  • Create New...

Important Information

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