Skip to content

Provlima Me To Color Sto Droplist

Featured Replies

ftiaxnw ta colors sto droplist kai exw ena provlima enw vazw to idio xroma sta rates m vgazei diaforetika. Diladi sto 100% exw valei na einai mple kai den m to vgazei mple ekei pou anagrafete to drop rate opos stin foto:

 

1q1fnn.png

 

 

to 100% kai to 90% to dixnei me prasino xroma enw to item apo katw to dixnei me mple. opos mporite na dite k sto kodika to exw grapsei swsta (i etsi toulaxiston nomizw).

			if (getTemplate().getDropData() != null)
			{
				StringUtil.append(html1,
						"<br><center><font color=\"3399FF\">[Drop & Rate Info]</font></center>" +
						"<br><font color=\"FF0000\">0%+</font><font color=\"FF3300\">10%+</font><font color=\"FF6600\">20%+</font><font color=\"FF9900\">30%+</font><font color=\"FFCC00\">40%+</font><font color=\"FFFF00\">50%+</font><font color=\"009933\">60%+</font><font color=\"00CC33\">70%+</font><font color=\"00FF33\">80%+</font><font color=\"3366FF\">90%+</font><font color=\"3333FF\">100%</font>" +					
						"<table border=0 width=\"100%\">"
						);
				for (L2DropCategory cat : getTemplate().getDropData())
				{
					for (L2DropData drop : cat.getAllDrops())
					{
						final L2Item item = ItemTable.getInstance().getTemplate(drop.getItemId());
						if (item == null)
							continue;

						final String color;
						if (drop.getChance() >= 1000000)
							color = "3333FF";
						else if (drop.getChance() >= 900000)
							color = "3366FF";
						else if (drop.getChance() >= 800000)
							color = "00FF33";
						else if (drop.getChance() >= 700000)
							color = "00CC33";
						else if (drop.getChance() >= 600000)
							color = "009933";
						else if (drop.getChance() >= 500000)
							color = "FFFF00";
						else if (drop.getChance() >= 400000)
							color = "FFCC00";
						else if (drop.getChance() >= 300000)
							color = "FF9900";
						else if (drop.getChance() >= 200000)
							color = "FF6600";
						else if (drop.getChance() >= 100000)
							color = "FF3300";
						else
							color = "FF0000";

pws mporw na to ftiaksw na dixnei to idio xroma kai sto rate k sto item?

 

 

 

solved... epeftan polla se mia grammi. pros8esa ena <br> sto 90 kai 100% kai m ta vgazei kanonika. :)

Edited by Komnis

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.