Advertisement
Unlocker001_TFM

Untitled

Aug 5th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. function openShop(n, page)
  2. if not CannonsShopImg[n] then CannonsShopImg[n] = {} end
  3. ui.addTextArea(-2000,"<a href='event:Cannons'><p align='center'><font size='12'>Cannons",n,142,148,70,25,0x3f2b1d, 0x1f1813,1,true)
  4. ui.addTextArea(-2001,"",n,219,100,350,263,0x142b2e, 0x1f1813,1,true)
  5. ui.addTextArea(-2002,"<p align='center'><font size='14'>Shop</p>",n,214,100,360,25,0x3f2b1d, 0x1f1813,1,true)
  6. ui.addTextArea(-2003,"<a href='event:close_shop'><p align='center'><font size='14'>X</p>",n,549,100,25,25,4139805,2037779,0,true)
  7. ui.addTextArea(-2004,"<p align='center'><a href='event:prv_sp'><b>«</b></a> "..sp_page[n].."/"..#shopCannons.." <a href='event:next_sp'><b>»</j></b></a></p>", n, 220, 343, 342, 20, 0x142b2e, 0x8a583c, 0, true)
  8. local pos, id = 1, 50
  9. isNoEquip = player[n].c == 0
  10. for i = 1, #shopCannons[page] do
  11. colori = shopCannons[page][i].State(n) and 0x00FF00 or 14550016
  12. pos, id = pos, id + 7
  13. local x, y = pos * 85, 60*(i-1)
  14. ui.addTextArea(id,"",n,142 + x,157 + y,334,50,colori,0x1f1813,1,true)
  15. ui.addTextArea(id + 1,"",n,152 + x,157 + y,314,50,0x3f2b1d, 0x1f1813,1,true)
  16. if isNoEquip then
  17. ui.addTextArea(id + 2,"<a href='event:"..shopCannons[page][i].event.."'><p align='center'><font size='nil'>Equip",n,392 + x,158 + y,73,20,0x3f2b1d, 0x1f1813,1,true)
  18. else
  19. ui.addTextArea(id + 2,player[n].c == i and "<a href='event:Unequip'><p align='center'><font size='nil'>Unequip" or "<p align='center'><font size='nil'>Equip",n,392 + x,158 + y,73,20,0x3f2b1d, 0x1f1813,1,true)
  20. end
  21. if CannonsShopImg[n][i] ~= nil then
  22. tfm.exec.removeImage(CannonsShopImg[n][i])
  23. CannonsShopImg[n][i]=nil
  24. end
  25. CannonsShopImg[n][i] = tfm.exec.addImage(shopCannons[page][i].img, "&"..i,155 + x,160 + y, n)
  26. ui.addTextArea(id + 4,"",n,152 + x,157 + y,50,50,0x3f2b1d, 0x1f1813,1,true)
  27. ui.addTextArea(id + 5,"Name: "..shopCannons[page][i].name,n,210 + x,157 + y,170,20,0x3f2b1d, 0x1f1813,0,true)
  28. ui.addTextArea(id + 6,"Objective: "..shopCannons[page][i].objective,n,210 + x,187 + y,255,20,0x3f2b1d, 0x1f1813,1,true)
  29. end
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement