Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    245

Everything posted by AnnieRuru

  1. the exact way to reproduce this is .. - script asdf FAKE_NPC,{ end;OnNPCKillEvent: mes "Hi"; next; mes "bye"; close;}1. @monster poring 1002. cast storm gust skill then you got the error since this is anti-bot script, your players might be killing stuffs with skills like storm gust so when it suddenly the mes pops-up, it will queue up the player's chat towards the npc compiling to increase MAX_EVENTQUEUE in this case, will make the players take the anti-bot test over and over again LOL that is exactly the reason why MAX_EVENTQUEUE is set to 2 I remember ultramage did that for this purpose EDIT: btw, hahaha I just learned from Haru, don't use SC_BERSERK for anti-bot any 3rd party program like opencore actually allow to use atcommand during SC_BERSERK making this script easily bypass with @go or @warp enabled https://github.com/HerculesWS/Hercules/pull/937#issuecomment-165323552 EDIT2: well at least I saw "@option 2 0 0" in this script, they get permanent freeze then
  2. prontera,155,185,5 script kjdshfkjsf 1_F_MARIA,{ disable_items; mes "select which part of your custome to refine"; next; for ( .@i = EQI_COSTUME_HEAD_LOW; .@i <= EQI_SHADOW_ACC_L; ++.@i ) .@menu$ += ( getequipid(.@i) == -1 )? ":" : getequipname(.@i) +":"; if ( .@menu$ == "::::::::::" ) { mes "sorry you don't have a costume equipped"; close; } .@s = select(.@menu$) +10; if ( !getequipisenableref(.@s) ) { mes "This item is not refine-able"; close; } if ( getequiprefinerycnt(.@s) < 10 || getequiprefinerycnt(.@s) >= 20 ) { mes "I only refine item from +10 ~ +19"; // lazy description close; } .@item = getequipweaponlv(.@s)? HD_Bradium : HD_Carnium; if ( !countitem(.@item) ) { mes "you don't have "+ getitemname(.@item) +" for me to refine this item."; close; } if ( getequiprefinerycnt(.@s) < 100 ) { mes "There are chance to fail, proceed ?"; next; if ( select( "Yes", "No" ) == 2 ) close; delitem .@item, 1; if ( getequippercentrefinery(.@s) <= rand(100) && getequippercentrefinery(.@s) <= rand(100) ) { downrefitem .@s; mes "sry I failed"; close; } } else delitem .@item, 1; successrefitem .@s; mes "successful"; close;}you didn't say in the topic, so I'm lazy so made it 100% chance success LOLwell it was just a copy paste from https://github.com/HerculesWS/Hercules/blob/master/npc/merchants/hd_refine.txt
  3. in theory this should work ... how it doesn't work ? 1. the server can't even start because it says .dll not found/corrupted ? 2. in the game the item still can use/equip ? or forgot to uncomment HPMHook ?
  4. LOL then you have to do the old way http://herc.ws/board/topic/7045-npc-emblem-of-war/?p=42929 there is only 2 way to tackle this there is no 3rd way unless you hex the client
  5. then just set the currency as 0 in script http://herc.ws/board/topic/11238-dynamic-shop-support/?p=66309
  6. you mean this ? http://herc.ws/board/topic/11292-onpcstatcalcevent/
  7. 1.2 plugin - no need to clean too much LOL - now OnPCUseSkillEvent.conf can use more whitespace - unsupported inf type will now display which skill ID properly - fix a bug that inf type friend(16) when cast on self, will spam error message
  8. I am actually curious where the $@Toggle variable been set since it not in this script, it always goes to the 1st one there are also some variables like $@NPC_Fishing$, $@FishingBoxItemCountNeed, $@FishingBoxItemCount that are not set in this script callfunc "FishingManualQuest"; also dunno where is that function so this is just a small part of a whole system
  9. prontera,155,185,5 script kjdshfkjsf 1_F_MARIA,{disable_items;mes "select which part of your custome to refine";next;for ( .@i = EQI_COSTUME_HEAD_LOW; .@i <= EQI_SHADOW_ACC_L; ++.@i ).@menu$ += ( getequipid(.@i) == -1 )? ":" : getequipname(.@i) +":";if ( .@menu$ == "::::::::::" ) {mes "sorry you don't have a costume equipped";close;}.@s = select(.@menu$) +10;if ( getequiprefinerycnt(.@s) < 10 || getequiprefinerycnt(.@s) >= 20 ) {mes "I only refine item from +10 ~ +19"; // lazy descriptionclose;}.@item = getequipweaponlv(.@s)? HD_Bradium : HD_Carnium;if ( !countitem(.@item) ) {mes "you don't have "+ getitemname(.@item) +" for me to refine this item.";close;}delitem .@item, 1;successrefitem .@s;mes "always successful";close;} . . prontera,155,185,5 script kjdshfkjsf 1_F_MARIA,{disable_items;mes "select which part of your equipment to refine";next;for ( .@i = EQI_HEAD_TOP; .@i <= EQI_HEAD_LOW; ++.@i ).@menu$ += ( getequipid(.@i) == -1 )? ":" : getequipname(.@i) +":";if ( .@menu$ == "::::::::::" ) {mes "sorry you don't have a equipment equipped";close;}.@s = select(.@menu$);if ( getequiprefinerycnt(.@s) < 7 || getequiprefinerycnt(.@s) >= 10 ) {mes "I only refine item from +7 ~ +9"; // lazy descriptionclose;}.@item = getequipweaponlv(.@s)? HD_Oridecon : HD_Elunium;if ( !countitem(.@item) ) {mes "you don't have "+ getitemname(.@item) +" for me to refine this item.";close;}delitem .@item, 1;successrefitem .@s;mes "always successful";close;} . . lazy .... just copy paste
  10. nope not this script this script houses the item awaiting players to redeem their items like you add items to the player in the control panel, then it add an entry in the `cp_redeemlog` table then player can redeem their items in-game through this npc since you said this is not the script you are looking for when people buy donation item ... actually its better to do it via #CASHPOINTS
  11. FishingBox: next; goto FBLevel; close; you didn't post the full script that contain FBLevel label,or it is missing
  12. prontera,150,180,4 script rewards 1_F_MARIA,{ mes "Here's your daily reward!"; next; if ( #nextrewardtime + .next_take > gettimetick(2) ) { mes "Sorry, it seems you've already got it!"; } else { mes "Take this!"; getitem Apple, 1; #nextrewardtime = gettimetick(2); query_sql "select date_format( now() + interval "+ .next_take +" second,'%l %i %p'), date_format( now() + interval "+ .next_take +" second,'%e.%c.%Y')", .@time1$, .@time2$; mes "Can someone add after redeem, please redeem again at "+ .@time1$ +" on "+ .@time2$ +". I need the date and time."; } close;OnInit: .next_take = 24*60*60; // next time take in seconds. 24*60*60 = 1 Day end;}
  13. getitem Old_Violet_Box, .@quantity[.@loop];just guessingI don't know where you got that script from
  14. many many members keep reporting this error, ever since I started write plugin http://herc.ws/board/topic/7242-market-clone/?p=44110 http://herc.ws/board/topic/5057-auraset/?p=38152 it wasn't just me that 4996 error has been ignore by sample/hook ... but if you add your own plugin, of course it spit errors
  15. eh ? I thought just change ++.@i into .@i++ will work for rathena already ? because I saw you did it before on other topic - script kjdshfksfj FAKE_NPC,{OnInit: bindatcmd "sameip", strnpcinfo(0)+"::Onaaa"; end;Onaaa: freeloop true; .@nb = query_sql( "select `char`.name, char_id, last_ip from login left join `char` on login.account_id = `char`.account_id where online = 1", .@name$, .@cid, .@ip$ ); for ( .@i = 0; .@i < .@nb; .@i++ ) { for ( .@j = 0; .@j < .@ip_list; .@j++ ) if ( .@b_ip$[.@j] == .@ip$[.@i] ) break; if ( .@j == .@ip_list ) { .@b_ip$[.@j] = .@ip$[.@i]; .@ip_list++; } setd ".@b_ip"+ .@j +"_name$["+ .@b_ip_size[.@j] +"]", .@name$[.@i]; setd ".@b_ip"+ .@j +"_cid$["+ .@b_ip_size[.@j] +"]", .@cid[.@i] +""; .@b_ip_size[.@j]++; } dispbottom "===== SAME IP Searching ====="; for ( .@i = 0; .@i < .@ip_list; .@i++ ) { if ( .@b_ip_size[.@i] > 1 ) { dispbottom " == The IP ["+ .@b_ip$[.@i] +"] has "+ .@b_ip_size[.@i] +" players."; for ( .@j = 0; .@j < .@b_ip_size[.@i]; .@j++ ) { getmapxy .@map$, .@x, .@y, 0, getd( ".@b_ip"+ .@i +"_name$["+ .@j +"]"); dispbottom " = "+( .@j +1 )+". ("+ getd( ".@b_ip"+ .@i +"_cid$["+ .@j +"]" ) +") "+ getd( ".@b_ip"+ .@i +"_name$["+ .@j +"]") +" -> "+ .@map$ +" "+ .@x +" "+ .@y; } .@result++; } } dispbottom ">>> "+ .@result +" results found."; end;} btw the source version ... I got problem with it ... map-server keep crashing when it initialize 2 dimension array I guess have to learn how to use struct ...
  16. 1 & 2 ok I add disable 4996 warning, instantly no more error http://herc.ws/wiki/Building_HPM_Plugin_for_MSVC#Step_18 I just not sure to add this as Step-18 ? or an additional step ... because I found this in our sample and plugin property page, and after google around many people also add them http://stackoverflow.com/questions/3317536/visual-studio-warning-c4996?lq=1 3, oh I always call new struct ... no wonder, I guess your method does optimized a bit
  17. script version ... should be faster than GMOcean's version because I only list online players, but his query will list all login table search all online players and only list if they have 2 same ip or above . - script kjdshfksfj FAKE_NPC,{OnInit: bindatcmd "sameip", strnpcinfo(0)+"::Onaaa"; end;Onaaa: freeloop true; .@nb = query_sql( "select `char`.name, char_id, last_ip from login left join `char` on login.account_id = `char`.account_id where online = 1", .@name$, .@cid, .@ip$ ); for ( .@i = 0; .@i < .@nb; ++.@i ) { for ( .@j = 0; .@j < .@ip_list; ++.@j ) if ( .@b_ip$[.@j] == .@ip$[.@i] ) break; if ( .@j == .@ip_list ) { .@b_ip$[.@j] = .@ip$[.@i]; ++.@ip_list; } setd ".@b_ip"+ .@j +"_name$["+ .@b_ip_size[.@j] +"]", .@name$[.@i]; setd ".@b_ip"+ .@j +"_cid$["+ .@b_ip_size[.@j] +"]", .@cid[.@i] +""; ++.@b_ip_size[.@j]; } dispbottom "===== SAME IP Searching ====="; for ( .@i = 0; .@i < .@ip_list; ++.@i ) { if ( .@b_ip_size[.@i] > 1 ) { dispbottom " == The IP ["+ .@b_ip$[.@i] +"] has "+ .@b_ip_size[.@i] +" players."; for ( .@j = 0; .@j < .@b_ip_size[.@i]; ++.@j ) { getmapxy .@map$, .@x, .@y, 0, getd( ".@b_ip"+ .@i +"_name$["+ .@j +"]"); dispbottom " = "+( .@j +1 )+". ("+ getd( ".@b_ip"+ .@i +"_cid$["+ .@j +"]" ) +") "+ getd( ".@b_ip"+ .@i +"_name$["+ .@j +"]") +" -> "+ .@map$ +" "+ .@x +" "+ .@y; } ++.@result; } } dispbottom ">>> "+ .@result +" results found."; end;}.now tackle the source version in theory, source code should be faster than script
  18. ah ... hahaha don't use that script I already told emistry in PM that script doesn't use the random probability properly the answer always fall within +-25 when I have time I'll redo this stuff
  19. holy ... that method so unoptimized and using query_sql to check online player is not recommended, it only save periodically better use *getcartinventorylist; or its better to use db(pre-)remap_zone_db.conf and disabled_items: it to unequip the equipment has to add a config change to 3 EDIT: Euphy ? I thought Euphy only active in rathena ..
  20. errr ... there are so many error during compile, because I didn't off that stupid microsoft warning ... try change those sprintf -> safesnprintf strncpy -> safestrncpy the only thing that I don't think its possible is sscanf and fopen strcmpi ... no idea . if(retVal == 0 || !sd) // sd missing case is impossible, but who knows... it's RAGNAROK!use nullpo in this casenullpo_retr(0, sd); EDIT: is there a need to call a new struct for pcre and pcre_extra ? when I try mine, I don't need to use them http://upaste.me/67672221608816857
  21. rathena also have srccustomatcommand.inc ... I think I can write this one, if just write in atcommand.inc, the format with hercules shouldn't be that far off
  22. yea that script ... sql query not optimized reference -> https://www.eathena.ws/board/index.php?s=&showtopic=271842&view=findpost&p=1489957 erm ... its not that complex actually, just like this select `char`.name, login.account_id, last_ip from login left join `char` on login.account_id = `char`.account_id where online = 1 order by last_ip,account_id;.. curious, you want the plugin version or the script version ? and you want to display all online character or just specific map ?
  23. you have a typo for char_receive_packet void char_receive_packet(int fd) { ShowDebug("Char: CommonValue(Before parsing packet): %dn",common_value); common_value = RFIFOL(fd, 2); ShowDebug("Char: CommonValue(After parsing packet): %dn",common_value); return;}..ok so ... enum HPluginPacketHookingPoints { hpClif_Parse, ///< map-server (client-map) hpChrif_Parse, ///< map-server (char-map) hpParse_FromMap, ///< char-server (map-char) hpParse_FromLogin, ///< char-server (login-char) hpParse_Char, ///< char-server (client-char) hpParse_FromChar, ///< login-server (char-login) hpParse_Login, ///< login-server (client-login) /* */ hpPHP_MAX,};in this example,to pass packet from map-server to char-server 1. use hpParse_FromMap in SERVER_TYPE_CHAR 2. check char-server online with chrif->isconnected() function 3. global value can be pass with chrif->fd now this is just in theory ... to pass packet from char-server to login-server 1. use hpParse_FromChar in SERVER_TYPE_LOGIN 2. can hook to loginif->on_ready/loginif->on_disconnect to check if login-server online 3. global value can be pass with .... hmm ... ?? I start to think you did something wrong there in the sample.c, it create a new socket session sockt->session[fd]yes in the sample.c, it also can use sd->fd, right ?but I think sockt->session[fd] is more generic hmm ... need some test ...
  24. I have no idea why members always getting different result than others
  25. yeah, confirmed bug when I see you didn't include MakeDWord(..) == reserved_costume_id I already got a feeling your patch doesn't work correctly I got a ribbon with setitemscript, ID 5083 with bonus bStr, 1000; when I wear it, I got bonus 1000 str when I costumed it, the bonus is gone but I get another same ribbon, wear both, I didn't get the 1000 str bonus from EQI_HEAD_TOP my patch works correctly though, when I wear both, the one from EQI_HEAD_TOP is applied EDIT: seriously, don't use 999998 because it can reach this number the char ID start from 150000, and can get to this number in time it should be below 150000
×
×
  • Create New...

Important Information

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