542 "R","cm_birdy","Default","heart","Castle" |
542 "R","cm_birdy","Default","heart","Castle" |
543 } |
543 } |
544 |
544 |
545 } |
545 } |
546 |
546 |
547 local colorArray = { |
|
548 {0xff0204ff, "0xff0204ff", "Red"}, |
|
549 {0xff4980c1, "0xff4980c1", "Blue"}, |
|
550 {0xff1de6ba, "0xff1de6ba", "Teal"}, |
|
551 {0xffb541ef, "0xffb541ef", "Purple"}, |
|
552 {0xffe55bb0, "0xffe55bb0", "Pink"}, |
|
553 {0xff20bf00, "0xff20bf00", "Green"}, |
|
554 {0xfffe8b0e, "0xfffe8b0e", "Orange"}, |
|
555 {0xff5f3605, "0xff5f3605", "Brown"}, |
|
556 {0xffffff01, "0xffffff01", "Yellow"} |
|
557 } |
|
558 |
547 |
559 local fortArray = { |
548 local fortArray = { |
560 "Cake", "Castle", "Earth", "EvilChicken", "Flowerhog", |
549 "Cake", "Castle", "Earth", "EvilChicken", "Flowerhog", |
561 "Hydrant", "Lego", "Plane", "Statue", "SteelTower", "Tank", |
550 "Hydrant", "Lego", "Plane", "Statue", "SteelTower", "Tank", |
562 "UFO", "Wood" |
551 "UFO", "Wood" |
1444 teamCounter = teamCounter + 1 |
1433 teamCounter = teamCounter + 1 |
1445 if teamCounter == 9 then |
1434 if teamCounter == 9 then |
1446 teamCounter = 1 |
1435 teamCounter = 1 |
1447 end |
1436 end |
1448 |
1437 |
1449 -- try match team colour to the colours recorded in the colour array |
1438 -- Convert color to string |
1450 |
1439 local rgba = GetClanColor(GetHogClan(gear)) |
1451 local tColor = 0x00000000 |
1440 local rgb = div(band(rgba, 0xFFFFFF00), 0x100) |
1452 for i = 1, #colorArray do |
1441 local tColor = string.format("0x%X", rgb) |
1453 if GetClanColor(GetHogClan(gear)) == colorArray[i][1] then |
|
1454 tColor = colorArray[i][2] |
|
1455 end |
|
1456 end |
|
1457 |
|
1458 -- no match, just give him a default colour from the array, then |
|
1459 if tColor == 0x00000000 then |
|
1460 tColor = colorArray[teamCounter][2] |
|
1461 end |
|
1462 |
1442 |
1463 if getGearValue(gear,"grave") == nil then |
1443 if getGearValue(gear,"grave") == nil then |
1464 tFort = fortArray[1+GetRandom(#fortArray)] |
1444 tFort = fortArray[1+GetRandom(#fortArray)] |
1465 tGrave = GetHogGrave(gear) |
1445 tGrave = GetHogGrave(gear) |
1466 tFlag = GetHogFlag(gear) |
1446 tFlag = GetHogFlag(gear) |
1476 |
1456 |
1477 table.insert(tempDataList, "") |
1457 table.insert(tempDataList, "") |
1478 table.insert (tempDataList, |
1458 table.insert (tempDataList, |
1479 " AddTeam(\"" .. |
1459 " AddTeam(\"" .. |
1480 GetHogTeamName(gear) .."\"" .. |
1460 GetHogTeamName(gear) .."\"" .. |
1481 ", " .. "\"" ..tColor .. "\"" .. |
1461 ", " .. tColor .. |
1482 ", " .. "\"" .. tGrave .. "\"" .. |
1462 ", " .. "\"" .. tGrave .. "\"" .. |
1483 ", " .. "\"" .. tFort .. "\"" .. |
1463 ", " .. "\"" .. tFort .. "\"" .. |
1484 ", " .. "\"" .. tVoice .. "\"" .. |
1464 ", " .. "\"" .. tVoice .. "\"" .. |
1485 ", " .. "\"" .. tFlag .. "\"" .. |
1465 ", " .. "\"" .. tFlag .. "\"" .. |
1486 ")" |
1466 ")" |