Jump to content
  • 0

Help NPC Party


leondedios

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   0
  • Joined:  10/02/13
  • Last Seen:  

Help.

I have two npc party informants,

-the first. not show the number of members.

the second, only displays information from my. party

 

I need a search engine, and full reporting for the users seeking party.

 

new_3-2,23,174,4	script	RPC LADDER	416,{
mes "Party creadas: ";
query_sql "SELECT name FROM `party` ORDER BY party_id DESC LIMIT 20",.@party$[0];
set .@i, 1;
for (set .@c, 0; .@c < getarraysize(.@party$); set .@c, .@c + 1) {
	mes "Partys ^FF0000" +.@i +"^000000 - ^0000FF" +.@party$[.@c] +"^000000 integrantes ^FF0000" +.party[.@c] +"^000000.";
	set .@i, .@i + 1;
}
close;
}


///NPC 2

new_3-2,23,176,4	script	RPC LADDERr	416,{
if(getcharid(1))
	goto Configuracion;
	if(!getcharid(1))
	goto Negativo;
	configuracion:
		getpartymember(getcharid(1));
		set @partymembercount,$@partymembercount;
		copyarray @partymembername$[0],$@partymembername$[0],@partymembercount;
		set @count,0;
		if(@count == @partymembercount) goto L_Free;
		mes "[Informacion Party]";
		mes "Hola tu te encuentras en la Party "+getpartyname(getcharid(1))+"";
		mes "El lider de la party es "+getpartyleader(getcharid(1))+"";
		menu "Ver Miembros",visual,"Nada",closing;
		visual:
		if(@count == 100) goto L_nomore;
		mes (@count + 1) + ". ^0000FF" + @partymembername$[@count] + "^000000";
		set @count,@count+1;
		goto visual;
		Negativo:
	mes "[Informacion Party]";
	mes "No estas en una party.No hay informacion disponible";
	close;
	L_Free:
		close;
	L_nomore:
		mes "[Informacion Party]";
		mes "Gracias por usar este servicio";
		close;
	closing:
	mes "[Informacion Party]";
	mes "Nos vemos";
	close;
	}
}

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

you mean something like this ??

http://upaste.me/r/972671

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   0
  • Joined:  10/02/13
  • Last Seen:  

Yes!!!

Quite so!

can do, to show party leader and map where they are?

and this is great, but these two functions will make it better

just saw it on a server before, and never shared, thanks for the help 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Try this one ( credits to @Emistry ) :

prontera,150,150,5    script    Sample    757,{
query_sql( "SELECT `party_id`,`name` FROM `party` LIMIT 20",.@party_id,.@name$ );
.@size = getarraysize( .@party_id );
    if( .@size ) {
        mes "Select a Party.";
        for( .@i = 0; .@i < .@size; .@i++ )
            .@menu$ = .@menu$ + .@name$[.@i] + ":";
        next;
        .@party = select( .@menu$ ) - 1;
        mes "["+.@name$[.@party]+"]";
        getpartymember .@party_id[.@party];
        mes "Member("+$@partymembercount+"):";
        for( .@i = 0; .@i < $@partymembercount; .@i++ )
            mes " > "+$@partymembername$[.@i];
        mes "Party Leader : " +rid2name(getpartyleader(.@party_id[.@party], 1));
        getmapxy(.@map$, .@x, .@y, 0, rid2name(getpartyleader(.@party_id[.@party], 1)));
        mes "Map of the leader : " +.@map$;
        mes "X Coordinates : " +.@x;
        mes "Y Coordinates : " +.@y;
    } else {
        mes "No party.";
    }
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...