Advertisement
Brownies

qm1 onTrade

Dec 12th, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.91 KB | None | 0 0
  1.  -----------------------------------
  2. -- onTrade Action
  3. -----------------------------------
  4.  
  5. function onTrade(player,npc,trade)
  6.         mobspawn = GetMobByID(16921015);
  7.         qm1p = GetServerVariable("[POSI]Fortitude");
  8.         npc = GetNPCByID(16921027);
  9.         -- Trade 12 Ghrah M Chips
  10.         if (GetMobAction(16921015) == 0 and trade:hasItemQty(1872,12) and trade:getItemCount() == 12) then
  11.                 player:tradeComplete();
  12.                 mobspawn:setSpawn(player:getXPos(),player:getYPos(),player:getZPos());
  13.                 SpawnMob(16921015,180):updateEnmity(player);
  14.                 SetServerVariable("[POSI]Fortitude", qm1p + 1);
  15.                 -- SpawnMob(16921015,180):updateEnmity(player):setPos(npc:getXPos(),npc:getYPos(),npc:getZPos()); -- Spawn Jailer of Fortitude
  16.                --SpawnMob(16921015,180):updateEnmity(player); -- Spawn Jailer of Fortitude
  17.                --local mobpop = GetNPCByID(17535224); -- Spawn ???
  18.         end
  19.        
  20. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement