Advertisement
Guest User

Special Apparel Shop - Original

a guest
Apr 30th, 2017
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.76 KB | None | 0 0
  1.             -- cha_timer
  2.             if(_G['SpecialAppSummon'] ~= nil)then  
  3.                 if _G['SpecialAppSummon'].monsterrole ~= nil then
  4.                     if CheckMonsterDead(_G['SpecialAppSummon'].monsterrole) ~= 1 then
  5.                         if _G['SpecialAppSummon'].step == 1  then
  6.                             Say(_G['SpecialAppSummon'].monsterrole,"Hello "..GetChaDefaultName(_G['SpecialAppSummon'].summoner).." !")
  7.                         elseif _G['SpecialAppSummon'].step == 16 then
  8.                             Say(_G['SpecialAppSummon'].monsterrole,"This Is ".._G['SpecialAppSummon'].SetName.." !")
  9.                    
  10.                         elseif _G['SpecialAppSummon'].step == 25 then
  11.                             ChaMove(_G['SpecialAppSummon'].monsterrole,38125,58625)
  12.                        
  13.                         elseif _G['SpecialAppSummon'].step == 30 then
  14.                             ChaMove(_G['SpecialAppSummon'].monsterrole,38100,59500)
  15.                            
  16.                         elseif _G['SpecialAppSummon'].step == 60 then
  17.                             Say(_G['SpecialAppSummon'].monsterrole,"Bye!")
  18.                             appmobsummoned = 0
  19.                         end
  20.                         _G['SpecialAppSummon'].step = _G['SpecialAppSummon'].step + 1
  21.                        
  22.                     else
  23.                             _G['SpecialAppSummon'] = nil
  24.                             appmobsummoned = 0
  25.                     end
  26.                 end
  27.             end
  28.            
  29. appmobsummoned = 0
  30. function SummonAppMob(role,monster,set)
  31.     if(appmobsummoned ~= 1)then
  32.         local MonsterRole = CreateChaX( monster , 38100 , 59500 , 0 , 1900000,role )
  33.     SetChaLifeTime( MonsterRole, 10000 )
  34.     appmobsummoned = 1
  35.     _G['SpecialAppSummon'] = {summoner = role, step = 1,SetName=GetItemName(set),summoned = 1,monsterrole = MonsterRole}
  36.     else
  37.         SystemNotice(role,"Some Model Is Already Summoned")
  38.     end
  39. end
  40.  
  41. function GetApparelsList(req)
  42. local NeededItem = 7838
  43.     local IndexPageID = 3
  44.     local ItemsPerPage = 0
  45.     for i,v in pairs(SpecialApps) do
  46.         if(v.Race == req or v.Race == 0)then
  47.         ItemsPerPage = ItemsPerPage + 1
  48.             if(ItemsPerPage < 8)then
  49.                 Text( 4, GetItemName(i),JumpPage,v.PageID)
  50.             elseif(ItemsPerPage == 8)then
  51.                 Text( 4, 'Next Page ->',JumpPage,26)
  52.                 Text( 26, GetItemName(i),JumpPage,v.PageID)
  53.             elseif(ItemsPerPage < 16)then
  54.                 Text( 26, GetItemName(i),JumpPage,v.PageID)
  55.             elseif(ItemsPerPage == 16)then
  56.                 Text( 26, 'Next Page ->',JumpPage,3)
  57.                 Text( 26, GetItemName(i),JumpPage,v.PageID)
  58.             else
  59.                 Text( 3, GetItemName(i),JumpPage,v.PageID)
  60.             end
  61.                 InitTrigger()
  62.                 TriggerCondition( 1, HasItem, NeededItem, 1 )
  63.                 TriggerCondition( 1, HasLeaveBagGrid, 1 )
  64.                 TriggerCondition( 1, KitbagLock, 0 )
  65.                 TriggerAction( 1, TakeItem, NeededItem, 1 )
  66.                 TriggerAction( 1, GiveItem, i, 1 , 4)
  67.                 TriggerAction( 1, JumpPage, 3 )
  68.                 TriggerFailure( 1, JumpPage, 2 )
  69.                 Talk(v.PageID,"You Sure You Want"..GetItemName(i).." ?")
  70.                 Text( v.PageID, "Get Apparel!",MultiTrigger, GetMultiTrigger(), 1)
  71.                 InitTrigger()
  72.                 TriggerAction( 1, SummonAppMob, v.Monster,i)
  73.                 Text( v.PageID, "Try The Apparel",MultiTrigger, GetMultiTrigger(), 1)
  74.         end
  75.     end
  76. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement