Jump to content
  • 0

Script Support


caspa

Question


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  



if( getcharid(1) ) {
        getpartymember( getcharid(1),2 );
        getpartymember( getcharid(1),1 );
//-------------------------
        i want to set it up like this -->> setarray .@item, "2374", "2375", "2433", "2537", "5808";
//-------------------------
        set .@map_killer$,strcharinfo(3);
        set .@chance,rand(10);
        for( set .@i,0; .@i<$@partymembercount; set .@i,.@i+1 )
            if( isloggedin( $@partymemberaid[ .@i ],$@partymembercid[ .@i ] ) )
                if( !getmapxy( .@map$, .@x, .@y, 0, rid2name( $@partymemberaid[ .@i ] ) ) && .@map$ == .@map_killer$ ) {
//----------------------------------------------------
so it wouldn't look like this -->>
                    //getitem 2374,1, $@partymemberaid[ .@i ];
                    //getitem 2375,1, $@partymemberaid[ .@i ];
                    //getitem 2433,1, $@partymemberaid[ .@i ];
                    //getitem 2537,1, $@partymemberaid[ .@i ];
                    //getitem 5808,1, $@partymemberaid[ .@i ];
//----------------------------------------------------

//---------------------------------------------------
 and so it would look like this -->>  getitem .@item,1, $@partymemberaid[ .@i ];
//---------------------------------------------------
                    if( !.@chance )
                    getitem 4001, 1, $@partymemberaid[ .@i ];
                }
        }
    end;
}

Edited by caspa
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


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

for( .@x = 0; .@x < getarraysize( .@item ); .@x++ )
    getitem .@item[.@x],1, $@partymemberaid[ .@i ];

 

like this ???

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