summaryrefslogtreecommitdiff
path: root/src/server/scripts/Custom
diff options
context:
space:
mode:
authorYehonal <hw.2@hotmail.it>2016-06-26 19:22:35 +0200
committerYehonal <hw.2@hotmail.it>2016-06-26 19:22:35 +0200
commit52f305111ce2bb876eaea985d75ffcb744f583a5 (patch)
tree6607d6eb3af13384f3cf5e6aafd362f244da49ea /src/server/scripts/Custom
parent5bb70a86beab67958520b170c5008b82d0e36314 (diff)
importing changes from callmephil repo
a special thanks to him
Diffstat (limited to 'src/server/scripts/Custom')
-rw-r--r--src/server/scripts/Custom/Multivendor/MultivendorExample.sql10
-rw-r--r--src/server/scripts/Custom/Multivendor/README.md42
2 files changed, 52 insertions, 0 deletions
diff --git a/src/server/scripts/Custom/Multivendor/MultivendorExample.sql b/src/server/scripts/Custom/Multivendor/MultivendorExample.sql
new file mode 100644
index 0000000000..ef94f213da
--- /dev/null
+++ b/src/server/scripts/Custom/Multivendor/MultivendorExample.sql
@@ -0,0 +1,10 @@
+SET @ENTRY = (SELECT max(entry)+1 FROM creature_template);
+SET @MENU_ID = (SELECT max(menu_id)+1 FROM gossip_menu_option);
+
+INSERT INTO `creature_template` (`entry`, `modelid1`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `dmgschool`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES
+(@ENTRY, 1298, "Herbert", "MultiVendor", NULL, @MENU_ID, 10, 10, 0, 35, 129, 1, 1.14286, 1, 0, 0, 1500, 0, 1, 512, 2048, 8, 0, 0, 0, 0, 0, 7, 138412032, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 0, 0, 1, 0, 2, '');
+
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES
+(@MENU_ID, 0, 4, 'VendorTest 465', 3, 128, 465, 0, 0, 0, ''),
+(@MENU_ID, 1, 9, 'VendorTest 54', 3, 128, 54, 0, 0, 0, ''),
+(@MENU_ID, 2, 6, 'VendorTest 35574', 3, 128, 35574, 0, 0, 100, 'These goods are special, so pay up!');
diff --git a/src/server/scripts/Custom/Multivendor/README.md b/src/server/scripts/Custom/Multivendor/README.md
new file mode 100644
index 0000000000..39680beb37
--- /dev/null
+++ b/src/server/scripts/Custom/Multivendor/README.md
@@ -0,0 +1,42 @@
+#Multivendor [![Build Status](https://travis-ci.org/Rochet2/TrinityCore.svg?branch=multivendor)](https://travis-ci.org/Rochet2/TrinityCore)
+
+####About
+Allows you to show gossip options that show different vendors from npc_vendor.<br />
+Source: http://rochet2.github.io/Multivendor.html
+
+####Installation
+
+Available as:
+- Direct merge: https://github.com/Rochet2/TrinityCore/tree/multivendor
+- Diff: https://github.com/Rochet2/TrinityCore/compare/TrinityCore:3.3.5...multivendor.diff
+- Diff in github view: https://github.com/Rochet2/TrinityCore/compare/TrinityCore:3.3.5...multivendor
+
+Using direct merge:
+- open git bash to source location
+- do `git remote add rochet2 https://github.com/Rochet2/TrinityCore.git`
+- do `git pull rochet2 multivendor`
+- use cmake and compile
+
+Using diff:
+- DO NOT COPY THE DIFF DIRECTLY! It causes apply to fail.
+- download the diff by __right clicking__ the link and select __Save link as__
+- place the downloaded `multivendor.diff` to the source root folder
+- open git bash to source location
+- do `git apply multivendor.diff`
+- use cmake and compile
+
+####Usage
+Set your NPC to have gossip and vendor NPCflags (129)<br />
+Add a gossip menu for him and add a new option to it.<br />
+The option needs to have option_id set to 3 so it acts as a vendor button,<br />
+npc_option_npcflag can be 1 or 128 (shows only if the NPC has vendor flag then)<br />
+and the action_menu_id is the vendor entry from npc_vendor that you want to show to the player.<br />
+
+YOU CAN also send menus from C++. All you need to do is to provide the vendor entry to the<br />
+`void WorldSession::SendListInventory(ObjectGuid guid, uint32 vendorEntry)` function.
+
+The npc add item command was modified so you can add items to multivendors as well.<br />
+The last vendor window must have been the multivendor you want to add your item to.<br />
+After opening the window you need to type `.npc add item #itemId <#maxcount><#incrtime><#extendedcost> 1`<br />
+The 1 in the end specifies that you are adding the item to the multivendor currently open.<br />
+Same thing works with `.npc delete item #itemId 1`