Jump to content
  • 0

help me on this script please T_T


chromus28

Question


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

can anyone make this script that when the award fairy comes out.. only on who are only on that map can get the prize.. coz this script even when you are on prontera and the party is on guild_vs3 the player on prontera can still get prizes.. i want that only who are in the map can get the prize only

06guild_01,50,48,5	script	Award Fairy D	811,{
	if(getcharid(0)!=getpartyleader(getcharid(1),2)) end;
	callfunc("package_func",21,32005,1,100,12210,2,30,12103,1,100,14232,5,100,20165,1,20,20171,1,20,20161,1,20);
	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",15,12103,1,50,14232,5,100,12210,2,30,20165,1,10,20171,1,10,20161,1,10);
		}
	}
	set @id,getcharid(1);
	warpparty "prontera",165,24,@id;
	disablenpc "Award Fairy D";
	end;

OnInit:
	disablenpc "Award Fairy D";
}

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

06guild_01,50,52,6	script	Tier D	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 "[Tier D]";
			mes "Hi There,";
			mes "Welcome to Riot's Tier D";
			next;
			mes "[Tier D]";
			mes "This is a custom party quest of XXXXXX that you need party members to get through on this quest...";
			next;
			mes "[Tier D]";
			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 "[Tier D]";
			mes "Would you like to summon the first Boss?";
			menu "Yes",-,"No",L_ayaw;
			next;

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

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


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

		k1:
			next;
			mes "[Tier D]";
			mes "Very well done my friend you have finished the Tier D Quest";
			mes "Get ready";
			delitem 32004,1;
			next;
			monster "06guild_01",0,0,"Prime Baphomet",3263,1,"Tier D::OnDarkDead";
			mes "[Tier D]";
			mes "Now go and kill the Prime Baphomet!!";
			close;

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

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

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

getmapxy(@map$,@x,@y,0);
    if(@map$ == "edit_map") {
callfunc("package_func",21,32005,1,100,12210,2,30,12103,1,100,14232,5,100,20165,1,20,20171,1,20,20161,1,20);
}

 

add the getmapxy codes before calling the package function.

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:  

getmapxy(@map$,@x,@y,0);
    if(@map$ == "edit_map") {
callfunc("package_func",21,32005,1,100,12210,2,30,12103,1,100,14232,5,100,20165,1,20,20171,1,20,20161,1,20);
}

add the getmapxy codes before calling the package function.

this is for all right? coz this script is.. the party leader must be the one who will click ths npc to distribute the award to all..

 

and where to add this?

Edited by chromus28
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

add the getmapxy codes before calling the package function.

 

you can also use strcharinfo(3)

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:  

 

add the getmapxy codes before calling the package function.

 

you can also use strcharinfo(3)

 

help me where to add that script T_T plss

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

read what i 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:  

read what i said ;/

06guild_01,50,48,5	script	Award Fairy D	811,{
getmapxy(@map$,@x,@y,0);
    if(@map$ == "06guild_01") {
	callfunc("package_func",21,32005,1,100,12210,2,30,12103,1,100,14232,5,100,20165,1,20,20171,1,20,20161,1,20);

like this? sorry noob here T_T

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Try this one

 

if(strcharinfo(3) == "06guild_01") {
    callfunc("package_func",21,32005,1,100,12210,2,30,12103,1,100,14232,5,100,20165,1,20,20171,1,20,20161,1,20); }

 

Put it on the 2nd one also

 

if(strcharinfo(3) == "06guild_01") {
callfunc("package_func",15,12103,1,50,14232,5,100,12210,2,30,20165,1,10,20171,1,10,20161,1,10); }
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...