SHARE
TWEET

Untitled

a guest Jun 26th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local config = {
  2.     player = {}, -- don't touch
  3.     item = {}, -- don't touch
  4.     items = {8304, 8305, 8300, 8306},
  5.     stand = {
  6.         {x = 33268, y = 31833, z = 10},
  7.         {x = 33268, y = 31838, z = 10},
  8.         {x = 33270, y = 31835, z = 10},
  9.         {x = 33266, y = 31835, z = 10}
  10.     },
  11.     itemsPos = {
  12.         {x = 33268, y = 31829, z = 11},
  13.         {x = 33268, y = 31839, z = 11},
  14.         {x = 33273, y = 31834, z = 11},
  15.         {x = 33263, y = 31834, z = 11}
  16.     },
  17.     new = {
  18.         {x = 33263, y = 31831, z = 12},
  19.         {x = 33272, y = 31831, z = 12},
  20.         {x = 33263, y = 31840, z = 12},
  21.         {x = 33272, y = 31840, z = 12}
  22.     },
  23.     monster = {"Lord of the elements", {x = 33267, y = 31835, z = 12}}
  24. }
  25.  
  26. function onUse(cid, item, fromPosition, itemEx, toPosition)
  27.     if (item.itemid == 1946) then
  28.         return doTransformItem(item.uid, item.itemid - 1)
  29.     end
  30.  
  31.     for i = 1, 4 do
  32.         config.player[i] = getTopCreature(config.stand[i]).uid 
  33.     end
  34.  
  35.     if (isPlayer(config.player[1]) and isPlayer(config.player[2]) and isPlayer(config.player[3]) and isPlayer(config.player[4])) then
  36.         if (isSorcerer(config.player[1]) and isDruid(config.player[2]) and isPaladin(config.player[3]) and isKnight(config.player[4])) then
  37.             for i = 1, 4 do
  38.                 config.item[i] = doPlayerRemoveItem(cid, config.items[i])
  39.             end
  40.  
  41.             if (#config.item == 4 and config.item[1] > 0 and config.item[2] > 0 and config.item[3] > 0 and config.item[4] > 0) then
  42.                 for i = 1, 4 do
  43.                     doSendMagicEffect(config.stand[i], CONST_ME_POFF)
  44.                     doTeleportThing(config.player[i], config.new[i])
  45.                     doSendMagicEffect(config.new[i], CONST_ME_TELEPORT)
  46.                 end
  47.                 doSummonCreature(config.monster[1], config.monster[2])
  48.                 doTransformItem(item.uid, item.itemid + 1)
  49.             else
  50.                 doCreatureSay(cid, "You need one player of each vocation having completed the Elemental Spheres quest and also carrying the elemental rare item.", TALKTYPE_ORANGE_1, nil, nil, {x=33268, y=31835, z=10})
  51.             end
  52.         else
  53.                 doCreatureSay(cid, "You need one player of each vocation having completed the Elemental Spheres quest and also carrying the elemental rare item.", TALKTYPE_ORANGE_1, nil, nil, {x=33268, y=31835, z=10})
  54.         end
  55.     else
  56.                 doCreatureSay(cid, "You need one player of each vocation having completed the Elemental Spheres quest and also carrying the elemental rare item.", TALKTYPE_ORANGE_1, nil, nil, {x=33268, y=31835, z=10})
  57.     end
  58.  
  59.     return true
  60. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top