Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,147,171,5 script Hannah 72,{
- mes "^0000FF[Hannah]^000000";
- mes "Hi,";
- mes "I can exchange your victory badges into my gold victory badges.";
- mes "The rate is 100x victory badges to 1x gold victory badge.";
- //mes "I can exchange "+.exchange_rate[0]+"x "+getitemname( .victory_badge )+" into "+.exchange_rate[1]+"x "+getitemname( .gold_victory_badge );
- next;
- mes "^0000FF[Hannah]^000000";
- .@count = countitem( .victory_badge );
- if( .@count >= .exchange_rate[0] ){
- mes "How many would you like to exchange?";
- input .@amount,0,.@count;
- if( .@amount >= .exchange_rate[0] ){
- .@amount = ( .@amount / .exchange_rate[0] );
- .@total_gold_badge = countitem( .gold_victory_badge ) + ( .@amount * .exchange_rate[1] );
- if( .@total_gold_badge > 30000 ){
- next;
- mes "^0000FF[Hannah]^000000";
- mes "You can't carry more than 30,000 of one kind of item. Try putting some of your badges in storage.";
- close;
- }else if( !checkweight( .gold_victory_badge,( .@amount * .exchange_rate[1] ) ) ){
- mes "^0000FF[Hannah]^000000";
- mes "You can't hold "+( .@amount * .exchange_rate[1] )+" of "+getitemname( .gold_victory_badge );
- }else{
- next;
- mes "^0000FF[Hannah]^000000";
- mes "Done. Exchanged.";
- delitem .victory_badge,( .@amount * .exchange_rate[0] );
- getitem .gold_victory_badge,( .@amount * .exchange_rate[1] );
- close;
- }
- }else{
- mes "You need minimum of "+.exchange_rate[0]+" "+getitemname( .victory_badge );
- }
- }else{
- mes "You need minimum of "+.exchange_rate[0]+" "+getitemname( .victory_badge );
- }
- close;
- OnInit:
- // victory badge item id
- .victory_badge = 23020;
- // gold victory badge item id
- .gold_victory_badge = 23021;
- // exchange rate. ( default 100 victory badge = 1 gold victory badge )
- setarray .exchange_rate,
- 100, // 100 victory badge
- 1; // 10 gold victory badge
- end;
- }
- prontera,158,171,5 script Name Changer 757,{
- mes "You need "+.cash_cost+" CashPoint to change name";
- if( #CASHPOINTS >= .cash_cost ){
- if( select( "Change NAME","Cancel" ) == 1 ){
- if( getcharid(2) ){
- mes "You must leave your Guild if you wish to change name.";
- mes "This is to avoid incorrect informations to be stored in server.";
- close;
- }
- mes "Enter your NEW name.";
- do{
- input .@name$;
- .@length = getstrlen( .@name$ );
- if( .@length > 24 || .@length < 4 )
- message strcharinfo(0),"Name lenght must between 4 ~ 24 characters.";
- }while( .@length > 24 || .@length < 4 );
- .@name$ = escape_sql( .@name$ );
- query_sql( "SELECT 1 FROM `char` WHERE `name` = '"+.@name$+"'",.@dummy );
- if( .@dummy ){
- mes "Sorry, this Name alread exist.";
- }else{
- mes "Confirm change to "+.@name$+" ?";
- mes " ";
- mes "You will be disconnected to apply the changes.";
- if( select( "YES","Cancel" ) == 1 ){
- #CASHPOINTS -= .cash_cost;
- .@char_id = getcharid(0);
- .@char_name$ = strcharinfo(0);
- atcommand "@kick "+strcharinfo(0);
- detachrid;
- sleep 1000;
- query_sql( "UPDATE `char` SET `name` = '"+.@name$+"' WHERE `char_id` = "+.@char_id );
- end;
- }
- }
- }
- }
- close;
- OnInit:
- // cashpoint required.
- .cash_cost = 1000;
- end;
- }
- prontera,153,171,5 script Sex Changer 757,{
- mes "You need "+.cash_cost+" CashPoint to change sex.";
- if( #CASHPOINTS >= .cash_cost ){
- if( select( "Change SEX","Cancel" ) == 1 ){
- mes "Are you sure ????";
- if( select( "Yes, I'm sure","Cancel" ) == 1 ){
- #CASHPOINTS -= .cash_cost;
- changesex;
- }
- }
- }
- close;
- OnInit:
- // cashpoint required.
- .cash_cost = 1000;
- end;
- }
- prontera,155,171,4 script Uber Point Exchanger 757,{
- mes "i can exchange items using Uber Points.";
- next;
- .@item = select( .menu$ ) - 1;
- if( .cost[.@item] < #uber_points ){
- mes "You need "+.cost[.@item]+" uber points to buy "+.quantity[.@item]+"x "+getitemname( .item[.@item] );
- }else{
- mes "Confirm to buy these ?";
- mes "Item: "+.quantity[.@item]+"x "+getitemname( .item[.@item] );
- mes "Cost: "+.cost[.@item]+" uber points.";
- if( select( "Confirm","Cancel" ) == 1 ){
- #uber_points -= .cost[.@item];
- getitem .item[.@item],.quantity[.@item];
- mes "Done exchanged items.";
- }
- }
- close;
- OnInit:
- setarray .item,512,1607,608,501;
- setarray .quantity,2,5,10,40;
- setarray .cost,0,2,3,4;
- .item_size = getarraysize( .item );
- for( .@i = 0; .@i < .item_size; .@i++ )
- .menu$ = .menu$ + .quantity[.@i] +"x "+ getitemname( .item[.@i] ) +" = "+.cost[.@i]+" points" + ":";
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment