Jump to content
  • 0

investor


Nickelodeon

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  01/14/12
  • Last Seen:  

The player can get random item from investor. Player need pay certain zeny or cash point (give more chance to get old blue box) each deal with this npc. Player also need to be mechanic class and require Max Base level and job level to make this npc talk to player. Other job cannot talk with this npc. this npc are repeatable.

 

menu

 

"thanks for donating me"

"here your reward"

 

 

immortal heart 20ea - 50%

alcohol 20ea - 50%

Jelopy 100ea - 100%

treasure box 5ea - 20%

old blue box 1ea - 1%

ghostring card 1ea - 1%

 

p/s : npc will announce who had each reward

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  


prontera,154,171,5 script Investor 100,{

.@price$ = "#CASHPOINTS";

.@cost = 10;

.@bmax = 99;

.@jmax = 50;

if( compare(jobname(Class),"Mechanic")

&& BaseLevel == .@bmax

&& JobLevel == .@jmax ) {

mes "[ Investor ]";

mes "So would you like to invest in this big project I'm working on?";

mes "It'll cost you 10 cash points!";

next;

if(select("Yes:No")==1) {

if(getd(.@price$)>=.@cost) {

investment++;

.@i = investment;

setd(.@price$,getd(.@price$)-.@cost);

callfunc( "package_func",

929, 20, 50, //Immortal Heart

970, 20, 50, //Alcohol

909, 100, 100, //Jellopy

7444, 5, 20, //Treasure Box

603, 1, 1*.@i, //Old Blue Box

4047, 1, 1 //Ghostring Card

);

mes "[ Investor ]";

mes "Congratulations, but maybe next time you'll get something even better!";

} else {

mes "[ Investor ]";

mes "It seems you don't have enough cash points better luck next time.";

}

close;

}

mes "[ Investor ]";

mes "Alright, maybe next time.";

} else {

mes "[ Investor ]";

mes "I don't have time for you!";

}

close;

}

/// callfunc("package_func",<itemid>,<amount>,<chance>{,<itemid>,<amount>,<chance>{,<itemid>,<amount>,<chance>{,...},<accountid>}})

function script package_func {

set .@len, getargcount()-((getarg(getargcount()-1)>=2000000)?1:0);

set .@id, ((getarg(getargcount()-1)>=2000000)?getarg(getargcount()-1):getcharid(3));

while(set(.@i,.@i+3)-3<.@len)

if(rand(101)<=getarg(.@i-1))

getitem(set(@package_item[.@a++-1],getarg(.@i-3)),set(@package_amount[.@a-1],getarg(.@i-2)),.@id);

return .@a;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  01/14/12
  • Last Seen:  

ok i will try after this..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  01/14/12
  • Last Seen:  

the npc wont work.. when i choose yes the conversation was stuck.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

Right... Would you happen to be using an emulator other than rAthena?

 

Or did you make any modifications to the script?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  01/14/12
  • Last Seen:  

i use hercules emulator..

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  


prontera,154,171,5 script Investor 100,{

.@price$ = "#CASHPOINTS";

.@cost = 10;

.@bmax = 99;

.@jmax = 50;

if( compare(jobname(Class),"Mechanic")

&& BaseLevel == .@bmax

&& JobLevel == .@jmax ) {

mes "[ Investor ]";

mes "So would you like to invest in this big project I'm working on?";

mes "It'll cost you 10 cash points!";

next;

if(select("Yes:No")==1) {

if(getd(.@price$)>=.@cost) {

investment++;

.@i = investment;

setd(.@price$,getd(.@price$)-.@cost);

callfunc( "package_func",

929, 20, 50, //Immortal Heart

970, 20, 50, //Alcohol

909, 100, 100, //Jellopy

7444, 5, 20, //Treasure Box

603, 1, 1*.@i, //Old Blue Box

4047, 1, 1 //Ghostring Card

);

mes "[ Investor ]";

mes "Congratulations, but maybe next time you'll get something even better!";

} else {

mes "[ Investor ]";

mes "It seems you don't have enough cash points better luck next time.";

}

close;

}

mes "[ Investor ]";

mes "Alright, maybe next time.";

} else {

mes "[ Investor ]";

mes "I don't have time for you!";

}

close;

}

/// callfunc("package_func",<itemid>,<amount>,<chance>{,<itemid>,<amount>,<chance>{,<itemid>,<amount>,<chance>{,...},<accountid>}})

function script package_func {

set .@len, getargcount()-((getarg(getargcount()-1)>=2000000)?1:0);

set .@id, ((getarg(getargcount()-1)>=2000000)?getarg(getargcount()-1):getcharid(3));

while(set(.@i,.@i+3)-3<.@len)

if(rand(101)<=getarg(.@i-1))

getitem(set(@package_item[++.@a-1],getarg(.@i-3)),set(@package_amount[.@a-1],getarg(.@i-2)),.@id);

return .@a;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  01/14/12
  • Last Seen:  

prontera,154,171,5	script	Investor	100,{
	.@price$ = "#CASHPOINTS";
	.@cost = 10;
	.@bmax = 99;
	.@jmax = 50;
	if(	compare(jobname(Class),"Mechanic")
	&&	BaseLevel == .@bmax 
	&&	JobLevel == .@jmax					) {
		mes "[ Investor ]";
		mes "So would you like to invest in this big project I'm working on?";
		mes "It'll cost you 10 cash points!";
		next;
		if(select("Yes:No")==1) {
			if(getd(.@price$)>=.@cost) {
				investment++;
				.@i = investment;
				setd(.@price$,getd(.@price$)-.@cost);
				callfunc( "package_func",
					929,	20,		50, //Immortal Heart
					970,	20,		50, //Alcohol
					909,	100,		100, //Jellopy
					7444,	5,		20, //Treasure Box
					603,	1,		1*.@i, //Old Blue Box
					4047,	1,		1 //Ghostring Card
				);
				mes "[ Investor ]";
				mes "Congratulations, but maybe next time you'll get something even better!";
			} else {
				mes "[ Investor ]";
				mes "It seems you don't have enough cash points better luck next time.";
			}
			close;
		}
		mes "[ Investor ]";
		mes "Alright, maybe next time.";
	} else {
		mes "[ Investor ]";
		mes "I don't have time for you!";
	}
	close;
}

/// callfunc("package_func",<itemid>,<amount>,<chance>{,<itemid>,<amount>,<chance>{,<itemid>,<amount>,<chance>{,...},<accountid>}})

function	script	package_func	{
	set .@len, getargcount()-((getarg(getargcount()-1)>=2000000)?1:0);
	set .@id, ((getarg(getargcount()-1)>=2000000)?getarg(getargcount()-1):getcharid(3));
	while(set(.@i,.@i+3)-3<.@len)
		if(rand(101)<=getarg(.@i-1))
			getitem(set(@package_item[++.@a-1],getarg(.@i-3)),set(@package_amount[.@a-1],getarg(.@i-2)),.@id);
	return .@a;
}

 

oh its working now.. thank a lot +1

Link to comment
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.   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.

×
×
  • Create New...