Jump to content
  • 0

party vs party! Take half of the bet and add a prize to the winning party.


Yukaiii

Question


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  110
  • Reputation:   9
  • Joined:  11/20/13
  • Last Seen:  

can someone who has knowledge in scripting help me to solve this?

I would like to remove the item or zeny bet from this script.

and it is adding a prize for the winning party and the losing party.

script tested and working perfectly.
If anyone is interested in helping I'm sharing the script with them!

Thank you in advance

image.thumb.png.26ee59e242049247504a0ca52300a34f.png

image.thumb.png.46941cbd30c0ea6aeef3838abb600ad7.png

image.thumb.png.ed8f8ec8be009d916a83d756356b7499.png

image.thumb.png.704ab448759a22616e083de982559622.png

image.thumb.png.39b0dcae2d7b40c487a66df087ade750.png

 

Quote

    Case 1:
        if( getcharid(0) != getpartyleader( .@partyid,2 ) ){
            mes "Only Party Leader can register.";
        }else if( .@partyid == .team[0] ){
            if( !.team[1] ){
                if( select("Quit Match","Cancel") == 1 ){
                    set .team[0],0;
                    set .status,1;
                    stopnpctimer;
                    if( $match_amount && $match_itemid ){
                        message strcharinfo(0),"Retrieved "+callfunc( "ValueConvert", $match_amount )+" x "+getitemname( $match_itemid )+".";
                        getitem $match_itemid,$match_amount;
                    }
                    if( $zeny ){
                        message strcharinfo(0),"Retrieved "+callfunc( "ValueConvert", $zeny )+" Zeny.";
                        set Zeny,Zeny + $zeny;
                    }
                }

 

Quote

                if( $match_itemid )
                    if( countitem( $match_itemid ) < $match_amount ){
                        mes "You need "+callfunc( "ValueConvert", $match_amount )+" x "+getitemname( $match_itemid );
                        close;
                    }
                    
                if( $zeny )
                    if( Zeny < $zeny ){
                        mes "You need "+callfunc( "ValueConvert", $zeny )+" Zeny";
                        close;
                    }
                    
                if( $match_itemid ){
                    set .@amount,$match_amount;
                    message strcharinfo(0),"Paid "+callfunc( "ValueConvert", .@amount )+" x "+getitemname( $match_itemid )+".";
                    delitem $match_itemid,.@amount;
                }
                
                if( $zeny ){
                    message strcharinfo(0),"Total of "+callfunc( "ValueConvert", $zeny )+" Zeny deducted.";
                    set Zeny,Zeny - $zeny;
                }

 

Quote

            callsub display_event_info;
            next;
            switch( select( "Edit Party Member","Required Item","Required Zeny","^FF0000Start Event^000000" ) ){

 

Quote

                Case 2:
                    mes "Enter item ID :";
                    do{
                        input .@input;
                    }while( getitemname( .@input ) == "null" );
                    mes "Enter Amount : "+getitemname( .@input );
                    mes "^777777( 0 ~ "+callfunc( "ValueConvert", 30000 )+" )^000000";
                    input $match_amount,0,30000;
                    if( $match_amount ) set $match_itemid,.@input;
                    break;
                Case 3:
                    mes "Enter Zeny amount :";
                    mes "^777777( 0 ~ "+callfunc( "ValueConvert", 10000000 )+" )^000000";
                    input $zeny,0,10000000;
                    break;

 

Quote

                    if( $party_member < 1 ){
                        mes "^FF0000Invalid^000000. Minimum 1 Party Member.";
                    }else if( !$match_amount && !$zeny ){
                        mes "^FF0000Invalid^000000. Required 1 item or Zeny.";
                    }else{

 

Quote

    if( $party_member && ( $match_amount || $zeny ) && !.status ) set .status,1;
    end;

 

Quote

    if( $zeny ) mes "Required Zeny : ^777777"+callfunc( "ValueConvert", $zeny )+" Zeny^000000";

 

Quote

                if( $zeny ){
                    mapannounce .map_list$[.map],"Party Leader received "+callfunc( "ValueConvert", $zeny )+" Zeny",bc_blue;
                    set Zeny,Zeny + ( $zeny * 2 );

 

Quote

    if( $party_member && ( $match_amount || $zeny ) && !.status ){

 

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  896
  • Reputation:   117
  • Joined:  05/23/12
  • Last Seen:  

Uve already post the script parts u need to change.

 

Rynbef~

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  18
  • Reputation:   0
  • Joined:  03/02/12
  • Last Seen:  

switch( select( "Edit Party Member",/*"Required Item","Required Zeny",*/"^FF0000Start Event^000000" ) ){

 

Make sure to include Case 4, so your previous Case 4 will now become Case 2

                Case 2:
                   /* mes "Enter item ID :";
                    do{
                        input .@input;
                    }while( getitemname( .@input ) == "null" );
                    mes "Enter Amount : "+getitemname( .@input );
                    mes "^777777( 0 ~ "+callfunc( "ValueConvert", 30000 )+" )^000000";
                    input $match_amount,0,30000;
                    if( $match_amount ) set $match_itemid,.@input;
                    break;
                Case 3:
                    mes "Enter Zeny amount :";
                    mes "^777777( 0 ~ "+callfunc( "ValueConvert", 10000000 )+" )^000000";
                    input $zeny,0,10000000;
                    break;
                Case 4:*/

 

                    if( $party_member < 1 ){
                        mes "^FF0000Invalid^000000. Minimum 1 Party Member.";
                    }/*else if( !$match_amount && !$zeny ){
                        mes "^FF0000Invalid^000000. Required 1 item or Zeny.";
                    }*/else{

 

    if( $party_member /*&& ( $match_amount || $zeny )*/ && !.status ) set .status,1;
    end;

 

    if( $party_member /*&& ( $match_amount || $zeny )*/ && !.status ){

 

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