Advertisement
Guest User

Untitled

a guest
Apr 21st, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. item script PotionSpecial
  2. {
  3. void run(int a,int b, int c)
  4. {
  5.  
  6. if(a==0){Game->DCounter[CR_LIFE] += b;}
  7. if(a==1){Game->DCounter[CR_MAGIC] += c;}
  8. if(a==2){Game->DCounter[CR_LIFE] +=b; Game->DCounter[CR_LIFE] += c;}
  9.  
  10. }
  11. }
  12.  
  13. item script EveryWeapon {
  14. void run(int thisItemId) {
  15. LastItemUsed = thisItemId;}}
  16.  
  17. item script DummyItem
  18. {
  19. void run(int ItemID, int m)
  20. {
  21. Link->Item[ItemID] = true;
  22. Screen->Message(m);
  23. }
  24. }
  25.  
  26. item script ItemBundle
  27. {
  28. void run(int a, int b, int c, int d, int e, int f, int g, int m)
  29. {
  30. Link->Item[a] = true;
  31. Link->Item[b] = true;
  32. Link->Item[c] = true;
  33. Link->Item[d] = true;
  34. Link->Item[e] = true;
  35. Link->Item[f] = true;
  36. Link->Item[g] = true;
  37. Screen->Message(m);
  38. }
  39. }
  40.  
  41. //D0 - D7: Set these to the items you want to give in the bundle and place as the pickup script on one dummy item.
  42.  
  43. item script MultipleItemPickup{
  44.  
  45. void run(int Item0, int Item1, int m){
  46. item giveitem0= Screen->CreateItem(Item0);
  47. giveitem0->X = Link->X;
  48. giveitem0->Y = Link->Y;
  49. giveitem0->Z = Link->Z;
  50. item giveitem1= Screen->CreateItem(Item1);
  51. giveitem1->X = Link->X;
  52. giveitem1->Y = Link->Y;
  53. giveitem1->Z = Link->Z;
  54.  
  55. Screen->Message(m);
  56.  
  57. }
  58. }
  59.  
  60. //D0: The power of this attack ring (can be integer or decimal)
  61. item script attackRingPickup{
  62. void run(float power, int m){
  63. attackRingPower = Max(attackRingPower, power);
  64. Screen->Message(m);
  65. }
  66. }
  67.  
  68. item script IceRod{
  69. void run(int step, int thisItemId){
  70. LastItemUsed = thisItemId;
  71. if (Game->Counter[CR_MAGIC] > 8)
  72. {
  73. Game->Counter[CR_MAGIC] -= 8; //fill in the magic consumption here as well
  74. lweapon Ice = NextToLink(LW_SCRIPT1, 1);
  75. Ice->Dir = Link->Dir;
  76. Ice->Damage = 2;
  77. Ice->Step = step;
  78. Ice->Misc[4] = 42;
  79. Ice->Misc[10] = 2;
  80. Ice->UseSprite(83);
  81. Ice->CollDetection=false;
  82.  
  83. }
  84.  
  85. else{
  86. Game->PlaySound(SFX_ERROR); //If out of MP, play ERROR SOund Effects.
  87. }
  88. }
  89. }
  90.  
  91. item script IceElemental{
  92. void run(int sprite, int thisItemId){
  93.  
  94. lweapon Ice = NextToLink(LW_ARROW, 3);
  95. Ice->Dir = Link->Dir;
  96. Ice->Misc[4] = 42;
  97. Ice->Misc[10] = 2;
  98. Ice->CollDetection=false;
  99.  
  100.  
  101.  
  102. }
  103. }
  104.  
  105. item script FireElemental {
  106. void run(int thisItemId) {
  107. LastItemUsed = thisItemId;}}
  108.  
  109. item script LightElemental {
  110. void run(int thisItemId) {
  111. LastItemUsed = thisItemId;}}
  112.  
  113.  
  114. item script Message{
  115. void run(int ignore1, int ignore2, int ignore3, int ignore4, int ignore5, int ignore6, int ignore7, int m){
  116. Screen->Message(m);
  117. }
  118. }
  119.  
  120. //D0: MP Cost
  121. item script faroresWind{
  122. void run(int mpCost){
  123. //If warp currently active, quit
  124. if ( fwData[FWD_ACTIVE] != 0 )
  125. return;
  126.  
  127. //If no warp point and insufficient magic, quit
  128. if ( fwData[FWD_DMAP] > 0 && Link->MP < mpCost )
  129. return;
  130.  
  131. //Otherwise if no warp point, pay to make one
  132. if ( fwData[FWD_DMAP] > 0 )
  133. Link->MP -= mpCost;
  134.  
  135. //Then activate
  136. fwData[FWD_ACTIVE] = 1;
  137. }
  138. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement