Teleporter by Mentus

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • Teleporter by Mentus

      Da ja nicht alle Leecher es schaffen es aus meinem Source zu holen release ich es nun.

      WndField am Ende der Datei:

      PHP-Quellcode

      1. #ifdef __APP_TELEPORTER
      2. CWndTeleporter::CWndTeleporter( void )
      3. {
      4. m_nSelected = NULL;
      5. m_pPicTexture = NULL;
      6. }
      7. CWndTeleporter::~CWndTeleporter( void )
      8. {
      9. DeleteDeviceObjects();
      10. }
      11. BOOL CWndTeleporter::Initialize( CWndBase* pWndParent, DWORD dwType )
      12. {
      13. return CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TELEPORTER, 0, CPoint( 0, 0 ), pWndParent );
      14. }
      15. BOOL CWndTeleporter::OnCommand( UINT nID, DWORD dwMessage, CWndBase* pWndBase )
      16. {
      17. return CWndNeuz::OnCommand( nID, dwMessage, pWndBase );
      18. }
      19. void CWndTeleporter::OnSize( UINT nType, int cx, int cy )
      20. {
      21. CWndNeuz::OnSize( nType, cx, cy );
      22. }
      23. void CWndTeleporter::OnLButtonUp( UINT nFlags, CPoint point )
      24. {
      25. }
      26. void CWndTeleporter::OnLButtonDown( UINT nFlags, CPoint point )
      27. {
      28. }
      29. void CWndTeleporter::OnDraw( C2DRender* p2DRender )
      30. {
      31. CWndStatic* pStatic = (CWndStatic*)GetDlgItem( WIDC_STATIC2 );
      32. CWndText* pText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
      33. CString strFile, strLandName, strDes;
      34. switch( m_nSelected )
      35. {
      36. case 0:
      37. strFile = "flaris.tga";
      38. strLandName ="Flaris";
      39. strDes= "";
      40. break;
      41. case 1:
      42. strFile = "SM.tga";
      43. strLandName ="Saint Morning";
      44. strDes="";
      45. break;
      46. case 2:
      47. strFile = "darkon.tga";
      48. strLandName ="Darkon";
      49. strDes= "";
      50. break;
      51. case 3:
      52. strFile = "darkon1.tga";
      53. strLandName ="Darkon 1";
      54. strDes= "";
      55. break;
      56. case 4:
      57. strFile = "darkon3.tga";
      58. strLandName ="Darkon 3";
      59. strDes= "";
      60. break;
      61. case 5:
      62. strFile = "vulcano.tga";
      63. strLandName ="Vulcano";
      64. strDes= "";
      65. break;
      66. case 6:
      67. strFile = "behemoth.tga";
      68. strLandName ="Behemoth Dungeon";
      69. strDes= "";
      70. break;
      71. case 7:
      72. strFile = "animush.tga";
      73. strLandName ="Animus - Hero Dungeon";
      74. strDes= "";
      75. break;
      76. case 8:
      77. strFile = "animusm.tga";
      78. strLandName ="Animus - Master Dungeon";
      79. strDes= "";
      80. break;
      81. case 9:
      82. strFile = "tramnukm.tga";
      83. strLandName ="Tramnuk - Master Dungeon";
      84. strDes= "";
      85. break;
      86. case 10:
      87. strFile = "tramnuk.tga";
      88. strLandName ="Tramnuk Dungeon";
      89. strDes= "";
      90. break;
      91. case 11:
      92. strFile = "khaldera.tga";
      93. strLandName ="Khaldera";
      94. strDes= "";
      95. break;
      96. case 12:
      97. strFile = "Bahara.tga";
      98. strLandName ="Bahara";
      99. strDes= "";
      100. break;
      101. case 13:
      102. strFile = "Sanpres.tga";
      103. strLandName ="Sanpres 1 Dungeon";
      104. strDes= "";
      105. break;
      106. case 14:
      107. strFile = "Sanpres.tga";
      108. strLandName ="Sanpres 2 Dungeon";
      109. strDes= "";
      110. break;
      111. case 15:
      112. strFile = "Upresia.tga";
      113. strLandName ="Upresia 1 Dungeon";
      114. strDes= ".";
      115. break;
      116. case 16:
      117. strFile = "Upresia.tga";
      118. strLandName ="Upresia 2 Dungeon";
      119. strDes= "";
      120. break;
      121. case 17:
      122. strFile = "Herneos.tga";
      123. strLandName ="Herneos 1 Dungeon";
      124. strDes= "";
      125. break;
      126. case 18:
      127. strFile = "Herneos.tga";
      128. strLandName ="Herneos 2 Dungeon";
      129. strDes= "";
      130. break;
      131. case 19:
      132. strFile = "Knochenpfad.tga";
      133. strLandName ="Knochenpfad";
      134. strDes= "";
      135. break;
      136. case 20:
      137. strFile = "Crystal.tga";
      138. strLandName ="Crystal Dungeon";
      139. strDes= "";
      140. break;
      141. case 21:
      142. strFile = "Kalgas.tga";
      143. strLandName ="Kalgas Dungeon";
      144. strDes= "";
      145. break;
      146. case 22:
      147. strFile = "Eillun.tga";
      148. strLandName ="Eillun";
      149. strDes= "";
      150. break;
      151. default: strFile = "flaris.tga"; strLandName ="Error"; strDes= "Error"; break;
      152. }
      153. pStatic->SetTitle( strLandName );
      154. pText->SetString( strDes, 0xFF1e90ff );
      155. m_pPicTexture = m_textureMng.AddTexture( m_pApp->m_pd3dDevice, MakePath( "Theme\\Default\\LoadMap\\", strFile ), 0xff000000 );
      156. if( m_pPicTexture != NULL )
      157. {
      158. LPWNDCTRL lpWndCtrl = GetWndCtrl( WIDC_STATIC1 );
      159. if( g_Option.m_nWindowAlpha > 200 )
      160. m_pPicTexture->Render( p2DRender, lpWndCtrl->rect.TopLeft(), g_Option.m_nWindowAlpha - 55 );
      161. else
      162. m_pPicTexture->Render( p2DRender, lpWndCtrl->rect.TopLeft(), g_Option.m_nWindowAlpha );
      163. }
      164. }
      165. HRESULT CWndTeleporter::RestoreDeviceObjects()
      166. {
      167. CWndNeuz::RestoreDeviceObjects();
      168. return S_OK;
      169. }
      170. HRESULT CWndTeleporter::InvalidateDeviceObjects()
      171. {
      172. CWndNeuz::InvalidateDeviceObjects();
      173. return S_OK;
      174. }
      175. HRESULT CWndTeleporter::DeleteDeviceObjects()
      176. {
      177. CWndNeuz::DeleteDeviceObjects();
      178. InvalidateDeviceObjects();
      179. return S_OK;
      180. }
      181. void CWndTeleporter::OnInitialUpdate( void )
      182. {
      183. CWndNeuz::OnInitialUpdate();
      184. RestoreDeviceObjects();
      185. CRect rectRoot = m_pWndRoot->GetLayoutRect();
      186. CRect rectWindow = GetWindowRect();
      187. CPoint point( rectRoot.right - rectWindow.Width(), 110 );
      188. Move( point );
      189. MoveParentCenter();
      190. CWndListBox* pListBox = (CWndListBox*)GetDlgItem( WIDC_LISTBOX1 );
      191. pListBox->AddString("Flaris");
      192. pListBox->AddString("Saint Morning");
      193. pListBox->AddString("Darkon");
      194. pListBox->AddString("Darkon 1");
      195. pListBox->AddString("Darkon 3");
      196. pListBox->AddString("Vulcano");
      197. //pListBox->AddString("Behemoth D.");
      198. pListBox->AddString("Amnius Hero");
      199. pListBox->AddString("Amnius Master");
      200. //pListBox->AddString("Master Tramnuk");
      201. //pListBox->AddString("Tramnuk");
      202. pListBox->AddString("Khaldera");
      203. //pListBox->AddString("Bahara Desert");
      204. //pListBox->AddString("Sanpres 1");
      205. //pListBox->AddString("Sanpres 2");
      206. //pListBox->AddString("Upresia 1");
      207. //pListBox->AddString("Upresia 2");
      208. //pListBox->AddString("Herneos 1");
      209. //pListBox->AddString("Herneos 2");
      210. //pListBox->AddString("Knochenpfad");
      211. //pListBox->AddString("Crystal Dungeon");
      212. //pListBox->AddString("Kalgas Cave");
      213. //pListBox->AddString("Eillun");
      214. }
      215. BOOL CWndTeleporter::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult )
      216. {
      217. if( nID == WIDC_LISTBOX1 )
      218. {
      219. CWndListBox* pWndListBox = (CWndListBox*)GetDlgItem( WIDC_LISTBOX1 );
      220. if( pWndListBox->GetCurSel() != -1 || pWndListBox->GetCurSel() > 22 )
      221. m_nSelected= pWndListBox->GetCurSel();
      222. }
      223. else if( nID == WIDC_BUTTON1 )
      224. {
      225. g_DPlay.SendTeleport( m_nSelected );
      226. Destroy();
      227. }
      228. return CWndNeuz::OnChildNotify( message, nID, pLResult );
      229. }
      230. #endif
      Alles anzeigen


      WndField.h:
      Am Ende vor dem letzten "#endif"

      PHP-Quellcode

      1. #ifdef __APP_TELEPORTER
      2. class CWndTeleporter : public CWndNeuz
      3. {
      4. public:
      5. int m_nSelected;
      6. CTexture* m_pPicTexture;
      7. CWndTeleporter( void );
      8. ~CWndTeleporter( void );
      9. virtual HRESULT RestoreDeviceObjects();
      10. virtual HRESULT InvalidateDeviceObjects();
      11. virtual HRESULT DeleteDeviceObjects();
      12. public:
      13. virtual BOOL Initialize( CWndBase* pWndParent = NULL, DWORD nType = MB_OK );
      14. virtual BOOL OnChildNotify( UINT message, UINT nID, LRESULT* pLResult );
      15. virtual void OnDraw( C2DRender* p2DRender );
      16. virtual void OnInitialUpdate();
      17. virtual BOOL OnCommand( UINT nID, DWORD dwMessage, CWndBase* pWndBase );
      18. virtual void OnSize( UINT nType, int cx, int cy );
      19. virtual void OnLButtonUp( UINT nFlags, CPoint point );
      20. virtual void OnLButtonDown( UINT nFlags, CPoint point );
      21. };
      22. #endif //__APP_TELEPORTER
      Alles anzeigen


      DPClient.cpp ( Client )
      Am Ende, VOR

      PHP-Quellcode

      1. CDPClient g_DPlay;


      kommt das hier hin:

      PHP-Quellcode

      1. #ifdef __APP_TELEPORTER
      2. void CDPClient::SendTeleport( int nCurSel )
      3. {
      4. BEFORESENDSOLE( ar, PACKETTYPE_APP_TELEPORT, DPID_UNKNOWN );
      5. ar << nCurSel;
      6. SEND( ar, this, DPID_SERVERPLAYER );
      7. }
      8. #endif

      MsgHdr.h
      Über die Snapshots:

      PHP-Quellcode

      1. #ifdef __APP_TELEPORTER
      2. #define PACKETTYPE_APP_TELEPORT (DWORD)0xDDD00026
      3. #endif

      DPSrvr.cpp ( WorldServer )
      Unter

      PHP-Quellcode

      1. BEGIN_MSG;

      Das hier:

      PHP-Quellcode

      1. #ifdef __APP_TELEPORTER
      2. ON_MSG( PACKETTYPE_APP_TELEPORT, OnTeleportByAPP );
      3. #endif // __APP_TELEPORTER


      Dann noch am Ende der Datei das hier einfügen:

      PHP-Quellcode

      1. #ifdef __APP_TELEPORTER
      2. void CDPSrvr::OnTeleportByAPP( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long )
      3. {
      4. #ifdef __NEW_DEBUG
      5. g_Guard.LogDebug("CDPSrvr::OnTeleportByAPP");
      6. #endif
      7. CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );
      8. int nCurSel;
      9. if( IsValidObj( pUser ) )
      10. {
      11. ar >> nCurSel;
      12. DWORD dwWorldID;
      13. D3DXVECTOR3 vPos;
      14. switch( nCurSel )
      15. {
      16. case 0: vPos = D3DXVECTOR3(6973.0F, 100.0F, 3328.0F); dwWorldID = 1; break;
      17. case 1: vPos = D3DXVECTOR3(8321.0F, 100.0F, 3720.0F); dwWorldID = 1; break;
      18. case 2: vPos = D3DXVECTOR3(3900.250732F, 59.0F, 4377.806641F); dwWorldID = 1; break;
      19. case 3: vPos = D3DXVECTOR3(5574.530273F, 75.001129F, 3900.282227F); dwWorldID = 1; break;
      20. case 4: vPos = D3DXVECTOR3(3240.482910F, 11.316653F, 3409.634766F); dwWorldID = 1; break;
      21. case 5: vPos = D3DXVECTOR3(881.142883F, 183.273331F, 1008.118652F); dwWorldID = 206; break;
      22. case 6: vPos = D3DXVECTOR3(6642.931152F, 58.000000F, 6454.676758F); dwWorldID = 1; break;
      23. case 7: vPos = D3DXVECTOR3(6785.000000F, 100.699989F, 6062.000000F); dwWorldID = 1; break;
      24. case 8: vPos = D3DXVECTOR3(5986.8989f, 100.0f, 5414.0f); dwWorldID = 1; break;
      25. /* case 9: vPos = D3DXVECTOR3(4908.647F, 100.000F, 3457.677F); dwWorldID = 1; break;
      26. case 10: vPos = D3DXVECTOR3(5267.235F, 100.000F, 4719.388F); dwWorldID = 1; break;
      27. case 11: vPos = D3DXVECTOR3(5946.719F, 100.392F, 5406.160F); dwWorldID = 1; break;
      28. case 12: vPos = D3DXVECTOR3(6501.000F, 66.000F, 9095.00F); dwWorldID = 1; break;
      29. case 13: vPos = D3DXVECTOR3(6593.000F, 100.000F, 5076.000F); dwWorldID = 1; break;
      30. case 14: vPos = D3DXVECTOR3(5159.000F, 100.000F, 5273.000F); dwWorldID = 1; break;
      31. case 15: vPos = D3DXVECTOR3(2762.000F, 150.000F, 5242.000F); dwWorldID = 1; break;
      32. case 16: vPos = D3DXVECTOR3(2734.000F, 150.000F, 5239.000F); dwWorldID = 1; break;
      33. case 17: vPos = D3DXVECTOR3(1826.000F, 96.600F, 2756.000F); dwWorldID = 1; break;
      34. case 18: vPos = D3DXVECTOR3(2011.000F, 96.900F, 2307.000F); dwWorldID = 1; break;
      35. case 19: vPos = D3DXVECTOR3(7065.011F, 90.962F, 6457.552F); dwWorldID = 1; break;
      36. case 20: vPos = D3DXVECTOR3(6366.140F, 100.000F, 8050.609F); dwWorldID = 1; break;
      37. case 21: vPos = D3DXVECTOR3(5730.762F, 87.762F, 8141.579F); dwWorldID = 1; break;
      38. case 22: vPos = D3DXVECTOR3(7956.923F, 70.000F, 8822.327F); dwWorldID = 1; break;*/
      39. default: Error("CDPSrvr::OnTeleportByAPP - %s", pUser->GetName() ); return;
      40. }
      41. pUser->REPLACE( g_uIdofMulti, dwWorldID, vPos, REPLACE_NORMAL, nDefaultLayer );
      42. }
      43. }
      44. #endif
      Alles anzeigen


      Das Gelbe ist alles auskommentiert, ob es alles wieder funktioniert wenn ihr es wieder aktiviert weiß ich nicht. Müsst ihr schauen welche Koordinaten zu was gehören.


      Resdata.inc:

      PHP-Quellcode

      1. APP_TELEPORTER "WndTile08.tga" "" 1 640 464 0x2410000 26
      2. {
      3. // Title String
      4. IDS_RESDATA_INC_006762
      5. }
      6. {
      7. // Help Key
      8. IDS_RESDATA_INC_006763
      9. }
      10. {
      11. WTYPE_LISTBOX WIDC_LISTBOX1 "WndEditTile00.tga" 1 40 22 194 346 0x20020000 0 0 0 0 0 0 0
      12. {
      13. // Title String
      14. IDS_RESDATA_INC_006764
      15. }
      16. {
      17. // ToolTip
      18. IDS_RESDATA_INC_006765
      19. }
      20. WTYPE_BUTTON WIDC_BUTTON1 "ButtApply.tga" 0 72 374 144 394 0x220010 0 0 0 0 0 0 0
      21. {
      22. // Title String
      23. IDS_RESDATA_INC_006766
      24. }
      25. {
      26. // ToolTip
      27. IDS_RESDATA_INC_006767
      28. }
      29. WTYPE_STATIC WIDC_STATIC1 "" 0 284 56 534 306 0x2220002 0 0 0 0 0 0 0
      30. {
      31. // Title String
      32. IDS_RESDATA_INC_006768
      33. }
      34. {
      35. // ToolTip
      36. IDS_RESDATA_INC_006769
      37. }
      38. WTYPE_TEXT WIDC_TEXT1 "WndEditTile00.tga" 1 268 328 568 404 0x20020000 0 0 0 0 0 0 0
      39. {
      40. // Title String
      41. IDS_RESDATA_INC_006770
      42. }
      43. {
      44. // ToolTip
      45. IDS_RESDATA_INC_006771
      46. }
      47. WTYPE_STATIC WIDC_STATIC2 "WndEditTile200.tga" 1 365 20 498 36 0x2222481 0 0 0 0 0 0 0
      48. {
      49. // Title String
      50. IDS_RESDATA_INC_006772
      51. }
      52. {
      53. // ToolTip
      54. IDS_RESDATA_INC_006773
      55. }
      56. }
      Alles anzeigen


      Resdata.h

      PHP-Quellcode

      1. #define APP_TELEPORTER 2024


      Die Bilder: Klick

      Müsst ihr in Theme/Default/LoadMap reinklatschen.

      Das wars schon, aber ihr müsst natürlich die Weise wie ihr den Teleporter aufrufen wollt noch bestimmen.


      Screen:

    • Werbung zur Unterstützung des Forums ( Bitte AddBlocker deaktivieren )