Solved get money from mobs

  • 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.

Moon2288

Member
Feb 8, 2020
4
0
1
Skript Version: Skript 2.2 (dev20c) (i forgot, i'm going to assume its that version)
Skript Author: Bensku
Minecraft Version: 1.12.2
I am trying to make a script that gives you money when you kill a mob (for example, a zombie).
I am aware that there are other plugins that do this, i just want to know how to recreate them with Skript.
When I kill said mob, I don't get the money.
There doesn't seem to be any error messages, almost like Skript ignores its existence.
Here's the code
Code:
on death:
  if victim is zombie:
    execute command "/eco give %player% 10 "
    send message "&6You got &e$10 &6for killing a &eZombie&6!" to player
Other Useful Info:

Addons using (including versions):
None

Troubleshooting:

Have you tried searching the docs? Yes
Have you tried searching the forums? No results
 
gett vault and use
add X to playersp balance

Also use a newer skript version. Yours is very old
 
So, how should the code look like? I'm not sure what you mean by "use add X to playersp balance"
by the way i know my skript version its 2.4
 
So, how should the code look like? I'm not sure what you mean by "use add X to playersp balance"
by the way i know my skript version its 2.4
he ment "add X to player's balance" and install plugin called VAULT
 
Step 1. Download Vault plugin.
Step 2. Potentially skVault?
Step 3. Replace 'execute command "stuff"' with 'add 10 to attacker's balance".
Also, I'm pretty sure that there isn't a 'player' in a death event, only attacker and victim.
Oh, also, use 'execute console command'
Don't install SkVault. It's to connect plugins currency with skript variables but it breaks other expressions and is poorly made.
 
Code:
on death:
  if victim is zombie:
    add 10 to attacker's balance
    send message "&6You got &e$10 &6for killing a &eZombie&6!" to attacker
 
Status
Not open for further replies.