yuhsing

Untitled

Oct 18th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.45 KB | None | 0 0
  1. prontera,147,171,5 script Hannah 72,{
  2. mes "^0000FF[Hannah]^000000";
  3. mes "Hi,";
  4. mes "I can exchange your victory badges into my gold victory badges.";
  5. mes "The rate is 100x victory badges to 1x gold victory badge.";
  6. //mes "I can exchange "+.exchange_rate[0]+"x "+getitemname( .victory_badge )+" into "+.exchange_rate[1]+"x "+getitemname( .gold_victory_badge );
  7. next;
  8. mes "^0000FF[Hannah]^000000";
  9. .@count = countitem( .victory_badge );
  10. if( .@count >= .exchange_rate[0] ){
  11. mes "How many would you like to exchange?";
  12. input .@amount,0,.@count;
  13. if( .@amount >= .exchange_rate[0] ){
  14. .@amount = ( .@amount / .exchange_rate[0] );
  15.  
  16. .@total_gold_badge = countitem( .gold_victory_badge ) + ( .@amount * .exchange_rate[1] );
  17. if( .@total_gold_badge > 30000 ){
  18. next;
  19. mes "^0000FF[Hannah]^000000";
  20. mes "You can't carry more than 30,000 of one kind of item. Try putting some of your badges in storage.";
  21. close;
  22. }else if( !checkweight( .gold_victory_badge,( .@amount * .exchange_rate[1] ) ) ){
  23. mes "^0000FF[Hannah]^000000";
  24. mes "You can't hold "+( .@amount * .exchange_rate[1] )+" of "+getitemname( .gold_victory_badge );
  25. }else{
  26. next;
  27. mes "^0000FF[Hannah]^000000";
  28. mes "Done. Exchanged.";
  29. delitem .victory_badge,( .@amount * .exchange_rate[0] );
  30. getitem .gold_victory_badge,( .@amount * .exchange_rate[1] );
  31. close;
  32. }
  33. }else{
  34. mes "You need minimum of "+.exchange_rate[0]+" "+getitemname( .victory_badge );
  35. }
  36.  
  37. }else{
  38. mes "You need minimum of "+.exchange_rate[0]+" "+getitemname( .victory_badge );
  39. }
  40. close;
  41.  
  42. OnInit:
  43. // victory badge item id
  44. .victory_badge = 23020;
  45. // gold victory badge item id
  46. .gold_victory_badge = 23021;
  47.  
  48. // exchange rate. ( default 100 victory badge = 1 gold victory badge )
  49. setarray .exchange_rate,
  50. 100, // 100 victory badge
  51. 1; // 10 gold victory badge
  52. end;
  53. }
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. prontera,158,171,5 script Name Changer 757,{
  69. mes "You need "+.cash_cost+" CashPoint to change name";
  70. if( #CASHPOINTS >= .cash_cost ){
  71. if( select( "Change NAME","Cancel" ) == 1 ){
  72. if( getcharid(2) ){
  73. mes "You must leave your Guild if you wish to change name.";
  74. mes "This is to avoid incorrect informations to be stored in server.";
  75. close;
  76. }
  77. mes "Enter your NEW name.";
  78. do{
  79. input .@name$;
  80. .@length = getstrlen( .@name$ );
  81. if( .@length > 24 || .@length < 4 )
  82. message strcharinfo(0),"Name lenght must between 4 ~ 24 characters.";
  83. }while( .@length > 24 || .@length < 4 );
  84. .@name$ = escape_sql( .@name$ );
  85. query_sql( "SELECT 1 FROM `char` WHERE `name` = '"+.@name$+"'",.@dummy );
  86. if( .@dummy ){
  87. mes "Sorry, this Name alread exist.";
  88. }else{
  89. mes "Confirm change to "+.@name$+" ?";
  90. mes " ";
  91. mes "You will be disconnected to apply the changes.";
  92. if( select( "YES","Cancel" ) == 1 ){
  93. #CASHPOINTS -= .cash_cost;
  94. .@char_id = getcharid(0);
  95. .@char_name$ = strcharinfo(0);
  96. atcommand "@kick "+strcharinfo(0);
  97. detachrid;
  98. sleep 1000;
  99. query_sql( "UPDATE `char` SET `name` = '"+.@name$+"' WHERE `char_id` = "+.@char_id );
  100. end;
  101. }
  102. }
  103. }
  104. }
  105. close;
  106.  
  107. OnInit:
  108. // cashpoint required.
  109. .cash_cost = 1000;
  110. end;
  111. }
  112.  
  113.  
  114. prontera,153,171,5 script Sex Changer 757,{
  115. mes "You need "+.cash_cost+" CashPoint to change sex.";
  116. if( #CASHPOINTS >= .cash_cost ){
  117. if( select( "Change SEX","Cancel" ) == 1 ){
  118. mes "Are you sure ????";
  119. if( select( "Yes, I'm sure","Cancel" ) == 1 ){
  120. #CASHPOINTS -= .cash_cost;
  121. changesex;
  122. }
  123. }
  124. }
  125. close;
  126.  
  127. OnInit:
  128. // cashpoint required.
  129. .cash_cost = 1000;
  130. end;
  131. }
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142. prontera,155,171,4 script Uber Point Exchanger 757,{
  143.  
  144. mes "i can exchange items using Uber Points.";
  145. next;
  146. .@item = select( .menu$ ) - 1;
  147. if( .cost[.@item] < #uber_points ){
  148. mes "You need "+.cost[.@item]+" uber points to buy "+.quantity[.@item]+"x "+getitemname( .item[.@item] );
  149.  
  150. }else{
  151. mes "Confirm to buy these ?";
  152. mes "Item: "+.quantity[.@item]+"x "+getitemname( .item[.@item] );
  153. mes "Cost: "+.cost[.@item]+" uber points.";
  154. if( select( "Confirm","Cancel" ) == 1 ){
  155. #uber_points -= .cost[.@item];
  156. getitem .item[.@item],.quantity[.@item];
  157. mes "Done exchanged items.";
  158. }
  159.  
  160. }
  161. close;
  162.  
  163. OnInit:
  164. setarray .item,512,1607,608,501;
  165. setarray .quantity,2,5,10,40;
  166. setarray .cost,0,2,3,4;
  167.  
  168. .item_size = getarraysize( .item );
  169. for( .@i = 0; .@i < .item_size; .@i++ )
  170. .menu$ = .menu$ + .quantity[.@i] +"x "+ getitemname( .item[.@i] ) +" = "+.cost[.@i]+" points" + ":";
  171. end;
  172. }
Advertisement
Add Comment
Please, Sign In to add comment