Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.62 KB | None | 0 0
  1. var objtype := 0;
  2. var plan := 0;
  3. var amounts;
  4. var j := 0;
  5. var i := 0;
  6. var godly := 0;
  7. var glorious := 0;
  8. var greater := 0;
  9. var good := 0;
  10. var lesser := 0;
  11. var mat_names;
  12. var materials;
  13. var plan_name := "Guggi";
  14. var godlyhouses := {0xD8A2, 0x6024, 0xd8a1, 0xd8a2 };
  15. var glorioushouses := {0x6023, 0xd8a5, 0xd8af};
  16. var greaterhouses := {0x6021, 0x6022, 0xd8a6, 0xd8a7, 0xd8b3, 0xd8b4};
  17. var goodhouses := {0x6020, 0x6026, 0xd8a3, 0xd8a4, 0xd8a8, 0xd8aa, 0xd8ab, 0xd8ae, 0xd8b0, 0xd8b1};
  18. var lesserhouses := {0x6019, 0x601A, 0x601B, 0x601C, 0x601D, 0x601e, 0xd8a9, 0xd8ac, 0xd8ad, 0xd8b2};
  19.  
  20. var px := who.x, py := who.y;
  21.  
  22. for(i := 0; i <= amt-1; i := i +1)
  23. if(scrolls.amount < 1)
  24. SendSysMessage(who, "You dont have enough blank scrolls");
  25. return 0;
  26. else
  27. SubtractAmount(scrolls,1);
  28. PlaySoundEffect(who, 0x24a);
  29. PrintTextAbovePrivate( who, "You start drawing..", who, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
  30. SleepMS(2500);
  31. if((px != who.x) OR (py != who.y))
  32. SendSysMessage(who, "You move and stop drawing.");
  33. return;
  34. endif
  35. PrintTextAbovePrivate( who, "Calculating costs..", who, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
  36. SleepMS(2500);
  37. if((px != who.x) OR (py != who.y))
  38. SendSysMessage(who, "You move and stop drawing.");
  39. return;
  40. endif
  41.  
  42. PrintTextAbovePrivate( who, "Finalizing drawing..", who, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
  43. SleepMS(2500);
  44. if((px != who.x) OR (py != who.y))
  45. SendSysMessage(who, "You move and stop drawing.");
  46. return;
  47. endif
  48.  
  49. var number := RandomInt(301);
  50. var success := 1;
  51.  
  52. var boats := {0x6028, 0x6027, 0x6029, 0x602A, 0x602B, 0x602C};
  53.  
  54. if(who.cmdlevel > 1)
  55. number := 163;
  56. endif
  57. if(number == 163)
  58. var number2 := RandomInt(101);
  59. if(number2 <=25)
  60. var number3 := RandomInt(3);
  61. if((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 100)
  62. number3 := RandomInt(6) +1;
  63. objtype := boats[number3];
  64. elseif((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 85)
  65. number3 := RandomInt(4) +1;
  66. objtype := boats[number3];
  67. elseif((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 70)
  68. number3 := RandomInt(2) +1;
  69. objtype := boats[number3];
  70. else
  71. PrintTextAbovePrivate( who, "You fail at making the plan", who, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
  72. success := 0;
  73. endif
  74. else
  75. var number3 := RandomInt(224);
  76. if((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 125)
  77. number3 := RandomInt(401);
  78. elseif((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 120)
  79. number3 := Randomint(400);
  80. elseif((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 115)
  81. number3 := Randomint(380);
  82. elseif((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 110)
  83. number3 := Randomint(340);
  84. elseif((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 105 )
  85. number3 := Randomint(224);
  86. else
  87. PrintTextAbovePrivate( who, "You fail at making the plan", who, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
  88. success := 0;
  89. endif
  90. if(number3 == 400) // 125
  91. var number4 := RandomInt(101);
  92. if(number4 > 5)
  93. var rnumber := RandomInt(godlyhouses.size());
  94. objtype := godlyhouses[rnumber+1];
  95. else
  96. objtype := 0x6025;
  97. endif
  98. elseif(number3 >= 380) // 120
  99. var rnumber := RandomInt(glorioushouses.size());
  100. objtype := glorioushouses[rnumber+1];
  101. elseif(number3 >= 339) // 110
  102. var rnumber := RandomInt(greaterhouses.size());
  103. objtype := greaterhouses[rnumber+1];
  104. elseif(number3 >= 224) // 90
  105. var rnumber := RandomInt(goodhouses.size());
  106. objtype := goodhouses[rnumber+1];
  107. else // 70
  108. var rnumber := RandomInt(lesserhouses.size());
  109. objtype := lesserhouses[rnumber+1];
  110. endif
  111. endif
  112. if(success == 1)
  113. plan := CreateItemInBackpack(who, 0x875, 1);
  114. plan_name := cfg_plans[objtype]."Name";
  115.  
  116. if(objtype == 0x6019 || objtype == 0x601A || objtype == 0x601B || objtype == 0x601C || objtype == 0x601D || objtype == 0x601e || objtype == 0xd8ac) // small houses
  117. materials := { 0x879, 0x884, 0x876, 0x880, 0x9031, 0x1BD7, 0x102F, "anyingot", "anylog"};
  118. mat_names := {"house walls", "roof deed", "cement bags", "wooden door", "iron ingots", "boards", "nail boxes", "colored ingots", "colored logs"};
  119. amounts := { 4, 1, 40, 1, 1000, 3000, 1, 200, 200};
  120. elseif(objtype == 0xd8b2) // Tree house
  121. materials := { 0x879, 0x884, 0x876, 0x880, 0x1BD7, 0x102F, "anyingot", "anylog"};
  122. mat_names := {"house walls", "roof deed", "cement bags", "wooden door", "boards", "nail boxes", "colored ingots", "colored logs"};
  123. amounts := { 4, 1, 40, 1, 3000, 1, 180, 180};
  124. elseif(objtype == 0xd8ad || objtype == 0xd8a9) // Outpost and plaster residence
  125. materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, 0x885, "anyingot", "anylog"};
  126. mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "stair", "colored ingots", "colored logs"};
  127. amounts := { 8, 80, 2, 5500, 1500, 2, 1, 400, 400};
  128. elseif(objtype == 0xd8ae) // Small tower
  129. materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, 0x885, "anyingot", "anylog"};
  130. mat_names := {"house walls", "cement bags", "wooden door", "boards", "iron ingots", "nail boxes", "stairs", "colored ingots", "colored logs"};
  131. amounts := { 8, 80, 1, 2000, 2000, 2, 3, 400, 400};
  132. elseif(objtype == 0xd8a4) // Stone gatehouse
  133. materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, "anyingot", "anylog"};
  134. mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "colored ingots", "colored logs"};
  135. amounts := { 9, 96, 2, 6000, 2000, 2, 2, 450, 450};
  136. elseif(objtype == 0xd8aa) // Sandstone house
  137. materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, "anyingot", "anylog"};
  138. mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "colored ingots", "colored logs"};
  139. amounts := { 10, 100, 3, 7000, 3000, 2, 2, 500, 500};
  140. elseif(objtype == 0xd8ab) // Sandstone residence
  141. materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, "anyingot", "anylog"};
  142. mat_names := {"house walls", "cement bags", "metal door", "boards", "iron ingots", "nail boxes", "stair", "colored ingots", "colored logs"};
  143. amounts := { 10, 100, 1, 7000, 3000, 2, 1, 500, 500};
  144. elseif(objtype == 0xd8a3) //Domvilla
  145. materials := { 0x879, 0x876, 0x877, 0x880 , 0x1BD7, 0x9031, 0x102F, 0x885, "anyingot", "anylog"};
  146. mat_names := {"house walls", "cement bags", "metal doors", "wooden door", "boards", "iron ingots", "nail boxes", "stairs", "colored ingots", "colored logs"};
  147. amounts := { 8, 120, 2, 1, 2000, 2000, 2, 3, 400, 400};
  148. elseif(objtype == 0xd8a8) // Merchant shop
  149. materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
  150. mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
  151. amounts := { 10, 120, 3, 7000, 4000, 2, 600, 600};
  152. elseif(objtype == 0x6026) // Large patio house
  153. materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
  154. mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
  155. amounts := { 12, 126, 5, 6600, 3500, 3, 660, 660};
  156. elseif(objtype == 0x6020 || objtype == 0xd8b0) // Large brick house and large brick house east
  157. materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
  158. mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
  159. amounts := { 12, 120, 4, 6500, 3400, 3, 650, 650};
  160. elseif(objtype == 0xd8b4) // Two story large brick house
  161. materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, 0x885, "anyingot", "anylog"};
  162. mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "stair", "colored ingots", "colored logs"};
  163. amounts := { 16, 130, 4, 7000, 4000, 3, 1, 800, 800};
  164. elseif(objtype == 0xd8a6) // Large log cabin
  165. materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x102F, 0x885, "anyingot", "anylog"};
  166. mat_names := {"house walls", "cement bags", "wooden doors", "boards", "nail boxes", "stairs", "colored ingots", "colored logs"};
  167. amounts := { 20, 150, 3, 19000, 5, 2, 1000, 1000};
  168. elseif(objtype == 0xd8b1) // Five story estate
  169. materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x7055, 0x7057, "anyingot", "anylog"};
  170. mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
  171. amounts := { 26, 182, 3, 9000, 5000, 5, 5, 300, 300, 200, 100, 100, 20, 100, 20, 1000, 1000};
  172. elseif(objtype == 0xd8a7) // Marble hacienda
  173. materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9048, 0x9049, 0x904A, 0x7055, 0x7057, "anyingot", "anylog"};
  174. mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stair", "topaz ingots", "augite ingots", "hematite ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
  175. amounts := { 16, 160, 4, 7000, 1000, 3, 1, 200, 200, 100, 100, 20, 800, 800};
  176. elseif(objtype == 0xd8b3) // Two story patio house
  177. materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x7055, 0x7057, "anyingot", "anylog"};
  178. mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "stair", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
  179. amounts := { 20, 182, 6, 12000, 8000, 5, 1, 300, 300, 200, 120, 120, 30, 100, 20, 1000, 1000};
  180. elseif(objtype == 0x6022 || objtype == 0x6021) // Two story stone and plaster house and Two story wood and plaster house
  181. materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x7055, 0x7057, "anyingot", "anylog"};
  182. mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "stair", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
  183. amounts := { 18, 190, 4, 10000, 7000, 5, 1, 300, 300, 200, 120, 120, 30, 100, 20, 1000, 1000};
  184. elseif(objtype == 0xd8a5) // Small castle
  185. materials := { 0x879, 0x876, 0x880, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x904D, 0x7055, 0x7057, "anyingot", "anylog"};
  186. mat_names := {"house walls", "cement bags", "wooden doors", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "corundum ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
  187. amounts := { 40, 250, 3, 2, 10000, 10000, 5, 2, 400, 350, 250, 200, 200, 100, 40, 200, 80, 2000, 2000};
  188. elseif(objtype == 0xd8af) // Brick basement
  189. materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x904D, 0x7055, 0x7057, "anyingot", "anylog"};
  190. mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "corundum ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
  191. amounts := { 50, 280, 5, 10000, 12000, 7, 3, 400, 350, 300, 300, 300, 100, 100, 250, 100, 2500, 2500};
  192. elseif(objtype == 0x6023) // Tower
  193. materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x904D, 0x7055, 0x7057, "anyingot", "anylog"};
  194. mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "corundum ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
  195. amounts := { 50, 280, 3, 10000, 12000, 7, 3, 400, 350, 300, 300, 300, 100, 100, 250, 100, 2500, 2500};
  196. elseif(objtype == 0xd8a1) // Hacienda
  197. materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x904D, 0x904E, 0x7055, 0x7057, "anyingot", "anylog"};
  198. mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "corundum ingots", "nexus ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
  199. amounts := { 60, 320, 16, 12000, 14000, 7, 1, 600, 500, 450, 400, 350, 200, 150, 50, 400, 150, 3000, 3000};
  200. elseif(objtype == 0x6024) // Keep
  201. materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x904D, 0x904E, 0x7055, 0x7057, "anyingot", "anylog"};
  202. mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "corundum ingots", "nexus ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
  203. amounts := { 90, 480, 2, 18000, 21000, 10, 5, 900, 750, 675, 600, 450, 300, 225, 100, 600, 225, 4500, 4500};
  204. elseif(objtype == 0xd8a2) // Arena
  205. materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x904D, 0x904E, 0x7055, 0x7057, "anyingot", "anylog"};
  206. mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "corundum ingots", "nexus ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
  207. amounts := { 60, 500, 4, 12000, 14000, 7, 4, 600, 500, 450, 400, 350, 200, 150, 50, 400, 150, 3000, 3000};
  208. elseif(objtype == 0x6025) // G-castle
  209. materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x904D, 0x904E, 0x7055, 0x7057, "anyingot", "anylog"};
  210. mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "corundum ingots", "nexus ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
  211. amounts := { 135, 720, 8, 27000, 31500, 15, 2, 1350, 1125, 1000, 900, 700, 450, 350, 200, 900, 350, 6750, 6750};
  212. elseif(objtype == 0x6027) // Small boat
  213. materials := { 0x881, 0x883, 0x882, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
  214. mat_names := {"boat decks", "Sail deed", "Tiller deed", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
  215. amounts := { 8, 1, 1 , 3000, 1500, 2, 150, 300};
  216. elseif(objtype == 0x6028) // Small dragon boat
  217. materials := { 0x881, 0x883, 0x882, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
  218. mat_names := {"boat decks", "Sail deed", "Tiller deed", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
  219. amounts := { 8, 1, 1 , 3000, 1500, 2, 300, 500};
  220. elseif(objtype == 0x6029) // Medium boat
  221. materials := { 0x881, 0x883, 0x882, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
  222. mat_names := {"boat decks", "Sail deed", "Tiller deed", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
  223. amounts := { 16, 2, 1 , 5000, 3000, 4, 600, 800};
  224. elseif(objtype == 0x602A) // Medium dragon boat
  225. materials := { 0x881, 0x883, 0x882, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
  226. mat_names := {"boat decks", "Sail deed", "Tiller deed", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
  227. amounts := { 16, 2, 1 , 5000, 3000, 4, 700, 900};
  228. elseif(objtype == 0x602B) // Large boat
  229. materials := { 0x881, 0x883, 0x882, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
  230. mat_names := {"boat decks", "Sail deed", "Tiller deed", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
  231. amounts := { 24, 3, 1 , 8000, 6000, 8, 1000, 1000};
  232. elseif(objtype == 0x602C) // Large dragon boat
  233. materials := { 0x881, 0x883, 0x882, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
  234. mat_names := {"boat decks", "Sail deed", "Tiller deed", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
  235. amounts := { 24, 3, 1 , 8000, 6000, 8, 1100, 1100};
  236. endif
  237.  
  238. PlayStationaryEffect(who.x,who.y,who.z,FX_HEAL_EFFECT,10);
  239. PrintTextAbovePrivate( who, "You finish the plan and place it in your pack", who, font := _DEFAULT_TEXT_FONT, color := 238 );
  240. playsoundEffect (who, 0x1ed);
  241. SetObjProperty( plan, "materials", materials );
  242. SetObjProperty( plan, "mat_names", mat_names );
  243. SetObjProperty( plan, "amounts", amounts );
  244. SetObjProperty( plan, "objtype", objtype );
  245. SetObjProperty( plan, "plan_name", plan_name );
  246.  
  247. SetName(plan, "Architect's plan for a "+plan_name);
  248. endif
  249.  
  250.  
  251.  
  252. j := j+1;
  253. else
  254. PrintTextAbovePrivate( who, "You fail at making the plan", who, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
  255. endif
  256. SleepMS(2500);
  257. endif
  258. endfor
  259. endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement