Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Rangi jak w csgo w miencraft


Marchew222_

Rekomendowane odpowiedzi

Opublikowano

witajcie! poszukuje kogos kto napisze mi skrypt na rangi prosil bym o 2 bo zrobie sam dalej ale nie wiem jak zaczac :D

dobra skrypt ma polegac na tym ze jak wejdziemy do piero na serwer to mamy range &d&lUNRANKED czyli 0 kiili. gdy zabiemy 10 osob dostaniemy range silver 1 tyle

Opublikowano


variables:

{unranked.%player%} = false

{silver1.%player%} = false

{kille.%player%} = 0

 

on first join:

set {unranked.%player%} to true

 

on chat:

if {unranked.%player%} is true:

set the player's display name to "&d&lUNRANKED %player%: %message%"

if {silver1.%player%} is true:

set the player's display name to "&d&lSILVER1 %player%: %message%"

 

on death:

if attacker is player:

if victim is player:

add 1 to {kille.%player%}

if {kille.%player%} is more than 9:

send "&aAwansowales na wyzsza range !" to attacker

set {silver1.%player%} to true

 

Proszę przykład, mam nadzieję, że pomogłem.

 

Pomagam na PW (Prywatna Wiadomosc)

▄ . ► KONTAKT .
Wyślij do mnie Prywatną Wiadomość (PW)

►Skype: smith.polska

Opublikowano

@up

 

Na serio? Używasz wyrażenia

%player%

w Evencie

on death:

? Ponadto, jeżeli dajesz

change player's displayname to "&d&lSILVER1 %player%: %message%"

To po użyciu chatu wiadomość zostaje wyświetlona 2 razy, co wygląda nieestetycznie. Nie wspominam już tu o innych drobnych błędach, które wpływają negatywnie na estetykę. A co do skryptu, to wszystko wygląda ogólnie jak kolega @up napisał. Czy chcesz ode mnie ten skrypt? Jak tak, to pisz na priv/skype.

:D  Let's start with MPCForum :D

 

 

 

30/50/69/100/150/200/250...

Opublikowano

@Marchew222_

A może być kawałek pluginu? :D

 

 

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Statistic;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin implements Listener{

	public void onEnable(){
		Bukkit.getPluginManager().registerEvents(this, this);
	}
	/*
	 * TODO x < y - x mniejsze od y
	 * TODO x > y - x wieksze od y
	 */
	@EventHandler
	public void onChat(AsyncPlayerChatEvent e){
		int kills = e.getPlayer().getStatistic(Statistic.PLAYER_KILLS);
		if (kills < 10){
			e.getPlayer().setDisplayName(fixColors("&8[&d&lUNRANKED&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 25){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER I&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 50){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER II&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 75){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER III&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 100){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER IV&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 150){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER V&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 200){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER VI&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 250){
			e.getPlayer().setDisplayName(fixColors("&8[&6GOLD I&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 300){
			e.getPlayer().setDisplayName(fixColors("&8[&6GOLD II&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 400){
			e.getPlayer().setDisplayName(fixColors("&8[&6GOLD III&8] &e&l" + e.getPlayer().getName()));
			return;
		}
	}
	public static String fixColors(String s){
		return ChatColor.translateAlternateColorCodes('&', s);
	}
}

 

 

9247914700071651530128.png

Opublikowano

@Marchew222_

A może być kawałek pluginu? :D

 

 

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Statistic;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin implements Listener{

	public void onEnable(){
		Bukkit.getPluginManager().registerEvents(this, this);
	}
	/*
	 * TODO x < y - x mniejsze od y
	 * TODO x > y - x wieksze od y
	 */
	@EventHandler
	public void onChat(AsyncPlayerChatEvent e){
		int kills = e.getPlayer().getStatistic(Statistic.PLAYER_KILLS);
		if (kills < 10){
			e.getPlayer().setDisplayName(fixColors("&8[&d&lUNRANKED&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 25){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER I&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 50){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER II&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 75){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER III&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 100){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER IV&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 150){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER V&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 200){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER VI&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 250){
			e.getPlayer().setDisplayName(fixColors("&8[&6GOLD I&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 300){
			e.getPlayer().setDisplayName(fixColors("&8[&6GOLD II&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 400){
			e.getPlayer().setDisplayName(fixColors("&8[&6GOLD III&8] &e&l" + e.getPlayer().getName()));
			return;
		}
	}
	public static String fixColors(String s){
		return ChatColor.translateAlternateColorCodes('&', s);
	}
}

 

 

Ja p******e dlaczego.

 

Już wolę tamten skrypt na górze xDDDDDDDDDDDDDDDDDDDDDDDDDD

 

@Edit

 

 

  • Hobby:.

    Przez niektóre osoby chce mi się "rzygać".

 

No, mi też, przez Ciebie i ten kod xD

 

 

 

 

 

@antywarn, olej to

on chat:
   if kills > 5:
       cancel
       send 'silver lol' 

 

 

Moja oficjalna strona! :)

http://socketbyte.pl/ 

Opublikowano

 

@Marchew222_

A może być kawałek pluginu? :D

 

 

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Statistic;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin implements Listener{

	public void onEnable(){
		Bukkit.getPluginManager().registerEvents(this, this);
	}
	/*
	 * TODO x < y - x mniejsze od y
	 * TODO x > y - x wieksze od y
	 */
	@EventHandler
	public void onChat(AsyncPlayerChatEvent e){
		int kills = e.getPlayer().getStatistic(Statistic.PLAYER_KILLS);
		if (kills < 10){
			e.getPlayer().setDisplayName(fixColors("&8[&d&lUNRANKED&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 25){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER I&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 50){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER II&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 75){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER III&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 100){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER IV&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 150){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER V&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 200){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER VI&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 250){
			e.getPlayer().setDisplayName(fixColors("&8[&6GOLD I&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 300){
			e.getPlayer().setDisplayName(fixColors("&8[&6GOLD II&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 400){
			e.getPlayer().setDisplayName(fixColors("&8[&6GOLD III&8] &e&l" + e.getPlayer().getName()));
			return;
		}
	}
	public static String fixColors(String s){
		return ChatColor.translateAlternateColorCodes('&', s);
	}
}

 

 

Ja p******e dlaczego.

 

Już wolę tamten skrypt na górze xDDDDDDDDDDDDDDDDDDDDDDDDDD

 

@Edit

 

 

  • Hobby:.

    Przez niektóre osoby chce mi się "rzygać".

 

No, mi też, przez Ciebie i ten kod xD

 

 

 

 

 

@antywarn, olej to

on chat:
   if kills > 5:
       cancel
       send 'silver lol' 

 

 

 

Po ch#j miałem rozpisywać się bardziej w javie ;p

Jest? jest.

 

Topic:

on chat:
    cancel event
    if {kills.%player%} is bigger than 100:
        broadcast "&8[&4Globalny elitarny!!&8] &6%player%"
        stop
    broadcast "&8[&7śilver -1&8] &6%player%"

9247914700071651530128.png

Opublikowano

@Marchew222_

A może być kawałek pluginu? :D

 

 

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Statistic;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin implements Listener{

	public void onEnable(){
		Bukkit.getPluginManager().registerEvents(this, this);
	}
	/*
	 * TODO x < y - x mniejsze od y
	 * TODO x > y - x wieksze od y
	 */
	@EventHandler
	public void onChat(AsyncPlayerChatEvent e){
		int kills = e.getPlayer().getStatistic(Statistic.PLAYER_KILLS);
		if (kills < 10){
			e.getPlayer().setDisplayName(fixColors("&8[&d&lUNRANKED&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 25){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER I&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 50){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER II&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 75){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER III&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 100){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER IV&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 150){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER V&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 200){
			e.getPlayer().setDisplayName(fixColors("&8[&7SILVER VI&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 250){
			e.getPlayer().setDisplayName(fixColors("&8[&6GOLD I&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 300){
			e.getPlayer().setDisplayName(fixColors("&8[&6GOLD II&8] &e&l" + e.getPlayer().getName()));
			return;
		}
		if (kills < 400){
			e.getPlayer().setDisplayName(fixColors("&8[&6GOLD III&8] &e&l" + e.getPlayer().getName()));
			return;
		}
	}
	public static String fixColors(String s){
		return ChatColor.translateAlternateColorCodes('&', s);
	}
}

 

 

bys mi dodal jeszcze ze przed nickiem pisze ille ma sie killi na taki kolor: &a&l(@kille) %nick% i dopisac ze pisze na chacie jak ktos awansuje np na s2

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...