Advertisement
Guest User

Untitled

a guest
Oct 3rd, 2011
612
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.81 KB | None | 0 0
  1. function questGirlTurnInPopUp(ok:int, cancel:int, girlTotal:int, topString:String, itemsKept:Boolean, classCheck11:String, stat11:int, classCheck12:String, stat12:int, posNeg1:Boolean, classCheck21:String, stat21:int, classCheck22:String, stat22:int, posNeg2:Boolean, classCheck31:String, stat31:int, classCheck32:String, stat32:int, posNeg3:Boolean, classCheck41:String, stat41:int, classCheck42:String, stat42:int, posNeg4:Boolean, effectType:Boolean, effect1:String, effect2:String, effect3:String, effect4:String, allorone:Boolean, special:int) {
  2. var eventNum:int = new int(0);//number returned to trigger next event
  3. var hoopX:int = new int(175);
  4. var hoopY:int = new int(150);
  5. var hoopYSpacing = new int(75);
  6. var hoopIndex = new int(numChildren - 1);
  7. var topIndex = new int(numChildren - 1);
  8. var nameWidth = new int(60);
  9. var nameHeight = new int(20);
  10.  
  11. var cycleX:int = new int(260);
  12. var cycleY:int = new int(150);
  13. var cycleSpace:int = new int(200);
  14. var cycleWidth:int = new int(80);
  15. var questBelowButtonSpace:int = new int(60);
  16.  
  17. hidePeople();
  18. cleanCharPopUpArray();
  19. Player.charPopUpGirlTotal = girlTotal;
  20. Player.charPopUpItemsKept = itemsKept;
  21.  
  22. Player.charPopUpClassCheck11 = classCheck11;
  23. Player.charPopUpClassCheck12 = classCheck12;
  24. Player.charPopUpstat11 = stat11;
  25. Player.charPopUpstat12 = stat12;
  26. Player.charPopUpposNeg1 = posNeg1;
  27.  
  28. Player.charPopUpClassCheck21 = classCheck21;
  29. Player.charPopUpClassCheck22 = classCheck22;
  30. Player.charPopUpstat21 = stat21;
  31. Player.charPopUpstat22 = stat22;
  32. Player.charPopUpposNeg2 = posNeg2;
  33.  
  34. Player.charPopUpClassCheck31 = classCheck31;
  35. Player.charPopUpClassCheck32 = classCheck32;
  36. Player.charPopUpstat31 = stat31;
  37. Player.charPopUpstat32 = stat32;
  38. Player.charPopUpposNeg3 = posNeg3;
  39.  
  40. Player.charPopUpClassCheck41 = classCheck41;
  41. Player.charPopUpClassCheck42 = classCheck42;
  42. Player.charPopUpstat41 = stat41;
  43. Player.charPopUpstat42 = stat42;
  44. Player.charPopUpposNeg4 = posNeg4;
  45.  
  46. Player.charPopUpEffectType = effectType;//true if effect, false if items
  47. Player.charPopUpEffect1 = effect1;
  48. Player.charPopUpEffect2 = effect2;
  49. Player.charPopUpEffect3 = effect3;
  50. Player.charPopUpEffect4 = effect4;
  51. Player.charPopUpSpecial = special;
  52. Player.charPopUpallorOne = allorone;
  53.  
  54. Player.charPopUpSpecial = special;
  55. Player.charPopUpOk = ok;
  56. Player.charPopUpCancel = cancel;
  57.  
  58. //PU 0 add Button
  59. popUpArrayBuilderAddAll(QuestAddButton, cycleX, cycleY + questBelowButtonSpace, -1, -1, topIndex - 6);
  60. popUpArrayBuilder[popUpArrayBuilder.length - 1].addEventListener(MouseEvent.CLICK, questAddGirlButtonClick);
  61.  
  62. //PU 1 Remove Button
  63. popUpArrayBuilderAddAll(QuestRemoveButton, cycleX + cycleSpace, cycleY + questBelowButtonSpace, -1, -1, topIndex - 5);
  64. popUpArrayBuilder[popUpArrayBuilder.length - 1].alpha = .6;
  65.  
  66. //PU 2 Blank Background
  67. popUpArrayBuilderAddAll(BlankBackground, 0, 0, 800, 600, topIndex - 11);
  68. popUpArrayBuilder[popUpArrayBuilder.length - 1].alpha = .6;
  69.  
  70. //PU 3 SlideShowBackground
  71. popUpArrayBuilderAddAll(SlideShowBackGround, 155, 100, -1, -1, topIndex - 100);
  72.  
  73. questHoop1.x = hoopX;
  74. questHoop1.y = hoopY;
  75. questHoop1.visible = true;
  76. setChildIndex(questHoop1, hoopIndex);
  77.  
  78. popUpLabel10.visible = true;
  79. popUpLabel10.x = hoopX;
  80. popUpLabel10.y = hoopY + (hoopYSpacing * 1) - 20;
  81. popUpLabel10.htmlText = "No Girl";
  82. popUpLabel10.width = nameWidth;
  83. popUpLabel10.height = nameHeight;
  84. setChildIndex(popUpLabel10, hoopIndex);
  85.  
  86. if (girlTotal > 1) {
  87. questHoop2.x = hoopX;
  88. questHoop2.y = hoopY+ hoopYSpacing;
  89. questHoop2.visible = true;
  90. setChildIndex(questHoop2, hoopIndex);
  91. }
  92. else {
  93. questHoopRedLine2.x = hoopX;
  94. questHoopRedLine2.y = hoopY+ hoopYSpacing;
  95. questHoopRedLine2.visible = true;
  96. setChildIndex(questHoopRedLine2, hoopIndex);
  97. }
  98.  
  99. popUpLabel11.visible = true;
  100. popUpLabel11.x = hoopX;
  101. popUpLabel11.y = hoopY + (hoopYSpacing * 2) - 20;
  102. popUpLabel11.htmlText = "No Girl";
  103. popUpLabel11.width = nameWidth;
  104. popUpLabel11.height = nameHeight;
  105. setChildIndex(popUpLabel11, hoopIndex);
  106.  
  107. if (girlTotal > 2) {
  108. questHoop3.x = hoopX;
  109. questHoop3.y = hoopY + (hoopYSpacing * 2);
  110. questHoop3.visible = true;
  111. setChildIndex(questHoop3, hoopIndex);
  112. }
  113. else {
  114. questHoopRedLine3.x = hoopX;
  115. questHoopRedLine3.y = hoopY + (hoopYSpacing * 2);
  116. questHoopRedLine3.visible = true;
  117. setChildIndex(questHoopRedLine3, hoopIndex);
  118. }
  119.  
  120. popUpLabel12.visible = true;
  121. popUpLabel12.x = hoopX;
  122. popUpLabel12.y = hoopY + (hoopYSpacing * 3) - 20;
  123. popUpLabel12.htmlText = "No Girl";
  124. popUpLabel12.width = nameWidth;
  125. popUpLabel12.height = nameHeight;
  126. setChildIndex(popUpLabel12, hoopIndex);
  127.  
  128. if (girlTotal > 3) {
  129. questHoop4.x = hoopX;
  130. questHoop4.y = hoopY+ (hoopYSpacing * 3);
  131. questHoop4.visible = true;
  132. setChildIndex(questHoop4, hoopIndex);
  133. }
  134. else {
  135. questHoopRedLine4.x = hoopX;
  136. questHoopRedLine4.y = hoopY + (hoopYSpacing * 3);
  137. questHoopRedLine4.visible = true;
  138. setChildIndex(questHoopRedLine4, hoopIndex);
  139. }
  140.  
  141. popUpLabel13.visible = true;
  142. popUpLabel13.x = hoopX;
  143. popUpLabel13.y = hoopY + (hoopYSpacing * 4) - 20;
  144. popUpLabel13.htmlText = "No Girl";
  145. popUpLabel13.width = nameWidth;
  146. popUpLabel13.height = nameHeight;
  147. setChildIndex(popUpLabel13, hoopIndex);
  148.  
  149. var buttonX:int = new int(550);
  150. var buttonY:int = new int(350);
  151. var buttonYSpacing:int = new int(50);
  152.  
  153. questOkButton.visible = true;
  154. setChildIndex(questOkButton, topIndex - 9);
  155. questOkButton.alpha = .6;
  156. questOkButton.x = buttonX;
  157. questOkButton.y = buttonY;
  158.  
  159. questCancelButton.visible = true;
  160. setChildIndex(questCancelButton, topIndex - 8);
  161. questCancelButton.x = buttonX;
  162. questCancelButton.y = buttonY + buttonYSpacing;
  163. questCancelButton.addEventListener(MouseEvent.CLICK, cancelPopUpClick);
  164.  
  165. popUpLabel1.visible = true;
  166. popUpLabel1.x = hoopX - 15;
  167. popUpLabel1.y = hoopY - 40;
  168. popUpLabel1.width = 600;
  169. popUpLabel1.htmlText = "<font size = '24'>" + topString;
  170. setChildIndex(popUpLabel1, hoopIndex);
  171.  
  172. questCycleLeft.visible = true;
  173. questCycleLeft.x = cycleX;
  174. questCycleLeft.y = cycleY;
  175. questCycleLeft.width = cycleWidth;
  176. questCycleLeft.addEventListener(MouseEvent.CLICK, cycleLeftPopUp);
  177. setChildIndex(questCycleLeft, topIndex - 7);
  178.  
  179. questCycleRight.visible = true;
  180. questCycleRight.x = cycleX + cycleSpace;
  181. questCycleRight.y = cycleY;
  182. questCycleRight.width = cycleWidth;
  183. questCycleRight.addEventListener(MouseEvent.CLICK, cycleRightPopUp);
  184. setChildIndex(questCycleRight, hoopIndex);
  185.  
  186. popUpLabel2.visible = true;
  187. popUpLabel2.x = cycleX+ (cycleSpace /2 ) + 10;
  188. popUpLabel2.y = cycleY + questBelowButtonSpace;
  189. popUpLabel2.width = nameWidth;
  190. popUpLabel2.height = nameHeight;
  191. setChildIndex(popUpLabel2, hoopIndex);
  192.  
  193. popUpLabel3.visible = true;
  194. popUpLabel3.x = cycleX;
  195. popUpLabel3.y = hoopY + (hoopYSpacing * 2) - 20;
  196. popUpLabel3.width = 290;
  197. popUpLabel3.height = 30;
  198. popUpLabel3.htmlText = "Required Check:";
  199. setChildIndex(popUpLabel3, hoopIndex);
  200.  
  201. popUpLabel4.visible = true;
  202. popUpLabel4.x = cycleX;
  203. popUpLabel4.y = hoopY + (hoopYSpacing * 2);
  204. popUpLabel4.width = 290;
  205. popUpLabel4.height = 30;
  206. popUpLabel4.htmlText = "check text";
  207. setChildIndex(popUpLabel4, hoopIndex);
  208.  
  209. popUpLabel5.visible = true;
  210. popUpLabel5.x = cycleX;
  211. popUpLabel5.y = hoopY + (hoopYSpacing * 2) + 20;
  212. popUpLabel5.width = 290;
  213. popUpLabel5.height = 30;
  214. popUpLabel5.htmlText = "check text";
  215. setChildIndex(popUpLabel5, hoopIndex);
  216.  
  217. popUpLabel6.visible = true;
  218. popUpLabel6.x = cycleX;
  219. popUpLabel6.y = hoopY + (hoopYSpacing * 3) - 20;
  220. popUpLabel6.width = 290;
  221. popUpLabel6.height = 30;
  222. popUpLabel6.htmlText = "Other Requirments:";
  223. setChildIndex(popUpLabel6, hoopIndex);
  224.  
  225. popUpLabel7.visible = true;
  226. popUpLabel7.x = cycleX;
  227. popUpLabel7.y = hoopY + (hoopYSpacing * 3);
  228. popUpLabel7.width = 290;
  229. popUpLabel7.height = 30;
  230. popUpLabel7.htmlText = "check text";
  231. setChildIndex(popUpLabel7, hoopIndex);
  232.  
  233. popUpLabel8.visible = true;
  234. popUpLabel8.x = cycleX;
  235. popUpLabel8.y = hoopY + (hoopYSpacing * 3) + 20;
  236. popUpLabel8.width = 290;
  237. popUpLabel8.height = 30;
  238. popUpLabel8.htmlText = "check text";
  239. setChildIndex(popUpLabel8, hoopIndex);
  240.  
  241. popUpLabel9.visible = true;
  242. popUpLabel9.x = cycleX - 30;
  243. popUpLabel9.y = hoopY + (hoopYSpacing * 4) - 20;
  244. popUpLabel9.width = 300;
  245. popUpLabel9.height = 30;
  246. setChildIndex(popUpLabel9, hoopIndex);
  247. if (Player.charPopUpItemsKept == true) {
  248. popUpLabel9.htmlText = "<font size = '18'>You will keep the girls equipped items.";
  249. }
  250. else {
  251. popUpLabel9.x = cycleX + 20;
  252. popUpLabel9.htmlText = "<font size = '18'>Items are <b>LOST</b> on turn in.";
  253. }
  254. var itemEffectWidth:int = new int(140);
  255. popUpLabel20.visible = true;
  256. popUpLabel20.x = cycleX + 150;
  257. popUpLabel20.y = hoopY + (hoopYSpacing * 2) - 20;
  258. popUpLabel20.width = 100;
  259. popUpLabel20.height = 30;
  260. setChildIndex(popUpLabel20, hoopIndex);
  261. if (Player.charPopUpEffectType == true) {
  262. popUpLabel20.htmlText = "Effect Required:";
  263. }
  264. else {
  265. popUpLabel20.htmlText = "Item Required:";
  266. }
  267. popUpLabel21.visible = true;
  268. popUpLabel21.x = cycleX + 150;
  269. popUpLabel21.y = hoopY + (hoopYSpacing * 2);
  270. popUpLabel21.width = itemEffectWidth;
  271. popUpLabel21.height = 30;
  272. if (questEffectPopUpCheck()) {
  273. popUpLabel21.htmlText = questPopUpTextEffectorItem(1);
  274. }
  275. else {
  276. popUpLabel21.htmlText = "<font color = '#FF0000'>" + questPopUpTextEffectorItem(1) + "<font color = '#00000'>";
  277. }
  278. setChildIndex(popUpLabel21, hoopIndex);
  279.  
  280. popUpLabel22.visible = true;
  281. popUpLabel22.x = cycleX + 150;
  282. popUpLabel22.y = hoopY + (hoopYSpacing * 2) + 20;
  283. popUpLabel22.width = itemEffectWidth;
  284. popUpLabel22.height = 30;
  285. if (questEffectPopUpCheck()) {
  286. popUpLabel22.htmlText = questPopUpTextEffectorItem(2);
  287. }
  288. else {
  289. popUpLabel21.htmlText = "<font color = '#FF0000'>" + questPopUpTextEffectorItem(2) + "<font color = '#00000'>";
  290. }
  291. setChildIndex(popUpLabel22, hoopIndex);
  292.  
  293. popUpLabel23.visible = true;
  294. popUpLabel23.x = cycleX + 150;
  295. popUpLabel23.y = hoopY + (hoopYSpacing * 2) + 40;
  296. popUpLabel23.width = itemEffectWidth;
  297. popUpLabel23.height = 30;
  298. if (questEffectPopUpCheck()) {
  299. popUpLabel23.htmlText = questPopUpTextEffectorItem(3);
  300. }
  301. else {
  302. popUpLabel21.htmlText = "<font color = '#FF0000'>" + questPopUpTextEffectorItem(3) + "<font color = '#00000'>";
  303. }
  304. setChildIndex(popUpLabel23, hoopIndex);
  305.  
  306. popUpLabel24.visible = true;
  307. popUpLabel24.x = cycleX + 150;
  308. popUpLabel24.y = hoopY + (hoopYSpacing * 2) + 60;
  309. popUpLabel24.width = itemEffectWidth;
  310. popUpLabel24.height = 30;
  311. if (questEffectPopUpCheck()) {
  312. popUpLabel24.htmlText = questPopUpTextEffectorItem(4);
  313. }
  314. else {
  315. popUpLabel21.htmlText = "<font color = '#FF0000'>" + questPopUpTextEffectorItem(4) + "<font color = '#00000'>";
  316. }
  317. setChildIndex(popUpLabel24, hoopIndex);
  318. if(cPlayer.GameArray[whatGirl] == null) {
  319. return;
  320. }
  321. updatePopUp();
  322. }
  323.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement