Jump to content

MQXO

Member
  • Posts

    7
  • Joined

  • Last visited

Posts posted by MQXO

  1. I have skript (obv) and SkRayfall and i was updating a kitpvp skript from a random spigot post, i dont get any errors when im reloading it but when it actually runs i just get chat spam of "An internal error occurred when trying to execute this command." due to the "every 2 seconds:", after going through the code ive narrowed it down to the "command /score:" but im still very confused and would appreciate any help recieved

    options:
    
    #! MESSAGES
    
    	Kill_Message: &b&l$+1.5 &7and &a&l+15 EXP &7for killing &e%victim%
    	Death_Message: &e%victim% &7was killed by &e%attacker%
    
    #! SCOREBOARD - ACTIONBAR
    
    	Title: &8[&3&lSodexPvP&8]
    	Update_Time: 2 # <-- IN SECONDS
    	Scoreboard_Permission: skript.kitpvp.scoreboard
    
    #! KITPVP
    
    
    	KitPvP_Prefix: &b[KITPVP]
    	Reset_Kills_Permission: skript.kitpvp.reset.kills
    	Reset_Kills_Message: You have cleared %arg-3%'s kills.
    	Reset_Kills_No_Permission: You don't have permission to use this command.
    
    	Reset_Deaths_Permission: skript.kitpvp.reset.deaths
    	Reset_Deaths_Message: You have cleared %arg-3%'s deaths.
    	Reset_Deaths_No_Permission: You don't have permission to use this command.
    
    	Reload_Permission: skript.kitpvp.reload
    	Reload_Message: KitPvP Skript succesfully loaded
    	Reload_No_Permission: You don't have permission to use this command.
    
    #! DO NOT EDIT DOWN HERE
    on load:
    	send "&8[&3&LSodexPvP&8] &7Successfully loaded." to all players
    
    on death:
    	if victim is a player:
    		if attacker is a player:
    			add 1 to {deaths.kitpvp::%uuid of victim%}
    			add 1 to {kills.kitpvp::%uuid of attacker%}
    			send "{@Kill_Message}" to attacker
    			set the death message to "{@Death_Message}"
    
    command /score:
    	trigger:
    		if player has permission "{@Scoreboard_Permission}":
    			wipe player's sidebar
    			set name of sidebar of player to "{@Title}"
    			set score "&r&r&r" in sidebar of player to 11
    			set score "&bKills" in sidebar of player to 10
    			set score "&f%{kills.kitpvp::%uuid of player%}%" in sidebar of player to 9
    			set score "&r&r" in sidebar of player to 8
    			set score "&bDeaths" in sidebar of player to 7
    			set score "&b&f%{deaths.kitpvp::%uuid of player%}%" in sidebar of player to 6
    			set score "&r" in sidebar of player to 5
    			set score "&bIP" in sidebar of player to 4
    			set score "&3SodexPvP.minehut.gg | SodexSMP.minehut.gg" in sidebar of player to 3
    
    every {@Update_Time} seconds:
    	loop all players:
    		make loop-player execute "/score"
    
    on join:
    	if {kills.kitpvp::%uuid of player%} is not set:
    		set {kills.kitpvp::%uuid of player%} to 0
    	if {deaths.kitpvp::%uuid of player%} is not set:
    		set {deaths.kitpvp::%uuid of player%} to 0
    
    command /kitpvp [<text>] [<text>] [<offline player>]:
    	trigger:
    		if arg 1 is "reset":
    			if player has permission "{@Reset_Kills_Permission}":
    				if arg 2 is "kills":
    					if arg 3 is set:
    						send "{@KitPvP_Prefix} {@Reset_Kills_Message}"
    						set {kills.kitpvp::%uuid of arg-3%} to 0
    				else:
    					if player has permission "{@Reset_Deaths_Permission}":
    						if arg 2 is "deaths":
    							if arg 3 is set:
    								send "{@KitPvP_Prefix} {@Reset_Deaths_Message}"
    								set {deaths.kitpvp::%uuid of arg-3%} to 0
    					else:
    						send "{@KitPvP_Prefix} {@Reset_Deaths_No_Permission}"
    			else:
    				send "{@KitPvP_Prefix} {@Reset_Kills_No_Permission}"
    		else if arg 1 is "reload":
    			if player has permission "{@Reload_Permission}":
    				make console execute command "sk reload kitpvp"
    				send "{@KitPvP_Prefix} {@Reload_Message}" 
    			else:
    				send "{@KitPvP_Prefix} {@Reload_No_Permission}"


     

  2. yeah surprisingly i got back into skript and figured it out, my current skript as it stands is:
    the "else if execute is console:" bit is because when sending messages from console the sender would appear as "none" but that solved it
     

    on load:
    	send "&8[&3&lSodexMessaging&8] &7Successfully loaded." to all players
    
    command /smsg <player> <text>:
    	aliases: /sodexmsg
    	usage: &8[&b&lSodexMessaging&8] &3/smsg <player> <text>
    	trigger:
    		if arg-1 = player:
    			send "&8[&3&lSodexMessaging&8] &c You can't send messages to youself, silly!" to player
    		else if executor is console:
    			send "&8[&3&lSodexMessaging&8] &bConsole &3>> &b%arg-2%" to arg-1
    		else:
    			send "&8[&3&lSodexMessaging&8] &b%player% &3>> &b%arg-2%" to arg-1
    

     

  3. command /smsg <player> <text>:
    	aliases: /smsg
    	usage: &8[&b&lSodexMsg&8] &3/smsg <player> <text>
    	trigger:
    		if arg-1 and player are equal:
    			send "&8[&3&lSodexMessaging&8] &c You can't send messages to youself, silly!" to player
    		else: 
    			send "&8[&3&lSodexMessaging&8] &f%player% messaged you: %arg-2%" to arg-1

    Ok so basically I just want to know what i need to insert in "if arg-1 and player are equal" for equal because whatever i try doesn't work so thats pretty much all i need

  4. 1 hour ago, KJPAKA said:

    This is a fully functioning Skript i made for you.

    
    command /forcechat [<offline player>] [<text>]:
        permission: op
        permission message: &CNo permission!
        usage: &c/forcechat <player> <message>
        trigger:
            if arg-1 is set:
                if arg-2 is set:
                    set {_p} to arg-1
                    if {_p} is online:
                        make {_p} send message arg-2
                    else:   
                        send "&cYou can't sudo a offline player" to player
                else:
                    send "&CPlease specify a message!" to player
            else:
                send "&cPlease specify a player!" to player
    
    command /forcechatall [<text>]:
        permission: op
        permission message: &CNo permission!
        usage: &c/forcechatall
        trigger:
            if arg-1 is set:
                loop all players:
                    make loop-player send message arg-1
            else:
                send "&cPlease specify a message!" to player

     

    Thanks, I'm 100% gonna study this so i can figure out what the hell I'm doing.

  5. I am pretty new to skripting and i know kinda what im doing with commands but I've never been able to figure this one out;

    The commands I'm trying to get are; /forcechat [player] [message] and /forcechatall [message]

    I feel as though the parameters are pretty self explanitory but in case you dont get it, /forcechatall would force everyone to say the message inputted in the "[messsage]" field, and /forcechat would make the player entered in the "[player]" field say the message in the "[message]" field.

×
×
  • Create New...