Jump to content
  • 0

Question

Posted

hello can i request working on eathena ..

 

Example:

 

Event Start every 2hr's 

NPC announce the bring me this item's but is random items  (1 to 7) 

1  apple

2 jellopy 

3 skull

4 poring card

5 TCG

6 emperium

7 red potion

if the npc announce please bring me this "APPLE" 30pcs

 

after announcement of item's need for event the the player bring the apple 30pcs and the reward is 7227 after check the items the npc is autoclose or autohide and wait again for 2hr's for event  

9 answers to this question

Recommended Posts

  • 1
Posted


prontera,150,150,0 script Sample 100,{

if ( countitem( .item ) < .amount ) {

mes "You don't have my requirements";

close;

}

delitem .item, .amount;

getitem .p, .a;

announce "Yayks! " + strcharinfo( 0 ) + " won the event",0;

hideonnpc strnpcinfo(1);

end;

OnMinute30:

set .@i, rand( getarraysize( .BringMeItems ) );

set .item, .BringMeItems[ .@i ];

set .amount, rand( 10, 30 );

announce "Bring me " + .amount + "x " + getitemname( .item ),0;

hideoffnpc strnpcinfo(1);

end;

OnInit:

setarray .BringMeItems[0],501,7227,4001,7005,909,512,714;

set .p, 7227;

set .a, 5;

hideonnpc strnpcinfo(1);

end;

}

  • Upvote 1
  • 0
Posted
On 2/10/2014 at 7:34 AM, Patskie said:

 



 

prontera,150,150,0 script Sample 100,{

if ( countitem( .item ) < .amount ) {

mes "You don't have my requirements";

close;

}

delitem .item, .amount;

getitem .p, .a;

announce "Yayks! " + strcharinfo( 0 ) + " won the event",0;

hideonnpc strnpcinfo(1);

end;

OnMinute30:

set .@i, rand( getarraysize( .BringMeItems ) );

set .item, .BringMeItems[ .@i ];

set .amount, rand( 10, 30 );

announce "Bring me " + .amount + "x " + getitemname( .item ),0;

hideoffnpc strnpcinfo(1);

end;

OnInit:

setarray .BringMeItems[0],501,7227,4001,7005,909,512,714;

set .p, 7227;

set .a, 5;

hideonnpc strnpcinfo(1);

end;

}

 

Hi Patskie,

 

How can I make it atleast 3 rounds? Or is it possible to put rounds for this? Thanks for your hard work.

Posted

Oh didn't notice you are using eAthena

prontera,150,150,0	script	Sample	100,{
	if ( countitem( .item ) < .amount ) {
		mes "You don't have my requirements";
		close;
	}
	delitem .item, .amount;
	getitem .p, .a;
	announce "Yayks! " + strcharinfo( 0 ) + " won the event",0;
	hideonnpc strnpcinfo(1);
	end;
	
	OnMinute00:
		set .@time, .@time + 1;
		if ( .@time % 2 ) end;
		set .@i, rand( getarraysize( .BringMeItems ) );
		set .item, .BringMeItems[ .@i ];
		set .amount, rand( 10, 30 );
		announce "Bring me " + .amount + "x " + getitemname( .item ),0;
		hideoffnpc strnpcinfo(1);
		end;

	OnInit:
		setarray .BringMeItems[0],501,7227,4001,7005,909,512,714;
		set .p, 7227;
		set .a, 5; 
		hideonnpc strnpcinfo(1);
		end;
}
Posted

there are no error from the script master but every time to set .

the npc not pop up and there are no npc prontera 150 150


  1. prontera,150,150,0 script Sample 100,{
  2. if ( countitem( .item ) < .amount ) {
  3. mes "You don't have my requirements";
  4. close;
  5. }
  6. delitem .item, .amount;
  7. getitem .p, .a;
  8. announce "Yayks! " + strcharinfo( 0 ) + " won the event",0;
  9. hideonnpc strnpcinfo(1);
  10. end;
  11.  
  12. OnMinute30:
  13. set .@time, .@time + 1;
  14. if ( .@time % 2 ) end;
  15. set .@i, rand( getarraysize( .BringMeItems ) );
  16. set .item, .BringMeItems[ .@i ];
  17. set .amount, rand( 10, 30 );
  18. announce "Bring me " + .amount + "x " + getitemname( .item ),0;
  19. hideoffnpc strnpcinfo(1);
  20. end;
  21.  
  22. OnInit:
  23. setarray .BringMeItems[0],501,7227,4001,7005,909,512,714;
  24. set .p, 7227;
  25. set .a, 5;
  26. hideonnpc strnpcinfo(1);
  27. end;
  28. }

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...