How can i add an item to your inventory whenever you kill a player ? menu

Shout-Out

User Tag List

Results 1 to 7 of 7
  1. #1
    Wheeze201's Avatar Active Member
    Reputation
    51
    Join Date
    Apr 2007
    Posts
    660
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can i add an item to your inventory whenever you kill a player ?

    Well.. how do i go about doing so ?

    And how can i make other items require a specific amount of these items to be bought ?


    I'm up for some scripting prefferably LUA

    How can i add an item to your inventory whenever you kill a player ?
  2. #2
    stoneharry's Avatar Moderator Harry


    Reputation
    1615
    Join Date
    Sep 2007
    Posts
    4,558
    Thanks G/R
    151/147
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Well for adding items when you kill a player is C++, cant be done in Lua as far as I am aware, but you get the individual freak Lua scripters who script things like connect 4 somehow working perfectly. To make items require a certain item you go to vendors table, find the vendor and item id, and in extended cost put the code you want for the cost. Heres a list of codes:

    Code:
    2425 Alterac valley mark of honor 10
    2424 Alterac Valley Mark of Honor 5
    2412-2407 unknown 
    2406 Eye of the Storm Mark of Honor 40
    2405 Eye of the Storm mark of Honor 20
    2402 Alterac Valley Mark of Honor 10
    2401 Warsong Gulch Mark of Honor 20
    2400 Eye of the Storm Mark of Honor 40
    2399 unknown
    2398 unknown
    2397 unknown
    2393-2354 unknown appears unused
    2353 Burning Blossom 350
    2352 Burning Blossom 200
    2351 Burning Blossom 100
    2350 Burning Blossom 20
    2349 Burning Blossom 5
    2348 Burning Blossom 2
    2347 Badge of Justicex40
    2346-2334 unknown appears unused
    2333 Badge of Justicex100
    2332 Badge of Justicex45
    2331 Badge of Justicex105
    2330 Badge of Justicex125
    2329 Badge of Justicex150
    2328 unknown
    2327 unknown
    2326-2292 unknown
    2291 Arathi Basin Mark of Honor 20
    2290 Arathi Basin Mark of Honor 20
    2289 Alterac Valley Mark of Honor 40
    2288-2282 unknown appears unused 
    2281 Warsong Gulch Mark of Honor 30
    2280 Alterac Valley Mark of Honor 30
    2279 Arathi Basin Mark of Honor 30
    2278 Arathi Basin Mark of Honor 20
    2277 Alterac Valley Mark of Honor 20
    2276-2273 unknown
    2272 Apexis Shard 50
    2271 Alterac Valley Mark of Honor 40
    2270 Alterac Valley Mark of Honor 40
    2269 Arathi Basin Mark of Honor 20
    2268 Arathi Basin Mark of Honor 20
    2267 Arathi Basin Mark of Honor 20
    2266 Arathi Basin Mark of Honor 20
    2265 Warsong Gulch Mark of Honor 30
    2264 Warsong Gulch Mark of Honor 30
    2263 Alterac Valley Mark of Honor 30
    2262 Alterac Valley Mark of Honor 30
    2261 Alterac Valley Mark of Honor 20
    2260 Alterac Valley Mark of Honor 20
    2259 Arathi Basin Mark of Honor 30
    2258 Arathi Basin Mark of Honor 30
    2257 Alterac Valley Mark of Honor 40
    2256 Alterac Valley Mark of Honor 40
    2255 Eye of the Storm Mark of Honor 20
    2254 Eye of the Storm Mark of Honor 20
    2253 Alterac Valley Mark of Honor 10
    2252 Eye of the Storm Mark of Honor 10
    2251 Warsong Gulch Mark of Honor 20
    2250 Eye of the Storm Mark of Honor 40
    2249 Arathi Basin Mark of Honor 40
    2248 Eye of the Storm Mark of Honor 10
    2242 Eye of the Storm Mark of Honor 20
    2241 Eye of the Storm Mark of Honor 10
    2240 Eye of the Storm Mark of Honor 20
    2239 Eye of the Storm Mark of Honor 20
    2238 Eye of the Storm Mark of Honor 20
    2237 Alterac Valley Mark of Honor 40
    2236 Halaa Research Token 4
    2060 Badge of Justice 35
    2059 Badge of Justice 60
    2049 Badge of Justice 75
    2028 Alterac Valley Mark of Honor 10
    1994 Glowcap 10
    1992 Spirit Shard 2
    1985 Apexis Crystal 3
    1981 Apexis Crystal 4
    1979 Apexis Shard 160
    1973 Apexis Shard 40
    1963 Coilfang Armaments 1
    1959 Mark of the Illidari 1
    1958 Apexis Shard 10
    1952 Apexis Crystal 1
    1950 Apexis Crystal 4
    1949 Apexis Shard 2
    1948 Apexis Shard 3
    1935 Warsong Gulch Mark of Honor 20
    1923 Arathi Basin Mark of Honor 40
    1911 Eye of the Storm Mark of Honor 40
    1910 Apexis Shard 35
    1909 Badge of Justice 10
    1765 Halaa Research Token 2
    1758-1664 unknown 
    1653 Warsong Gulch Mark of Honor 2
    1652 Eye of the Storm Mark of Honor 2
    1649 Alterac Valley Mark of Honor 2
    1648 Arathi Basin Mark of Honor 2
    1647 Halaa Battle Token 70
    1646 Halaa Battle Token 100
    1645 unknown
    1642 Badge of Justice 15
    1565 unknown
    1564 unknown
    1524 Pauldrons of the Forgotten Vanquisher
    1523 Leggings of the Forgotten Vanquisher
    1522 Chestguard of the Forgotten Vanquisher
    1521 Helm of the Forgotten Vanquisher
    1520 Gloves of the Forgotten Vanquisher
    1497 Pauldrons of the Forgotten Conqueror
    1494 Leggings of the Forgotten Conqueror
    1491 Chestguard of the Forgotten Conqueror
    1488 Helm of the Forgotten Conqueror
    1485 Gloves of the Forgotten Conqueror
    1482 Pauldrons of the Forgotten Protector
    1480 Leggings of the forgotten Protector
    1478 Chestguard of the forgotten Protector
    1476 Helm of the Forgotten Protector
    1474 Gloves of the Forgotten Protector
    1468 Murloc Fin 60
    1454 Badge of Justice 30
    1452 Badge of Justice 20
    1442 Warsong Gulch Mark of Honor 60
    1435-1432 unknown
    1361 Pauldrons of the Vanquished Hero
    1360 Leggings of the Vanquished Hero
    1359 Chestguard of the Vanquished Hero
    1358 Helm of the Vanquished Hero
    1357 Gloves of the Vanquished hero
    1346 Pauldrons of the Vanquished Champion
    1345 Leggings of the Vanquished Champion
    1344 Chestguard of the Vanquished Champion
    1343 Helm of the Vanquished CHampion
    1342 Gloves of the Vanquished Champion
    1336 Pauldrons of the Vanquished Defender
    1335 Leggings of the Vaquished Defender
    1334 Chestguard of the Vanquished Defender
    1333 Helm of the Vanquished Defender
    1332 Gloves of the Vanquished Defender
    1243 Pauldrons of the Fallen Defender
    1241 Leggings of the Fallen Defender
    1239 Chestguard of the Fallen Defender
    1237 Helm of the Fallen Defender
    1235 Gloves of the Fallen Defender
    1219 Pauldrons of the Fallen Hero
    1218 Leggings of the Fallen Hero
    1217 Chestguard of the Fallen Hero
    1216 Helm of the Fallen Hero
    1215 Gloves of the Fallen Hero
    1212 Pauldrons of the Fallen Champion
    1209 Leggings of the Fallen Champion
    1206 CHestguard of the Fallen Champion
    1203 Helm of the Fallen Champion 
    1200 Gloves of the Fallen Champion 
    1196 Arcane Rune 8
    1192 Arcane Rune 2
    1188 Holy Dust 8
    1184 Holy Dust 2
    1111 Warsong Gulch Mark of Honor 30
    1110 Arathi Basin Mark of Honor 30
    1077 Glowcap 45
    1076 Glowcap 20
    1062 Alterac Valley Mark of Honor 20
    1061 Arathi Basin Mark of Honor 20
    1055 Warsong Gulch Mark of Honor 30
    1054 Warsong Gulch Mark of Honor 30
    1050 Arathi Basin Mark of Honor 10
    1040 Badge of Justice 50
    1037 Badge of Justice 33
    1027 Badge of Justice 41
    1015 Badge of Justice 25
    1009 Warsong Gulch Mark of Honor 60
    1007 Arathi Basin Mark of Honor 3
    1006 Alterac Valley Mark of Honor 20
    1005 Alterac Valley Mark of Honor 50
    1003 Alterac Valley Mark of Honor 60
    1002 Alterac Valley Mark of Honor 30
    1000 Arathi Basin Mark of Honor 60
    990 Warsong Gulch Mark of Honor 20
    989 Warsong Gulch Mark of Honor 20
    986 Arathi Basin Mark of Honor 10
    968 Warsong Gulch Mark of Honor 30
    947 Arathi Basin Mark of Honor 30
    933 Arathi Basin Mark of Honor 20
    931 Warsong Gulch Mark of Honor 10
    930 Warsong Gulch Mark of Honor 20
    929 Warsong Gulch Mark of Honor 40
    917 Warsong Gulch Mark of Honor 30
    901 Arathi Basin Mark of Honor 30
    887 Arathi Basin Mark of Honor 20
    885 Warsong Gulch Mark of Honor 10
    884 Warsong Gulch Mark of Honor 20
    883 Warsong Gulch Mark of Honor 40
    871 Warsong Gulch Mark of Honor 30
    855 Arathi Basin Mark of Honor 30
    841 Arathi Basin Mark of Honor 20
    839 Warsong Gulch Mark of Honor 10
    838 Warsong Gulch Mark of Honor 20
    837 Warsong Gulch Mark of Honor 40
    826 Warsong Gulch Mark of Honor 30
    823 Warsong Gulch Mark of Honor 10
    822 Warsong Gulch Mark of Honor 20
    821 Warsong Gulch Mark of Honor 40
    774 Arathi Basin Mark of Honor 10
    748 Warsong Gulch Mark of Honor 40
    747 Warsong Gulch Mark of Honor 30
    746 Arathi Basin Mark of Honor 40
    702 Alterac Valley Mark of Honor 25
    701 Warsong Gultch Mark of Honor 30
    653 Warsong Gultch Mark of Honor 30
    652 Arathi Basin Mark of Honor 30
    634 unknown 
    567 Arathi Basin Mark of Honor 40
    565 Arathi Basin Mark of Honor 20
    542 Warsong Gultch Mark of Honor 30
    541 Alterac Valley Mark of Honor 20
    533 Alterac Valley Mark of Honor 20
    532 Atlerac Valley Mark of Honor 10
    520 Arathi Basin mark of Honor 30
    501 Arathi Basin Mark of Honor 40
    497 Alterac Valley Mark of Honor 15
    496 Alterac Valley Mark of Honor 10
    495 Arathi Basin Mark of Honor 20
    492 Warsong Gultch Mark of Honor 10
    491 Warsong Gultch Mark of Honor 20
    490 Warsong Gultch Mark of Honor 40
    489 Alterac Valley Mark of Honor 25
    488 Warsong Gultch Mark of Honor 20
    465 Arathi Basin Mark of Honor 20
    464 Alterac Valley Mark of Honor 30
    463 Arathi Basin Mark of Honor 30
    460 unknown 
    444 Alterac Valley Mark of Honor 30
    428 Alterac Valley Mark of Honor 20
    427 Arathi Basin mark of Honor 20
    423 Alterac Valley Mark of Honor 30
    388 Glowcap 30
    386 unknown
    360 ALterac Valley Mark of Honor 40
    359 Unknown 
    348 Eye of the Storm Mark of Honor 20
    298 Spirit Shard 8
    293 SPirit Shard 50
    205 Arathi Basin Mark of Honor 20
    204 Warsong Gultch Mark of Honor 30
    203 Alterac Valley Mark of Honor 30
    202 Alterac Valley Mark of Honor 20
    201 Arathi Basin Mark of Honor 30
    194 Spirit Shard 18
    173 unused
    172 Arathi Basin Mark of Honor 40
    171 Eye of the Storm Mark of Honor 40
    170 unknown
    169 Warsong Gultch Mark of Honor 20
    165 Arathi Basin Mark of Honor 20
    148 unknown
    146 unknown
    133 unknown
    131 Alterac Valley Mark of honor 40
    129 Alterac Valley Mark of honor 10
    127 Eye of the Storm Mark of Honor 10
    125 Eye of the Storm Mark of Honor 10
    115 unknown 
    104 Glowcap 15
    103 Glowcap 25
    102 Glowcap 2
    100 Glowcap 1
    99 unknown
    98 unknown
    95 unknown
    94 unknown
    77 Mark of Honor Hold 30
    76 Mark of Thrallmar 30
    69 Mark of Honor Hold 15
    66 unknown
    65 Mark of Thrallmar 15
    56 Mark of Honor Hold 10
    55 Mark of Thrallmar 10
    54 Mark of Thrallmar 5
    53 Mark of Honor hold 5
    26 unknown
    24 unknown
    22 unknown
    21 unknown
    18 Halaa Battle Token 100
    7 Halaa Research Token 8
    6 Halaa Battle Token 20
    5 Halaa Battle Token 40
    2 Unknown
    1 Tough Jerky 1

    Left is code, middle is name of item, right is how many.
    Hope this helps and good luck!

  3. #3
    Wheeze201's Avatar Active Member
    Reputation
    51
    Join Date
    Apr 2007
    Posts
    660
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks alot for your help.

    Do you know if there is some pre-made pvp-token system ?

  4. #4
    stoneharry's Avatar Moderator Harry


    Reputation
    1615
    Join Date
    Sep 2007
    Posts
    4,558
    Thanks G/R
    151/147
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Theres a lot of C++ scripts that give you a token on PvP kill you can search and find.

  5. #5
    mager1794's Avatar Member
    Reputation
    356
    Join Date
    Feb 2008
    Posts
    703
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'll get you the script and btw stoneharry in the Blua Engine(Editted Lua Engine) I made it possible to add items : )

    --Edit---

    Code:
    #include "StdAfx.h"
    
    #define ItemID 55555//set to item that you wish to be give
    #define AMOUNT 1///Amount it gives
    #define STACK false///set to true if you want it to stack
    
    
    void AddItem(Player* Plr, const uint32 &ItemID, const uint32 &Amt, const bool &Stack)//credits to aspire
    {
    	Item *ItemToAdd;
    	SlotResult Slot;
    	
    	if(Plr == NULL)
    		return;
    	if(Stack)
    	{
    		ItemToAdd = Plr->GetItemInterface()->FindItemLessMax(ItemID, Amt, false);
    		if(ItemToAdd != NULL)
    		{
    			ItemToAdd->ModUnsigned32Value(ITEM_FIELD_STACK_COUNT, Amt);
    			ItemToAdd->m_isDirty = true;
    			Plr->BroadcastMessage("%s%s x%u Awarded", MSG_COLOR_GOLD, ItemToAdd->GetProto()->Name1, Amt);
    			return;
    		}
    			
    	}
    	for(uint32 i = 1;i <= Amt;i++)
    	{
    		ItemToAdd = objmgr.CreateItem(ItemID, Plr);
    		
    		if(ItemToAdd == NULL)
    			return; // failed creation, no memory to allocate, or invalid item id
    
    		Slot = Plr->GetItemInterface()->FindFreeInventorySlot(ItemToAdd->GetProto());
    
    		if(Slot.Result)
    		{
    			Plr->GetItemInterface()->SafeAddItem(ItemID, Slot.ContainerSlot, Slot.Slot);
    			Plr->BroadcastMessage("%s%s x1 Awarded", MSG_COLOR_GOLD, ItemToAdd->GetProto()->Name1);
    		}
    		else
    			Plr->BroadcastMessage("No free inventory slots could be located, aborting");
    	}
    
    }
    
    bool ChecksPassed(Player *Attcker, Player *Vct)//credits to aspire
    {
    	string Aip;
    	string Vip;
    
    	if(Attcker->GetSession()->HasGMPermissions() || Vct->GetSession()->HasGMPermissions())
    		return true; // gm over-ride for testing
    
    	if(Attcker == Vct)
    		return false;
    
    	if(Attcker->GetSession()->GetSocket() == NULL || Vct->GetSession()->GetSocket() == NULL)
    		return false;
    
    	Aip = Attcker->GetSession()->GetSocket()->GetRemoteIP();
    	Vip = Vct->GetSession()->GetSocket()->GetRemoteIP();
    
    	if(Aip == "" || Vip == "" || Aip == Vip)
    		return false;
    
    
    	return true;
    }
    
    void PvpKill(Player* Attcker, Player* Vct)
    {
    	if(ChecksPassed == true)
    	{
    		AddItem(Attcker, ItemID, AMOUNT, STACK);
    	}
    };
    
    
    
    
    void SetupPvPSystem(ScriptMgr *mgr)
    {
    
    	mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, (void*)PvpKill);
    
    }
    Last edited by mager1794; 01-10-2009 at 01:00 PM.
    Lunar Gaming - Reaching For The Stars

  6. #6
    Artthus's Avatar Member
    Reputation
    1
    Join Date
    Apr 2007
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey do u kno how to make a item require honour ?

  7. #7
    secretdragon008's Avatar Member
    Reputation
    43
    Join Date
    Sep 2007
    Posts
    217
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is a bit offtopic, but wasnt it easy-er before when the extended cost was on the items table?
    idk why they changed it,since now we must put extended cost every time we add a new item
    to a vendor.(if i need that item to cost tokens ofc)

Similar Threads

  1. how can i add t 6.5 to my 2.4.2 open ascent server
    By jo3jo3 in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 06-21-2008, 06:45 PM
  2. How can I add shapeshift forms?
    By andrelunde in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 05-07-2008, 02:34 PM
  3. [Guide] How to add starting items to your players!
    By metehan in forum WoW EMU Guides & Tutorials
    Replies: 7
    Last Post: 04-15-2008, 09:42 PM
  4. How can i add a new teleport option into a teleporter ?
    By Wheeze201 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 12-17-2007, 11:52 AM
  5. How can i make custom items
    By silviu2008 in forum World of Warcraft General
    Replies: 1
    Last Post: 09-14-2007, 04:51 AM
All times are GMT -5. The time now is 05:30 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search