daily pastebin goal
36%
SHARE
TWEET

Character Creation

a guest Aug 19th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. INIT
  2.  
  3. DB_CharacterCreationLevels("SYS_Character_Creation_A");
  4.  
  5. DB_GLO_FirstLevelAfterCharacterCreation("PoS_Starting_Village");
  6.  
  7. DB_CharCreateTransitionInfo("PoS_Starting_Village",(TRIGGERGUID)TRIGGERGUID_StartPoint_000_000_000_000_e9cb71b1-a972-4ec7-8a5d-9afa6ab47d3f,"");
  8.  
  9. DB_StartPoints((TRIGGERGUID)TRIGGERGUID_StartPoint_000_000_000_000_e9cb71b1-a972-4ec7-8a5d-9afa6ab47d3f);
  10.  
  11. DB_CharacterCreationDummy((CHARACTERGUID)S_GLO_CharacterCreationDummy_001_da072fe7-fdd5-42ae-9139-8bd4b9fca406);
  12. DB_CharacterCreationDummy((CHARACTERGUID)S_GLO_CharacterCreationDummy_002_361dacdc-4135-4d3f-a9a2-3cad46ca246a);
  13. DB_CharacterCreationDummy((CHARACTERGUID)S_GLO_CharacterCreationDummy_003_dded8c22-b28e-45c1-a074-eb0954602c8a);
  14. DB_CharacterCreationDummy((CHARACTERGUID)S_GLO_CharacterCreationDummy_004_5f93cae7-6c10-4da1-b9a5-0efafc168c8e);
  15.  
  16. DB_GenericOrigins((CHARACTERGUID)S_Player_GenericOrigin_7b6c1f26-fe4e-40bd-a5d0-e6ff58cef4fe);
  17. DB_GenericOrigins((CHARACTERGUID)S_Player_GenericOrigin2_c451954c-73bf-46ce-a1d1-caa9bbdc3cfd);
  18. DB_GenericOrigins((CHARACTERGUID)S_Player_GenericOrigin3_41a06985-7851-4c29-8a78-398ccb313f39);
  19. DB_GenericOrigins((CHARACTERGUID)S_Player_GenericOrigin4_41a594ed-b768-4289-9f17-59f701cc6910);
  20.  
  21. DB_OriginsCharacterIDs((CHARACTERGUID)S_Player_Beast_f25ca124-a4d2-427b-af62-df66df41a978);
  22. DB_OriginsCharacterIDs((CHARACTERGUID)S_Player_Fane_02a77f1f-872b-49ca-91ab-32098c443beb);
  23. DB_OriginsCharacterIDs((CHARACTERGUID)S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f);
  24. DB_OriginsCharacterIDs((CHARACTERGUID)S_Player_Lohse_bb932b13-8ebf-4ab4-aac0-83e6924e4295);
  25. DB_OriginsCharacterIDs((CHARACTERGUID)S_Player_RedPrince_a26a1efb-cdc8-4cf3-a7b2-b2f9544add6f);
  26. DB_OriginsCharacterIDs((CHARACTERGUID)S_Player_Sebille_c8d55eaf-e4eb-466a-8f0d-6a9447b5b24c);
  27.  
  28. ----------------------------------------------------------------------------------------------------------------------
  29. KB
  30.  
  31. IF
  32. CharacterEnteredTrigger(_Player,TRIGGERGUID_TeleportToTownAtStart_1ca8f96e-263d-424f-ac17-21c52d667c51)
  33. AND
  34. DB_IsPlayer(_Player)
  35. AND
  36. DB_StartPoints((TRIGGERGUID)_StartPoint)
  37. AND
  38. UserGetFlag(_Player,"StarterTeleport",0)
  39. THEN
  40. TeleportTo(_Player,(TRIGGERGUID)_StartPoint);
  41. UserSetFlag(_Player,"StarterTeleport");
  42. SetOnStage(ITEMGUID_PyramidPortalLeft_d1f3d72b-bbcf-423c-9ff0-bca82edf6e58,0);
  43. SetOnStage(ITEMGUID_PyramidPortalRight_428e32bb-8a43-403d-ae36-642ba1f23759,0);
  44.  
  45.  
  46. IF
  47. RegionStarted((STRING)_NewRegion)
  48. THEN
  49. ProcCheckRemoveOtherOrigins();
  50.  
  51. PROC
  52. ProcCheckRemoveOtherOrigins()
  53. AND
  54. NOT DB_InCharacterCreation(1)
  55. AND
  56. QueryOnlyOnce("SetupNonSelectedOrigins")
  57. THEN
  58. ProcRemoveOtherOrigins();
  59.  
  60. PROC
  61. ProcRemoveOtherOrigins()
  62. AND
  63. DB_GenericOrigins(_GenericOrigin)
  64. AND
  65. IsTagged(_GenericOrigin,"AVATAR",0)
  66. THEN
  67. NOT DB_IsPlayer(_GenericOrigin);
  68. CharacterRemoveFromParty(_GenericOrigin);
  69. CharacterMakeNPC(_GenericOrigin);
  70. SetOnStage(_GenericOrigin,0);
  71.  
  72. PROC
  73. ProcRemoveOtherOrigins()
  74. AND
  75. DB_OriginsCharacterIDs(_Origin)
  76. AND
  77. IsTagged(_Origin,"AVATAR",0)
  78. THEN
  79. NOT DB_IsPlayer(_Origin);
  80. CharacterRemoveFromParty(_Origin);
  81. CharacterMakeNPC(_Origin);
  82. SetOnStage(_Origin,0);
  83.  
  84. IF
  85. GameModeStarted("Campaign",1)
  86. AND
  87. DB_OriginsCharacterIDs(_Dummy)
  88. THEN
  89. NOT DB_IsPlayer(_Dummy);
  90. CharacterMakeNPC(_Dummy);
  91. SetOnStage(_Dummy,0);
  92.  
  93.  
  94. IF
  95. DB_InCharacterCreation(1)
  96. AND
  97. DB_OriginsCharacterIDs((CHARACTERGUID)_Orig)
  98. AND
  99. ObjectExists(_Orig,1)
  100. THEN
  101. SetOnStage(_Orig,1);
  102. TeleportTo(_Orig,S_CharOriginDest_c9c5e1d7-1998-4d4e-aacb-3970e8823674);//S_CharOriginDest_c9c5e1d7-1998-4d4e-aacb-3970e8823674
  103. CharacterMakePlayer(_Orig, NULL_00000000-0000-0000-0000-000000000000);
  104.  
  105. IF
  106. CharacterCreationFinished((CHARACTERGUID)NULL_00000000-0000-0000-0000-000000000000)
  107. AND
  108. DB_OriginsCharacterIDs(_Dummy)
  109. AND
  110. NOT DB_SelectedCC(_Dummy,_)
  111. THEN
  112. NOT DB_IsPlayer(_Dummy);
  113. CharacterMakeNPC(_Dummy);
  114. SetOnStage(_Dummy,0);
  115.  
  116. //End Origins Dependency Stuff
  117.  
  118. //Basic Character Creation from Larian for Standalone Adventures
  119. IF
  120. DB_CharacterCreationDummy(_Dummy)
  121. THEN
  122. DB_AvailableDummy(_Dummy);
  123.  
  124. IF
  125. GameModeStarted("Campaign",1)
  126. THEN
  127. DB_InCharacterCreation(0);
  128.  
  129. IF
  130. GameModeStarted("Campaign",1)
  131. AND
  132. DB_CharacterCreationDummy(_Dummy)
  133. THEN
  134. CharacterMakeNPC(_Dummy);
  135. SetOnStage(_Dummy,0);
  136.  
  137. IF
  138. GameModeStarted("Campaign",1)
  139. AND
  140. DB_GenericOrigins(_Dummy)
  141. THEN
  142. CharacterMakeNPC(_Dummy);
  143. SetOnStage(_Dummy,0);
  144.  
  145. IF
  146. RegionStarted(_Lvl)
  147. AND
  148. IsGameLevel(_Lvl,1)
  149. THEN
  150. DB_InCharacterCreation(0);
  151.  
  152. IF
  153. CharacterCreationStarted(_)
  154. AND
  155. CharacterAddToCharacterCreation((CHARACTERGUID)CHARACTERGUID_S_GLO_CharacterCreationDummy_001_da072fe7-fdd5-42ae-9139-8bd4b9fca406,0,_Success)
  156. THEN
  157. DB_InCharacterCreation(_Success);
  158.  
  159. IF
  160. DB_InCharacterCreation(1)
  161. AND
  162. DB_CharacterCreationDummy(_Dummy)
  163. THEN
  164. SetOnStage(_Dummy,1);
  165. TeleportTo(_Dummy,S_CharOriginDest_c9c5e1d7-1998-4d4e-aacb-3970e8823674);
  166. CharacterMakePlayer(_Dummy, NULL_00000000-0000-0000-0000-000000000000);
  167.  
  168. IF
  169. DB_InCharacterCreation(1)
  170. AND
  171. DB_GenericOrigins((CHARACTERGUID)_Org)
  172. THEN
  173. SetOnStage(_Org,1);
  174. TeleportTo(_Org,S_CharOriginDest_c9c5e1d7-1998-4d4e-aacb-3970e8823674);
  175. CharacterMakePlayer(_Org, NULL_00000000-0000-0000-0000-000000000000);
  176.  
  177. IF
  178. DB_InCharacterCreation(1)
  179. THEN
  180. IterateUsers("_CCUserSetup");
  181.  
  182. IF
  183. UserEvent(_User,"_CCUserSetup")
  184. AND
  185. GetUserProfileID(_User,_UserName)
  186. AND
  187. DB_CharacterCreationDummy(_Dummy)
  188. AND
  189. NOT DB_AssignedDummyForUser(_,_Dummy)
  190. AND
  191. NOT DB_AssignedDummyForUser(_UserName,_)
  192. THEN
  193. ProcAssignDummyToUser(_Dummy,_UserName);
  194.  
  195. IF
  196. UserEvent(_User,"_CCUserSetup")
  197. AND
  198. GetUserProfileID(_User,_UserName)
  199. AND
  200. DB_AssignedDummyForUser(_UserName,_Dummy)
  201. THEN
  202. SetOnStage(_Dummy,1);
  203. CharacterMakePlayer(_Dummy);
  204. CharacterAssignToUser(_User,_Dummy);
  205. MakePlayerActive(_Dummy);
  206. DB_IsPlayer(_Dummy);
  207.  
  208.  
  209. IF
  210. CharacterCreationFinished((CHARACTERGUID)NULL_00000000-0000-0000-0000-000000000000)
  211. AND
  212. DB_InCharacterCreation(1)
  213. AND
  214. DB_CurrentLevel(_Lvl)
  215. AND
  216. DB_CharacterCreationLevels(_Lvl)
  217. AND
  218. DB_GLO_FirstLevelAfterCharacterCreation(_FirstLevel)
  219. AND
  220. DB_CharCreateTransitionInfo(_FirstLevel,_StartPoint,_Movie)
  221. AND
  222. DB_IsPlayer(_Char)
  223. THEN
  224. NOT DB_DoNotFace(_Char);
  225. ProcMovePartyToStart(_Char,_StartPoint);
  226.  
  227. IF
  228. RegionStarted(_Region)
  229. AND
  230. IsGameLevel(_Region,1)
  231. THEN
  232. DB_StartedActualGame(1);
  233.  
  234. IF
  235. UserDisconnected(_UserID,_,_UserProfile)
  236. AND
  237. NOT DB_InCharacterCreation(1)
  238. AND
  239. NOT DB_StartedActualGame(1)
  240. AND
  241. DB_SelectedCC(_Char,_UserProfile)
  242. THEN
  243. NOT DB_IsPlayer(_Char);
  244. ProcUnRegisterPlayerTriggers(_Char);
  245.  
  246. PROC
  247. ProcMovePartyToStart((CHARACTERGUID)_NewChar,(TRIGGERGUID)_StartTrigger)
  248. THEN
  249. NOT DB_AlreadyTeleported(1);
  250.  
  251. PROC
  252. ProcMovePartyToStart((CHARACTERGUID)_NewChar,(TRIGGERGUID)_StartTrigger)
  253. AND
  254. DB_TeleportedToStartCharacters(_Char)
  255. AND
  256. CharacterIsInPartyWith(_Char,_NewChar,1)
  257. THEN
  258. DB_AlreadyTeleported(1);
  259.  
  260. PROC
  261. ProcMovePartyToStart((CHARACTERGUID)_NewChar,(TRIGGERGUID)_StartTrigger)
  262. AND
  263. NOT DB_AlreadyTeleported(1)
  264. THEN
  265. DB_TeleportedToStartCharacters(_NewChar);
  266. CharacterTeleportPartiesToTrigger(_StartTrigger,"");
  267.  
  268. IF
  269. RegionStarted(_Level)
  270. AND
  271. IsGameLevel(_Level,0)
  272. AND
  273. IsCharacterCreationLevel(_Level,0)
  274. AND
  275. DB_CharacterCreationDummy(_Dummy)
  276. AND
  277. _Dummy != CHARACTERGUID_S_GLO_CharacterCreationDummy_001_da072fe7-fdd5-42ae-9139-8bd4b9fca406
  278. THEN
  279. TeleportTo(_Dummy,CHARACTERGUID_S_GLO_CharacterCreationDummy_001_da072fe7-fdd5-42ae-9139-8bd4b9fca406);
  280. CharacterMakePlayer(_Dummy);
  281. DB_IsPlayer(_Dummy);
  282.  
  283. PROC
  284. ProcRemovePreviousSelectedCharacter((STRING)_UserProfile)
  285. AND
  286. DB_SelectedCC((CHARACTERGUID)_Char,(STRING)_UserProfile)
  287. THEN
  288. ClearTag(_Char,"AVATAR");
  289. NOT DB_IsPlayer(_Char);
  290. ProcUnRegisterPlayerTriggers(_Char);
  291. NOT DB_SelectedCC(_Char,_UserProfile);
  292.  
  293. PROC
  294. ProcSetSelectedCharCreationPlayer((CHARACTERGUID)_Char,(STRING)_UserProfile)
  295. THEN
  296. ProcRemovePreviousSelectedCharacter(_UserProfile);
  297. SetTag(_Char,"AVATAR");
  298. DB_IsPlayer(_Char);
  299. ProcRegisterPlayerTriggers(_Char);
  300. DB_SelectedCC(_Char,_UserProfile);
  301.  
  302. IF
  303. UserDisconnected(_UserID,_,_UserProfile)
  304. AND
  305. DB_InCharacterCreation(1)
  306. THEN
  307. ProcRemovePreviousSelectedCharacter(_UserProfile);
  308. ProcRemovePreviousDummy(_UserProfile);
  309.  
  310. IF
  311. CharacterSelectedInCharCreation(_Char,_UserID)
  312. AND
  313. GetUserProfileID(_UserID,_UserProfile)
  314. THEN
  315. ProcSetSelectedCharCreationPlayer(_Char,_UserProfile);
  316.  
  317. IF
  318. CharacterSelectedInCharCreation(_Char,_UserID)
  319. AND
  320. CharacterHasTalent(_Char,"AnimalEmpathy",1)
  321. THEN
  322. SetTag(_Char,"PETPAL");
  323.  
  324. IF
  325. UserConnected(_,_,_UserName)
  326. AND
  327. DB_InCharacterCreation(1)
  328. AND
  329. DB_CharacterCreationDummy(_Dummy)
  330. AND
  331. NOT DB_AssignedDummyForUser(_,_Dummy)
  332. AND
  333. NOT DB_AssignedDummyForUser(_UserName,_)
  334. THEN
  335. ProcAssignDummyToUser(_Dummy,_UserName);
  336.  
  337. PROC
  338. ProcRemovePreviousDummy((STRING)_UserProfile)
  339. AND
  340. DB_AssignedDummyForUser(_UserProfile,_Dummy)
  341. THEN
  342. NOT DB_AssignedDummyForUser(_UserProfile,_Dummy);
  343. DB_AvailableDummy(_Dummy);
  344.  
  345. PROC
  346. ProcAssignDummyToUser((CHARACTERGUID)_Dummy,(STRING)_UserName)
  347. AND
  348. DB_AvailableDummy(_Dummy)
  349. THEN
  350. CharacterMakePlayer(_Dummy, NULL_00000000-0000-0000-0000-000000000000);
  351.  
  352. PROC
  353. ProcAssignDummyToUser((CHARACTERGUID)_Dummy,(STRING)_UserName)
  354. AND
  355. DB_AvailableDummy(_Dummy)
  356. AND
  357. CharacterAddToCharacterCreation(_Dummy,0,1)
  358. THEN
  359. DB_AssignedDummyForUser(_UserName,_Dummy);
  360.  
  361. PROC
  362. ProcAssignDummyToUser((CHARACTERGUID)_Dummy,(STRING)_UserName)
  363. AND
  364. DB_AvailableDummy(_Dummy)
  365. THEN
  366. DB_AssignedDummyForUser(_UserName,_Dummy);
  367.  
  368. PROC
  369. ProcAssignDummyToUser((CHARACTERGUID)_Dummy,(STRING)_UserName)
  370. THEN
  371. NOT DB_AvailableDummy(_Dummy);
  372.  
  373. IF
  374. UserConnected(_UserID,_,_UserName)
  375. AND
  376. DB_InCharacterCreation(1)
  377. AND
  378. DB_AssignedDummyForUser(_UserName,_Dummy)
  379. THEN
  380. SetOnStage(_Dummy,1);
  381. CharacterMakePlayer(_Dummy);
  382. CharacterAssignToUser(_UserID,_Dummy);
  383. MakePlayerActive(_Dummy);
  384.  
  385. IF
  386. CharacterCreationFinished((CHARACTERGUID)NULL_00000000-0000-0000-0000-000000000000)
  387. AND
  388. DB_GenericOrigins(_Dummy)
  389. AND
  390. NOT DB_SelectedCC(_Dummy,_)
  391. THEN
  392. NOT DB_IsPlayer(_Dummy);
  393. CharacterRemoveFromParty(_Dummy);
  394. CharacterMakeNPC(_Dummy);
  395. SetOnStage(_Dummy,0);
  396.  
  397. IF
  398. CharacterCreationFinished((CHARACTERGUID)NULL_00000000-0000-0000-0000-000000000000)
  399. AND
  400. DB_CharacterCreationDummy(_Dummy)
  401. THEN
  402. NOT DB_IsPlayer(_Dummy);
  403. CharacterRemoveFromParty(_Dummy);
  404. CharacterMakeNPC(_Dummy);
  405. SetOnStage(_Dummy,0);
  406.  
  407. IF
  408. CharacterCreationFinished(_)
  409. AND
  410. DB_InCharacterCreation(_Value)
  411. THEN
  412. NOT DB_InCharacterCreation(_Value);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top