Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    245

Everything posted by AnnieRuru

  1. why not just use changelook ... prontera,156,183,5 script kjdhfsksjf 100,{ mes "input an item to preview the look"; next; input .@id, 500, 32768; if ( getitemname(.@id) == "null" ) { mes "no such item"; close; } if ( getiteminfo( .@id, 2 ) != IT_ARMOR && !( getiteminfo( .@id, 5 ) & 256 ) ) { mes "that item is not a upper headgear"; close; } @look_temp = getlook(LOOK_HEAD_TOP); addtimer 100, strnpcinfo(0)+"::OnQuit"; changelook LOOK_HEAD_TOP, getiteminfo( .@id, 11 ); mes "how's the look ?"; next; changelook LOOK_HEAD_TOP, @look_temp; @look_temp = 0; mes "bye"; close;OnQuit: changelook LOOK_HEAD_TOP, look_temp; @look_temp = 0; end;}euphy's quest shop already has the preview function isn't it ?
  2. writing this as patch is just a few line src/map/battle.c | 7 +++++++ 1 file changed, 7 insertions(+)diff --git a/src/map/battle.c b/src/map/battle.cindex 24f39a3..3d3284e 100644--- a/src/map/battle.c+++ b/src/map/battle.c@@ -6020,6 +6020,13 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if( (s_bl = battle->get_master(src)) == NULL ) s_bl = src; + if ( s_bl->type == BL_PC && t_bl->type == BL_PC ) {+ TBL_PC *sd = BL_CAST( BL_PC, s_bl );+ TBL_PC *pl_sd = BL_CAST( BL_PC, t_bl );+ if ( guild->check_alliance( sd->status.guild_id, pl_sd->status.guild_id, 1 ) && !map->list[sd->bl.m].flag.town && !map->list[sd->bl.m].flag.nowarpto )+ return 1;+ }+ if ( s_bl->type == BL_PC ) { switch( t_bl->type ) { case BL_MOB: // Source => PC, Target => MOBits more fun to make this as pluginhttp://upaste.me/28fd11097df8e9a10
  3. actually I'm thinking of writing both ... with this one http://herc.ws/board/topic/4412-map-zone-dbconf-allows-to-restrict-an-item-type/ then only pull request
  4. its only not increasing to self but it gives to others
  5. I don't think its possible by reading the source, the source also actually built the list upon sql_handle https://github.com/HerculesWS/Hercules/blob/master/src/char/char.c#L2724 then compare the list each with the player's char id https://github.com/HerculesWS/Hercules/blob/master/src/map/pc.c#L355 problem of resetting the value while server is online is the sd->status.fame require players to online its not like the list is actually built internally with a sorting algorithm or ladder algorithm it actually do a constant listing with sql_handle so the only way to correctly reset the variables is do it when the server shut down update `char` set fame = 0; update char_reg_num_db set value = 0 where `key` = 'TK_MISSION_ID' or `key` = 'TK_MISSION_COUNT';
  6. prontera,156,183,5 script kjdhfsksjf 100,{ mes "hi"; getitem 1204, 1; equip 1204; addtimer 1, strnpcinfo(0)+"::OnPCLogoutEvent"; next; mes "bye"; close2;OnPCLogoutEvent: if ( countitem(1204) ) delitem 1204, countitem(1204); end;}what's the point of doing this actually ?
  7. hahaha .... that known issue is a false alarm I was having another plugin that crash the server ... thanks to the core dump there was nothing wrong with the patch at all @Jezu actually I rather have the map_zone_db.conf have a config to unequip the equipments so this one stay custom, that one should get a pull request @Samuel the current mapflag implementation sucks there should be just a function to add a mapflag, then from that global function handle the rest
  8. http://rathena.org/board/topic/92360-utility-onpclogin-gm-settings/?p=243632
  9. @安赫尔 1. OnPCDieEvent cannot put inside the instance map npc because the *instance_init command will make the copy of all the npc inside the maps means, if there are 2 copy of the instance map has copied (2 different players playing in separate instance maps), OnPCDieEvent will be trigger twice 2. your OnPCLoadMapEvent probably doesn't work because you don't have loadevent mapflag but rather than using OnPCLoadMapEvent, try use OnInstanceInit label instead the problem ? there is no player attached @karazu I think your problem is probably made from skills for example I tested this script with wizard the wizard clone can make fire pillar when the instance time out, the fire pillar should be deleted and I cannot reproduce your problem your server instance system kinda screw up, and its only you ...
  10. //===== Hercules Plugin ======================================//= *regexp Script Command//===== By: ==================================================//= AnnieRuru//===== Current Version: =====================================//= 1.0//===== Compatible With: ===================================== //= Hercules 2014-03-12//===== Description: =========================================//= check the string match with regular expression//===== Topic ================================================//= none//===== Additional Comments: ================================= //= rip off from rathena *preg_match//============================================================#include <stdio.h>#include <string.h>#include <stdlib.h>#include "../map/npc.h"#include "../map/script.h"#include "../common/HPMi.h"#include "../../3rdparty/pcre/include/pcre.h"#include "../common/HPMDataCheck.h" // should always be the last file included! (if you don't make it last, it'll intentionally break compile time)HPExport struct hplugin_info pinfo = { "regexp", // 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)};BUILDIN(regexp) {#ifdef PCRE_SUPPORT pcre *re; pcre_extra *pcreExtra; const char *error; int erroffset, r, offset = 0; int subStrVec[30]; const char* pattern = script_getstr(st,2); const char* subject = script_getstr(st,3); if (script_hasdata(st,4)) offset = script_getnum(st,4); re = libpcre->compile(pattern, 0, &error, &erroffset, NULL); pcreExtra = libpcre->study(re, 0, &error); r = libpcre->exec(re, pcreExtra, subject, (int)strlen(subject), offset, 0, subStrVec, 30); libpcre->free(re); if (pcreExtra != NULL) libpcre->free(pcreExtra); if (r < 0) script_pushint(st,0); else script_pushint(st,(r > 0) ? r : 30 / 3); return true;#else ShowError( "buildin_regexp: Cannot run because PCRE library are disabled.n" ); script_pushint(st,0); return false;#endif}HPExport void plugin_init (void) {#ifdef PCRE_SUPPORT script = GET_SYMBOL("script"); libpcre = GET_SYMBOL("libpcre"); addScriptCommand( "regexp", "ss?", regexp );#else ShowError( "buildin_regexp: Cannot run because PCRE library are disabled.n" );#endif}yeah ... yeah ... the error disappearedbut you also get the ShowError warning saying that it is disabled
  11. so its not my compiler problem, many member else experiencing this issue seems to me like the pcre are not compatible with plugins @samuel I'm using windows with microsoft visual express so I also try fix odin server side manner http://upaste.me/a7a2110923a939b03 and my compiler throw this error 2>whisp.obj : error LNK2019: unresolved external symbol __imp__pcre_exec referenced in function _filter_chat2>whisp.obj : error LNK2019: unresolved external symbol __imp__pcre_study referenced in function _read_manner2>whisp.obj : error LNK2019: unresolved external symbol __imp__pcre_compile referenced in function _read_manner2>whisp.obj : error LNK2001: unresolved external symbol __imp__pcre_free2>..pluginswhisp.dll : fatal error LNK1120: 4 unresolved externalsthat is the reason I'm actually using libpcre->compile, libpcre->study and so on because it has already defined in npc_chat.chttps://github.com/HerculesWS/Hercules/blob/master/src/map/npc_chat.c#L436 that's why ... @安赫尔 yes, like I said in my 2nd point to make this plugin works, comment the line inside npc.h line 285, change #ifdef PCRE_SUPPORT into //#ifdef PCRE_SUPPORT line 348, change #endif into //#endif then this plugin will work but doing like this will defeat the purpose of making a plugin, because plugin means you don't have to touch the source ? the patch is actually working though http://upaste.me/c4861109339c41185 but not the plugin ... maybe I should do a pull request ...
  12. http://upaste.me/868111089e57a3d30 there is something funny about this plugin 1. if I uncomment the //#ifdef PCRE_SUPPORT even though I have PCRE compiled, but it always go under the #else statement ... dunno why 2. and the only way to make this work porperly is also uncomment the #ifdef PCRE_SUPPORT inside npc.h !! https://github.com/HerculesWS/Hercules/blob/master/src/map/npc.h#L285 maybe its my compiler problem ? microsoft visual basic 2010
  13. map.c ? if you can read the patch, this patch doesn't alter anything to the map.c file you went off-topic I think
  14. this is the correct script http://upaste.me/8f1311087bf401916 lol, I also found a bug by writing this script http://herc.ws/oldboard/index.php?app=tracker&showissue=8077
  15. there's a reason that I haven't made this script like above did because there is a bug if setcastledata when the agit is on, the emperium is not change immediately ( its not like *bg_monster_set_team command where the monster allegiance can be change immediately ) and nobody bother to fix this because not many people knows how to write a custom woe castle script (well ... I know though ) 99,prontera,Prontera Test Castle,test flag,1 prontera,155,188,5 script reset castles 100,{ if(getgmlevel()!=99) { mes "you are not admin!"; close; } mes "Are you sure reset all castles ?"; if(select("no:yes") == 2 ) { set .@gid,getcharid(2); if(!.@gid) { mes "you haven't joined a guild!"; close; } setarray .@maps$[0],"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05"; setarray .@maps$[5],"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05"; setarray .@maps$[10],"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05"; setarray .@maps$[15],"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05"; setarray .@maps$[20],"prontera"; for( set .@i, 0; .@i <= 20; set .@i, .@i+1 ) setcastledata .@maps$[.@i],1,.@gid; mes "All castles have been set to"+getguildname(.@gid)+"!"; } close; } prontera,152,185,4 script test flag 722,{ dispbottom "========================="; set .@gid, getcastledata( "prontera", 1 ); dispbottom "owner of the castle : "+( ( .@gid )? "["+ getguildname(.@gid) +"]" : "<none>" ); dispbottom "agit check : "+( ( agitcheck() )?"on":"off" ); dispbottom "gvg_castle mapflag : "+( ( getmapflag( strcharinfo(3), mf_gvg_castle )?"on":"off" ) ); dispbottom "========================="; end; OnInit: if ( !agitcheck() ) agitstart; else donpcevent strnpcinfo(0)+"::OnAgitStart"; setmapflag "prontera", mf_gvg_castle; flagemblem getcastledata("prontera",1); end; OnAgitStart: monster "prontera",151,181,"EMPERIUM",1288,1,strnpcinfo(0)+"::OnEmpBreak"; end; OnAgitEnd: killmonster strnpcinfo(4), strnpcinfo(0)+"::OnEmpBreak"; end; OnEmpBreak: announce "The Emperium has fallen", bc_map; setcastledata "prontera", 1, getcharid(2); donpcevent "::OnRecvCastle123"; sleep getbattleflag("gvg_eliminate_time"); monster "prontera",151,181,"EMPERIUM",1288,1,strnpcinfo(0)+"::OnEmpBreak"; end; OnAgitInit: requestguildinfo getcastledata("prontera", 1); OnRecvCastle123: flagemblem getcastledata("prontera",1); end; OnGuildBreak: setcastledata "prontera", 1, 0; donpcevent "::OnRecvCastle123"; end; } after using the castle reset npc, the castle's emperium will still belongs to the original guild, which even yourself still can hit the emperium to fix this, the emperium has to be removed and respawn again the correct script has to donpcevent on the official castle script ...
  16. http://herc.ws/board/topic/4850-fight-your-clone/#entry31243 the one inside bug tracker is actually just a sample script, not meant for live server use lol
  17. some people are using the one inside bug tracker ... no ... that is actually just a sample script and this is the one that is fully capable of using in live server Download: 2.0 script plugin ohh ... original topic http://rathena.org/board/topic/72691-evil-clone-on-map-enter/
  18. http://upaste.me/3e1211085057a4cc8# there is 1 reason that I don't want to make this into script release section because I want to turn this into instance script =/ then there is theoretically not limit to the number of rooms that players can rent
  19. 1. Output directory doesn't end with trailing sentence it should be ..plugins with the '' symbol 2. HPMdataCheck.h your SVN is not update, it only comes after this http://herc.ws/board/topic/4283-introducing-hpm-datacheck/ your question doesn't have anything to do with my source code totally its your own problem
  20. HPMHooking.c I completely remove the one default in hercules and rebuilt it from clean also this particular plugin doesn't need to have HPMHooking anyways
  21. http://upaste.me/5f1c110840f19f3f0 HAHAHA !! that's another thing that's not documented its like asking us to read the source and figure out ourselves =/ ok move to plugin support and mark this as solved
  22. http://rathena.org/board/topic/72376-mvp-summon-script/?p=245270 I actually release 1.4b in rathena that works in hercules . . set .@menu[1], 1; // Turn Group 1 summons On/Off -> MVP set .@menu[2], 1; // Turn Group 2 summons On/Off -> mini bossyou just have to set these as 0
  23. http://herc.ws/board/topic/4812-official-banker/?p=31162 that method is actually quite funny, like a cheap hack I can think of 2 methods to actually solve this 1. allow overwrite the function completely maybe something like addHookoverwrite("original->function",new_fuction) the problem is if the are more than 1 plugin overwrite the same function, only the later one take place but this might be feast-able for certain condition that needs to read in the middle of the function 2. add a new plugin command like noreturn; currently all pre-Hook will ALWAYS return to the "original->function" maybe a new plugin command like noreturn; can instead of return to "original->function", it will return to previous function instead
  24. well the patch was built for the plugin in mind and I also realized the plugin also not that ... powerful http://upaste.me/5f1c110840f19f3f0 ok just learn the HookStop() command from Samuel
  25. http://support.microsoft.com/kb/241215 already tried that, the setup.exe throws error ... it just say failed to install http://www.simba.com/resources/knowledge-base/other-information-articles/create-a-core-dump-for-debugging-on-windows just tried this ... the .dmp file opens in my microsoft visual basic, but the .dmp file cannot read by visual basic ... currently I'm using this http://support.emsisoft.com/topic/3810-how-to-configure-automatic-crash-dumps-in-case-of-application-failures/ this .dmp file can be open by microsoft visual basic and can be read ... but its not like a text like you guys provided in bug tracker =/
×
×
  • Create New...

Important Information

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