krashdragon 0 Posted February 9, 2014 Can i request lucky pick event work on hercules? Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted February 9, 2014 (edited) Let's try this one : - script LuckyPick -1,{ OnPCLoginEvent: .aid[getarraysize(.aid)] = getcharid(3); end; OnPCLogoutEvent: for ( .@i = 0; .@i < getarraysize(.aid); .@i++ ) { if ( .aid[.@i] == getcharid(3) ) deletearray .aid[.@i], 1; } end; OnMinute00: .@t++; if ( .@t % 2 ) end; .@i = rand(getarraysize(.aid)); if (attachrid(.aid[.@i])) getitem 501, 1, .aid[.@i]; end;} @EDIT : Trigger every 2 hours Edited February 9, 2014 by Patskie Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted February 9, 2014 hmm ... paskie made a post makes me change my plan to make this topic a top priority in my list I have made 3 variations of lucky pick event script http://www.eathena.ws/board/index.php?s=&showtopic=275732&view=findpost&p=1512505 3 years ago http://rathena.org/board/topic/77364-dynamic-time-lucky-pick-event/?p=173025 last year http://rathena.org/board/topic/91510-lucky-pick-event/?p=240207 last month and 4th method now if consider adding paskie's method above but now I'm going to propose a 5th method ... write a new script command call *getservermember I always wanted to write one since years ago but there was array limitation to 127 index all the time ... until last month http://upaste.me/23e0105643b9c3019 and the script with shuffle algorithm http://upaste.me/ab41105653011d513 keyworld, feel free to optimized that shuffle algorithm =/ 1 schan reacted to this Quote Share this post Link to post Share on other sites
0 安赫尔 9 Posted February 10, 2014 Very powerful Quote Share this post Link to post Share on other sites
0 安赫尔 9 Posted February 14, 2014 hmm ... paskie made a post makes me change my plan to make this topic a top priority in my list I have made 3 variations of lucky pick event script http://www.eathena.ws/board/index.php?s=&showtopic=275732&view=findpost&p=1512505 3 years ago http://rathena.org/board/topic/77364-dynamic-time-lucky-pick-event/?p=173025 last year http://rathena.org/board/topic/91510-lucky-pick-event/?p=240207 last month and 4th method now if consider adding paskie's method above but now I'm going to propose a 5th method ... write a new script command call *getservermember I always wanted to write one since years ago but there was array limitation to 127 index all the time ... until last month http://upaste.me/23e0105643b9c3019 and the script with shuffle algorithm http://upaste.me/ab41105653011d513 keyworld, feel free to optimized that shuffle algorithm =/ I am trying this http://upaste.me/ab41105653011d513 your lucky-pick-event. I found bindatcmd "asdf", strnpcinfo(0)+"::Onbbb", 99,100; this command has no effect(no any error report). Already add your source getservermember Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted February 14, 2014 (edited) Onbbb:...... if ( getgmlevel() < 60 && checkvending() != 2 ) {this script will search on all online account ID, but only runs on players that is not GM60 and not autotraders you can try dual-client login 1 account with GM99 to test, then login another account with normal player account (no GM) it will always give the prize to the normal player, because GMs are not supposed to win this kind of event, players will complain GMs are cheating Edited February 14, 2014 by AnnieRuru Quote Share this post Link to post Share on other sites
0 安赫尔 9 Posted February 14, 2014 Onbbb:...... if ( getgmlevel() < 60 && checkvending() != 2 ) {this script will search on all online account ID, but only runs on players that is not GM60 and not autotraders you can try dual-client login 1 account with GM99 to test, then login another account with normal player account (no GM) it will always give the prize to the normal player, because GMs are not supposed to win this kind of event, players will complain GMs are cheating Oh, it no effect in my test server. It works fine in Public Server. And other question, can I set this run every xx minutes? OnMinute00:Onbbb:// while ( .@j++ < 100 ) { // ran a test with 100 times I add a OnMinute00: in this line, but it not run. Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted February 15, 2014 (edited) how its not working ? OnMinute18: announce "runs without attachrid", bc_all;Onbbb:// while ( .@j++ < 100 ) { // ran a test with 100 times getservermember 2; callfunc "shuffle", 0, $@servermembercount -1, .@r; for ( .@i = 0; .@i < $@servermembercount; .@i++ ) { attachrid $@servermemberaid[ .@r[.@i] ]; if ( getgmlevel() < 60 && checkvending() != 2 ) { announce "Winner is "+ strcharinfo(0), bc_all; getitem 501, 1; break; } }// } end; PS: http://herc.ws/board/topic/4455-capped-aspd-mapflag/ Edited February 15, 2014 by AnnieRuru Quote Share this post Link to post Share on other sites
0 安赫尔 9 Posted February 15, 2014 how its not working ? OnMinute18: announce "runs without attachrid", bc_all;Onbbb:// while ( .@j++ < 100 ) { // ran a test with 100 times getservermember 2; callfunc "shuffle", 0, $@servermembercount -1, .@r; for ( .@i = 0; .@i < $@servermembercount; .@i++ ) { attachrid $@servermemberaid[ .@r[.@i] ]; if ( getgmlevel() < 60 && checkvending() != 2 ) { announce "Winner is "+ strcharinfo(0), bc_all; getitem 501, 1; break; } }// } end; screenHercules004.jpg PS: http://herc.ws/board/topic/4455-capped-aspd-mapflag/ e, I seem dizzy. It's OK~ Quote Share this post Link to post Share on other sites
0 Phriya 0 Posted June 12, 2016 hmm ... paskie made a post makes me change my plan to make this topic a top priority in my list I have made 3 variations of lucky pick event script http://www.eathena.ws/board/index.php?s=&showtopic=275732&view=findpost&p=1512505 3 years ago http://rathena.org/board/topic/77364-dynamic-time-lucky-pick-event/?p=173025 last year http://rathena.org/board/topic/91510-lucky-pick-event/?p=240207 last month and 4th method now if consider adding paskie's method above but now I'm going to propose a 5th method ... write a new script command call *getservermember I always wanted to write one since years ago but there was array limitation to 127 index all the time ... until last month http://upaste.me/23e0105643b9c3019 and the script with shuffle algorithm http://upaste.me/ab41105653011d513 keyworld, feel free to optimized that shuffle algorithm =/ this one doesnt work , tried them all this is the error that shows in my console : [Error]: script error in file '(DIRECT INPUT)' line 32 column 2 parse_line: expect command, missing function name or calling undeclared function 29: bindatcmd "asdf", strnpcinfo(0)+"::Onbbb", 99,100; 30: end; 31: Onooo: * 32: getservermember 0; ~~~~~~~~^ 33: for ( .@i = 0; .@i < $@servermembercount; .@i++ ) 34: dispbottom $@servermembername$[.@i]; 35: end; Quote Share this post Link to post Share on other sites
0 Legend 43 Posted June 12, 2016 (edited) hmm ... paskie made a post makes me change my plan to make this topic a top priority in my list I have made 3 variations of lucky pick event script http://www.eathena.ws/board/index.php?s=&showtopic=275732&view=findpost&p=1512505 3 years ago http://rathena.org/board/topic/77364-dynamic-time-lucky-pick-event/?p=173025 last year http://rathena.org/board/topic/91510-lucky-pick-event/?p=240207 last month and 4th method now if consider adding paskie's method above but now I'm going to propose a 5th method ... write a new script command call *getservermember I always wanted to write one since years ago but there was array limitation to 127 index all the time ... until last month http://upaste.me/23e0105643b9c3019 and the script with shuffle algorithm http://upaste.me/ab41105653011d513 keyworld, feel free to optimized that shuffle algorithm =/ this one doesnt work , tried them all this is the error that shows in my console : [Error]: script error in file '(DIRECT INPUT)' line 32 column 2 parse_line: expect command, missing function name or calling undeclared function 29: bindatcmd "asdf", strnpcinfo(0)+"::Onbbb", 99,100; 30: end; 31: Onooo: * 32: getservermember 0; ~~~~~~~~^ 33: for ( .@i = 0; .@i < $@servermembercount; .@i++ ) 34: dispbottom $@servermembername$[.@i]; 35: end; apply the diff first Edited June 12, 2016 by Legend 1 Phriya reacted to this Quote Share this post Link to post Share on other sites
0 Phriya 0 Posted June 12, 2016 hmm ... paskie made a post makes me change my plan to make this topic a top priority in my list I have made 3 variations of lucky pick event script http://www.eathena.ws/board/index.php?s=&showtopic=275732&view=findpost&p=1512505 3 years ago http://rathena.org/board/topic/77364-dynamic-time-lucky-pick-event/?p=173025 last year http://rathena.org/board/topic/91510-lucky-pick-event/?p=240207 last month and 4th method now if consider adding paskie's method above but now I'm going to propose a 5th method ... write a new script command call *getservermember I always wanted to write one since years ago but there was array limitation to 127 index all the time ... until last month http://upaste.me/23e0105643b9c3019 and the script with shuffle algorithm http://upaste.me/ab41105653011d513 keyworld, feel free to optimized that shuffle algorithm =/ this one doesnt work , tried them all this is the error that shows in my console : [Error]: script error in file '(DIRECT INPUT)' line 32 column 2 parse_line: expect command, missing function name or calling undeclared function 29: bindatcmd "asdf", strnpcinfo(0)+"::Onbbb", 99,100; 30: end; 31: Onooo: * 32: getservermember 0; ~~~~~~~~^ 33: for ( .@i = 0; .@i < $@servermembercount; .@i++ ) 34: dispbottom $@servermembername$[.@i]; 35: end; apply the diff first how noob i am , thank you <3 Quote Share this post Link to post Share on other sites
Can i request lucky pick event work on hercules?
Share this post
Link to post
Share on other sites