Jump to content
  • 0

Periergo problima


Question

Posted

kalispera exw 1 server kai meta apo kapia patch pou perasa den mou emfanizete panw apo ta npc px: gatekepper to onoma kai to title oute to name sta mobs

ss:

 

33f6skl.jpg

 

nvod2q.jpg

 

stin db einai olla ta name apo ta npc mallon peiraxa kati ston core kai den xerw ti

mporei kapios dev na mou pei pos to ftiaxnw auto???

gia na min xanakanw compile kai ftou kai apo tin arxi !!!!!! :D

ty!!! :) :)

6 answers to this question

Recommended Posts

  • 0
Posted

ti pack exeis? (mipws exei kanena custom setting giauto)

 

to radius  polles fores fteei alla edw oi npcs einai mia xara...... ara den fteei auto..

 

Dokimase na mpeis me an ka8aro system.... dld mono me to l2.ini piragmeno

kai pes m

  • 0
Posted

ti pack exeis? (mipws exei kanena custom setting giauto)

 

to radius  polles fores fteei alla edw oi npcs einai mia xara...... ara den fteei auto..

 

Dokimase na mpeis me an ka8aro system.... dld mono me to l2.ini piragmeno

kai pes m

exw kanei compile l2j epilogue last revision kai dokimasa kai me clean system alla tpt auto egine meta apo kapia patch pou perasa ston server opote mallon kati exei piraxtei ston core kai den xerw ti!!!! to periergo einai oti den exw kai kanena kokkino x sto eclipse gia na to brw pou sto diatano einai!!!!!

  • 0
Posted

kokino 8a eixes an exeis kapio error.... an omws o code einai swstos den exeis errors(mporei kapio code pou perases na  eixe auto to apotelems...

 

di3e m mia ta codes pou peras 9otan les patch? codes enoeis?)

  • 0
Posted

auto peresa teleuteo kai meta eginan etsi ta npc

   1. Index: java/com/l2jserver/gameserver/datatables/FakePcsTable.java
   2. ===================================================================
   3. --- java/com/l2jserver/gameserver/datatables/FakePcsTable.java (revision 0)
   4. +++ java/com/l2jserver/gameserver/datatables/FakePcsTable.java (revision 0)
   5. @@ -0,0 +1,142 @@
   6. +package com.l2jserver.gameserver.datatables;
   7. +
   8. +import java.sql.Connection;
   9. +import java.sql.PreparedStatement;
  10. +import java.sql.ResultSet;
  11. +import java.sql.SQLException;
  12. +import java.util.logging.Logger;
  13. +
  14. +import javolution.util.FastMap;
  15. +
  16. +import com.l2jserver.L2DatabaseFactory;
  17. +import com.l2jserver.gameserver.model.actor.FakePc;
  18. +
  19. +/**
  20. + *
  21. + * @author BiTi
  22. + */
  23. +public class FakePcsTable
  24. +{
  25. + /** The logger<br> */
  26. + private static Logger _log = Logger.getLogger(FakePcsTable.class.getName());
  27. +
  28. + private FastMap<Integer, FakePc> _fakePcs = new FastMap<Integer, FakePc>();
  29. +
  30. + private FakePcsTable()
  31. + {
  32. + Connection con = null;
  33. +
  34. + try
  35. + {
  36. + con = L2DatabaseFactory.getInstance().getConnection();
  37. +
  38. + PreparedStatement stmt = con.prepareStatement("SELECT * FROM `fake_pcs`");
  39. + ResultSet rset = stmt.executeQuery();
  40. +
  41. + FakePc fpc = null;
  42. +
  43. + while (rset.next())
  44. + {
  45. + fpc = new FakePc();
  46. +
  47. + int npcId = rset.getInt("npc_id");
  48. + fpc.race = rset.getInt("race");
  49. + fpc.sex = rset.getInt("sex");
  50. + fpc.clazz = rset.getInt("class");
  51. + fpc.title = rset.getString("title");
  52. + fpc.titleColor = rset.getInt("title_color");
  53. + fpc.name = rset.getString("name");
  54. + fpc.nameColor = rset.getInt("name_color");
  55. + fpc.hairStyle = rset.getInt("hair_style");
  56. + fpc.hairColor = rset.getInt("hair_color");
  57. + fpc.face = rset.getInt("face");
  58. + fpc.mount = rset.getByte("mount");
  59. + fpc.team = rset.getByte("team");
  60. + fpc.hero = rset.getByte("hero");
  61. + fpc.pdUnder = rset.getInt("pd_under");
  62. + fpc.pdUnderAug = rset.getInt("pd_under_aug");
  63. + fpc.pdHead = rset.getInt("pd_head");
  64. + fpc.pdHeadAug = rset.getInt("pd_head_aug");
  65. + fpc.pdRHand = rset.getInt("pd_rhand");
  66. + fpc.pdRHandAug = rset.getInt("pd_rhand_aug");
  67. + fpc.pdLHand = rset.getInt("pd_lhand");
  68. + fpc.pdLHandAug = rset.getInt("pd_lhand_aug");
  69. + fpc.pdGloves = rset.getInt("pd_gloves");
  70. + fpc.pdGlovesAug = rset.getInt("pd_gloves_aug");
  71. + fpc.pdChest = rset.getInt("pd_chest");
  72. + fpc.pdChestAug = rset.getInt("pd_chest_aug");
  73. + fpc.pdLegs = rset.getInt("pd_legs");
  74. + fpc.pdLegsAug = rset.getInt("pd_legs_aug");
  75. + fpc.pdFeet = rset.getInt("pd_feet");
  76. + fpc.pdFeetAug = rset.getInt("pd_feet_aug");
  77. + fpc.pdBack = rset.getInt("pd_back");
  78. + fpc.pdBackAug = rset.getInt("pd_back_aug");
  79. + fpc.pdLRHand = rset.getInt("pd_lrhand");
  80. + fpc.pdLRHandAug = rset.getInt("pd_lrhand_aug");
  81. + fpc.pdHair = rset.getInt("pd_hair");
  82. + fpc.pdHairAug = rset.getInt("pd_hair_aug");
  83. + fpc.pdHair2 = rset.getInt("pd_hair2");
  84. + fpc.pdHair2Aug = rset.getInt("pd_hair2_aug");
  85. + fpc.pdRBracelet = rset.getInt("pd_rbracelet");
  86. + fpc.pdRBraceletAug = rset.getInt("pd_rbracelet_aug");
  87. + fpc.pdLBracelet = rset.getInt("pd_lbracelet");
  88. + fpc.pdLBraceletAug = rset.getInt("pd_lbracelet_aug");
  89. + fpc.pdDeco1 = rset.getInt("pd_deco1");
  90. + fpc.pdDeco1Aug = rset.getInt("pd_deco1_aug");
  91. + fpc.pdDeco2 = rset.getInt("pd_deco2");
  92. + fpc.pdDeco2Aug = rset.getInt("pd_deco2_aug");
  93. + fpc.pdDeco3 = rset.getInt("pd_deco3");
  94. + fpc.pdDeco3Aug = rset.getInt("pd_deco3_aug");
  95. + fpc.pdDeco4 = rset.getInt("pd_deco4");
  96. + fpc.pdDeco4Aug = rset.getInt("pd_deco4_aug");
  97. + fpc.pdDeco5 = rset.getInt("pd_deco5");
  98. + fpc.pdDeco5Aug = rset.getInt("pd_deco5_aug");
  99. + fpc.pdDeco6 = rset.getInt("pd_deco6");
100. + fpc.pdDeco6Aug = rset.getInt("pd_deco6_aug");
101. + fpc.enchantEffect = rset.getByte("enchant_effect");
102. + fpc.pvpFlag = rset.getInt("pvp_flag");
103. + fpc.karma = rset.getInt("karma");
104. + fpc.fishing = rset.getByte("fishing");
105. + fpc.fishingX = rset.getInt("fishing_x");
106. + fpc.fishingY = rset.getInt("fishing_y");
107. + fpc.fishingZ = rset.getInt("fishing_z");
108. + fpc.invisible = rset.getByte("invisible");
109. + _fakePcs.put(npcId, fpc);
110. + }
111. +
112. + rset.close();
113. + stmt.close();
114. + }
115. + catch (SQLException e)
116. + {
117. + _log.warning("AccessFakePcsTable: Error loading from database:");
118. + }
119. + finally
120. + {
121. + try
122. + {
123. + con.close();
124. + }
125. + catch (Exception e)
126. + {
127. +
128. + }
129. + }
130. + }
131. +
132. + public FakePc getFakePc(int npcId)
133. + {
134. + return _fakePcs.get(npcId);
135. + }
136. +
137. + public static FakePcsTable getInstance()
138. + {
139. + return SingletonHolder._instance;
140. + }
141. +
142. + @SuppressWarnings("synthetic-access")
143. + private static class SingletonHolder
144. + {
145. + protected static final FakePcsTable _instance = new FakePcsTable();
146. + }
147. +}
148. Index: java/com/l2jserver/gameserver/model/actor/FakePc.java
149. ===================================================================
150. --- java/com/l2jserver/gameserver/model/actor/FakePc.java (revision 0)
151. +++ java/com/l2jserver/gameserver/model/actor/FakePc.java (revision 0)
152. @@ -0,0 +1,66 @@
153. +package com.l2jserver.gameserver.model.actor;
154. +
155. +public class FakePc
156. +{
157. + public int race;
158. + public int sex;
159. + public int clazz;
160. + public String title;
161. + public int titleColor;
162. + public String name;
163. + public int nameColor;
164. + public int hairStyle;
165. + public int hairColor;
166. + public int face;
167. + public byte mount;
168. + public byte team;
169. + public byte hero;
170. + public int pdUnder;
171. + public int pdUnderAug;
172. + public int pdHead;
173. + public int pdHeadAug;
174. + public int pdRHand;
175. + public int pdRHandAug;
176. + public int pdLHand;
177. + public int pdLHandAug;
178. + public int pdGloves;
179. + public int pdGlovesAug;
180. + public int pdChest;
181. + public int pdChestAug;
182. + public int pdLegs;
183. + public int pdLegsAug;
184. + public int pdFeet;
185. + public int pdFeetAug;
186. + public int pdBack;
187. + public int pdBackAug;
188. + public int pdLRHand;
189. + public int pdLRHandAug;
190. + public int pdHair;
191. + public int pdHairAug;
192. + public int pdHair2;
193. + public int pdHair2Aug;
194. + public int pdRBracelet;
195. + public int pdRBraceletAug;
196. + public int pdLBracelet;
197. + public int pdLBraceletAug;
198. + public int pdDeco1;
199. + public int pdDeco1Aug;
200. + public int pdDeco2;
201. + public int pdDeco2Aug;
202. + public int pdDeco3;
203. + public int pdDeco3Aug;
204. + public int pdDeco4;
205. + public int pdDeco4Aug;
206. + public int pdDeco5;
207. + public int pdDeco5Aug;
208. + public int pdDeco6;
209. + public int pdDeco6Aug;
210. + public byte enchantEffect;
211. + public int pvpFlag;
212. + public int karma;
213. + public byte fishing;
214. + public int fishingX;
215. + public int fishingY;
216. + public int fishingZ;
217. + public byte invisible;
218. +}
219. Index: java/com/l2jserver/gameserver/network/serverpackets/AbstractNpcInfo.java
220. ===================================================================
221. --- java/com/l2jserver/gameserver/network/serverpackets/AbstractNpcInfo.java (revision 3836)
222. +++ java/com/l2jserver/gameserver/network/serverpackets/AbstractNpcInfo.java (working copy)
223. @@ -15,11 +15,14 @@
224. package com.l2jserver.gameserver.network.serverpackets;
225.  
226. import com.l2jserver.Config;
227. +import com.l2jserver.gameserver.datatables.CharTemplateTable;
228. import com.l2jserver.gameserver.datatables.ClanTable;
229. +import com.l2jserver.gameserver.datatables.FakePcsTable;
230. import com.l2jserver.gameserver.instancemanager.CursedWeaponsManager;
231. import com.l2jserver.gameserver.instancemanager.TownManager;
232. import com.l2jserver.gameserver.model.L2Clan;
233. import com.l2jserver.gameserver.model.L2Transformation;
234. +import com.l2jserver.gameserver.model.actor.FakePc;
235. import com.l2jserver.gameserver.model.actor.L2Character;
236. import com.l2jserver.gameserver.model.actor.L2Decoy;
237. import com.l2jserver.gameserver.model.actor.L2Npc;
238. @@ -30,6 +33,7 @@
239. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
240. import com.l2jserver.gameserver.model.itemcontainer.Inventory;
241. import com.l2jserver.gameserver.skills.AbnormalEffect;
242. +import com.l2jserver.gameserver.templates.chars.L2PcTemplate;
243.  
244. /**
245. * This class ...
246. @@ -143,60 +147,225 @@
247. @Override
248. protected void writeImpl()
249. {
250. - writeC(0x0c);
251. - writeD(_npc.getObjectId());
252. - writeD(_idTemplate + 1000000); // npctype id
253. - writeD(_isAttackable ? 1 : 0);
254. - writeD(_x);
255. - writeD(_y);
256. - writeD(_z);
257. - writeD(_heading);
258. - writeD(0x00);
259. - writeD(_mAtkSpd);
260. - writeD(_pAtkSpd);
261. - writeD(_runSpd);
262. - writeD(_walkSpd);
263. - writeD(_runSpd); // swim run speed
264. - writeD(_walkSpd); // swim walk speed
265. - writeD(_runSpd); // swim run speed
266. - writeD(_walkSpd); // swim walk speed
267. - writeD(_runSpd); // fly run speed
268. - writeD(_walkSpd); // fly run speed
269. - writeF(_npc.getMovementSpeedMultiplier());
270. - writeF(_npc.getAttackSpeedMultiplier());
271. - writeF(_collisionRadius);
272. - writeF(_collisionHeight);
273. - writeD(_rhand); // right hand weapon
274. - writeD(_chest);
275. - writeD(_lhand); // left hand weapon
276. - writeC(1); // name above char 1=true ... ??
277. - writeC(_npc.isRunning() ? 1 : 0);
278. - writeC(_npc.isInCombat() ? 1 : 0);
279. - writeC(_npc.isAlikeDead() ? 1 : 0);
280. - writeC(_isSummoned ? 2 : 0); // 0=teleported 1=default 2=summoned
281. - writeS(_name);
282. - writeS(_title);
283. - writeD(0x00); // Title color 0=client default
284. - writeD(0x00); //pvp flag
285. - writeD(0x00); // karma
286. -
287. - writeD(_npc.getAbnormalEffect()); // C2
288. - writeD(_clanId); //clan id
289. - writeD(_clanCrest); //crest id
290. - writeD(_allyId); // ally id
291. - writeD(_allyCrest); // all crest
292. - writeC(_npc.isFlying() ? 2 : 0); // C2
293. - writeC(0x00); // title color 0=client
294. -
295. - writeF(_collisionRadius);
296. - writeF(_collisionHeight);
297. - writeD(_enchantEffect); // C4
298. - writeD(_npc.isFlying() ? 1 : 0); // C6
299. - writeD(0x00);
300. - writeD(0x00);// CT1.5 Pet form and skills
301. - writeC(0x01);
302. - writeC(0x01);
303. - writeD(_npc.getSpecialEffect());
304. + FakePc fpc = FakePcsTable.getInstance().getFakePc(_npc.getNpcId());
305. + if (fpc != null)
306. + {
307. + writeC(0x31);
308. + writeD(_x);
309. + writeD(_y);
310. + writeD(_z);
311. + writeD(0x00);
312. + writeD(_npc.getObjectId());
313. + writeS(fpc.name);
314. + writeD(fpc.race);
315. + writeD(fpc.sex);
316. + writeD(fpc.clazz);
317. +
318. + writeD(fpc.pdUnder);
319. + writeD(fpc.pdHead);
320. + writeD(fpc.pdRHand);
321. + writeD(fpc.pdLHand);
322. + writeD(fpc.pdGloves);
323. + writeD(fpc.pdChest);
324. + writeD(fpc.pdLegs);
325. + writeD(fpc.pdFeet);
326. + writeD(fpc.pdBack);
327. + writeD(fpc.pdLRHand);
328. + writeD(fpc.pdHair);
329. + writeD(fpc.pdHair2);
330. +
331. + writeD(fpc.pdRBracelet);
332. + writeD(fpc.pdLBracelet);
333. + writeD(fpc.pdDeco1);
334. + writeD(fpc.pdDeco2);
335. + writeD(fpc.pdDeco3);
336. + writeD(fpc.pdDeco4);
337. + writeD(fpc.pdDeco5);
338. + writeD(fpc.pdDeco6);
339. + writeD(0x00); // belt
340. +
341. + writeD(fpc.pdUnderAug);
342. + writeD(fpc.pdHeadAug);
343. + writeD(fpc.pdRHandAug);
344. + writeD(fpc.pdLHandAug);
345. + writeD(fpc.pdGlovesAug);
346. + writeD(fpc.pdChestAug);
347. + writeD(fpc.pdLegsAug);
348. + writeD(fpc.pdFeetAug);
349. + writeD(fpc.pdBackAug);
350. + writeD(fpc.pdLRHandAug);
351. + writeD(fpc.pdHairAug);
352. + writeD(fpc.pdHair2Aug);
353. +
354. + writeD(fpc.pdRBraceletAug);
355. + writeD(fpc.pdLBraceletAug);
356. + writeD(fpc.pdDeco1Aug);
357. + writeD(fpc.pdDeco2Aug);
358. + writeD(fpc.pdDeco3);
359. + writeD(fpc.pdDeco4);
360. + writeD(fpc.pdDeco5);
361. + writeD(fpc.pdDeco6);
362. + writeD(0x00); // belt
363. +
364. + writeD(0x00);
365. + writeD(0x00);
366. +
367. + writeD(fpc.pvpFlag);
368. + writeD(fpc.karma);
369. +
370. + writeD(_mAtkSpd);
371. + writeD(_pAtkSpd);
372. +
373. + writeD(fpc.pvpFlag);
374. + writeD(fpc.karma);
375. +
376. + writeD(_runSpd);
377. + writeD(_walkSpd);
378. + writeD(_runSpd); // swim run speed
379. + writeD(_walkSpd); // swim walk speed
380. + writeD(_runSpd); // fly run speed
381. + writeD(_walkSpd); // fly walk speed
382. + writeD(_runSpd);
383. + writeD(_walkSpd);
384. + writeF(_npc.getMovementSpeedMultiplier()); // _activeChar.getProperMultiplier()
385. + writeF(_npc.getAttackSpeedMultiplier()); // _activeChar.getAttackSpeedMultiplier()
386. +
387. + // TODO: add handling of mount collision
388. + L2PcTemplate pctmpl = CharTemplateTable.getInstance().getTemplate(fpc.clazz);
389. + writeF(fpc.sex == 0 ? pctmpl.fCollisionRadius : pctmpl.fCollisionRadius_female);
390. + writeF(fpc.sex == 0 ? pctmpl.fCollisionHeight : pctmpl.fCollisionHeight_female);
391. +
392. + writeD(fpc.hairStyle);
393. + writeD(fpc.hairColor);
394. + writeD(fpc.face);
395. +
396. + writeS(fpc.title);
397. +
398. + writeD(0x00); // clan id
399. + writeD(0x00); // clan crest id
400. + writeD(0x00); // ally id
401. + writeD(0x00); // ally crest id
402. + // In UserInfo leader rights and siege flags, but here found nothing??
403. + // Therefore RelationChanged packet with that info is required
404. + writeD(0);
405. +
406. + writeC(0x01); // standing = 1 sitting = 0
407. + writeC(_npc.isRunning() ? 1 : 0); // running = 1 walking = 0
408. + writeC(_npc.isInCombat() ? 1 : 0);
409. + writeC(_npc.isAlikeDead() ? 1 : 0);
410. +
411. + writeC(fpc.invisible); // invisible = 1 visible =0
412. +
413. + writeC(fpc.mount); // 1 on strider 2 on wyvern 3 on Great Wolf 0 no mount
414. + writeC(0x00); // 1 - sellshop
415. +
416. + writeH(0x00); // cubic count
417. + //for (int id : allCubics)
418. + // writeH(id);
419. +
420. + writeC(0x00); // find party members
421. +
422. + writeD(0x00); // abnormal effect
423. +
424. + writeC(0x00); // isFlying() ? 2 : 0
425. + writeH(0x00); //getRecomHave(): Blue value for name (0 = white, 255 = pure blue)
426. + writeD(1000000); // getMountNpcId() + 1000000
427. +
428. + writeD(fpc.clazz);
429. + writeD(0x00); // ?
430. + writeC(fpc.enchantEffect);
431. + writeC(fpc.team); //team circle around feet 1= Blue, 2 = red
432. +
433. + writeD(0x00); // getClanCrestLargeId()
434. + writeC(0x00); // isNoble(): Symbol on char menu ctrl+I
435. + writeC(fpc.hero); // Hero Aura
436. +
437. + writeC(fpc.fishing); //0x01: Fishing Mode (Cant be undone by setting back to 0)
438. + writeD(fpc.fishingX);
439. + writeD(fpc.fishingY);
440. + writeD(fpc.fishingZ);
441. +
442. + writeD(fpc.nameColor);
443. +
444. + writeD(_heading);
445. +
446. + writeD(0x00); // pledge class
447. + writeD(0x00); // pledge type
448. +
449. + writeD(fpc.titleColor);
450. +
451. + writeD(0x00); // cursed weapon level
452. +
453. + writeD(0x00); // reputation score
454. +
455. + writeD(0x00); // transformation id
456. +
457. + writeD(0x00); // agathion id
458. +
459. + writeD(0x01); // T2 ?
460. +
461. + writeD(0x00); // special effect
462. + writeD(0x00); // ?
463. + writeD(0x00); // ?
464. + writeD(0x00); // ?
465. + }
466. + else
467. + {
468. + writeC(0x0c);
469. + writeD(_npc.getObjectId());
470. + writeD(_idTemplate + 1000000); // npctype id
471. + writeD(_isAttackable ? 1 : 0);
472. + writeD(_x);
473. + writeD(_y);
474. + writeD(_z);
475. + writeD(_heading);
476. + writeD(0x00);
477. + writeD(_mAtkSpd);
478. + writeD(_pAtkSpd);
479. + writeD(_runSpd);
480. + writeD(_walkSpd);
481. + writeD(_runSpd); // swim run speed
482. + writeD(_walkSpd); // swim walk speed
483. + writeD(_runSpd); // swim run speed
484. + writeD(_walkSpd); // swim walk speed
485. + writeD(_runSpd); // fly run speed
486. + writeD(_walkSpd); // fly run speed
487. + writeF(_npc.getMovementSpeedMultiplier());
488. + writeF(_npc.getAttackSpeedMultiplier());
489. + writeF(_collisionRadius);
490. + writeF(_collisionHeight);
491. + writeD(_rhand); // right hand weapon
492. + writeD(_chest);
493. + writeD(_lhand); // left hand weapon
494. + writeC(1); // name above char 1=true ... ??
495. + writeC(_npc.isRunning() ? 1 : 0);
496. + writeC(_npc.isInCombat() ? 1 : 0);
497. + writeC(_npc.isAlikeDead() ? 1 : 0);
498. + writeC(_isSummoned ? 2 : 0); // 0=teleported 1=default 2=summoned
499. + writeS(_name);
500. + writeS(_title);
501. + writeD(0x00); // Title color 0=client default
502. + writeD(0x00); //pvp flag
503. + writeD(0x00); // karma
504. +
505. + writeD(_npc.getAbnormalEffect()); // C2
506. + writeD(_clanId); //clan id
507. + writeD(_clanCrest); //crest id
508. + writeD(_allyId); // ally id
509. + writeD(_allyCrest); // all crest
510. + writeC(_npc.isFlying() ? 2 : 0); // C2
511. + writeC(0x00); // title color 0=client
512. +
513. + writeF(_collisionRadius);
514. + writeF(_collisionHeight);
515. + writeD(_enchantEffect); // C4
516. + writeD(_npc.isFlying() ? 1 : 0); // C6
517. + writeD(0x00);
518. + writeD(0x00);// CT1.5 Pet form and skills
519. + writeC(0x01);
520. + writeC(0x01);
521. + writeD(_npc.getSpecialEffect());
522. + }
523. }
524. }
525.  

Guest
This topic is now closed to further replies.
×
×
  • Create New...