SHARE
TWEET

Untitled

a guest May 19th, 2017 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- src/bindings/ScriptDev2/ScriptMgr.cpp 2007-05-23 12:28:26.000000000 +0000
  2. +++ src/bindings/ScriptDev2/ScriptMgr.cpp 2007-05-23 12:57:04.444259000 +0000
  3. @@ -79,6 +79,8 @@
  4. extern void AddSC_item_test();
  5.  
  6. // -- NPC --
  7. +extern void AddSC_teleport_npc_1();
  8. +extern void AddSC_teleport_npc_2();
  9.  
  10. // -- Servers --
  11. extern void AddSC_battlemaster();
  12. @@ -393,6 +394,8 @@
  13. AddSC_item_test();
  14.  
  15. // -- NPC --
  16. + AddSC_teleport_npc_1();
  17. + AddSC_teleport_npc_2();
  18.  
  19. // -- Servers --
  20. AddSC_battlemaster();
  21. --- src/bindings/ScriptDev2/Makefile.am 2007-05-23 13:04:10.000000000 +0000
  22. +++ src/bindings/ScriptDev2/Makefile.am 2007-05-23 13:05:25.034259000 +0000
  23. @@ -40,6 +40,8 @@
  24. scripts/creature/sc_miner.cpp \
  25. scripts/creature/sc_shade_of_taerar.cpp \
  26. scripts/custom/sc_custom_example.cpp \
  27. +scripts/custom/sc_teleport_npc_1.cpp \
  28. +scripts/custom/sc_teleport_npc_2.cpp \
  29. scripts/custom/sc_test.cpp \
  30. scripts/go/sc_go_teleporter.cpp \
  31. scripts/guard/sc_guard_ai.h \
  32. --- src/bindings/ScriptDev2/scripts/custom/sc_teleport_npc_2.cpp 2007-05-23 14:14:28.904259000 +0000
  33. +++ src/bindings/ScriptDev2/scripts/custom/sc_teleport_npc_2.cpp 2007-05-23 14:14:25.314259000 +0000
  34. @@ -0,0 +1,381 @@
  35. +#include "../sc_defines.h"
  36. +bool GossipHello_teleport_npc_2(Player *player, Creature *_Creature)
  37. +
  38. +{
  39. +player->ADD_GOSSIP_ITEM( 7, "Tirisfal Prime (25g,lvl 1-84)", GOSSIP_SENDER_MAIN, 1201);
  40. +player->ADD_GOSSIP_ITEM( 7, "Shattrath (5 g,lvl 1-84)", GOSSIP_SENDER_MAIN, 1202);
  41. +player->ADD_GOSSIP_ITEM( 7, "Darnassus (50 s,lvl 1-84)", GOSSIP_SENDER_MAIN, 1203);
  42. +player->ADD_GOSSIP_ITEM( 7, "Exodar (50 s,lvl 1-84)", GOSSIP_SENDER_MAIN, 1204);
  43. +player->ADD_GOSSIP_ITEM( 7, "Ironforge (50 s,lvl 1-84)", GOSSIP_SENDER_MAIN, 1205);
  44. +player->ADD_GOSSIP_ITEM( 7, "Stormwind (50 s,lvl 1-84)", GOSSIP_SENDER_MAIN, 1206);
  45. +player->ADD_GOSSIP_ITEM( 7, "Orgrimmar (50 s,lvl 1-84)", GOSSIP_SENDER_MAIN, 1207);
  46. +player->ADD_GOSSIP_ITEM( 7, "Silvermoon (50 s,lvl 1-84)", GOSSIP_SENDER_MAIN, 1208);
  47. +player->ADD_GOSSIP_ITEM( 7, "Thunder Bluff (50 s,lvl 1-84)", GOSSIP_SENDER_MAIN, 1209);
  48. +player->ADD_GOSSIP_ITEM( 7, "Undercity (50 s,lvl 1-84)", GOSSIP_SENDER_MAIN, 1210);
  49. +player->ADD_GOSSIP_ITEM( 7, "Gurubashi Arena (free)", GOSSIP_SENDER_MAIN, 1211);
  50. +
  51. +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID());
  52. +
  53. +return true;
  54. +
  55. +}
  56. +
  57. +void SendDefaultMenu_teleport_npc_2(Player *player, Creature *_Creature, uint32 action)
  58. +{
  59. +
  60. +// Teleport to Tirisfal Prime
  61. +if (action == 1201)
  62. +{
  63. + if ((player->getLevel() >= 60) && (player->getLevel() <= 84))
  64. + {
  65. + if (player->GetMoney() >= 250000)
  66. + {
  67. + player->Say("Off I go to Tirisfal Prime!",LANG_UNIVERSAL);
  68. + player->CLOSE_GOSSIP_MENU();
  69. + player->ModifyMoney(-250000);
  70. + player->TeleportTo(0, 2500.0f, 2131.0f, 33.0f, 0.0f);
  71. + }
  72. + else
  73. + {
  74. + player->Say("I must have at least 25 gold to enter Tirisfal Prime.",LANG_UNIVERSAL);
  75. + player->CLOSE_GOSSIP_MENU();
  76. + }
  77. + }
  78. + else
  79. + {
  80. + player->Say("I must be between level 60 and 84 to enter Tirisfal Prime.",LANG_UNIVERSAL);
  81. + player->CLOSE_GOSSIP_MENU();
  82. + }
  83. +}
  84. +
  85. +// Teleport to Shattrath
  86. +if (action == 1202)
  87. +{
  88. + if ((player->getLevel() >= 58) && (player->getLevel() <= 84))
  89. + {
  90. + if (player->GetMoney() >= 50000)
  91. + {
  92. + player->Say("Off I go to Shattrath city!",LANG_UNIVERSAL);
  93. + player->CLOSE_GOSSIP_MENU();
  94. + player->ModifyMoney(-50000);
  95. + player->TeleportTo(530, -1846.85f, 5396.64f, -12.4282f, 0.0f);
  96. + }
  97. + else
  98. + {
  99. + player->Say("I must have at least 5 gold to enter Shattrath.",LANG_UNIVERSAL);
  100. + player->CLOSE_GOSSIP_MENU();
  101. + }
  102. + }
  103. + else
  104. + {
  105. + player->Say("I must be between level 58 and 84 to enter Shattrath.",LANG_UNIVERSAL);
  106. + player->CLOSE_GOSSIP_MENU();
  107. + }
  108. +}
  109. +
  110. +// Teleport to Darnassus
  111. +if (action == 1203)
  112. +{
  113. + if (player->GetTeam() == ALLIANCE)
  114. + {
  115. + if (player->getLevel() <= 84)
  116. + {
  117. + if (player->GetMoney() >= 5000)
  118. + {
  119. + player->Say("Off I go to Darnassus.",LANG_UNIVERSAL);
  120. + player->CLOSE_GOSSIP_MENU();
  121. + player->ModifyMoney(-5000);
  122. + player->TeleportTo(1, 9947.52f, 2482.73f, 1316.21f, 0.0f);
  123. + }
  124. + else
  125. + {
  126. + player->Say("I need 50 silver to teleport there.",LANG_UNIVERSAL);
  127. + player->CLOSE_GOSSIP_MENU();
  128. + }
  129. + }
  130. + else
  131. + {
  132. + player->Say("I must be level 84 or lower to teleport there.",LANG_UNIVERSAL);
  133. + player->CLOSE_GOSSIP_MENU();
  134. + }
  135. + }
  136. + else
  137. + {
  138. + player->Say("I can't enter alliance areas...",LANG_UNIVERSAL);
  139. + player->CLOSE_GOSSIP_MENU();
  140. + }
  141. +
  142. +}
  143. +
  144. +// Teleport to Exodar
  145. +if (action == 1204)
  146. +{
  147. + if (player->GetTeam() == ALLIANCE)
  148. + {
  149. + if (player->getLevel() <= 84)
  150. + {
  151. + if (player->GetMoney() >= 5000)
  152. + {
  153. + player->Say("Off I go to the Exodar.",LANG_UNIVERSAL);
  154. + player->CLOSE_GOSSIP_MENU();
  155. + player->ModifyMoney(-5000);
  156. + player->TeleportTo(530, -4073.03f, -12020.4f, -1.47f, 0.0f);
  157. + }
  158. + else
  159. + {
  160. + player->Say("I need 50 silver to teleport there.",LANG_UNIVERSAL);
  161. + player->CLOSE_GOSSIP_MENU();
  162. + }
  163. + }
  164. + else
  165. + {
  166. + player->Say("I must be level 84 or lower to teleport there.",LANG_UNIVERSAL);
  167. + player->CLOSE_GOSSIP_MENU();
  168. + }
  169. + }
  170. + else
  171. + {
  172. + player->Say("I can't enter alliance areas...",LANG_UNIVERSAL);
  173. + player->CLOSE_GOSSIP_MENU();
  174. + }
  175. +}
  176. +
  177. +// Teleport to Ironforge
  178. +if (action == 1205)
  179. +{
  180. + if (player->GetTeam() == ALLIANCE)
  181. + {
  182. + if (player->getLevel() <= 84)
  183. + {
  184. + if (player->GetMoney() >= 5000)
  185. + {
  186. + player->Say("Off I go to Ironforge.",LANG_UNIVERSAL);
  187. + player->CLOSE_GOSSIP_MENU();
  188. + player->ModifyMoney(-5000);
  189. + player->TeleportTo(0, -5032.0f, -819.0f, 495.0f, 0.0f);
  190. + }
  191. + else
  192. + {
  193. + player->Say("I need 50 silver to teleport there.",LANG_UNIVERSAL);
  194. + player->CLOSE_GOSSIP_MENU();
  195. + }
  196. + }
  197. + else
  198. + {
  199. + player->Say("I must be level 84 or lower to teleport there.",LANG_UNIVERSAL);
  200. + player->CLOSE_GOSSIP_MENU();
  201. + }
  202. + }
  203. + else
  204. + {
  205. + player->Say("I can't enter alliance areas...",LANG_UNIVERSAL);
  206. + player->CLOSE_GOSSIP_MENU();
  207. + }
  208. +}
  209. +
  210. +// Teleport to Stormwind
  211. +if (action == 1206)
  212. +{
  213. + if (player->GetTeam() == ALLIANCE)
  214. + {
  215. + if (player->getLevel() <= 84)
  216. + {
  217. + if (player->GetMoney() >= 5000)
  218. + {
  219. + player->Say("Off I go to Stormwind.",LANG_UNIVERSAL);
  220. + player->CLOSE_GOSSIP_MENU();
  221. + player->ModifyMoney(-5000);
  222. + player->TeleportTo(0, -8960.14f, 516.266f, 96.3568f, 0.0f);
  223. + }
  224. + else
  225. + {
  226. + player->Say("I need 50 silver to teleport there.",LANG_UNIVERSAL);
  227. + player->CLOSE_GOSSIP_MENU();
  228. + }
  229. + }
  230. + else
  231. + {
  232. + player->Say("I must be level 84 or lower to teleport there.",LANG_UNIVERSAL);
  233. + player->CLOSE_GOSSIP_MENU();
  234. + }
  235. + }
  236. + else
  237. + {
  238. + player->Say("I can't enter alliance areas...",LANG_UNIVERSAL);
  239. + player->CLOSE_GOSSIP_MENU();
  240. + }
  241. +}
  242. +
  243. +// Teleport to Orgrimmar
  244. +if (action == 1207)
  245. +{
  246. + if (player->GetTeam() == HORDE)
  247. + {
  248. + if (player->getLevel() <= 84)
  249. + {
  250. + if (player->GetMoney() >= 5000)
  251. + {
  252. + player->Say("Off I go to Orgrimmar.",LANG_UNIVERSAL);
  253. + player->CLOSE_GOSSIP_MENU();
  254. + player->ModifyMoney(-5000);
  255. + player->TeleportTo(1, 1552.5f, -4420.66f, 8.94802f, 0.0f);
  256. + }
  257. + else
  258. + {
  259. + player->Say("I need 50 silver to teleport there.",LANG_UNIVERSAL);
  260. + player->CLOSE_GOSSIP_MENU();
  261. + }
  262. + }
  263. + }
  264. + else
  265. + {
  266. + player->Say("I must be level 84 or lower to teleport there.",LANG_UNIVERSAL);
  267. + player->CLOSE_GOSSIP_MENU();
  268. + }
  269. + }
  270. + else
  271. + {
  272. + player->Say("I can't enter horde areas...",LANG_UNIVERSAL);
  273. + player->CLOSE_GOSSIP_MENU();
  274. + }
  275. +}
  276. +
  277. +// Teleport to Silvermoon
  278. +if (action == 1208)
  279. +{
  280. + if (player->GetTeam() == HORDE)
  281. + {
  282. + if (player->getLevel() <= 84)
  283. + {
  284. + if (player->GetMoney() >= 5000)
  285. + {
  286. + player->Say("Off I go to Silvermoon City.",LANG_UNIVERSAL);
  287. + player->CLOSE_GOSSIP_MENU();
  288. + player->ModifyMoney(-5000);
  289. + player->TeleportTo(530, 9338.74f, -7277.27f, 13.7895f, 0.0f);
  290. + }
  291. + else
  292. + {
  293. + player->Say("I need 50 silver to teleport there.",LANG_UNIVERSAL);
  294. + player->CLOSE_GOSSIP_MENU();
  295. + }
  296. + }
  297. + else
  298. + {
  299. + player->Say("I must be level 84 or lower to teleport there.",LANG_UNIVERSAL);
  300. + player->CLOSE_GOSSIP_MENU();
  301. + }
  302. + }
  303. + else
  304. + {
  305. + player->Say("I can't enter horde areas...",LANG_UNIVERSAL);
  306. + player->CLOSE_GOSSIP_MENU();
  307. + }
  308. +}
  309. +
  310. +// Teleport to Thunder Bluff
  311. +if (action == 1209)
  312. +{
  313. + if (player->GetTeam() == HORDE)
  314. + {
  315. + if (player->getLevel() <= 84)
  316. + {
  317. + if (player->GetMoney() >= 5000)
  318. + {
  319. + player->Say("Off I go to Thunder Bluff.",LANG_UNIVERSAL);
  320. + player->CLOSE_GOSSIP_MENU();
  321. + player->ModifyMoney(-5000);
  322. + player->TeleportTo(1, -1391.0f, 140.0f, 22.478f, 0.0f);
  323. + }
  324. + else
  325. + {
  326. + player->Say("I need 50 silver to teleport there.",LANG_UNIVERSAL);
  327. + player->CLOSE_GOSSIP_MENU();
  328. + }
  329. + }
  330. + else
  331. + {
  332. + player->Say("I must be level 84 or lower to teleport there.",LANG_UNIVERSAL);
  333. + player->CLOSE_GOSSIP_MENU();
  334. + }
  335. + }
  336. + else
  337. + {
  338. + player->Say("I can't enter horde areas...",LANG_UNIVERSAL);
  339. + player->CLOSE_GOSSIP_MENU();
  340. + }
  341. +}
  342. +
  343. +// Teleport to Undercity
  344. +if (action == 1210)
  345. +{
  346. + if (player->GetTeam() == HORDE)
  347. + {
  348. + if (player->getLevel() <= 84)
  349. + {
  350. + if (player->GetMoney() >= 5000)
  351. + {
  352. + player->Say("Off I go to Undercity.",LANG_UNIVERSAL);
  353. + player->CLOSE_GOSSIP_MENU();
  354. + player->ModifyMoney(-5000);
  355. + player->TeleportTo(0, 1819.71f, 238.79f, 60.5321f, 0.0f);
  356. + }
  357. + else
  358. + {
  359. + player->Say("I need 50 silver to teleport there.",LANG_UNIVERSAL);
  360. + player->CLOSE_GOSSIP_MENU();
  361. + }
  362. + }
  363. + else
  364. + {
  365. + player->Say("I must be level 84 or lower to teleport there.",LANG_UNIVERSAL);
  366. + player->CLOSE_GOSSIP_MENU();
  367. + }
  368. + }
  369. + else
  370. + {
  371. + player->Say("I can't enter horde areas...",LANG_UNIVERSAL);
  372. + player->CLOSE_GOSSIP_MENU();
  373. + }
  374. +}
  375. +
  376. +// Teleport to Gurubashi Arena
  377. +if (action == 1211)
  378. +{
  379. + player->CLOSE_GOSSIP_MENU();
  380. + player->Say("Off I go to the Gurubashi Arena!",LANG_UNIVERSAL);
  381. + player->TeleportTo(0, -13155.2314f, 340.1806f, 49.7404f, 4.15f);
  382. +}
  383. +
  384. +}
  385. +
  386. +bool GossipSelect_teleport_npc_2(Player *player, Creature *_Creature, uint32 sender, uint32 action )
  387. +
  388. +{
  389. +// Main menu
  390. +if (sender == GOSSIP_SENDER_MAIN)
  391. +SendDefaultMenu_teleport_npc_2(player, _Creature, action);
  392. +
  393. +return true;
  394. +
  395. +}
  396. +
  397. +void AddSC_teleport_npc_2()
  398. +
  399. +{
  400. +
  401. +Script *newscript;
  402. +
  403. +newscript = new Script;
  404. +newscript->Name="teleport_npc_2";
  405. +newscript->pGossipHello = &GossipHello_teleport_npc_2;
  406. +newscript->pGossipSelect = &GossipSelect_teleport_npc_2;
  407. +newscript->pItemHello = NULL;
  408. +newscript->pGOHello = NULL;
  409. +newscript->pAreaTrigger = NULL;
  410. +newscript->pItemQuestAccept = NULL;
  411. +newscript->pGOQuestAccept = NULL;
  412. +newscript->pGOChooseReward = NULL;
  413. +
  414. +m_scripts[nrscripts++] = newscript;
  415. +
  416. +}
  417. \ No newline at end of file
  418. --- src/bindings/ScriptDev2/scripts/custom/sc_teleport_npc_1.cpp 2007-05-23 14:14:28.904259000 +0000
  419. +++ src/bindings/ScriptDev2/scripts/custom/sc_teleport_npc_1.cpp 2007-05-23 14:14:25.314259000 +0000
  420. @@ -0,0 +1,360 @@
  421. +#include "../sc_defines.h"
  422. +bool GossipHello_teleport_npc_1(Player *player, Creature *_Creature)
  423. +
  424. +{
  425. +player->ADD_GOSSIP_ITEM( 7, "Alentus (20000 gold)", GOSSIP_SENDER_MAIN, 1212);
  426. +player->ADD_GOSSIP_ITEM( 7, "Hyjal (2000 gold)", GOSSIP_SENDER_MAIN, 1200);
  427. +player->ADD_GOSSIP_ITEM( 7, "Tirisfal Prime (250 gold)", GOSSIP_SENDER_MAIN, 1201);
  428. +player->ADD_GOSSIP_ITEM( 7, "Shattrath (500 gold)", GOSSIP_SENDER_MAIN, 1202);
  429. +player->ADD_GOSSIP_ITEM( 7, "Darnassus (5 gold)", GOSSIP_SENDER_MAIN, 1203);
  430. +player->ADD_GOSSIP_ITEM( 7, "Exodar (5 gold)", GOSSIP_SENDER_MAIN, 1204);
  431. +player->ADD_GOSSIP_ITEM( 7, "Ironforge (5 gold)", GOSSIP_SENDER_MAIN, 1205);
  432. +player->ADD_GOSSIP_ITEM( 7, "Stormwind (5 gold)", GOSSIP_SENDER_MAIN, 1206);
  433. +player->ADD_GOSSIP_ITEM( 7, "Orgrimmar (5 gold)", GOSSIP_SENDER_MAIN, 1207);
  434. +player->ADD_GOSSIP_ITEM( 7, "Silvermoon (5 gold)", GOSSIP_SENDER_MAIN, 1208);
  435. +player->ADD_GOSSIP_ITEM( 7, "Thunder Bluff (5 gold)", GOSSIP_SENDER_MAIN, 1209);
  436. +player->ADD_GOSSIP_ITEM( 7, "Undercity (5 gold)", GOSSIP_SENDER_MAIN, 1210);
  437. +player->ADD_GOSSIP_ITEM( 7, "Gurubashi Arena (free)", GOSSIP_SENDER_MAIN, 1211);
  438. +
  439. +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID());
  440. +
  441. +return true;
  442. +
  443. +}
  444. +
  445. +void SendDefaultMenu_teleport_npc_1(Player *player, Creature *_Creature, uint32 action)
  446. +{
  447. +
  448. +// Teleport to Alentus
  449. +if (action == 1212)
  450. +{
  451. + if (player->getLevel() >= 175)
  452. + {
  453. + if (player->GetMoney() >= 200000000)
  454. + {
  455. + player->Say("Off I go to Alentus!",LANG_UNIVERSAL);
  456. + player->CLOSE_GOSSIP_MENU();
  457. + player->ModifyMoney(-200000000);
  458. + player->TeleportTo(0, -4730.4931f, 579.1478f, 408.0016f, 1.9714f);
  459. + }
  460. + else
  461. + {
  462. + player->Say("I must have at least 20 000 gold to enter Alentus.",LANG_UNIVERSAL);
  463. + player->CLOSE_GOSSIP_MENU();
  464. + }
  465. + }
  466. + else
  467. + {
  468. + player->Say("I must be at least level 175 to enter Alentus.",LANG_UNIVERSAL);
  469. + player->CLOSE_GOSSIP_MENU();
  470. + }
  471. +}
  472. +
  473. +// Teleport to Hyjal
  474. +if (action == 1200)
  475. +{
  476. + if (player->getLevel() >= 85)
  477. + {
  478. + if (player->GetMoney() >= 20000000)
  479. + {
  480. + player->Say("Off I go to Hyjal!",LANG_UNIVERSAL);
  481. + player->CLOSE_GOSSIP_MENU();
  482. + player->ModifyMoney(-20000000);
  483. + player->TeleportTo(1, 4609.85f, -3866.36f, 944.18f, 1.139f);
  484. + }
  485. + else
  486. + {
  487. + player->Say("I must have at least 2000 gold to enter Hyjal.",LANG_UNIVERSAL);
  488. + player->CLOSE_GOSSIP_MENU();
  489. + }
  490. + }
  491. + else
  492. + {
  493. + player->Say("I must be at least level 85 to enter Hyjal.",LANG_UNIVERSAL);
  494. + player->CLOSE_GOSSIP_MENU();
  495. + }
  496. +}
  497. +
  498. +// Teleport to Tirisfal Prime
  499. +if (action == 1201)
  500. +{
  501. + if (player->getLevel() >= 60)
  502. + {
  503. + if (player->GetMoney() >= 2500000)
  504. + {
  505. + player->Say("Off I go to Tirisfal Prime!",LANG_UNIVERSAL);
  506. + player->CLOSE_GOSSIP_MENU();
  507. + player->ModifyMoney(-2500000);
  508. + player->TeleportTo(0, 2500.0f, 2131.0f, 33.0f, 0.0f);
  509. + }
  510. + else
  511. + {
  512. + player->Say("I must have at least 250 gold to enter Tirisfal Prime.",LANG_UNIVERSAL);
  513. + player->CLOSE_GOSSIP_MENU();
  514. + }
  515. + }
  516. + else
  517. + {
  518. + player->Say("I must be at least level 60 to enter Tirisfal Prime.",LANG_UNIVERSAL);
  519. + player->CLOSE_GOSSIP_MENU();
  520. + }
  521. +}
  522. +
  523. +// Teleport to Shattrath
  524. +if (action == 1202)
  525. +{
  526. + if (player->getLevel() >= 58)
  527. + {
  528. + if (player->GetMoney() >= 5000000)
  529. + {
  530. + player->Say("Off I go to Shattrath city!",LANG_UNIVERSAL);
  531. + player->CLOSE_GOSSIP_MENU();
  532. + player->ModifyMoney(-5000000);
  533. + player->TeleportTo(530, -1846.85f, 5396.64f, -12.4282f, 0.0f);
  534. + }
  535. + else
  536. + {
  537. + player->Say("I must have at least 500 gold to enter Shattrath.",LANG_UNIVERSAL);
  538. + player->CLOSE_GOSSIP_MENU();
  539. + }
  540. + }
  541. + else
  542. + {
  543. + player->Say("I must be at least level 58 to enter Shattrath.",LANG_UNIVERSAL);
  544. + player->CLOSE_GOSSIP_MENU();
  545. + }
  546. +}
  547. +
  548. +// Teleport to Darnassus
  549. +if (action == 1203)
  550. +{
  551. + if (player->GetTeam() == ALLIANCE)
  552. + {
  553. + if (player->GetMoney() >= 50000)
  554. + {
  555. + player->CLOSE_GOSSIP_MENU();
  556. + player->ModifyMoney(-50000);
  557. + player->TeleportTo(1, 9947.52f, 2482.73f, 1316.21f, 0.0f);
  558. + }
  559. + else
  560. + {
  561. + player->Say("I need 5 gold to teleport there.",LANG_UNIVERSAL);
  562. + player->CLOSE_GOSSIP_MENU();
  563. + }
  564. + }
  565. + else
  566. + {
  567. + player->Say("I cannot enter alliance areas...",LANG_UNIVERSAL);
  568. + player->CLOSE_GOSSIP_MENU();
  569. + }
  570. +}
  571. +
  572. +// Teleport to Exodar
  573. +if (action == 1204)
  574. +{
  575. + if (player->GetTeam() == ALLIANCE)
  576. + {
  577. + if (player->GetMoney() >= 50000)
  578. + {
  579. + player->CLOSE_GOSSIP_MENU();
  580. + player->ModifyMoney(-50000);
  581. + player->TeleportTo(530, -4073.03f, -12020.4f, -1.47f, 0.0f);
  582. + }
  583. + else
  584. + {
  585. + player->Say("I need 5 gold to teleport there.",LANG_UNIVERSAL);
  586. + player->CLOSE_GOSSIP_MENU();
  587. + }
  588. + }
  589. + else
  590. + {
  591. + player->Say("I cannot enter alliance areas...",LANG_UNIVERSAL);
  592. + player->CLOSE_GOSSIP_MENU();
  593. + }
  594. +}
  595. +
  596. +// Teleport to Ironforge
  597. +if (action == 1205)
  598. +{
  599. + if (player->GetTeam() == ALLIANCE)
  600. + {
  601. + if (player->GetMoney() >= 50000)
  602. + {
  603. + player->CLOSE_GOSSIP_MENU();
  604. + player->ModifyMoney(-50000);
  605. + player->TeleportTo(0, -5032.0f, -819.0f, 495.0f, 0.0f);
  606. + }
  607. + else
  608. + {
  609. + player->Say("I need 5 gold to teleport there.",LANG_UNIVERSAL);
  610. + player->CLOSE_GOSSIP_MENU();
  611. + }
  612. + }
  613. + else
  614. + {
  615. + player->Say("I cannot enter alliance areas...",LANG_UNIVERSAL);
  616. + player->CLOSE_GOSSIP_MENU();
  617. + }
  618. +}
  619. +
  620. +// Teleport to Stormwind
  621. +if (action == 1206)
  622. +{
  623. + if (player->GetTeam() == ALLIANCE)
  624. + {
  625. + if (player->GetMoney() >= 50000)
  626. + {
  627. + player->CLOSE_GOSSIP_MENU();
  628. + player->ModifyMoney(-50000);
  629. + player->TeleportTo(0, -8960.14f, 516.266f, 96.3568f, 0.0f);
  630. + }
  631. + else
  632. + {
  633. + player->Say("I need 5 gold to teleport there.",LANG_UNIVERSAL);
  634. + player->CLOSE_GOSSIP_MENU();
  635. + }
  636. + }
  637. + else
  638. + {
  639. + player->Say("I cannot enter alliance areas...",LANG_UNIVERSAL);
  640. + player->CLOSE_GOSSIP_MENU();
  641. + }
  642. +}
  643. +
  644. +// Teleport to Orgrimmar
  645. +if (action == 1207)
  646. +{
  647. + if (player->GetTeam() == HORDE)
  648. + {
  649. + if (player->GetMoney() >= 50000)
  650. + {
  651. + player->CLOSE_GOSSIP_MENU();
  652. + player->ModifyMoney(-50000);
  653. + player->TeleportTo(1, 1552.5f, -4420.66f, 8.94802f, 0.0f);
  654. + }
  655. + else
  656. + {
  657. + player->Say("I need 5 gold to teleport there.",LANG_UNIVERSAL);
  658. + player->CLOSE_GOSSIP_MENU();
  659. + }
  660. + }
  661. + else
  662. + {
  663. + player->Say("I cannot enter horde areas...",LANG_UNIVERSAL);
  664. + player->CLOSE_GOSSIP_MENU();
  665. + }
  666. +}
  667. +
  668. +// Teleport to Silvermoon
  669. +if (action == 1208)
  670. +{
  671. + if (player->GetTeam() == HORDE)
  672. + {
  673. + if (player->GetMoney() >= 50000)
  674. + {
  675. + player->CLOSE_GOSSIP_MENU();
  676. + player->ModifyMoney(-50000);
  677. + player->TeleportTo(530, 9338.74f, -7277.27f, 13.7895f, 0.0f);
  678. + }
  679. + else
  680. + {
  681. + player->Say("I need 5 gold to teleport there.",LANG_UNIVERSAL);
  682. + player->CLOSE_GOSSIP_MENU();
  683. + }
  684. + }
  685. + else
  686. + {
  687. + player->Say("I cannot enter horde areas...",LANG_UNIVERSAL);
  688. + player->CLOSE_GOSSIP_MENU();
  689. + }
  690. +}
  691. +
  692. +// Teleport to Thunder Bluff
  693. +if (action == 1209)
  694. +{
  695. + if (player->GetTeam() == HORDE)
  696. + {
  697. + if (player->GetMoney() >= 50000)
  698. + {
  699. + player->CLOSE_GOSSIP_MENU();
  700. + player->ModifyMoney(-50000);
  701. + player->TeleportTo(1, -1391.0f, 140.0f, 22.478f, 0.0f);
  702. + }
  703. + else
  704. + {
  705. + player->Say("I need 5 gold to teleport there.",LANG_UNIVERSAL);
  706. + player->CLOSE_GOSSIP_MENU();
  707. + }
  708. + }
  709. + else
  710. + {
  711. + player->Say("I cannot enter horde areas...",LANG_UNIVERSAL);
  712. + player->CLOSE_GOSSIP_MENU();
  713. + }
  714. +}
  715. +
  716. +// Teleport to Undercity
  717. +if (action == 1210)
  718. +{
  719. + if (player->GetTeam() == HORDE)
  720. + {
  721. + if (player->GetMoney() >= 50000)
  722. + {
  723. + player->CLOSE_GOSSIP_MENU();
  724. + player->ModifyMoney(-50000);
  725. + player->TeleportTo(0, 1819.71f, 238.79f, 60.5321f, 0.0f);
  726. + }
  727. + else
  728. + {
  729. + player->Say("I need 5 gold to teleport there.",LANG_UNIVERSAL);
  730. + player->CLOSE_GOSSIP_MENU();
  731. + }
  732. + }
  733. + else
  734. + {
  735. + player->Say("I cannot enter horde areas...",LANG_UNIVERSAL);
  736. + player->CLOSE_GOSSIP_MENU();
  737. + }
  738. +}
  739. +
  740. +// Teleport to Gurubashi Arena
  741. +if (action == 1211)
  742. +{
  743. + player->CLOSE_GOSSIP_MENU();
  744. + player->Say("Off I go to the Gurubashi Arena!",LANG_UNIVERSAL);
  745. + player->TeleportTo(0, -13155.2314f, 340.1806f, 49.7404f, 4.15f);
  746. +}
  747. +
  748. +}
  749. +
  750. +bool GossipSelect_teleport_npc_1(Player *player, Creature *_Creature, uint32 sender, uint32 action )
  751. +
  752. +{
  753. +// Main menu
  754. +if (sender == GOSSIP_SENDER_MAIN)
  755. +SendDefaultMenu_teleport_npc_1(player, _Creature, action);
  756. +
  757. +return true;
  758. +
  759. +}
  760. +
  761. +void AddSC_teleport_npc_1()
  762. +
  763. +{
  764. +
  765. +Script *newscript;
  766. +
  767. +newscript = new Script;
  768. +newscript->Name="teleport_npc_1";
  769. +newscript->pGossipHello = &GossipHello_teleport_npc_1;
  770. +newscript->pGossipSelect = &GossipSelect_teleport_npc_1;
  771. +newscript->pItemHello = NULL;
  772. +newscript->pGOHello = NULL;
  773. +newscript->pAreaTrigger = NULL;
  774. +newscript->pItemQuestAccept = NULL;
  775. +newscript->pGOQuestAccept = NULL;
  776. +newscript->pGOChooseReward = NULL;
  777. +
  778. +m_scripts[nrscripts++] = newscript;
  779. +
  780. +}
RAW Paste Data
Top