Advertisement
Guest User

Untitled

a guest
Apr 10th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. //===== rAthena Script =======================================
  2. //= Item Bound Script
  3. //===== By: ==================================================
  4. //= Akinari
  5. //===== Compatible With: =====================================
  6. //= Revision 17351+ (rAthena Only)
  7. //===== Description: =========================================
  8. //= Item Bound Script
  9. //= Allows users to pay a price to make an item bound to
  10. //= Account, Character, or Guild
  11. //============================================================
  12.  
  13. prontera,144,174,4 script Bound Items 429,{
  14.  
  15. mes "I can bind your items to your account, guild, or character"+((.bindprice)?" for a ^0000FF"+.bindprice+"^000000 zeny fee":"")+".";
  16. next;
  17. mes "With this, you can rest assured your items are safe.";
  18. mes "What would you like to do?";
  19. next;
  20. if(select("Bind") == 1) {
  21. if(zeny < .bindprice) {
  22. mes "You don't have enough zeny to bind an item.";
  23. close;
  24. }
  25. mes "What kind of bind?";
  26. .@boundtype = 1 << (select("Account:Guild:Character")-1);
  27. if(.@boundtype == 2 && (!getcharid(2) || getguildmaster(getcharid(2)) != strcharinfo(0))) {
  28. mes "In order for me to bind an item to a guild you must be the master of one.";
  29. close;
  30. }
  31. getinventorylist();
  32. for(.@i = 0; .@i < @inventorylist_count; .@i++) {
  33. //We only show the items that you allow to be bound
  34. //Allows equipment (default)
  35. if(@inventorylist_bound[.@i])
  36. continue;
  37. if(((.allowbind & 1) && (getiteminfo(@inventorylist_id[.@i],2) == (4|5))) ||
  38. ((.allowbind & 2) && (getiteminfo(@inventorylist_id[.@i],2) == (0|2|11|18))) ||
  39. ((.allowbind & 4) && (getiteminfo(@inventorylist_id[.@i],2) == (3|6|7|8|10)))
  40. ) {
  41. set .@bindlist$, .@bindlist$ + ":" + getitemname(@inventorylist_id[.@i]) + " - " + @inventorylist_id[.@i];
  42. set .@bindlist[.@j],.@i;
  43. .@j++;
  44. }
  45. }
  46. .@item = .@bindlist[select(.@bindlist$)-2];
  47. mes "Before I continue, I want you to know I can't tell the difference between multiple items. If you have a specific item you want bounded, please remove any duplicates from inventory.";
  48. next;
  49. if(select("I understand, continue:Wait a minute") == 2) {
  50. mes "I'll be here when you're ready.";
  51. close;
  52. }
  53. mes "Are you sure you'd like to bind your "+ getitemname(@inventorylist_id[.@item]) +" to your "+.boundtypes$[.@boundtype]+"?";
  54. next;
  55. if(select("Yes:No") == 1) {
  56. zeny -= .bindprice;
  57. delitem2 @inventorylist_id[.@item],@inventorylist_amount[.@item],@inventorylist_identify[.@item],@inventorylist_refine[.@item],@inventorylist_attribute[.@item],@inventorylist_card1[.@item],@inventorylist_card2[.@item],@inventorylist_card3[.@item],@inventorylist_card4[.@item];
  58. getitembound2 @inventorylist_id[.@item],@inventorylist_amount[.@item],@inventorylist_identify[.@item],@inventorylist_refine[.@item],@inventorylist_attribute[.@item],@inventorylist_card1[.@item],@inventorylist_card2[.@item],@inventorylist_card3[.@item],@inventorylist_card4[.@item],.@boundtype;
  59. mes "All done!";
  60. if(.logbinds)
  61. logmes "Bound "+ @inventorylist_amount[.@item]+" "+@inventorylist_id[.@item]+" as "+.boundtypes$[.@boundtype]+" type.";
  62. }
  63. }
  64. close;
  65.  
  66. OnInit:
  67. //* Configuration *\\
  68. //Price
  69. .bindprice = 2500;
  70.  
  71. //What to allow to be bound - Add as necessary
  72. //1 = Equipment - 2 = Consumables - 4 = Etc
  73. .allowbind = 1;
  74.  
  75. //Log binds via NPC?
  76. .logbinds = 1;
  77.  
  78. //Other stuff
  79. .boundtypes$[1] = "account";
  80. .boundtypes$[2] = "guild";
  81. .boundtypes$[4] = "character";
  82. end;
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement