Jump to content
  • 1
krashdragon

Lucky Pick Event

Question

11 answers to this question

Recommended Posts

  • 0

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 by Patskie

Share this post


Link to post
Share on other sites
  • 0

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 =/

Share this post


Link to post
Share on other sites
  • 0

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 

Share this post


Link to post
Share on other sites
  • 0

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 by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

 

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. :P

 

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. 

Share this post


Link to post
Share on other sites
  • 0

how its not working ? :hmm:

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;
post-4102-0-60515800-1392445295_thumb.jpg

 

PS: http://herc.ws/board/topic/4455-capped-aspd-mapflag/

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

 

how its not working ? :hmm:

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;
attachicon.gifscreenHercules004.jpg

 

PS: http://herc.ws/board/topic/4455-capped-aspd-mapflag/

 

 

e, I seem dizzy. ^_^  It's OK~

Share this post


Link to post
Share on other sites
  • 0

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;

 

 

Share this post


Link to post
Share on other sites
  • 0

 

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 by Legend

Share this post


Link to post
Share on other sites
  • 0

 

 

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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