Jump to content

Shikazu

Members
  • Content Count

    74
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Shikazu

  1. I removed most of the stuff from the src you've sent me, so the plugin will only be able to be afk where ever you want, until i have access to the battle config through the plugin. I know that you might not want to use it like this, but i can't offer a better plugin, since i have no access to the needed functions. Here it is: http://herc.ws/board/topic/984-atcommandafk/ ~Shikazu
  2. The plugin is working but has no timeout and you can sit wherever you want. It is being reworked, when i have found out how to access the config's from a plugin. Here it is: https://github.com/shikazu/hpm-plugins/blob/master/src/plugins/afk.c just compile it, add it to your plugins.conf and type @afk ingame A little screenshot how it looks ingame, since you can't see it (afk logs you out, but you are still sitting there ) ~Shikazu
  3. Thanks, will work on it
  4. Can you give me a copy of that old @afk command? Would speed up the whole process
  5. Yeah that's the fluxcp i used, but it's not fixed for hercules. For example you can't show a list of the items, because hercules added the matk to attack instead of creating a new one. So if you want to show the itemdb to your users, you can upload a second item_db and rename the field "atk:matk" to "attack" which probably is the fastest solution, even if the field contains x:y sometimes, because of the matk. if you're running into problems with that, let me know
  6. It will take some time but i will be able to do so. is the creator of this okay with converting it as a plugin?
  7. yup it is possible. just request some in the plugin request section and i will try to code them
  8. That is not an HPM Plugin
  9. This script command is written to send color'ed messages to the player. dispbottomcolor is only writing messages to the players chatlog, but messagecolor is writing it to the chatlog and the message appears above his character's head. The source is available via github: https://github.com/shikazu/hpm-plugins/blob/master/src/plugins/ Usage: messagecolor <player>,<message>,<color>; Color is defined in db/const.txt and needs to be an integer. The color is optional, so you can still send messages like you did with message .. Both scripts are working the same ~Shikazu
  10. Just linking it http://herc.ws/board/topic/977-shikazus-hpm-plugin-collection/
  11. Heh, no problem. Since it's like i'm the first one trying to use it, there are a lot of untested things, so i am reporting everything to him, so he can fix it.
  12. You have to update, it got fixed by Ind already https://github.com/HerculesWS/Hercules/commit/86e9900db60e06738880a57820125ca169c37520
  13. Hey Guys, here i will list all plugins i write for the Plugin Module of Hercules. GitHub Repository: https://github.com/shikazu/hpm-plugins Plugin List: - [Atcommand] @afk -> http://herc.ws/board/topic/984-atcommandafk/ - [Atcommand] @mapmoblist -> https://github.com/shikazu/hpm-plugins/blob/master/src/plugins/mapmoblist.c - [script Command] autonext -> http://herc.ws/board/topic/976-script-cmdautonext/ - [script Command] dispbottomcolor -> http://herc.ws/board/topic/974-script-cmddispbottomcolor/ - [script Command] messagecolor -> http://herc.ws/board/topic/978-script-cmdmessagecolor/ A description of this will be available in the specific topic's. Use this topic to post requests for plugins and i will decide if i can code them as plugin! ~Shikazu
  14. This source is pretty old and only for windows, so i can't even compile it It wouldn't even run on newer windows systems, because it is using raw sockets, which have been fucked up by microsoft since xp service pack 2. Edit:// If i have some time left in the next week or so i'll check how to make a win/unix version out of it. ~Shikazu
  15. Yeah nana, it's just autonext the timer runs and cant be interrupted by the user So you need to go to /src/plugins/ and place the source above as "autonext.c". Then you are creating the plugin project like here: http://herc.ws/wiki/Building_HPM_Plugin_for_MSVC or you are just using the sample plugin project and replace the source with the one on page 1. after that you can easily compile it. Then you have to add "autonext" if the name of the .c file was autonext.c to your plugins.conf in your conf-folder and everything should be up and running. I use gcc cause i'm compiling on a test server on my root Additionally i have to say, that you should have the newest git version, because it's some bugfixing there =)
  16. Yeah it's pretty easy to add a plugin. What compiler are you using?
  17. For now it's causing a debug notice in the map-server console window, but that is fixed in the next commit. If he clicks it, before it runs out, just nothing happens because the timeout is made with the script sleep causing the script sleeping so i cant change anything while the sleep is going on. If you really need the next button to work, i have to rewrite some of that stuff also. so what do you need?
  18. So here is the plugin which has been requested here. Thank you for requesting it, i was just thinking about stuff i can implement The problem with this is, that the "next" buttons are still in the bottom of the window of that npc and they are not going to disappear, because the next is made by the server and not by the user. Just like XKore from openkore ^^ Anyways, here is the script for anyone who wants to use it. #include <stdio.h>#include <string.h>#include "../common/HPMi.h"#include "../map/script.h"#include "../map/pc.h"HPExport struct hplugin_info pinfo = { "autonext", // 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)};BUILDIN(autonext) { TBL_PC* sd; int timeout; sd = script->rid2sd(st); if( sd == NULL ) return true;#ifdef SECURE_NPCTIMEOUT sd->npc_idle_type = NPCT_WAIT;#endif timeout=script_getnum(st,2); if(st->sleep.tick == 0) { st->state = RERUNLINE; st->sleep.tick = timeout; } else {// sleep time is over st->state = RUN; st->sleep.tick = 0; } clif->scriptnext(sd, st->oid); return true;}/* Server Startup */HPExport void plugin_init (void) { clif = GET_SYMBOL("clif"); script = GET_SYMBOL("script"); if( HPMi->addScript != NULL ) { HPMi->addScript("autonext","i",BUILDIN_A(autonext)); }} The Script command is used like this: autonext 1000; This means, the script is waiting for 1000 milliseconds and then it's using next! If the user is pressing "next" on it's own, it is just ignored! Don't forget that! If you encounter any bugs, just ping me! ~Shikazu
  19. Looking into that Will be making a new thread if i can do it EDIT:// I figured something out! I just checking everything and will create a thread in about an hour. EDIT2:// Here is the link to the Plugin Thread! http://herc.ws/board/topic/976-script-cmdautonext/
  20. Fixed! Thanks There was a bug anyways
  21. Hey Guys, It's just the first plugin in made for the HPM and i'm posting some more in this section, once i got everything out about the HPM uPaste.me - http://upaste.me/8fec6054919f4fa2 #include <stdio.h>#include <string.h>#include "../common/HPMi.h"#include "../map/script.h"#include "../map/pc.h"HPExport struct hplugin_info pinfo = { "dispbottomcolor", // 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)};BUILDIN(dispbottomcolor){ TBL_PC *sd = script->rid2sd(st); const char *message; int color; message=script_getstr(st,2); if(script_hasdata(st,3)) color=script_getnum(st,3); else color = COLOR_DEFAULT; if(sd) clif->colormes(sd->fd,color,message); return true;}/* Server Startup */HPExport void plugin_init (void){ clif = GET_SYMBOL("clif"); script = GET_SYMBOL("script"); if( HPMi->addScript != NULL ) { HPMi->addScript("dispbottomcolor","s?",BUILDIN_A(dispbottomcolor)); }} How to compile is very well explained in the Wiki, so if you running into problems, write here or in plugin support.
  22. Will post some stuff in the next week, hope i can figure out a lot of stuff
  23. So i've checked what you said... I was able to register via FluxCP and the only issue i can imagine is, that you are using plain text passwords on your server and flux is making md5 hashes out of that, so have a look into your hercules db "login" and check if the new registered account is not md5 (password is hashed, 0-9 + a-f and 32 chars long). The MD5 Setting is in "your fluxcp folder/config/servers.php" and then 'UseMD5' => true, under 'LoginServer' if you want to use MD5, use true, otherwise false ~Shikazu
  24. Hey I have some issues in getting stuff to work, because i want to write mit source edits as HPM Plugins so i dont have to edit everything if there was an update i've tried to add a new command called dispbottomcolor and i have some issues Here is the plugin: http://upaste.me/7b816044b90bc54e And this is my error.log from VC++ 2010 Express 1>------ Neues Erstellen gestartet: Projekt: plugin-sample, Konfiguration: Debug Win32 ------1> dispbottomcolor.c1>..srcpluginsdispbottomcolor.c(16): warning C4013: 'script_rid2sd' undefiniert; Annahme: extern mit Rückgabetyp int1>..srcpluginsdispbottomcolor.c(16): warning C4047: 'Initialisierung': Anzahl der Dereferenzierungen bei 'TBL_PC *' und 'int' unterschiedlich1> Bibliothek "plugin-sampleDebugplugin-sample.lib" und Objekt "plugin-sampleDebugplugin-sample.exp" werden erstellt.1>dispbottomcolor.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_script_rid2sd" in Funktion "_buildin_dispbottomcolor".1>..pluginsplugin-sample.dll : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.========== Alles neu erstellen: 0 erfolgreich, Fehler bei 1, 0 übersprungen ========== The problem is that script_rid2sd is not defined, so i want to script.c, copied the function header to script.h and tried to build and he was not able to compile it. I think the issue might be that i don't have access to every function in script.c because the function header's / function prototypes are not mentioned in the script.h. What are your suggestions, because i want to use HPM to be able to update my version to the newest without much custom stuff to be reedited every time and this would be causing more src edits like i have by now.. Thanks for your help! ~Shikazu
×
×
  • Create New...

Important Information

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