Advertisement
Guest User

Untitled

a guest
May 31st, 2012
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.08 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class gd extends arj implements aiq, aro
  4. {
  5.  
  6. public gd(acz acz1)
  7. {
  8. this(acz1, 0);
  9. }
  10.  
  11. public gd(acz acz1, int j)
  12. {
  13. super(acz1);
  14. b = 0;
  15. c = false;
  16. d = false;
  17. a = null;
  18. f_(j);
  19. bo = "/mob/villager/villager.png";
  20. cl = 0.5F;
  21. aP().b(true);
  22. aP().a(true);
  23. bV.a(0, new aqt(this));
  24. bV.a(1, new hj(this, aqw, 8F, 0.3F, 0.35F));
  25. bV.a(1, new is(this));
  26. bV.a(1, new qb(this));
  27. bV.a(2, new cs(this));
  28. bV.a(3, new ys(this));
  29. bV.a(4, new ajp(this, true));
  30. bV.a(5, new abf(this, 0.3F));
  31. bV.a(6, new ada(this));
  32. bV.a(7, new aeg(this));
  33. bV.a(8, new zy(this, 0.32F));
  34. bV.a(9, new aan(this, aex, 3F, 1.0F));
  35. bV.a(9, new aan(this, gd, 5F, 0.02F));
  36. bV.a(9, new ajl(this, 0.3F));
  37. bV.a(10, new rw(this, ajf, 8F));
  38. }
  39.  
  40. public boolean b_()
  41. {
  42. return true;
  43. }
  44.  
  45. protected void g()
  46. {
  47. if(--b <= 0)
  48. {
  49. o.B.a(iv.c(s), iv.c(t), iv.c(u));
  50. b = 70 + Y.nextInt(50);
  51. a = o.B.a(iv.c(s), iv.c(t), iv.c(u), 32);
  52. if(a == null)
  53. {
  54. ba();
  55. } else
  56. {
  57. zi zi1 = a.a();
  58. b(zi1.a, zi1.b, zi1.c, a.b());
  59. }
  60. }
  61. if(!A() && g > 0)
  62. {
  63. g--;
  64. if(g <= 0)
  65. {
  66. i(1);
  67. e(new atg(agj.l.H, 200, 0));
  68. }
  69. }
  70. super.g();
  71. }
  72.  
  73. public boolean b_(aex aex1)
  74. {
  75. if(!A() && !bk())
  76. {
  77. if(!o.H)
  78. {
  79. c_(aex1);
  80. aex1.a(this);
  81. }
  82. return true;
  83. } else
  84. {
  85. return super.b_(aex1);
  86. }
  87. }
  88.  
  89. protected void b()
  90. {
  91. super.b();
  92. ag.a(16, Integer.valueOf(0));
  93. }
  94.  
  95. public int d()
  96. {
  97. return 20;
  98. }
  99.  
  100. public void b(akt akt1)
  101. {
  102. super.b(akt1);
  103. akt1.a("Profession", x());
  104. akt1.a("Riches", as);
  105. if(f != null)
  106. akt1.a("Offers", f.a());
  107. }
  108.  
  109. public void a(akt akt1)
  110. {
  111. super.a(akt1);
  112. f_(akt1.f("Profession"));
  113. as = akt1.f("Riches");
  114. if(akt1.c("Offers"))
  115. {
  116. akt akt2 = akt1.m("Offers");
  117. f = new ia(akt2);
  118. }
  119. }
  120.  
  121. public String u()
  122. {
  123. switch(x())
  124. {
  125. case 0: // '\0'
  126. return "/mob/villager/farmer.png";
  127.  
  128. case 1: // '\001'
  129. return "/mob/villager/librarian.png";
  130.  
  131. case 2: // '\002'
  132. return "/mob/villager/priest.png";
  133.  
  134. case 3: // '\003'
  135. return "/mob/villager/smith.png";
  136.  
  137. case 4: // '\004'
  138. return "/mob/villager/butcher.png";
  139. }
  140. return super.u();
  141. }
  142.  
  143. protected boolean d_()
  144. {
  145. return false;
  146. }
  147.  
  148. protected String m()
  149. {
  150. return "mob.villager.default";
  151. }
  152.  
  153. protected String n()
  154. {
  155. return "mob.villager.defaulthurt";
  156. }
  157.  
  158. protected String c_()
  159. {
  160. return "mob.villager.defaultdeath";
  161. }
  162.  
  163. public void f_(int j)
  164. {
  165. ag.b(16, Integer.valueOf(j));
  166. }
  167.  
  168. public int x()
  169. {
  170. return ag.c(16);
  171. }
  172.  
  173. public boolean J_()
  174. {
  175. return c;
  176. }
  177.  
  178. public void a(boolean flag)
  179. {
  180. c = flag;
  181. }
  182.  
  183. public void b(boolean flag)
  184. {
  185. d = flag;
  186. }
  187.  
  188. public boolean z()
  189. {
  190. return d;
  191. }
  192.  
  193. public void a(ajf ajf1)
  194. {
  195. super.a(ajf1);
  196. if(a != null && ajf1 != null)
  197. a.a(ajf1);
  198. }
  199.  
  200. public void c_(aex aex1)
  201. {
  202. e = aex1;
  203. }
  204.  
  205. public aex a()
  206. {
  207. return e;
  208. }
  209.  
  210. public boolean A()
  211. {
  212. return e != null;
  213. }
  214.  
  215. public void a(aof aof1)
  216. {
  217. if(aof1.a((aof)f.get(f.size() - 1)))
  218. g = 60;
  219. if(aof1.a().c == aeq.bH.bT)
  220. as += aof1.a().a;
  221. }
  222.  
  223. public ia b(aex aex1)
  224. {
  225. if(f == null)
  226. i(1);
  227. return f;
  228. }
  229.  
  230. private void i(int j)
  231. {
  232. ia ia1 = new ia();
  233. switch(x())
  234. {
  235. case 0: // '\0'
  236. a(ia1, aeq.T.bT, Y, 0.9F);
  237. a(ia1, tg.ab.bX, Y, 0.5F);
  238. a(ia1, aeq.bk.bT, Y, 0.5F);
  239. a(ia1, aeq.aV.bT, Y, 0.4F);
  240. b(ia1, aeq.U.bT, Y, 0.9F);
  241. b(ia1, aeq.bf.bT, Y, 0.3F);
  242. b(ia1, aeq.j.bT, Y, 0.3F);
  243. b(ia1, aeq.bc.bT, Y, 0.3F);
  244. b(ia1, aeq.be.bT, Y, 0.3F);
  245. b(ia1, aeq.i.bT, Y, 0.3F);
  246. b(ia1, aeq.bl.bT, Y, 0.3F);
  247. b(ia1, aeq.l.bT, Y, 0.5F);
  248. if(Y.nextFloat() < 0.5F)
  249. ia1.add(new aof(new agv(tg.F, 10), new agv(aeq.bH), new agv(aeq.ap.bT, 2 + Y.nextInt(2), 0)));
  250. break;
  251.  
  252. case 4: // '\004'
  253. a(ia1, aeq.m.bT, Y, 0.7F);
  254. a(ia1, aeq.aq.bT, Y, 0.5F);
  255. a(ia1, aeq.bi.bT, Y, 0.5F);
  256. b(ia1, aeq.aA.bT, Y, 0.1F);
  257. b(ia1, aeq.W.bT, Y, 0.3F);
  258. b(ia1, aeq.Y.bT, Y, 0.3F);
  259. b(ia1, aeq.V.bT, Y, 0.3F);
  260. b(ia1, aeq.X.bT, Y, 0.3F);
  261. b(ia1, aeq.ar.bT, Y, 0.3F);
  262. b(ia1, aeq.bj.bT, Y, 0.3F);
  263. break;
  264.  
  265. case 3: // '\003'
  266. a(ia1, aeq.m.bT, Y, 0.7F);
  267. a(ia1, aeq.o.bT, Y, 0.5F);
  268. a(ia1, aeq.p.bT, Y, 0.5F);
  269. a(ia1, aeq.n.bT, Y, 0.5F);
  270. b(ia1, aeq.q.bT, Y, 0.5F);
  271. b(ia1, aeq.z.bT, Y, 0.5F);
  272. b(ia1, aeq.h.bT, Y, 0.3F);
  273. b(ia1, aeq.C.bT, Y, 0.3F);
  274. b(ia1, aeq.g.bT, Y, 0.5F);
  275. b(ia1, aeq.B.bT, Y, 0.5F);
  276. b(ia1, aeq.f.bT, Y, 0.2F);
  277. b(ia1, aeq.A.bT, Y, 0.2F);
  278. b(ia1, aeq.P.bT, Y, 0.2F);
  279. b(ia1, aeq.Q.bT, Y, 0.2F);
  280. b(ia1, aeq.ag.bT, Y, 0.2F);
  281. b(ia1, aeq.ak.bT, Y, 0.2F);
  282. b(ia1, aeq.ad.bT, Y, 0.2F);
  283. b(ia1, aeq.ah.bT, Y, 0.2F);
  284. b(ia1, aeq.ae.bT, Y, 0.2F);
  285. b(ia1, aeq.ai.bT, Y, 0.2F);
  286. b(ia1, aeq.af.bT, Y, 0.2F);
  287. b(ia1, aeq.aj.bT, Y, 0.2F);
  288. b(ia1, aeq.ac.bT, Y, 0.1F);
  289. b(ia1, aeq.Z.bT, Y, 0.1F);
  290. b(ia1, aeq.aa.bT, Y, 0.1F);
  291. b(ia1, aeq.ab.bT, Y, 0.1F);
  292. break;
  293.  
  294. case 1: // '\001'
  295. a(ia1, aeq.aK.bT, Y, 0.8F);
  296. a(ia1, aeq.aL.bT, Y, 0.8F);
  297. a(ia1, aeq.bG.bT, Y, 1.3F);
  298. b(ia1, tg.an.bX, Y, 0.8F);
  299. b(ia1, tg.M.bX, Y, 0.2F);
  300. b(ia1, aeq.aQ.bT, Y, 0.2F);
  301. b(ia1, aeq.aS.bT, Y, 0.2F);
  302. break;
  303.  
  304. case 2: // '\002'
  305. b(ia1, aeq.bA.bT, Y, 0.3F);
  306. b(ia1, aeq.bD.bT, Y, 0.2F);
  307. b(ia1, aeq.aC.bT, Y, 0.4F);
  308. b(ia1, tg.bd.bX, Y, 0.3F);
  309. int ai[] = {
  310. aeq.q.bT, aeq.z.bT, aeq.ae.bT, aeq.ai.bT, aeq.h.bT, aeq.C.bT, aeq.g.bT, aeq.B.bT
  311. };
  312. int ai1[] = ai;
  313. int l = ai1.length;
  314. for(int i1 = 0; i1 < l; i1++)
  315. {
  316. int j1 = ai1[i1];
  317. if(Y.nextFloat() < 0.1F)
  318. ia1.add(new aof(new agv(j1, 1, 0), new agv(aeq.bH, 2 + Y.nextInt(3), 0), aqf.a(Y, new agv(j1, 1, 0), 5 + Y.nextInt(15))));
  319. }
  320.  
  321. break;
  322. }
  323. if(ia1.isEmpty())
  324. a(ia1, aeq.p.bT, Y, 1.0F);
  325. Collections.shuffle(ia1);
  326. if(f == null)
  327. f = new ia();
  328. for(int k = 0; k < j && k < ia1.size(); k++)
  329. f.a((aof)ia1.get(k));
  330.  
  331. }
  332.  
  333. public void a(ia ia1)
  334. {
  335. }
  336.  
  337. private static void a(ia ia1, int j, Random random, float f1)
  338. {
  339. if(random.nextFloat() < f1)
  340. ia1.add(new aof(a(j, random), aeq.bH));
  341. }
  342.  
  343. private static agv a(int j, Random random)
  344. {
  345. return new agv(j, b(j, random), 0);
  346. }
  347.  
  348. private static int b(int j, Random random)
  349. {
  350. ey ey1 = (ey)at.get(Integer.valueOf(j));
  351. if(ey1 == null)
  352. return 1;
  353. if(((Integer)ey1.a()).intValue() >= ((Integer)ey1.b()).intValue())
  354. return ((Integer)ey1.a()).intValue();
  355. else
  356. return ((Integer)ey1.a()).intValue() + random.nextInt(((Integer)ey1.b()).intValue() - ((Integer)ey1.a()).intValue());
  357. }
  358.  
  359. private static void b(ia ia1, int j, Random random, float f1)
  360. {
  361. if(random.nextFloat() < f1)
  362. {
  363. int k = c(j, random);
  364. agv agv1;
  365. agv agv2;
  366. if(k < 0)
  367. {
  368. agv1 = new agv(aeq.bH.bT, 1, 0);
  369. agv2 = new agv(j, -k, 0);
  370. } else
  371. {
  372. agv1 = new agv(aeq.bH.bT, k, 0);
  373. agv2 = new agv(j, 1, 0);
  374. }
  375. ia1.add(new aof(agv1, agv2));
  376. }
  377. }
  378.  
  379. private static int c(int j, Random random)
  380. {
  381. ey ey1 = (ey)au.get(Integer.valueOf(j));
  382. if(ey1 == null)
  383. return 1;
  384. if(((Integer)ey1.a()).intValue() >= ((Integer)ey1.b()).intValue())
  385. return ((Integer)ey1.a()).intValue();
  386. else
  387. return ((Integer)ey1.a()).intValue() + random.nextInt(((Integer)ey1.b()).intValue() - ((Integer)ey1.a()).intValue());
  388. }
  389.  
  390. private int b;
  391. private boolean c;
  392. private boolean d;
  393. nh a;
  394. private aex e;
  395. private ia f;
  396. private int g;
  397. private int as;
  398. private static final Map at;
  399. private static final Map au;
  400.  
  401. static
  402. {
  403. at = new HashMap();
  404. au = new HashMap();
  405. at.put(Integer.valueOf(aeq.m.bT), new ey(Integer.valueOf(16), Integer.valueOf(24)));
  406. at.put(Integer.valueOf(aeq.o.bT), new ey(Integer.valueOf(8), Integer.valueOf(10)));
  407. at.put(Integer.valueOf(aeq.p.bT), new ey(Integer.valueOf(8), Integer.valueOf(10)));
  408. at.put(Integer.valueOf(aeq.n.bT), new ey(Integer.valueOf(4), Integer.valueOf(6)));
  409. at.put(Integer.valueOf(aeq.aK.bT), new ey(Integer.valueOf(19), Integer.valueOf(30)));
  410. at.put(Integer.valueOf(aeq.aL.bT), new ey(Integer.valueOf(12), Integer.valueOf(15)));
  411. at.put(Integer.valueOf(aeq.bG.bT), new ey(Integer.valueOf(1), Integer.valueOf(1)));
  412. at.put(Integer.valueOf(aeq.bn.bT), new ey(Integer.valueOf(3), Integer.valueOf(4)));
  413. at.put(Integer.valueOf(aeq.bA.bT), new ey(Integer.valueOf(2), Integer.valueOf(3)));
  414. at.put(Integer.valueOf(aeq.aq.bT), new ey(Integer.valueOf(14), Integer.valueOf(18)));
  415. at.put(Integer.valueOf(aeq.bi.bT), new ey(Integer.valueOf(14), Integer.valueOf(18)));
  416. at.put(Integer.valueOf(aeq.bk.bT), new ey(Integer.valueOf(14), Integer.valueOf(18)));
  417. at.put(Integer.valueOf(aeq.aV.bT), new ey(Integer.valueOf(9), Integer.valueOf(13)));
  418. at.put(Integer.valueOf(aeq.S.bT), new ey(Integer.valueOf(34), Integer.valueOf(48)));
  419. at.put(Integer.valueOf(aeq.bh.bT), new ey(Integer.valueOf(30), Integer.valueOf(38)));
  420. at.put(Integer.valueOf(aeq.bg.bT), new ey(Integer.valueOf(30), Integer.valueOf(38)));
  421. at.put(Integer.valueOf(aeq.T.bT), new ey(Integer.valueOf(18), Integer.valueOf(22)));
  422. at.put(Integer.valueOf(tg.ab.bX), new ey(Integer.valueOf(14), Integer.valueOf(22)));
  423. at.put(Integer.valueOf(aeq.bm.bT), new ey(Integer.valueOf(36), Integer.valueOf(64)));
  424. au.put(Integer.valueOf(aeq.i.bT), new ey(Integer.valueOf(3), Integer.valueOf(4)));
  425. au.put(Integer.valueOf(aeq.be.bT), new ey(Integer.valueOf(3), Integer.valueOf(4)));
  426. au.put(Integer.valueOf(aeq.q.bT), new ey(Integer.valueOf(7), Integer.valueOf(11)));
  427. au.put(Integer.valueOf(aeq.z.bT), new ey(Integer.valueOf(12), Integer.valueOf(14)));
  428. au.put(Integer.valueOf(aeq.h.bT), new ey(Integer.valueOf(6), Integer.valueOf(8)));
  429. au.put(Integer.valueOf(aeq.C.bT), new ey(Integer.valueOf(9), Integer.valueOf(12)));
  430. au.put(Integer.valueOf(aeq.g.bT), new ey(Integer.valueOf(7), Integer.valueOf(9)));
  431. au.put(Integer.valueOf(aeq.B.bT), new ey(Integer.valueOf(10), Integer.valueOf(12)));
  432. au.put(Integer.valueOf(aeq.f.bT), new ey(Integer.valueOf(4), Integer.valueOf(6)));
  433. au.put(Integer.valueOf(aeq.A.bT), new ey(Integer.valueOf(7), Integer.valueOf(8)));
  434. au.put(Integer.valueOf(aeq.P.bT), new ey(Integer.valueOf(4), Integer.valueOf(6)));
  435. au.put(Integer.valueOf(aeq.Q.bT), new ey(Integer.valueOf(7), Integer.valueOf(8)));
  436. au.put(Integer.valueOf(aeq.ag.bT), new ey(Integer.valueOf(4), Integer.valueOf(6)));
  437. au.put(Integer.valueOf(aeq.ak.bT), new ey(Integer.valueOf(7), Integer.valueOf(8)));
  438. au.put(Integer.valueOf(aeq.ad.bT), new ey(Integer.valueOf(4), Integer.valueOf(6)));
  439. au.put(Integer.valueOf(aeq.ah.bT), new ey(Integer.valueOf(7), Integer.valueOf(8)));
  440. au.put(Integer.valueOf(aeq.ae.bT), new ey(Integer.valueOf(10), Integer.valueOf(14)));
  441. au.put(Integer.valueOf(aeq.ai.bT), new ey(Integer.valueOf(16), Integer.valueOf(19)));
  442. au.put(Integer.valueOf(aeq.af.bT), new ey(Integer.valueOf(8), Integer.valueOf(10)));
  443. au.put(Integer.valueOf(aeq.aj.bT), new ey(Integer.valueOf(11), Integer.valueOf(14)));
  444. au.put(Integer.valueOf(aeq.ac.bT), new ey(Integer.valueOf(5), Integer.valueOf(7)));
  445. au.put(Integer.valueOf(aeq.Z.bT), new ey(Integer.valueOf(5), Integer.valueOf(7)));
  446. au.put(Integer.valueOf(aeq.aa.bT), new ey(Integer.valueOf(11), Integer.valueOf(15)));
  447. au.put(Integer.valueOf(aeq.ab.bT), new ey(Integer.valueOf(9), Integer.valueOf(11)));
  448. au.put(Integer.valueOf(aeq.U.bT), new ey(Integer.valueOf(-4), Integer.valueOf(-2)));
  449. au.put(Integer.valueOf(aeq.bf.bT), new ey(Integer.valueOf(-8), Integer.valueOf(-4)));
  450. au.put(Integer.valueOf(aeq.j.bT), new ey(Integer.valueOf(-8), Integer.valueOf(-4)));
  451. au.put(Integer.valueOf(aeq.bc.bT), new ey(Integer.valueOf(-10), Integer.valueOf(-7)));
  452. au.put(Integer.valueOf(tg.M.bX), new ey(Integer.valueOf(-5), Integer.valueOf(-3)));
  453. au.put(Integer.valueOf(tg.an.bX), new ey(Integer.valueOf(3), Integer.valueOf(4)));
  454. au.put(Integer.valueOf(aeq.W.bT), new ey(Integer.valueOf(4), Integer.valueOf(5)));
  455. au.put(Integer.valueOf(aeq.Y.bT), new ey(Integer.valueOf(2), Integer.valueOf(4)));
  456. au.put(Integer.valueOf(aeq.V.bT), new ey(Integer.valueOf(2), Integer.valueOf(4)));
  457. au.put(Integer.valueOf(aeq.X.bT), new ey(Integer.valueOf(2), Integer.valueOf(4)));
  458. au.put(Integer.valueOf(aeq.aA.bT), new ey(Integer.valueOf(6), Integer.valueOf(8)));
  459. au.put(Integer.valueOf(aeq.bD.bT), new ey(Integer.valueOf(-4), Integer.valueOf(-1)));
  460. au.put(Integer.valueOf(aeq.aC.bT), new ey(Integer.valueOf(-4), Integer.valueOf(-1)));
  461. au.put(Integer.valueOf(aeq.aQ.bT), new ey(Integer.valueOf(10), Integer.valueOf(12)));
  462. au.put(Integer.valueOf(aeq.aS.bT), new ey(Integer.valueOf(10), Integer.valueOf(12)));
  463. au.put(Integer.valueOf(tg.bd.bX), new ey(Integer.valueOf(-3), Integer.valueOf(-1)));
  464. au.put(Integer.valueOf(aeq.ar.bT), new ey(Integer.valueOf(-7), Integer.valueOf(-5)));
  465. au.put(Integer.valueOf(aeq.bj.bT), new ey(Integer.valueOf(-7), Integer.valueOf(-5)));
  466. au.put(Integer.valueOf(aeq.bl.bT), new ey(Integer.valueOf(-8), Integer.valueOf(-6)));
  467. au.put(Integer.valueOf(aeq.bA.bT), new ey(Integer.valueOf(7), Integer.valueOf(11)));
  468. au.put(Integer.valueOf(aeq.l.bT), new ey(Integer.valueOf(-5), Integer.valueOf(-19)));
  469. }
  470. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement