Advertisement
Rochet2

Untitled

Feb 17th, 2014
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- -- -- -- -- -- -- -- -- -- -- -- --
  2. -- -- PvP Token System by Salja. -- --
  3. -- -- -- -- -- -- -- -- -- -- -- -- --
  4.  
  5. -- Settings
  6. local ItemOrGold = 0                     -- 0 = Gold and Item, 1 = Only Item, 2 = Only Gold
  7. local WorldAnnounce = true               -- Sends a World Announce false = Off, true = On
  8. local GoldCount = 10000                  -- Reward in copper
  9. local ItemEntry = 20558                  -- Warsong Gulch Mark of Honor
  10. local ItemCount = 1                      -- Count of the Item
  11. local ItemName = GetItemLink(ItemEntry)
  12.  
  13. local function PvPTokenItem(event, killer, killed)
  14.     local receiver = killer:GetGUIDLow()
  15.  
  16.     if (WorldAnnounce) then
  17.         SendWorldMessage("[PVP] |Hplayer:"..killer:GetName().."|h["..killer:GetName().."]|h killed |Hplayer:"..killed:GetName().."|h["..killed:GetName().."]|h")
  18.     end
  19.  
  20.     if (ItemOrGold ~= 2) then
  21.         if (killer:AddItem(ItemEntry, ItemCount)) then
  22.             if (ItemCount == 1) then
  23.                 killer:SendBroadcastMessage("|CFF20C000 You get: "..ItemName.."|CFF20C000.|r")
  24.             else
  25.                 killer:SendBroadcastMessage("|CFF20C000 You get: "..ItemName.."|CFF20C000 x"..ItemCount..".|r")
  26.             end
  27.         else
  28.             killer:SendBroadcastMessage("|cffff0000 Your bags are full, we will send it by mail.|r")
  29.             -- SendMail("PvP Token System", "Your Bags are full we send via Mail", receiver, nil, 41, nil, ItemEntry, ItemCount)
  30.         end
  31.     end
  32.  
  33.     if (ItemOrGold ~= 1) then
  34.         killer:ModifyMoney(GoldCount)
  35.         killer:SendBroadcastMessage("|CFF20C000 You get: "..GoldCount.."|CFF20C000 Copper.|r")
  36.     end
  37. end
  38.  
  39. RegisterPlayerEvent(6, PvPTokenItem)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement