Fixing transform effect position.

Discussion in 'Support' started by Lopaskurwa, Jan 13, 2018.

  1. RoyalzBHO

    RoyalzBHO Active Member

    Joined:
    Jun 25, 2012
    Messages:
    232
    Likes Received:
    195
    Best Answers:
    1
    It shifts a sprite/object/effect by specified pixels, for example if normally an effect is in the "middle" of 64x64 sprite and it a character has 32x32 pixels in size, you can switch an effect to the right, so it overlaps the character sprite, here's a small image how it works. Let's say the left blue dot is in the middle of an effect, right blue dot is in the middle of character sprite, x is a horizontal axis and y a vertical one.

    [​IMG]
     
  2. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
    Well i was so exited when i though it might work, but dammn it change absolutely nothing :D
    [​IMG]
     
  3. RoyalzBHO

    RoyalzBHO Active Member

    Joined:
    Jun 25, 2012
    Messages:
    232
    Likes Received:
    195
    Best Answers:
    1
    Oh but it does, set y to null and x to a big number to see a difference, then check it in-game, remember you have to save the dat file and reload the client as well
     
  4. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
    Hmm... made X to max (32) saved dat and reloaded client but it change nothing, dunno why
     
  5. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
  6. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
  7. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
  8. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
  9. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
  10. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
  11. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
  12. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
  13. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
  14. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
  15. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
    Thanks for 1k views. Bump still need.
     
  16. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
  17. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
  18. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
  19. Nameless#1337

    Nameless#1337 New Member

    Joined:
    Jul 6, 2016
    Messages:
    16
    Likes Received:
    2
    Best Answers:
    1
    Best Answer
    Code (Text):
    1.  
    2. function onSay(player, words, param)
    3.     local kurwa_gdzie_jest_efekt = Position(player:getPosition().x + 1, player:getPosition().y, player:getPosition().z)
    4.     local pid = player:getId()
    5.  
    6.     local TRANS = transform[player:getVocation():getId()]
    7.  
    8.     if not TRANS then
    9.         player:sendCancelMessage("You cannot transform.")
    10.         return false
    11.     end
    12.     if player:getLevel() < TRANS.level then
    13.         player:sendCancelMessage("You must reach level "..TRANS.level.." to transform.")
    14.         return false
    15.     end
    16.     if player:getSoul() < TRANS.rage then
    17.         player:sendCancelMessage("You need "..TRANS.rage.." to transform.")
    18.         return false
    19.     end
    20.     if player:getMana() < TRANS.mana then
    21.         player:sendCancelMessage("You need "..TRANS.mana.." to transform.")
    22.         return false
    23.     end
    24.  
    25.     local outfit = player:getOutfit()
    26.     outfit.lookType = TRANS.looktype
    27.  
    28.     if TRANS.constant then
    29.         player:setOutfit(outfit)
    30.     else
    31.         player:setOutfit(outfit, false)
    32.     end
    33.  
    34.     player:addSoul(-TRANS.rage)
    35.     player:setMaxHealth(player:getMaxHealth() + TRANS.addHealth)
    36.     player:setMaxMana(player:getMaxMana() + TRANS.addMana)
    37.     kurwa_gdzie_jest_efekt:sendMagicEffect(TRANS.effect)
    38.     player:setVocation(TRANS.newVoc)
    39.     player:save()
    40.     return false
    41. end
    Check it?
     
    Lopaskurwa likes this.
  20. Lopaskurwa

    Lopaskurwa Member

    Joined:
    Oct 6, 2017
    Messages:
    389
    Likes Received:
    8
    Best Answers:
    2
    Perfect my dude (y)
     

Share This Page

Loading...