experience drops aren't accurate

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

83y

New Member
Nov 7, 2019
8
0
1
19
Hi, im trying to make xp drop when a player dies however, when the player dies and the xp drops, the xp drop is accurate in the broadcast, but when I go to pick up the xp orb the amount of xp is different. How do I fix this?
Code:
on death:
    if attacker is a player:
        if victim is a player:
            set {_loc} to victim's location
            set {_attackersxp} to attacker's xp
            broadcast "%{_attackersxp}%"
            set {_xp} to (20 + ({_attackersxp} * 1.33 ))
            spawn {_xp} of xp at {_loc}
            broadcast "%{_xp}%"

Im using 1.8.8 paper spigot
 
Status
Not open for further replies.