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:  1282
  • Reputation:   393
  • Joined:  02/03/12
  • Last Seen:  

Tier 1 Award is located on the same map as the spawned monster right?

 

Make sure you change set .map$, "prontera";

 

prontera,150,150,5	script	Tier 1 Award	100,500,500,{
	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;

OnTouch:
	while( playerattached() ) {
		if( strcharinfo(3)!=.map$ ) end;
		if( getvariableofnpc(.party,"Tier 1")!=getcharid(1) ) {
			warp "prontera",0,0;
			end;
		} sleep2 1000;
	} end;
	
OnInit:
	disablenpc "Tier 1 Award";
	set .map$, "prontera";
}

/// 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,{
	set .map$, "prontera";
	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";
			set .party, getcharid(1);
			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

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