Advertisement
Guest User

Quest

a guest
Oct 12th, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.70 KB | None | 0 0
  1. - shop quest_shop4 -1,502:0
  2. veins,208,199,4 script Flying Girl 611,{
  3. set @i,0;
  4. mes "[ Flying Girl ]";
  5. mes "I believe I can fly~";
  6. next;
  7. mes "[ Flying Girl ]";
  8. mes "Huch!";
  9. mes "Ich hab garnicht bermerkt, dass du da bist..."
  10. mes "Wie kann dir helfen?"
  11. next;
  12. switch(select("Du hast da was von fliegen gesungen...","Ach... Garnichts!")){
  13. case 1:
  14. mes "Ich dachte mir hoert keiner zu, wenn ich ein bisschsen singe...";
  15. next;
  16. mes "Seid ich mir meine Fluegel hergestellt habe, habe ich das Gefuehl, fliegen zu koennen";
  17. mes "Möchtest du das auch...?";
  18. next;
  19. mes "Ich mixxe dir gerne ein paar Fluegel, die bestimmt gut zu dir passen.";
  20. next;
  21. mes "In welcher Farbe moechtest du sie denn haben?";
  22. mes "Dir wird die Farm Liste angezeigt, wenn ihr die Zeny Anzahl dabei habt!
  23. callshop "quest_shop4",1;
  24. npcshopattach "quest_shop4";
  25. end;
  26.  
  27. case 2:
  28. close;
  29. }
  30. }
  31.  
  32. OnBuyItem:
  33. if(.BuildQuest4) {
  34. for(set .e,0; !compare(getarg(.e+1)+"", "Zeny"); set .e,.e+2) {}
  35. npcshopadditem "quest_shop4",getarg(.e+2),getarg(.e)*compare(getarg(.e+1),"SZeny");
  36. setarray .Shop[.i],getarg(.e+2);
  37. set .i,.i+1;
  38. goto Quest_Setup;
  39. }
  40. if(.Shop[@i]!=@bought_nameid) for(set @i,1; 1; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set .i,@i; callsub Quest_Setup; }
  41. for(set @i,1; !@e; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set @e,1; set .i,@i; callsub Quest_Setup; }
  42. mes "[ Flying Girl ]";
  43. mes "Ich benötige die folgenden Items:";
  44. for(set @i,0; !compare(getarg(@i+1),"Zeny"); set @i,@i+2) mes "^FF0000" + ((countitem(getarg(@i))>=getarg(@i+1))? "^00FF00":"") + "" + getarg(@i+1) + " " + getitemname(getarg(@i)) + " [" + countitem(getarg(@i)) + "/" + getarg(@i+1) + "]";
  45. if(getarg(@i)) mes "^FF0000" + ((Zeny>=getarg(@i))? "^00FF00":"") + "" + getarg(@i) + " Zeny";
  46. mes "^000000Im Gegenzug bekommst du:^0000FF";
  47. for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) mes getarg(@i+1) + " " + getitemname(getarg(@i));
  48. switch(select("Exchange:" + (((((getiteminfo(@bought_nameid,5) & 1) || (getiteminfo(@bought_nameid,5) & 256) || (getiteminfo(@bought_nameid,5) & 512)) && @equip==0))? "Preview Item":"") + ":No thanks")) {
  49. case 1:
  50. for(set @i,0; !compare(getarg(@i+1),"Zeny"); set @i,@i+2) if(countitem(getarg(@i)) < getarg(@i+1)) {
  51. next;
  52. mes "Du hast " + countitem(getarg(@i)) + " " + getitemname(getarg(@i)) + ", Ich brauche " + getarg(@i+1) + ".";
  53. mes "Bitte suche ^FF0000" + (getarg(@i+1)-countitem(getarg(@i))) + " " + getitemname(getarg(@i)) + "^000000.";
  54. close;
  55. }
  56. if(Zeny < getarg(@i)) {
  57. next;
  58. mes "Sie haben nicht genug Zeny.";
  59. close;
  60. }
  61. for(set @i,0; !compare(getarg(@i+1),"Zeny"); set @i,@i+2) delitem getarg(@i),getarg(@i+1);
  62. set Zeny,Zeny-getarg(@i);
  63. for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) getitem getarg(@i),getarg(@i+1);
  64. if (compare(getarg(@i,0),"announce")) announce strcharinfo(0) + " hat ein " + getitemname(@bought_nameid) + "! Quest in Ayothaya",bc_all;
  65. close;
  66. case 2:
  67. set @bottomview, getlook(3);
  68. set @topview, getlook(4);
  69. set @midview, getlook(5);
  70. addtimer 1000, strnpcinfo(3)+"::On_Leave";
  71. set @equip,getiteminfo(@bought_nameid, 5);
  72. set @view, getiteminfo(@bought_nameid, 11);
  73. if(@equip != -1 && @view > 0) {
  74. if(@equip & 1) atcommand "@changelook 3 " + @view;
  75. if(@equip & 256) atcommand "@changelook 1 " + @view;
  76. if(@equip & 512) atcommand "@changelook 2 " + @view;
  77. }
  78. next;
  79. goto OnBuyItem;
  80. case 3:
  81. close;
  82. }
  83. On_Leave:
  84. atcommand "@changelook 1 " + @topview;
  85. atcommand "@changelook 2 " + @midview;
  86. atcommand "@changelook 3 " + @bottomview;
  87. set @equip,0;
  88. set @view,0;
  89. set @topview,0;
  90. set @midview,0;
  91. set @bottomview,0;
  92. end;
  93. OnInit:
  94. npcshopitem "quest_shop4",0,0;
  95. waitingroom "Animated Angel Wings",0;
  96. set .BuildQuest4,1;
  97. set .i,1;
  98. Quest_Setup:
  99.  
  100. switch(.i) {
  101. default: set .BuildQuest4,0; set .e,0; set .i,0; end;
  102. case 1: callsub OnBuyItem,7063,100,949,100,7441,100,7101,100,983,3,10000000,"SZeny",20141,1,"announce";
  103. case 2: callsub OnBuyItem,7063,100,949,100,7441,100,7101,100,978,3,10000000,"SZeny",20142,1,"announce";
  104. case 3: callsub OnBuyItem,7063,100,949,100,7441,100,7101,100,978,3,10000000,"SZeny",20143,1,"announce";
  105. case 4: callsub OnBuyItem,7063,100,949,100,7441,100,7101,100,976,3,10000000,"SZeny",20144,1,"announce";
  106. case 5: callsub OnBuyItem,7063,100,949,100,7441,100,7101,100,979,3,10000000,"SZeny",20145,1,"announce";
  107. case 6: callsub OnBuyItem,7063,100,949,100,7441,100,7101,100,981,3,10000000,"SZeny",20146,1,"announce";
  108. case 7: callsub OnBuyItem,7063,100,949,100,7441,100,7101,100,975,3,10000000,"SZeny",20147,1,"announce";
  109.  
  110. }
  111. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement