Jump to content
  • 0

auto prize box


chromus28

Question


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

Hi,

 

I just wanna ask if there is some script for auto prize box... Hmmm for example i have custom quest then after they finish that quest, in that same map the prize box will auto popped out in the middle of the map. Then inside the prize box there is a random prize with a chance to get only. like example bloody branch >> chance to get in that box for 10% only..and the other prize have different percent 10%,20% etc.. please if there is some kind of this script can anyone help me? thanks

Link to comment
Share on other sites

Recommended Posts


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

woooooooooooooooooooooo it's working now WOW!!! THANKS!!!  /kis2

 

One last suggestion, hehe xD can you please make the 7899 item directed in the partyleader only? coz in this quest there is some items that only party leaders can recieve that items to went through the next sage of this tier..please please? /??

Sir i lowered tha chance of 12246 MCA but still its like 100% chance to get

 

Alright I forgot one thing in the function so the rate should be fixed now. To add items exclusive to the party leader use the first callfunc.

prontera,150,150,5	script	Tier 1 Award	100,{
	if(getcharid(0)!=getpartyleader(getcharid(1),2)) end;
	callfunc("package_func",3,7899,1,50);
	getpartymember(getcharid(1),2);
	set .mem, $@partymembercount;
	copyarray .mem_aid[0], $@partymemberaid[0], 128;
	while(.@i<.mem) {
		set(.@i,.@i+1);
		if(isloggedin(.mem_aid[.@i-1])){
			attachrid(.mem_aid[.@i-1]);
			callfunc("package_func",3,12246,1,10);
		}
	}
	set @id,getcharid(1);
	warpparty "prontera",165,24,@id;
	disablenpc "Tier 1 Award";
	end;

OnInit:
	disablenpc "Tier 1 Award";
}

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

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

prontera,151,151,5	script	Tier 1	106,{
	if (getcharid(1) < 1) {
		mes "You're not in a party.";
	} else if (getpartyleader(getcharid(1),2) != getcharid(0)) {
		mes "You are not the party leader.";
	} else {
		getpartymember(getcharid(1));
		set .mem, $@partymembercount;
		if (.mem < 2) {
			mes "You need at least 2 party members.";
		} else {
			mes "[Summon Man]";
			mes "Hi There,";
			mes "Welcome to Riot's Tier 1";
			next;
			mes "[Summon Man]";
			mes "This is a custom party quest of XXXX RO that you need party members to get through on this quest...";
			next;
			mes "[Summon Man]";
			mes "This is not a simple MVP Room remember all MVP here is";
			mes "a Edited Stats by your Admin which 1 or 2 people";
			mes "cannot defeat the MVP's Hope you enjoy and good-luck...";
			next;
			mes "[Summon Man]";
			mes "Would you like to summon the first Boss?";
			menu "Yes",-,"No",L_ayaw;
			next;

			mes "[Tier 1]";
			mes "before you summon the boss please bring me the following";
			next;
			mes "[Summon Man]";
			mes "10x Platinum Bullion";
			menu "Yes",-,"No",L_ayaw;
			next;
			mes "[Tier 1]";
			mes "I'll be waiting for you chosen one!";
			if(countitem(7230) < 10) goto koolang;
			if(countitem(7230) >= 10) goto k1;
			close;

			L_ayaw:
			mes "[Tier 1]";
			mes "Just speak to me if you have the Requirements";
			close;


		koolang:
			next;
			mes "[Tier 1]";
			mes "As I said one missing material and all the others go to waste";
			close;

		k1:
			next;
			mes "[Tier 1]";
			mes "Very well done my friend you have finished the Tier 1 Quest";
			mes "Get ready";
			delitem 7230,10;
			next;
			monster "prontera",0,0,"Tier 1",1399,1,"Tier 1::OnDarkDead";
			mes "[Tier 1]";
			mes "Now go and kill the Great Baphomet";
			close;

		OnDarkDead:
			announce "Party "+getpartyname(getcharid(1))+" has Finish the Tier 1",bc_all,0xFFFF00;
			enablenpc "Tier 1 Award";
			end;

		L_Dead:
			announce "Summon Man: ",3;
			set $OnDarkDead,0;
			end;
		}
	}
	close;
}
Link to comment
Share on other sites


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

This depends on your event npc to enable and disable the prize npc that I've created.

 

If you can post that I'll modify it to disable and enable the prize box npc.

 

prontera,150,150,5	script	package_test	100,{
	set .@a, callfunc("package_func",501,10,50,
			502,1,10,
			503,12,10,
			504,6,100);
	while(.@i++-1<.@a)
		npctalk "You got "+@package_amount[.@i-1]+" "+getitemname(@package_item[.@i-1]);
	end;
	
}

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

function	script	package_func	{
	set .@len, getargcount();
	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)));
	return .@a;
}

 


 

Also you should add a check for the quest variable that the player should have.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

This depends on your event npc to enable and disable the prize npc that I've created.

 

If you can post that I'll modify it to disable and enable the prize box npc.

 

prontera,150,150,5	script	package_test	100,{
	set .@a, callfunc("package_func",501,10,50,
			502,1,10,
			503,12,10,
			504,6,100);
	while(.@i++-1<.@a)
		npctalk "You got "+@package_amount[.@i-1]+" "+getitemname(@package_item[.@i-1]);
	end;
	
}

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

function	script	package_func	{
	set .@len, getargcount();
	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)));
	return .@a;
}

 


 

Also you should add a check for the quest variable that the player should have.

 

 

Does this script can be like the one who can distribute the prize is the party leader?? 

Link to comment
Share on other sites


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

Does this script can be like the one who can distribute the prize is the party leader?? 

 

Uhm... For a quest? Sticking to the grounds of your original request and adding in the party leader requirement...

prontera,150,150,5	script	package_test	100,{
	if(Quest_Variable==1) end; Quest_Variable++;
	if(getcharid(0)!=getpartyleader(getcharid(1),2)) end; addrid(2);
	set .@a, callfunc("package_func",501,10,50,
			502,1,10,
			503,12,10,
			504,6,100);
	while(.@i++-1<.@a)
		dispbottom "You got "+@package_amount[.@i-1]+" "+getitemname(@package_item[.@i-1]);
	disablenpc "package_test";
	end;
}

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

function	script	package_func	{
	set .@len, getargcount();
	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)));
	return .@a;
}

If you wanted to activate this prize npc from the original quest npc you would use...

enablenpc "package_test";


 

If you're just asking for a party prize giver you could still use this function.

if(getcharid(0)!=getpartyleader(getcharid(1),2)) end; addrid(2);
callfunc("package_func",501,10,50,502,1,10,503,12,10,504,6,100);
disablenpc "NPCNAME";
end;

Otherwise you have to provide me with more information.

 

Addrid is a newer command so you might not have it if you're using an outdated rAthena.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

Does this script can be like the one who can distribute the prize is the party leader?? 

 

Uhm... For a quest? Sticking to the grounds of your original request and adding in the party leader requirement...

prontera,150,150,5	script	package_test	100,{
	if(Quest_Variable==1) end; Quest_Variable++;
	if(getcharid(0)!=getpartyleader(getcharid(1),2)) end; addrid(2);
	set .@a, callfunc("package_func",501,10,50,
			502,1,10,
			503,12,10,
			504,6,100);
	while(.@i++-1<.@a)
		dispbottom "You got "+@package_amount[.@i-1]+" "+getitemname(@package_item[.@i-1]);
	disablenpc "package_test";
	end;
}

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

function	script	package_func	{
	set .@len, getargcount();
	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)));
	return .@a;
}

If you wanted to activate this prize npc from the original quest npc you would use...

enablenpc "package_test";


 

If you're just asking for a party prize giver you could still use this function.

if(getcharid(0)!=getpartyleader(getcharid(1),2)) end; addrid(2);
callfunc("package_func",501,10,50,502,1,10,503,12,10,504,6,100);
disablenpc "NPCNAME";
end;

Otherwise you have to provide me with more information.

 

Addrid is a newer command so you might not have it if you're using an outdated rAthena.

 

hmmmm more info?

here is my script it's a lil hard to explain xD 

 

06guild_01,49,51,5 script Tier 1 106,{

if (getcharid(1) < 1) {

mes "You're not in a party.";

} else if (getpartyleader(getcharid(1),2) != getcharid(0)) {

mes "You are not the party leader.";

} else {

getpartymember(getcharid(1));

if ($@partymembercount < 2) {

mes "You need at least 2 party members.";

} else {

mes "[summon Man]";

mes "Hi There,";

mes "Welcome to Riot's Tier 1";

next;

mes "[summon Man]";

mes "This is a custom party quest of XXXX RO that you need party members to get through on this quest...";

next;

mes "[summon Man]";

mes "This is not a simple MVP Room remember all MVP here is";

mes "a Edited Stats by your Admin which 1 or 2 people";

mes "cannot defeat the MVP's Hope you enjoy and goodluck...";

next;

mes "[summon Man]";

mes "Would you like to summon the first Boss?";

menu "Yes",-,"No",L_ayaw;

next;

mes "[Tier 1]";

mes "before you summon the boss please bring me the following";

next;

mes "[summon Man]";

mes "10x Platinum Bullion";

menu "Yes",-,"No",L_ayaw;

next;

mes "[Tier 1]";

mes "I'll be waiting for you chosen one!";

if(countitem(7230) < 10) goto koolang;

if(countitem(7230) >= 10) goto k1;

close;

L_ayaw:

mes "[Tier 1]";

mes "Just speak to me if you have the Requirments";

close;

koolang:

next;

mes "[Tier 1]";

mes "As i said one missing material and all the others go to waste";

close;

k1:

next;

mes "[Tier 1]";

mes "Very well done my friend you have finished the Tier 1 Quest";

mes "Get ready";

delitem 7230,10;

next;

monster "06guild_01",0,0,"Tier 1",1399,1,"Tier 1::OnDarkDead";

mes "[Tier 1]";

mes "Now go and kill the Great Baphomet";

close;

OnDarkDead:

getitem 7899,1,getpartyleader( getcharid(1),1 );

getitem 12246,1,getpartyleader( getcharid(1),1 );

set @id,getcharid(1);

warpparty "que_moon",165,24,@id;

announce "Party "+getpartyname(getcharid(1))+" has Finish the Tier 1",bc_all,0xFFFF00;

end;

L_Dead:

announce "Summon Man: ",3;

set $OnDarkDead,0;

end;

}

}

close;

}

 

I want to make only the party leader can distribute the prize after they finish the tier...

Link to comment
Share on other sites


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

Something like this? Sorry I had to change all the maps because my data doesn't have them.

 

prontera,150,150,5	script	Award	100,{
	//if(Quest_Variable==1) end; Quest_Variable++;
	if(getcharid(0)!=getpartyleader(getcharid(1),2)) end; /*addrid(2);*/
	getpartymember(getcharid(1),2);
	getpartymember(getcharid(1),1);
	set .mem, $@partymembercount;
	copyarray .mem_aid[0], $@partymemberaid[0], 128;
	copyarray .mem_cid[0], $@partymembercid[0], 128;
	while(.@i++-1<.mem)
		if(isloggedin(.mem_aid[.@i-1],.mem_cid[.@i-1]))
			callfunc("package_func",7899,1,100,12246,1,100,.mem_aid[.@i-1]);
	set @id,getcharid(1);
	warpparty "prontera",165,24,@id;
	disablenpc "Award";
	end;

OnInit:
	disablenpc "Award";
}

/// 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;
}

prontera,151,151,5	script	Tier 1	106,{
	if (getcharid(1) < 1) {
		mes "You're not in a party.";
	} else if (getpartyleader(getcharid(1),2) != getcharid(0)) {
		mes "You are not the party leader.";
	} else {
		getpartymember(getcharid(1));
		set .mem, $@partymembercount;
		if (.mem < 2) {
			mes "You need at least 2 party members.";
		} else {
			mes "[Summon Man]";
			mes "Hi There,";
			mes "Welcome to Riot's Tier 1";
			next;
			mes "[Summon Man]";
			mes "This is a custom party quest of XXXX RO that you need party members to get through on this quest...";
			next;
			mes "[Summon Man]";
			mes "This is not a simple MVP Room remember all MVP here is";
			mes "a Edited Stats by your Admin which 1 or 2 people";
			mes "cannot defeat the MVP's Hope you enjoy and good-luck...";
			next;
			mes "[Summon Man]";
			mes "Would you like to summon the first Boss?";
			menu "Yes",-,"No",L_ayaw;
			next;

			mes "[Tier 1]";
			mes "before you summon the boss please bring me the following";
			next;
			mes "[Summon Man]";
			mes "10x Platinum Bullion";
			menu "Yes",-,"No",L_ayaw;
			next;
			mes "[Tier 1]";
			mes "I'll be waiting for you chosen one!";
			if(countitem(7230) < 10) goto koolang;
			if(countitem(7230) >= 10) goto k1;
			close;

			L_ayaw:
			mes "[Tier 1]";
			mes "Just speak to me if you have the Requirements";
			close;


		koolang:
			next;
			mes "[Tier 1]";
			mes "As I said one missing material and all the others go to waste";
			close;

		k1:
			next;
			mes "[Tier 1]";
			mes "Very well done my friend you have finished the Tier 1 Quest";
			mes "Get ready";
			delitem 7230,10;
			next;
			monster "prontera",0,0,"Tier 1",1399,1,"Tier 1::OnDarkDead";
			mes "[Tier 1]";
			mes "Now go and kill the Great Baphomet";
			close;

		OnDarkDead:
			//getitem 7899,1,getpartyleader( getcharid(1),1 );
			//getitem 12246,1,getpartyleader( getcharid(1),1 );
			announce "Party "+getpartyname(getcharid(1))+" has Finish the Tier 1",bc_all,0xFFFF00;
			enablenpc "Award";
			end;

		L_Dead:
			announce "Summon Man: ",3;
			set $OnDarkDead,0;
			end;
		}
	}
close;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

Something like this? Sorry I had to change all the maps because my data doesn't have them.

 

prontera,150,150,5	script	Award	100,{
	//if(Quest_Variable==1) end; Quest_Variable++;
	if(getcharid(0)!=getpartyleader(getcharid(1),2)) end; /*addrid(2);*/
	getpartymember(getcharid(1),2);
	getpartymember(getcharid(1),1);
	set .mem, $@partymembercount;
	copyarray .mem_aid[0], $@partymemberaid[0], 128;
	copyarray .mem_cid[0], $@partymembercid[0], 128;
	while(.@i++-1<.mem)
		if(isloggedin(.mem_aid[.@i-1],.mem_cid[.@i-1]))
			callfunc("package_func",7899,1,100,12246,1,100,.mem_aid[.@i-1]);
	set @id,getcharid(1);
	warpparty "prontera",165,24,@id;
	disablenpc "Award";
	end;

OnInit:
	disablenpc "Award";
}

/// 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;
}

prontera,151,151,5	script	Tier 1	106,{
	if (getcharid(1) < 1) {
		mes "You're not in a party.";
	} else if (getpartyleader(getcharid(1),2) != getcharid(0)) {
		mes "You are not the party leader.";
	} else {
		getpartymember(getcharid(1));
		set .mem, $@partymembercount;
		if (.mem < 2) {
			mes "You need at least 2 party members.";
		} else {
			mes "[Summon Man]";
			mes "Hi There,";
			mes "Welcome to Riot's Tier 1";
			next;
			mes "[Summon Man]";
			mes "This is a custom party quest of XXXX RO that you need party members to get through on this quest...";
			next;
			mes "[Summon Man]";
			mes "This is not a simple MVP Room remember all MVP here is";
			mes "a Edited Stats by your Admin which 1 or 2 people";
			mes "cannot defeat the MVP's Hope you enjoy and good-luck...";
			next;
			mes "[Summon Man]";
			mes "Would you like to summon the first Boss?";
			menu "Yes",-,"No",L_ayaw;
			next;

			mes "[Tier 1]";
			mes "before you summon the boss please bring me the following";
			next;
			mes "[Summon Man]";
			mes "10x Platinum Bullion";
			menu "Yes",-,"No",L_ayaw;
			next;
			mes "[Tier 1]";
			mes "I'll be waiting for you chosen one!";
			if(countitem(7230) < 10) goto koolang;
			if(countitem(7230) >= 10) goto k1;
			close;

			L_ayaw:
			mes "[Tier 1]";
			mes "Just speak to me if you have the Requirements";
			close;


		koolang:
			next;
			mes "[Tier 1]";
			mes "As I said one missing material and all the others go to waste";
			close;

		k1:
			next;
			mes "[Tier 1]";
			mes "Very well done my friend you have finished the Tier 1 Quest";
			mes "Get ready";
			delitem 7230,10;
			next;
			monster "prontera",0,0,"Tier 1",1399,1,"Tier 1::OnDarkDead";
			mes "[Tier 1]";
			mes "Now go and kill the Great Baphomet";
			close;

		OnDarkDead:
			//getitem 7899,1,getpartyleader( getcharid(1),1 );
			//getitem 12246,1,getpartyleader( getcharid(1),1 );
			announce "Party "+getpartyname(getcharid(1))+" has Finish the Tier 1",bc_all,0xFFFF00;
			enablenpc "Award";
			end;

		L_Dead:
			announce "Summon Man: ",3;
			set $OnDarkDead,0;
			end;
		}
	}
close;
}

Sir what is this script for? >>>    copyarray .mem_aid[0], $@partymemberaid[0], 128;

    copyarray .mem_cid[0], $@partymembercid[0], 128;

Sir i got some error what is this? 

cedierror_zpsa7089412.png

Link to comment
Share on other sites


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

$@partymembercid[0] and $@partymemberaid[0] are temporary global variables summoned by getpartymember commands respectively. I wrote them to a different npc array with the copyarray command so that if the command is called again by a different npc it wouldn't cause any problem.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

$@partymembercid[0] and $@partymemberaid[0] are temporary global variables summoned by getpartymember commands respectively. I wrote them to a different npc array with the copyarray command so that if the command is called again by a different npc it wouldn't cause any problem.

what about the errors i've got?

Link to comment
Share on other sites


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

$@partymembercid[0] and $@partymemberaid[0] are temporary global variables summoned by getpartymember commands respectively. I wrote them to a different npc array with the copyarray command so that if the command is called again by a different npc it wouldn't cause any problem.

what about the errors i've got?
What version of rathena are you using?
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

i dont really know gonna ask my dev later >.< im still studying on scripting

Link to comment
Share on other sites


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

i dont really know gonna ask my dev later >.< im still studying on scripting

It looks like you're using eAthena give me a second and I'll convert it.

 

 

Edit--
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

i dont really know gonna ask my dev later >.< im still studying on scripting

It looks like you're using eAthena give me a second and I'll convert it.

 

 

prontera,150,150,5	script	Award	100,{
	if(getcharid(0)!=getpartyleader(getcharid(1),2)) end;
	getpartymember(getcharid(1),2);
	getpartymember(getcharid(1),1);
	set .mem, $@partymembercount;
	copyarray .mem_aid[0], $@partymemberaid[0], 128;
	copyarray .mem_cid[0], $@partymembercid[0], 128;
	while((set(.@i,.@i+1)-1)<.mem)
		if(isloggedin(.mem_aid[.@i-1],.mem_cid[.@i-1]))
			callfunc("package_func",7,7899,1,100,12246,1,100,.mem_aid[.@i-1]);
	set @id,getcharid(1);
	warpparty "prontera",165,24,@id;
	disablenpc "Award";
	end;

OnInit:
	disablenpc "Award";
}

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

function	script	package_func	{
	set .@len, getarg(0)-((getarg(getargcount()-1)>=2000000)?1:0); set(.@i,1);
	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[set(.@a,.@a+1)-1],getarg(.@i-3)),set(@package_amount[.@a-1],getarg(.@i-2)),.@id);
	return .@a;
}

prontera,151,151,5	script	Tier 1	106,{
	if (getcharid(1) < 1) {
		mes "You're not in a party.";
	} else if (getpartyleader(getcharid(1),2) != getcharid(0)) {
		mes "You are not the party leader.";
	} else {
		getpartymember(getcharid(1));
		set .mem, $@partymembercount;
		if (.mem < 2) {
			mes "You need at least 2 party members.";
		} else {
			mes "[Summon Man]";
			mes "Hi There,";
			mes "Welcome to Riot's Tier 1";
			next;
			mes "[Summon Man]";
			mes "This is a custom party quest of XXXX RO that you need party members to get through on this quest...";
			next;
			mes "[Summon Man]";
			mes "This is not a simple MVP Room remember all MVP here is";
			mes "a Edited Stats by your Admin which 1 or 2 people";
			mes "cannot defeat the MVP's Hope you enjoy and good-luck...";
			next;
			mes "[Summon Man]";
			mes "Would you like to summon the first Boss?";
			menu "Yes",-,"No",L_ayaw;
			next;

			mes "[Tier 1]";
			mes "before you summon the boss please bring me the following";
			next;
			mes "[Summon Man]";
			mes "10x Platinum Bullion";
			menu "Yes",-,"No",L_ayaw;
			next;
			mes "[Tier 1]";
			mes "I'll be waiting for you chosen one!";
			if(countitem(7230) < 10) goto koolang;
			if(countitem(7230) >= 10) goto k1;
			close;

			L_ayaw:
			mes "[Tier 1]";
			mes "Just speak to me if you have the Requirements";
			close;


		koolang:
			next;
			mes "[Tier 1]";
			mes "As I said one missing material and all the others go to waste";
			close;

		k1:
			next;
			mes "[Tier 1]";
			mes "Very well done my friend you have finished the Tier 1 Quest";
			mes "Get ready";
			delitem 7230,10;
			next;
			monster "prontera",0,0,"Tier 1",1399,1,"Tier 1::OnDarkDead";
			mes "[Tier 1]";
			mes "Now go and kill the Great Baphomet";
			close;

		OnDarkDead:
			announce "Party "+getpartyname(getcharid(1))+" has Finish the Tier 1",bc_all,0xFFFF00;
			enablenpc "Award";
			end;

		L_Dead:
			announce "Summon Man: ",3;
			set $OnDarkDead,0;
			end;
		}
	}
close;
}

awww ok ok..i ask here coz rathena members is fast on helping than eathena >.< and i thought some script of rathena is ok on eathena

Link to comment
Share on other sites


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

awww ok ok..i ask here coz rathena members is fast on helping than eathena >.< and i thought some script of rathena is ok on eathena

 

I think you were very right to ask here. Many of the members of rAthena can recognize the differences from eAthena and rAthena and correct them.

Just remember to post your emulator version along with your request next time and that should save some of the hassle. /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

awww ok ok..i ask here coz rathena members is fast on helping than eathena >.< and i thought some script of rathena is ok on eathena

 

I think you were very right to ask here. Many of the members of rAthena including myself can easily recognize the differences from eAthena and rAthena and correct them.

Just remember to post your emulator version along with your request next time and that should save some of the hassle. /no1

I've got an error again in line 23 and it said

 

status_set_viewdata (NPC) : No view  data for class 146

 

[Error]:
script error on npc/rns/Cedi/ceditier.txt line 23
    parse_callfunc: expected ')' to close argument list
    22 : {
*   23 :        set .@len, getarg(0)-((getarg(getargcount'(')-1)>=2000000)?1:0); set(.@i,1);
    24 :        set .@id, ((getarg(getargcount()-1)>=2000000)?getarg(getargcount()-1):getcharid(3));
    25 :        while(set(.@i,.@i+3)-3<.@len)
    26 :                if(rand(101)<=getarg(.@i-1))
    27 :                        getitem(set(@package_item[set(.@a,.@a+1)-1],getarg(.@i-3)),set(@package_amount[.@a-1],getarg(.@i-2)),.@id);
    28 :        return .@a;
Link to comment
Share on other sites


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

Edit--

Ugh... Sorry about that I forgot to change all the instances of that command to the other one. T_T

 

I've got an error again in line 23 and it said

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

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

Ugh... Sorry about that I forgot to change all the instances of that command to the other one. T_T

 

I've got an error again in line 23 and it said

sir is this correct? coz when i killed the baphomet the award npc didn't showed up >.<

06guild_01,48,45,5 script Award 146,{

if(getcharid(0)!=getpartyleader(getcharid(1),2)) end;

getpartymember(getcharid(1),2);

getpartymember(getcharid(1),1);

set .mem, $@partymembercount;

copyarray .mem_aid[0], $@partymemberaid[0], 128;

copyarray .mem_cid[0], $@partymembercid[0], 128;

while((set(.@i,.@i+1)-1)<.mem)

if(isloggedin(.mem_aid[.@i-1],.mem_cid[.@i-1]))

callfunc("package_func",7,7899,1,100,12246,1,100,.mem_aid[.@i-1]);

set @id,getcharid(1);

warpparty "prontera",165,24,@id;

disablenpc "Award";

end;

OnInit:

disablenpc "Award";

}

/// callfunc("package_func",,,,{,,,{,,,{,...},}})

function script package_func {

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

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

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

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

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

return .@a;

}

06guild_01,50,51,6 script Tier 1 106,{

if (getcharid(1) < 1) {

mes "You're not in a party.";

} else if (getpartyleader(getcharid(1),2) != getcharid(0)) {

mes "You are not the party leader.";

} else {

getpartymember(getcharid(1));

set .mem, $@partymembercount;

if (.mem < 2) {

mes "You need at least 2 party members.";

} else {

mes "[summon Man]";

mes "Hi There,";

mes "Welcome to Riot's Tier 1";

next;

mes "[summon Man]";

mes "This is a custom party quest of XXXX RO that you need party members to get through on this quest...";

next;

mes "[summon Man]";

mes "This is not a simple MVP Room remember all MVP here is";

mes "a Edited Stats by your Admin which 1 or 2 people";

mes "cannot defeat the MVP's Hope you enjoy and good-luck...";

next;

mes "[summon Man]";

mes "Would you like to summon the first Boss?";

menu "Yes",-,"No",L_ayaw;

next;

mes "[Tier 1]";

mes "before you summon the boss please bring me the following";

next;

mes "[summon Man]";

mes "10x Platinum Bullion";

menu "Yes",-,"No",L_ayaw;

next;

mes "[Tier 1]";

mes "I'll be waiting for you chosen one!";

if(countitem(7230) < 10) goto koolang;

if(countitem(7230) >= 10) goto k1;

close;

L_ayaw:

mes "[Tier 1]";

mes "Just speak to me if you have the Requirements";

close;

koolang:

next;

mes "[Tier 1]";

mes "As I said one missing material and all the others go to waste";

close;

k1:

next;

mes "[Tier 1]";

mes "Very well done my friend you have finished the Tier 1 Quest";

mes "Get ready";

delitem 7230,10;

next;

monster "06guild_01",0,0,"Tier 1",1399,1,"Tier 1::OnDarkDead";

mes "[Tier 1]";

mes "Now go and kill the Great Baphomet";

close;

OnDarkDead:

announce "Party "+getpartyname(getcharid(1))+" has Finish the Tier 1",bc_all,0xFFFF00;

enablenpc "Award";

end;

L_Dead:

announce "Summon Man: ",3;

set $OnDarkDead,0;

end;

}

}

close;

}

Link to comment
Share on other sites


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

sir is this correct? coz when i killed the baphomet the award npc didn't showed up >.<

 

 

The only thing I can think of is maybe you already have an npc name Award and it's not reacting correctly with enable/disable npc... Try this, and tell me if anything happens in your terminal.

 

Edit--

Make sure to restart your server completely to eliminate and excess npcs. I could add a hidden part of event label to the npcs name...

 

You might want to consider switching to rAthena I've tested every version of this npc on rAthena and it worked. Unfortunatly I don't have an eAthena server to test on atm...

 

Give me a second and I'll download one.

 


 

Also you can use 1795900-42TOE2X.jpg that button to paste codes.

 

1795899-KM7ME1J.jpg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

sir is this correct? coz when i killed the baphomet the award npc didn't showed up >.<

 

 

The only thing I can think of is maybe you already have an npc name Award and it's not reacting correctly with enable/disable npc... Try this, and tell me if anything happens in your terminal.

 

prontera,150,150,5	script	Tier 1 Award	100,{
	if(getcharid(0)!=getpartyleader(getcharid(1),2)) end;
	getpartymember(getcharid(1),2);
	getpartymember(getcharid(1),1);
	set .mem, $@partymembercount;
	copyarray .mem_aid[0], $@partymemberaid[0], 128;
	copyarray .mem_cid[0], $@partymembercid[0], 128;
	while((set(.@i,.@i+1)-1)<.mem)
		if(isloggedin(.mem_aid[.@i-1],.mem_cid[.@i-1]))
			callfunc("package_func",7,7899,1,100,12246,1,100,.mem_aid[.@i-1]);
	set @id,getcharid(1);
	warpparty "prontera",165,24,@id;
	disablenpc "Tier 1 Award";
	end;

OnInit:
	disablenpc "Tier 1 Award";
}

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

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

prontera,151,151,5	script	Tier 1	106,{
	if (getcharid(1) < 1) {
		mes "You're not in a party.";
	} else if (getpartyleader(getcharid(1),2) != getcharid(0)) {
		mes "You are not the party leader.";
	} else {
		getpartymember(getcharid(1));
		set .mem, $@partymembercount;
		if (.mem < 2) {
			mes "You need at least 2 party members.";
		} else {
			mes "[Summon Man]";
			mes "Hi There,";
			mes "Welcome to Riot's Tier 1";
			next;
			mes "[Summon Man]";
			mes "This is a custom party quest of XXXX RO that you need party members to get through on this quest...";
			next;
			mes "[Summon Man]";
			mes "This is not a simple MVP Room remember all MVP here is";
			mes "a Edited Stats by your Admin which 1 or 2 people";
			mes "cannot defeat the MVP's Hope you enjoy and good-luck...";
			next;
			mes "[Summon Man]";
			mes "Would you like to summon the first Boss?";
			menu "Yes",-,"No",L_ayaw;
			next;

			mes "[Tier 1]";
			mes "before you summon the boss please bring me the following";
			next;
			mes "[Summon Man]";
			mes "10x Platinum Bullion";
			menu "Yes",-,"No",L_ayaw;
			next;
			mes "[Tier 1]";
			mes "I'll be waiting for you chosen one!";
			if(countitem(7230) < 10) goto koolang;
			if(countitem(7230) >= 10) goto k1;
			close;

			L_ayaw:
			mes "[Tier 1]";
			mes "Just speak to me if you have the Requirements";
			close;


		koolang:
			next;
			mes "[Tier 1]";
			mes "As I said one missing material and all the others go to waste";
			close;

		k1:
			next;
			mes "[Tier 1]";
			mes "Very well done my friend you have finished the Tier 1 Quest";
			mes "Get ready";
			delitem 7230,10;
			next;
			monster "prontera",0,0,"Tier 1",1399,1,"Tier 1::OnDarkDead";
			mes "[Tier 1]";
			mes "Now go and kill the Great Baphomet";
			close;

		OnDarkDead:
			announce "Party "+getpartyname(getcharid(1))+" has Finish the Tier 1",bc_all,0xFFFF00;
			enablenpc "Tier 1 Award";
			end;

		L_Dead:
			announce "Summon Man: ",3;
			set $OnDarkDead,0;
			end;
		}
	}
close;
}

Make sure to restart your server completely to eliminate and excess npcs. I could add a hidden part of event label to the npcs name...

 

You might want to consider switching to rAthena I've tested every version of this npc on rAthena and it worked. Unfortunatly I don't have an eAthena server to test on atm...

 

Give me a second and I'll download one.

 


 

Also you can use 1795900-42TOE2X.jpg that button to paste codes.

 

1795899-KM7ME1J.jpg

now the problem is 

 

npc_enable: attempted  to hide  a non-existing  NPC 'TIER 1 Award' (flag-0)

oh its ok now.. but one more problem when i killed bapho it showed up the npc but it didnt warp me out and the npc is still on the mid..

Link to comment
Share on other sites


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

now the problem is 

 

npc_enable: attempted  to hide  a non-existing  NPC 'TIER 1 Award' (flag-0)

oh its ok now.. but one more problem when i killed bapho it showed up the npc but it didnt warp me out and the npc is still on the mid..

 

Ok I was using command that existed in eAthena but the rAthena updated version of them... and some shortcuts that don't work on eAthena... I tested it again and it still works.

 

I'm so used to the shortcuts I forgot about the old versions. I think that's called proactive interference in psychology. /heh

 

Edit--

 

If the enable and disable commands still aren't working we can always replace them with other commands and if you don't have the warpparty command we can do something about that to.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

now the problem is 

 

npc_enable: attempted  to hide  a non-existing  NPC 'TIER 1 Award' (flag-0)

oh its ok now.. but one more problem when i killed bapho it showed up the npc but it didnt warp me out and the npc is still on the mid..

 

Ok I was using command that existed in eAthena but the rAthena updated version of them... and some shortcuts that don't work on eAthena... I tested it again and it still works.

 

I'm so used to the shortcuts I forgot about the old versions. I think that's called proactive interference in psychology. /heh

 

prontera,150,150,5	script	Tier 1 Award	100,{
	if(getcharid(0)!=getpartyleader(getcharid(1),2)) end;
	getpartymember(getcharid(1),2);
	set .mem, $@partymembercount;
	copyarray .mem_aid[0], $@partymemberaid[0], 128;
	while(.@i<.mem) {
		set(.@i,.@i+1);
		if(isloggedin(.mem_aid[.@i-1])){
			attachrid(.mem_aid[.@i-1]);
			callfunc("package_func",6,7899,1,100,12246,1,100);
		}
	}
	set @id,getcharid(1);
	warpparty "prontera",165,24,@id;
	disablenpc "Tier 1 Award";
	end;

OnInit:
	disablenpc "Tier 1 Award";
}

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

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

prontera,151,151,5	script	Tier 1	106,{
	if (getcharid(1) < 1) {
		mes "You're not in a party.";
	} else if (getpartyleader(getcharid(1),2) != getcharid(0)) {
		mes "You are not the party leader.";
	} else {
		getpartymember(getcharid(1));
		set .mem, $@partymembercount;
		if (.mem < 2) {
			mes "You need at least 2 party members.";
		} else {
			mes "[Summon Man]";
			mes "Hi There,";
			mes "Welcome to Riot's Tier 1";
			next;
			mes "[Summon Man]";
			mes "This is a custom party quest of XXXX RO that you need party members to get through on this quest...";
			next;
			mes "[Summon Man]";
			mes "This is not a simple MVP Room remember all MVP here is";
			mes "a Edited Stats by your Admin which 1 or 2 people";
			mes "cannot defeat the MVP's Hope you enjoy and good-luck...";
			next;
			mes "[Summon Man]";
			mes "Would you like to summon the first Boss?";
			menu "Yes",-,"No",L_ayaw;
			next;

			mes "[Tier 1]";
			mes "before you summon the boss please bring me the following";
			next;
			mes "[Summon Man]";
			mes "10x Platinum Bullion";
			menu "Yes",-,"No",L_ayaw;
			next;
			mes "[Tier 1]";
			mes "I'll be waiting for you chosen one!";
			if(countitem(7230) < 10) goto koolang;
			if(countitem(7230) >= 10) goto k1;
			close;

			L_ayaw:
			mes "[Tier 1]";
			mes "Just speak to me if you have the Requirements";
			close;


		koolang:
			next;
			mes "[Tier 1]";
			mes "As I said one missing material and all the others go to waste";
			close;

		k1:
			next;
			mes "[Tier 1]";
			mes "Very well done my friend you have finished the Tier 1 Quest";
			mes "Get ready";
			delitem 7230,10;
			next;
			monster "prontera",0,0,"Tier 1",1399,1,"Tier 1::OnDarkDead";
			mes "[Tier 1]";
			mes "Now go and kill the Great Baphomet";
			close;

		OnDarkDead:
			announce "Party "+getpartyname(getcharid(1))+" has Finish the Tier 1",bc_all,0xFFFF00;
			enablenpc "Tier 1 Award";
			end;

		L_Dead:
			announce "Summon Man: ",3;
			set $OnDarkDead,0;
			end;
		}
	}
close;
}

 

If the enable and disable commands still aren't working we can always replace them with other commands and if you don't have the warpparty command we can do something about that to.

woooooooooooooooooooooo it's working now WOW!!! THANKS!!!  /kis2

 

One last suggestion, hehe xD can you please make the 7899 item directed in the partyleader only? coz in this quest there is some items that only party leaders can recieve that items to went through the next sage of this tier..please please? /??

Sir i lowered tha chance of 12246 MCA but still its like 100% chance to get

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

woooooooooooooooooooooo it's working now WOW!!! THANKS!!!  /kis2

 

One last suggestion, hehe xD can you please make the 7899 item directed in the partyleader only? coz in this quest there is some items that only party leaders can recieve that items to went through the next sage of this tier..please please? /??

Sir i lowered tha chance of 12246 MCA but still its like 100% chance to get

 

Alright I forgot one thing in the function so the rate should be fixed now. To add items exclusive to the party leader use the first callfunc.

prontera,150,150,5	script	Tier 1 Award	100,{
	if(getcharid(0)!=getpartyleader(getcharid(1),2)) end;
	callfunc("package_func",3,7899,1,50);
	getpartymember(getcharid(1),2);
	set .mem, $@partymembercount;
	copyarray .mem_aid[0], $@partymemberaid[0], 128;
	while(.@i<.mem) {
		set(.@i,.@i+1);
		if(isloggedin(.mem_aid[.@i-1])){
			attachrid(.mem_aid[.@i-1]);
			callfunc("package_func",3,12246,1,10);
		}
	}
	set @id,getcharid(1);
	warpparty "prontera",165,24,@id;
	disablenpc "Tier 1 Award";
	end;

OnInit:
	disablenpc "Tier 1 Award";
}

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

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

prontera,151,151,5	script	Tier 1	106,{
	if (getcharid(1) < 1) {
		mes "You're not in a party.";
	} else if (getpartyleader(getcharid(1),2) != getcharid(0)) {
		mes "You are not the party leader.";
	} else {
		getpartymember(getcharid(1));
		set .mem, $@partymembercount;
		if (.mem < 2) {
			mes "You need at least 2 party members.";
		} else {
			mes "[Summon Man]";
			mes "Hi There,";
			mes "Welcome to Riot's Tier 1";
			next;
			mes "[Summon Man]";
			mes "This is a custom party quest of XXXX RO that you need party members to get through on this quest...";
			next;
			mes "[Summon Man]";
			mes "This is not a simple MVP Room remember all MVP here is";
			mes "a Edited Stats by your Admin which 1 or 2 people";
			mes "cannot defeat the MVP's Hope you enjoy and good-luck...";
			next;
			mes "[Summon Man]";
			mes "Would you like to summon the first Boss?";
			menu "Yes",-,"No",L_ayaw;
			next;

			mes "[Tier 1]";
			mes "before you summon the boss please bring me the following";
			next;
			mes "[Summon Man]";
			mes "10x Platinum Bullion";
			menu "Yes",-,"No",L_ayaw;
			next;
			mes "[Tier 1]";
			mes "I'll be waiting for you chosen one!";
			if(countitem(7230) < 10) goto koolang;
			if(countitem(7230) >= 10) goto k1;
			close;

			L_ayaw:
			mes "[Tier 1]";
			mes "Just speak to me if you have the Requirements";
			close;


		koolang:
			next;
			mes "[Tier 1]";
			mes "As I said one missing material and all the others go to waste";
			close;

		k1:
			next;
			mes "[Tier 1]";
			mes "Very well done my friend you have finished the Tier 1 Quest";
			mes "Get ready";
			delitem 7230,10;
			next;
			monster "prontera",0,0,"Tier 1",1399,1,"Tier 1::OnDarkDead";
			mes "[Tier 1]";
			mes "Now go and kill the Great Baphomet";
			close;

		OnDarkDead:
			announce "Party "+getpartyname(getcharid(1))+" has Finish the Tier 1",bc_all,0xFFFF00;
			enablenpc "Tier 1 Award";
			end;

		L_Dead:
			announce "Summon Man: ",3;
			set $OnDarkDead,0;
			end;
		}
	}
	close;
}

whats is the 3 in >>callfunc("package_func",3,7899,1,50); ?? 7899 is item id 1 is how many items 50 is chance then the 3 is?

Sir i tried this one >>>    callfunc("package_func",3,7899,1,50,12246,2,100); but it didn't give me even 1 mca 

3 is lenght?? what is lenght for?

i've got it now..3 is exact only for 1 items if i make it 6 i can make it for 2 items 

Link to comment
Share on other sites


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

i've got it now..3 is exact only for 1 items if i make it 6 i can make it for 2 items 

 

Yeah 3 is the length of parameters for one item. every item just add 3 and you'll be fine.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

i've got it now..3 is exact only for 1 items if i make it 6 i can make it for 2 items 

 

Yeah 3 is the length of parameters for one item. every item just add 3 and you'll be fine.

Thank you so much for helping me T_T i really appreciate it..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

 

woooooooooooooooooooooo it's working now WOW!!! THANKS!!!  /kis2

 

One last suggestion, hehe xD can you please make the 7899 item directed in the partyleader only? coz in this quest there is some items that only party leaders can recieve that items to went through the next sage of this tier..please please? /??

Sir i lowered tha chance of 12246 MCA but still its like 100% chance to get

 

Alright I forgot one thing in the function so the rate should be fixed now. To add items exclusive to the party leader use the first callfunc.

prontera,150,150,5	script	Tier 1 Award	100,{
	if(getcharid(0)!=getpartyleader(getcharid(1),2)) end;
	callfunc("package_func",3,7899,1,50);
	getpartymember(getcharid(1),2);
	set .mem, $@partymembercount;
	copyarray .mem_aid[0], $@partymemberaid[0], 128;
	while(.@i<.mem) {
		set(.@i,.@i+1);
		if(isloggedin(.mem_aid[.@i-1])){
			attachrid(.mem_aid[.@i-1]);
			callfunc("package_func",3,12246,1,10);
		}
	}
	set @id,getcharid(1);
	warpparty "prontera",165,24,@id;
	disablenpc "Tier 1 Award";
	end;

OnInit:
	disablenpc "Tier 1 Award";
}

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

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

prontera,151,151,5	script	Tier 1	106,{
	if (getcharid(1) < 1) {
		mes "You're not in a party.";
	} else if (getpartyleader(getcharid(1),2) != getcharid(0)) {
		mes "You are not the party leader.";
	} else {
		getpartymember(getcharid(1));
		set .mem, $@partymembercount;
		if (.mem < 2) {
			mes "You need at least 2 party members.";
		} else {
			mes "[Summon Man]";
			mes "Hi There,";
			mes "Welcome to Riot's Tier 1";
			next;
			mes "[Summon Man]";
			mes "This is a custom party quest of XXXX RO that you need party members to get through on this quest...";
			next;
			mes "[Summon Man]";
			mes "This is not a simple MVP Room remember all MVP here is";
			mes "a Edited Stats by your Admin which 1 or 2 people";
			mes "cannot defeat the MVP's Hope you enjoy and good-luck...";
			next;
			mes "[Summon Man]";
			mes "Would you like to summon the first Boss?";
			menu "Yes",-,"No",L_ayaw;
			next;

			mes "[Tier 1]";
			mes "before you summon the boss please bring me the following";
			next;
			mes "[Summon Man]";
			mes "10x Platinum Bullion";
			menu "Yes",-,"No",L_ayaw;
			next;
			mes "[Tier 1]";
			mes "I'll be waiting for you chosen one!";
			if(countitem(7230) < 10) goto koolang;
			if(countitem(7230) >= 10) goto k1;
			close;

			L_ayaw:
			mes "[Tier 1]";
			mes "Just speak to me if you have the Requirements";
			close;


		koolang:
			next;
			mes "[Tier 1]";
			mes "As I said one missing material and all the others go to waste";
			close;

		k1:
			next;
			mes "[Tier 1]";
			mes "Very well done my friend you have finished the Tier 1 Quest";
			mes "Get ready";
			delitem 7230,10;
			next;
			monster "prontera",0,0,"Tier 1",1399,1,"Tier 1::OnDarkDead";
			mes "[Tier 1]";
			mes "Now go and kill the Great Baphomet";
			close;

		OnDarkDead:
			announce "Party "+getpartyname(getcharid(1))+" has Finish the Tier 1",bc_all,0xFFFF00;
			enablenpc "Tier 1 Award";
			end;

		L_Dead:
			announce "Summon Man: ",3;
			set $OnDarkDead,0;
			end;
		}
	}
	close;
}

whats is the 3 in >>callfunc("package_func",3,7899,1,50); ?? 7899 is item id 1 is how many items 50 is chance then the 3 is?

Sir i tried this one >>>    callfunc("package_func",3,7899,1,50,12246,2,100); but it didn't give me even 1 mca 

3 is lenght?? what is lenght for?

i've got it now..3 is exact only for 1 items if i make it 6 i can make it for 2 items 

Sir Skorm

 

 

can i ask if you can add an auto kick member on the map if they leave the party

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