Jump to content
  • 0

what wrong with my script


Help-Help

Question


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  108
  • Reputation:   2
  • Joined:  03/16/13
  • Last Seen:  

prontera,150,150,5	script	Sex Changer	99,{

mes "Would you like to change your Sex ( Female or Male )?";
mes "The Operation would cost 10 Gold Coin.";
next;
	if(select("Yes:No")&2 || countitem(671)<10) mes "You need more Coins."; close;
next;
mes "Great...";
delitem 671,10;
changesex;
end;
}

 

i can't change my sex but i have 10 gold coin and i can't change wew

Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   3
  • Joined:  02/04/12
  • Last Seen:  

try:

 

 

prontera,150,150,5    script    Sex Changer    99,{

mes "Would you like to change your Sex ( Female or Male )?";
mes "The Operation would cost 10 Gold Coin.";
next;
    if(select("Yes:No") == 2 || countitem(671)<10){
mes "You need more Coins."; 
close;
}
next;
mes "Great...";
delitem 671,10;
changesex;
end;
}
Edited by TecnoCronus
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  108
  • Reputation:   2
  • Joined:  03/16/13
  • Last Seen:  

dude can you pls edit no if i enter in no will be auto close

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  108
  • Reputation:   2
  • Joined:  03/16/13
  • Last Seen:  

and dude can you edit the script like this oone

2dbkn6x.png

bcoz your script is auto log out

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  88
  • Reputation:   23
  • Joined:  01/30/12
  • Last Seen:  

This one should work properly.

prontera,150,150,5	script	Sex Changer	99,{

mes "Would you like to change your Sex ( Female or Male )?";

mes "The Operation would cost 10 Gold Coin.";

next;

if ( select("Yes:No") == 2 )

close;

if ( countitem(671) < 10 ) {

mes "You need more Coins.";

close;

}

delitem 671,10;

mes "Great...";

mes "You will be disconnected.";

close2;

changesex;

end;

}

Edited by Digos
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  108
  • Reputation:   2
  • Joined:  03/16/13
  • Last Seen:  

dude can you make the no if i enter to no will be auto matic close coz if i enetr in no they show the 

mes "Would you like to change your Sex ( Female or Male )?";
mes "The Operation would cost 10 Gold Coin.";

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:  

dude can you make the no if i enter to no will be auto matic close coz if i enetr in no they show the 

mes "Would you like to change your Sex ( Female or Male )?";

mes "The Operation would cost 10 Gold Coin.";

Try these 

 

 
prontera,150,150,5    script    Sex Changer    100,{
    set .@npc_name$,"Sex Changer";
    
    mes .@npc_name$;
    mes "Would you like to change your character sex?";
    mes "If yes, then this will cost you 10 gold coins";
    next;
    
    if (select("Yes:No") - 1) {
        close;
    } else {
        if (countitem(671) < 10) {
            mes .@npc_name$;
            mes "You need more gold coins";
            close;
        }
        
        delitem 671,10;
        mes .@npc_name$;
        mes "You will be disconnected afterwards";
        close2;
        changesex;
        end;
    }
 
}

 

Didn't test. Tell me if there is error.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  108
  • Reputation:   2
  • Joined:  03/16/13
  • Last Seen:  

error



line 25

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:  

Change 

        changesex;
        end;
    }
 
}

 

to : 

 

        changesex;
        end;
    }
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  210
  • Reputation:   10
  • Joined:  11/20/11
  • Last Seen:  


prontera,150,150,5<TAB>script<TAB>Sex Changer<TAB>100,{

    mes "[ Sex Changer ]";

    mes "Would you like to change your character sex?";

    mes "If yes, then this will cost you 10 gold coins";

    next;

    if (select("Yes","No") == 2) close;

        if (countitem(671) < 10) {

            mes "[ Sex Changer ]";

            mes "You need more gold coins";

            close;

        }

        delitem 671,10;

        mes "[ Sex Changer ]";

        mes "You will be disconnected afterwards";

        close2;

        changesex;

        end;

}

Edited by quesoph
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

error

line 25

For future errors, please provide as much info about an error as possible.

 

Change 

 

        changesex;
        end;
    }
 
}

 

to : 

 

 

        changesex;
        end;
    }
}

And whats the difference? This blank line shouldn't be an problem at all.

 

Regards,

Chris

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