Guest User

SI Fixes: fix Gwani hostile reaction

a guest
Jul 5th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.81 KB | None | 0 0
  1. From 970b2ee30ef3471ee01d572eb3e417819f4862c2 Mon Sep 17 00:00:00 2001
  2. From: Malignant Manor <malignantmanor@users.noreply.github.com>
  3. Date: Tue, 5 Jul 2016 13:23:40 -0500
  4. Subject: [PATCH] * SI Fixes: Add correct checks for Gwani cloak/pelt hostility
  5.  but still use   wrong checks
  6.  
  7. ---
  8. ChangeLog                            |  4 +++
  9.  content/sifixes/src/npcs/bwundiai.uc | 50 ++++++++++++++++++++++++++++++++++++
  10.  content/sifixes/src/usecode.uc       |  2 ++
  11.  3 files changed, 56 insertions(+)
  12.  create mode 100644 content/sifixes/src/npcs/bwundiai.uc
  13.  
  14. diff --git a/ChangeLog b/ChangeLog
  15. index 3e9911f..f22e601 100644
  16. --- a/ChangeLog
  17. +++ b/ChangeLog
  18. @@ -1,3 +1,7 @@
  19. +2016-07-05 Malignant Manor <malignantmanor@users.sourceforge.net>
  20. +   * SI Fixes: Add correct checks for Gwani cloak/pelt hostility but still use
  21. +     wrong checks
  22. +
  23.  2016-06-27 Marzo Sette Torres Junior <marzojr@yahoo.com>
  24.     * Fixed bug #1958 "Studio: Selecting mod of a game type doesn't work if there
  25.       are two same game".
  26. diff --git a/content/sifixes/src/npcs/bwundiai.uc b/content/sifixes/src/npcs/bwundiai.uc
  27. new file mode 100644
  28. index 0000000..745517a
  29. --- /dev/null
  30. +++ b/content/sifixes/src/npcs/bwundiai.uc
  31. @@ -0,0 +1,50 @@
  32. +/*
  33. + *  Copyright (C) 2016  The Exult Team
  34. + *
  35. + *  This program is free software; you can redistribute it and/or modify
  36. + *  it under the terms of the GNU General Public License as published by
  37. + *  the Free Software Foundation; either version 2 of the License, or
  38. + *  (at your option) any later version.
  39. + *
  40. + *  This program is distributed in the hope that it will be useful,
  41. + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  42. + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  43. + *  GNU General Public License for more details.
  44. + *
  45. + *  You should have received a copy of the GNU General Public License
  46. + *  along with this program; if not, write to the Free Software
  47. + *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  48. + */
  49. +
  50. +/*
  51. + * We add the correct Gwani pelt and cloak checks that give hostile reactions
  52. + * but still use the wrong checks
  53. + */
  54. +
  55. +extern var npcNearbyAndVisible 0x942 (var npc);
  56. +extern var hasItemCount 0x97D (var cont, var mincount, var shapenum, var quality, var framenum);
  57. +extern var partyUtters 0x992 (var npcnum, var partyutter, var avatarutter, var isbark);
  58. +
  59. +void Bwundiai object#(0x490) ()
  60. +{
  61. +   if (event == STARTED_TALKING) {
  62. +       var gwani_pelt = hasItemCount(PARTY, 1, 977, QUALITY_ANY, 9); // was using frame 8
  63. +       var gwani_cloak = hasItemCount(PARTY, 1, 227, QUALITY_ANY, 4); // was using shape 2
  64. +       if (gwani_pelt || gwani_cloak) {
  65. +           UI_run_schedule(BWUNDIAI);
  66. +           UI_clear_item_say(BWUNDIAI);
  67. +           UI_show_npc_face0(BWUNDIAI, 0);
  68. +           say("\"Botoka na guta!\" *This creature looks at you with eyes so filled with hate that it is painful to look at them.");
  69. +
  70. +           if (npcNearbyAndVisible(MWAERNO)) {
  71. +               UI_show_npc_face1(MWAERNO, 0);
  72. +               UI_set_conversation_slot(1);
  73. +               say("\"Umgabar fotuba na Gwani!\" *This one looks at you with eyes that are cold and feral.");
  74. +               UI_remove_npc_face1();
  75. +           }
  76. +           partyUtters(IOLO, "@Avatar, they smell the Gwani pelts!@", "@They smell the Gwani pelts!@", false);
  77. +           return;
  78. +       }
  79. +   }
  80. +   Bwundiai.original();
  81. +}
  82. diff --git a/content/sifixes/src/usecode.uc b/content/sifixes/src/usecode.uc
  83. index b00a658..9ea790d 100644
  84. --- a/content/sifixes/src/usecode.uc
  85. +++ b/content/sifixes/src/usecode.uc
  86. @@ -74,6 +74,8 @@
  87.  #include "npcs/iolo.uc"
  88.  // She now really gives dried fish when asked
  89.  #include "npcs/baiyanda.uc"
  90. +// Add correct checks for Gwani cloak/pelt hostility but still use wrong checks
  91. +#include "npcs/bwundiai.uc"
  92.  // For curing Cantra, from exult/content/si
  93.  #include "npcs/cantra.uc"
  94.  // Fixes fur cap/misplaced item list bug
  95. --
  96. 1.9.5.msysgit.1
Add Comment
Please, Sign In to add comment