12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021 |
- # mod_addedflavour_Volleyball
- if $ARGS[0] = 'Match':
- if sound = 0 : PLAY 'mod/addedflavour/sound/<<$modVar_AF_Music>>.mp3'
- gs 'stat'
- '<center><b>' + iif($modVar_AF_MatchBallTeam = 'A','<u>','') + '<<$modVar_AF_TeamA_PlayerTeam>>' + iif($modVar_AF_MatchBallTeam = 'A','</u>','') + '</b> - <<modVar_AF_MatchPointsA>> -vs- <<modVar_AF_MatchPointsB>> - <b>' + iif($modVar_AF_MatchBallTeam = 'B','<u>','') + '<<$modVar_AF_TeamB_PlayerTeam>>' + iif($modVar_AF_MatchBallTeam = 'B','</u>','') + '</b></center>'
- KILLVAR '$modArr_AF_MatchAIOptions'
- gs 'mod_addedflavour_Volleyball' , 'AIStance'
- gs 'mod_addedflavour_Volleyball' , 'BallAction'
- gs 'mod_addedflavour_Volleyball' , 'ManageStamina' , 'Event'
- gs 'mod_addedflavour_Volleyball' , 'PlayerKnowledge'
- if $modVar_AF_MatchPlayerLoc ! 'AX' and $modVar_AF_MatchPlayerLoc ! 'BX':
- if $modVar_AF_MatchAction ! 'Fumble' and $modVar_AF_MatchPlayerLoc ! $modVar_AF_MatchBall:
- if $modVar_AF_MatchAction ! 'Serve' and $modVar_AF_MatchGridAction['<<$modVar_AF_MatchPlayerLoc>>'] = 'Defend':
- if strpos($modVar_AF_MatchPlayerLoc,'1') ! 0 :
- act 'Go Wide' : $modVar_AF_MatchGridAction['<<$modVar_AF_MatchPlayerLoc>>'] = 'Wide' & gs 'mod_addedflavour_Volleyball' , 'AIAction'
- elseif strpos($modVar_AF_MatchPlayerLoc,'3') ! 0 :
- act 'Go Wide' : $modVar_AF_MatchGridAction['<<$modVar_AF_MatchPlayerLoc>>'] = 'Wide' & gs 'mod_addedflavour_Volleyball' , 'AIAction'
- elseif strpos($modVar_AF_MatchPlayerLoc,'4') ! 0 :
- act 'Move Forward' : $modVar_AF_MatchGridAction['<<$modVar_AF_MatchPlayerLoc>>'] = 'Attack' & gs 'mod_addedflavour_Volleyball' , 'AIAction'
- elseif strpos($modVar_AF_MatchPlayerLoc,'5') ! 0 :
- act 'Move Forward' : $modVar_AF_MatchGridAction['<<$modVar_AF_MatchPlayerLoc>>'] = 'Attack' & gs 'mod_addedflavour_Volleyball' , 'AIAction'
- elseif strpos($modVar_AF_MatchPlayerLoc,'6') ! 0 :
- act 'Move Forward' : $modVar_AF_MatchGridAction['<<$modVar_AF_MatchPlayerLoc>>'] = 'Attack' & gs 'mod_addedflavour_Volleyball' , 'AIAction'
- end
- end
- if $modVar_AF_MatchGridAction['<<$modVar_AF_MatchPlayerLoc>>'] = 'Attack' or $modVar_AF_MatchGridAction['<<$modVar_AF_MatchPlayerLoc>>'] = 'Wide':
- act 'Return Defensive' : $modVar_AF_MatchGridAction['<<$modVar_AF_MatchPlayerLoc>>'] = 'Defend' & gs 'mod_addedflavour_Volleyball' , 'AIAction'
- end
- act 'Just Watch the Play' : gs 'mod_addedflavour_Volleyball' , 'AIAction'
- end
- elseif $modVar_AF_MatchAction ! 'Fumble':
- act 'Just Watch the Play' : gs 'mod_addedflavour_Volleyball' , 'AIAction'
- end
- *nl
- '<a href="exec: gs ''mod_addedflavour_Volleyball'' , ''ChangeMusic'' ">Change Music</a>'
- *nl
- end
-
- if $ARGS[0] = 'ChangeMusic':
- if $modVar_AF_Music = 'VolleyballPractice':
- $modVar_AF_Music = 'VolleyballTournament'
- elseif $modVar_AF_Music = 'VolleyballTournament':
- $modVar_AF_Music = 'VolleyballFinal'
- elseif $modVar_AF_Music = 'VolleyballFinal':
- $modVar_AF_Music = 'No Music'
- elseif $modVar_AF_Music = 'No Music':
- $modVar_AF_Music = 'VolleyballPractice'
- end
- 'Backing Track is currently set to - "<<$modVar_AF_Music>>"'
- CLOSE ALL
- PLAY 'mod/addedflavour/sound/<<$modVar_AF_Music>>.mp3'
- end
-
- if $ARGS[0] = 'BallAction':
- if $modVar_AF_MatchAction = 'Serve':
- '<center><img style="<<$modVar_AF_ImageRestrictions>>" src="mod/addedflavour/images/shared/Volleyball/Serve<<rand(1,4)>>.jpg"></center>'
- *nl
- modVar_AF_Temp = modVar_AF_MatchZones['<<$modVar_AF_MatchBall>>']
- if $modVar_AF_MatchBallTeam = 'A' : $modVar_AF_TempStr = $modVar_AF_TeamA_PlayerName[modVar_AF_Temp]
- if $modVar_AF_MatchBallTeam = 'B' : $modVar_AF_TempStr = $modVar_AF_TeamB_PlayerName[modVar_AF_Temp]
- '<center><b><<$modVar_AF_TempStr>></b> prepares to Serve the Ball...</center>'
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Serve to Zone 1' : gs 'mod_addedflavour_Volleyball' , 'ServeAction' , '1'
- else
- $modArr_AF_MatchAIOptions[] = 'Serve-1'
- end
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Serve to Zone 2' : gs 'mod_addedflavour_Volleyball' , 'ServeAction' , '2'
- else
- $modArr_AF_MatchAIOptions[] = 'Serve-2'
- end
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Serve to Zone 3' : gs 'mod_addedflavour_Volleyball' , 'ServeAction' , '3'
- else
- $modArr_AF_MatchAIOptions[] = 'Serve-3'
- end
- end
- if $modVar_AF_MatchAction = 'Pass':
- '<center><img style="<<$modVar_AF_ImageRestrictions>>" src="mod/addedflavour/images/shared/Volleyball/Pass<<rand(1,4)>>.jpg"></center>'
- *nl
- modVar_AF_Temp = modVar_AF_MatchZones['<<$modVar_AF_MatchBall>>']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchBallPrev>>']
- if $modVar_AF_MatchBallTeam = 'A' : $modVar_AF_TempStr = $modVar_AF_TeamA_PlayerName[modVar_AF_Temp]
- if $modVar_AF_MatchBallTeam = 'B' : $modVar_AF_TempStr = $modVar_AF_TeamB_PlayerName[modVar_AF_Temp]
- if strpos($modVar_AF_MatchBallPrev,'A') ! 0 and $modVar_AF_MatchBallTeam = 'B':
- $modVar_AF_TempStr2 = $modVar_AF_TeamA_PlayerName[modVar_AF_Temp2]
- elseif strpos($modVar_AF_MatchBallPrev,'B') ! 0 and $modVar_AF_MatchBallTeam = 'A':
- $modVar_AF_TempStr2 = $modVar_AF_TeamB_PlayerName[modVar_AF_Temp2]
- else
- if $modVar_AF_MatchBallTeam = 'A' : $modVar_AF_TempStr2 = $modVar_AF_TeamA_PlayerName[modVar_AF_Temp2]
- if $modVar_AF_MatchBallTeam = 'B' : $modVar_AF_TempStr2 = $modVar_AF_TeamB_PlayerName[modVar_AF_Temp2]
- end
- '<center><b><<$modVar_AF_TempStr2>></b> hits the Ball to <b><<$modVar_AF_TempStr>></b>...</center>'
- if strpos($modVar_AF_MatchBall,'1') ! 0:
- if modVar_AF_MatchTouches < 2 and $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBallTeam>>3'] = 'Wide':
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 3' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '3'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-3'
- end
- end
- if modVar_AF_MatchTouches < 2:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 4' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '4'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-4'
- end
- end
- if modVar_AF_MatchTouches < 2:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 5' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '5'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-5'
- end
- end
- if modVar_AF_MatchTouches < 2:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 6' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '6'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-6'
- end
- end
- if modVar_AF_MatchTouches > 1 or $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBallTeam>>1'] = 'Wide':
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Spike Attack (Back Row)' : gs 'mod_addedflavour_Volleyball' , 'SpikeAction'
- else
- $modArr_AF_MatchAIOptions[] = 'SpikeAttack'
- end
- end
- elseif strpos($modVar_AF_MatchBall,'2') ! 0:
- if modVar_AF_MatchTouches < 2 and $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBallTeam>>1'] = 'Wide':
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 1' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '1'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-1'
- end
- end
- if modVar_AF_MatchTouches < 2 and $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBallTeam>>3'] = 'Wide':
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 3' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '3'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-3'
- end
- end
- if modVar_AF_MatchTouches < 2:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 4' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '4'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-4'
- end
- end
- if modVar_AF_MatchTouches < 2:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 5' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '5'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-5'
- end
- end
- if modVar_AF_MatchTouches < 2:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 6' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '6'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-6'
- end
- end
- if modVar_AF_MatchTouches > 1:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Spike Attack (Back Row)' : gs 'mod_addedflavour_Volleyball' , 'SpikeAction'
- else
- $modArr_AF_MatchAIOptions[] = 'SpikeAttack'
- end
- end
- elseif strpos($modVar_AF_MatchBall,'3') ! 0:
- if modVar_AF_MatchTouches < 2 and $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBallTeam>>1'] = 'Wide':
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 1' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '1'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-1'
- end
- end
- if modVar_AF_MatchTouches < 2:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 4' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '4'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-4'
- end
- end
- if modVar_AF_MatchTouches < 2:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 5' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '5'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-5'
- end
- end
- if modVar_AF_MatchTouches < 2:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 6' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '6'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-6'
- end
- end
- if modVar_AF_MatchTouches > 1 or $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBallTeam>>3'] = 'Wide':
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Spike Attack (Back Row)' : gs 'mod_addedflavour_Volleyball' , 'SpikeAction'
- else
- $modArr_AF_MatchAIOptions[] = 'SpikeAttack'
- end
- end
- elseif strpos($modVar_AF_MatchBall,'4') ! 0:
- if modVar_AF_MatchTouches < 2 and $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBallTeam>>1'] = 'Wide':
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 1' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '1'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-1'
- end
- end
- if modVar_AF_MatchTouches < 2 and $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBallTeam>>3'] = 'Wide':
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 3' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '3'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-3'
- end
- end
- if modVar_AF_MatchTouches < 2:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 5' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '5'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-5'
- end
- end
- if modVar_AF_MatchTouches < 2:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 6' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '6'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-6'
- end
- end
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Tip Attack (Front Row)' : gs 'mod_addedflavour_Volleyball' , 'TipAction'
- else
- $modArr_AF_MatchAIOptions[] = 'TipAttack'
- end
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Spike Attack (Back Row)' : gs 'mod_addedflavour_Volleyball' , 'SpikeAction'
- else
- $modArr_AF_MatchAIOptions[] = 'SpikeAttack'
- end
- elseif strpos($modVar_AF_MatchBall,'5') ! 0:
- if modVar_AF_MatchTouches < 2 and $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBallTeam>>1'] = 'Wide':
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 1' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '1'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-1'
- end
- end
- if modVar_AF_MatchTouches < 2 and $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBallTeam>>3'] = 'Wide':
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 3' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '3'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-3'
- end
- end
- if modVar_AF_MatchTouches < 2:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 4' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '4'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-4'
- end
- end
- if modVar_AF_MatchTouches < 2:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 6' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '6'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-6'
- end
- end
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Tip Attack (Front Row)' : gs 'mod_addedflavour_Volleyball' , 'TipAction'
- else
- $modArr_AF_MatchAIOptions[] = 'TipAttack'
- end
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Spike Attack (Back Row)' : gs 'mod_addedflavour_Volleyball' , 'SpikeAction'
- else
- $modArr_AF_MatchAIOptions[] = 'SpikeAttack'
- end
- elseif strpos($modVar_AF_MatchBall,'6') ! 0:
- if modVar_AF_MatchTouches < 2 and $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBallTeam>>1'] = 'Wide':
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 1' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '1'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-1'
- end
- end
- if modVar_AF_MatchTouches < 2 and $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBallTeam>>3'] = 'Wide':
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 3' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '3'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-3'
- end
- end
- if modVar_AF_MatchTouches < 2:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 4' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '4'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-4'
- end
- end
- if modVar_AF_MatchTouches < 2:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Pass to Zone 5' : gs 'mod_addedflavour_Volleyball' , 'PassAction' , '5'
- else
- $modArr_AF_MatchAIOptions[] = 'Pass-5'
- end
- end
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Tip Attack (Front Row)' : gs 'mod_addedflavour_Volleyball' , 'TipAction'
- else
- $modArr_AF_MatchAIOptions[] = 'TipAttack'
- end
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Spike Attack (Back Row)' : gs 'mod_addedflavour_Volleyball' , 'SpikeAction'
- else
- $modArr_AF_MatchAIOptions[] = 'SpikeAttack'
- end
- end
- end
- if $modVar_AF_MatchAction = 'Tip':
- '<center><img style="<<$modVar_AF_ImageRestrictions>>" src="mod/addedflavour/images/shared/Volleyball/Tip<<rand(1,4)>>.jpg"></center>'
- *nl
- modVar_AF_Temp = modVar_AF_MatchZones['<<$modVar_AF_MatchBall>>']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchBallPrev>>']
- if $modVar_AF_MatchBallTeam = 'A' : $modVar_AF_TempStr = $modVar_AF_TeamA_PlayerName[modVar_AF_Temp]
- if $modVar_AF_MatchBallTeam = 'B' : $modVar_AF_TempStr = $modVar_AF_TeamB_PlayerName[modVar_AF_Temp]
- if $modVar_AF_MatchBallTeam = 'A' : $modVar_AF_TempStr2 = $modVar_AF_TeamB_PlayerName[modVar_AF_Temp2]
- if $modVar_AF_MatchBallTeam = 'B' : $modVar_AF_TempStr2 = $modVar_AF_TeamA_PlayerName[modVar_AF_Temp2]
- '<center><b><<$modVar_AF_TempStr2>></b> Tips the Ball! <b><<$modVar_AF_TempStr>></b> is nearest to intercept...</center>'
- if strpos($modVar_AF_MatchBall,'4') ! 0:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Block' : gs 'mod_addedflavour_Volleyball' , 'BlockAction'
- else
- $modArr_AF_MatchAIOptions[] = 'Block'
- end
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Spike Attack (Back Row)' : gs 'mod_addedflavour_Volleyball' , 'SpikeAction'
- else
- $modArr_AF_MatchAIOptions[] = 'SpikeAttack'
- end
- elseif strpos($modVar_AF_MatchBall,'5') ! 0:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Block' : gs 'mod_addedflavour_Volleyball' , 'BlockAction'
- else
- $modArr_AF_MatchAIOptions[] = 'Block'
- end
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Spike Attack (Back Row)' : gs 'mod_addedflavour_Volleyball' , 'SpikeAction'
- else
- $modArr_AF_MatchAIOptions[] = 'SpikeAttack'
- end
- elseif strpos($modVar_AF_MatchBall,'6') ! 0:
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Block' : gs 'mod_addedflavour_Volleyball' , 'BlockAction'
- else
- $modArr_AF_MatchAIOptions[] = 'Block'
- end
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Spike Attack (Back Row)' : gs 'mod_addedflavour_Volleyball' , 'SpikeAction'
- else
- $modArr_AF_MatchAIOptions[] = 'SpikeAttack'
- end
- end
- end
- if $modVar_AF_MatchAction = 'Spike':
- '<center><img style="<<$modVar_AF_ImageRestrictions>>" src="mod/addedflavour/images/shared/Volleyball/Spike<<rand(1,4)>>.jpg"></center>'
- *nl
- modVar_AF_Temp = modVar_AF_MatchZones['<<$modVar_AF_MatchBall>>']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchBallPrev>>']
- if $modVar_AF_MatchBallTeam = 'A' : $modVar_AF_TempStr = $modVar_AF_TeamA_PlayerName[modVar_AF_Temp]
- if $modVar_AF_MatchBallTeam = 'B' : $modVar_AF_TempStr = $modVar_AF_TeamB_PlayerName[modVar_AF_Temp]
- if $modVar_AF_MatchBallTeam = 'A' : $modVar_AF_TempStr2 = $modVar_AF_TeamB_PlayerName[modVar_AF_Temp2]
- if $modVar_AF_MatchBallTeam = 'B' : $modVar_AF_TempStr2 = $modVar_AF_TeamA_PlayerName[modVar_AF_Temp2]
- '<center><b><<$modVar_AF_TempStr2>></b> Spikes the Ball! <b><<$modVar_AF_TempStr>></b> is nearest to intercept...</center>'
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Block' : gs 'mod_addedflavour_Volleyball' , 'BlockAction'
- else
- $modArr_AF_MatchAIOptions[] = 'Block'
- end
- end
- if $modVar_AF_MatchAction = 'Block':
- '<center><img style="<<$modVar_AF_ImageRestrictions>>" src="mod/addedflavour/images/shared/Volleyball/Block<<rand(1,4)>>.jpg"></center>'
- *nl
- modVar_AF_Temp = modVar_AF_MatchZones['<<$modVar_AF_MatchBall>>']
- if $modVar_AF_MatchBallTeam = 'A' : $modVar_AF_TempStr = $modVar_AF_TeamA_PlayerName[modVar_AF_Temp]
- if $modVar_AF_MatchBallTeam = 'B' : $modVar_AF_TempStr = $modVar_AF_TeamB_PlayerName[modVar_AF_Temp]
- '<center><b><<$modVar_AF_TempStr>></b> Blocks the Ball!</center>'
- if $modVar_AF_MatchPlayerLoc = $modVar_AF_MatchBall:
- act 'Rebound' : gs 'mod_addedflavour_Volleyball' , 'ReboundAction'
- else
- $modArr_AF_MatchAIOptions[] = 'Rebound'
- end
- end
- if $modVar_AF_MatchAction = 'Fumble':
- '<center><img style="<<$modVar_AF_ImageRestrictions>>" src="mod/addedflavour/images/shared/Volleyball/Fumble<<rand(1,2)>>.jpg"></center>'
- *nl
- modVar_AF_Temp = modVar_AF_MatchZones['<<$modVar_AF_MatchBall>>']
- if $modVar_AF_MatchBallTeam = 'A':
- $modVar_AF_TempStr = $modVar_AF_TeamA_PlayerName[modVar_AF_Temp]
- $modVar_AF_TempStr2 = $modVar_AF_TeamB_PlayerTeam
- modVar_AF_MatchPointsB += 1
- elseif $modVar_AF_MatchBallTeam = 'B':
- $modVar_AF_TempStr = $modVar_AF_TeamB_PlayerName[modVar_AF_Temp]
- $modVar_AF_TempStr2 = $modVar_AF_TeamA_PlayerTeam
- modVar_AF_MatchPointsA += 1
- end
- modVar_AF_MatchRound += 1
- '<center><b><<$modVar_AF_TempStr>></b> Fumbles! Point to <b><<$modVar_AF_TempStr2>></b></center>'
- gs 'mod_addedflavour_Volleyball' , 'FumbleAction'
- end
- end
-
- if $ARGS[0] = 'ServeAction':
- if $ARGS[1] = '1':
- if $modVar_AF_MatchBallTeam = 'A':
- $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallTeam = 'B' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B1' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallTeam = 'A' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A1' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif $ARGS[1] = '2':
- if $modVar_AF_MatchBallTeam = 'A':
- $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallTeam = 'B' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallTeam = 'A' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif $ARGS[1] = '3':
- if $modVar_AF_MatchBallTeam = 'A':
- $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallTeam = 'B' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B3' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallTeam = 'A' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A3' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- end
- end
-
- if $ARGS[0] = 'PassAction':
- if $ARGS[1] = '1':
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A1' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B1' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif $ARGS[1] = '2':
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif $ARGS[1] = '3':
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A3' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B3' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif $ARGS[1] = '4':
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A4' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B4' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif $ARGS[1] = '5':
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A5' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B5' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif $ARGS[1] = '6':
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A6' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B6' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- end
- end
-
- if $ARGS[0] = 'TipAction':
- modVar_AF_Rand = rand(1,150)
- if modVar_AF_Rand < 50:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches = 0 & $modVar_AF_MatchAction = 'Tip' & $modVar_AF_MatchBallTeam = 'B' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B4' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches = 0 & $modVar_AF_MatchAction = 'Tip' & $modVar_AF_MatchBallTeam = 'A' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A4' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand >= 50 and modVar_AF_Rand < 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches = 0 & $modVar_AF_MatchAction = 'Tip' & $modVar_AF_MatchBallTeam = 'B' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B5' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches = 0 & $modVar_AF_MatchAction = 'Tip' & $modVar_AF_MatchBallTeam = 'A' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A5' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand > 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches = 0 & $modVar_AF_MatchAction = 'Tip' & $modVar_AF_MatchBallTeam = 'B' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B6' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches = 0 & $modVar_AF_MatchAction = 'Tip' & $modVar_AF_MatchBallTeam = 'A' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A6' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- end
- end
-
- if $ARGS[0] = 'SpikeAction':
- if $modVar_AF_MatchAction = 'Tip':
- gs 'mod_addedflavour_Volleyball' , 'CalcEvent' , $modVar_AF_MatchAction
- if $modVar_AF_TempStr = 'Fail' : $modVar_AF_MatchAction = 'Fumble' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- modVar_AF_Rand = rand(1,150)
- if modVar_AF_Rand < 50:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches = 0 & $modVar_AF_MatchAction = 'Spike' & $modVar_AF_MatchBallTeam = 'B' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B1' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches = 0 & $modVar_AF_MatchAction = 'Spike' & $modVar_AF_MatchBallTeam = 'A' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A1' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand >= 50 and modVar_AF_Rand < 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches = 0 & $modVar_AF_MatchAction = 'Spike' & $modVar_AF_MatchBallTeam = 'B' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches = 0 & $modVar_AF_MatchAction = 'Spike' & $modVar_AF_MatchBallTeam = 'A' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand > 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches = 0 & $modVar_AF_MatchAction = 'Spike' & $modVar_AF_MatchBallTeam = 'B' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B3' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches = 0 & $modVar_AF_MatchAction = 'Spike' & $modVar_AF_MatchBallTeam = 'A' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A3' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- end
- end
-
- if $ARGS[0] = 'BlockAction':
- gs 'mod_addedflavour_Volleyball' , 'CalcEvent' , $modVar_AF_MatchAction
- if $modVar_AF_TempStr = 'Success':
- $modVar_AF_MatchAction = 'Block' & gt 'mod_addedflavour_Volleyball' , 'Match'
- elseif $modVar_AF_TempStr = 'Fail':
- $modVar_AF_MatchAction = 'Fumble' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- end
-
- if $ARGS[0] = 'ReboundAction':
- modVar_AF_Rand = rand(1,150)
- if strpos($modVar_AF_MatchBall,'1') ! 0:
- if modVar_AF_Rand < 50:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand >= 50 and modVar_AF_Rand < 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A5' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B5' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand > 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A6' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B6' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- end
- elseif strpos($modVar_AF_MatchBall,'2') ! 0:
- if modVar_AF_Rand < 50:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A1' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B1' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand >= 50 and modVar_AF_Rand < 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A3' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B3' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand > 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A5' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B5' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- end
- elseif strpos($modVar_AF_MatchBall,'3') ! 0:
- if modVar_AF_Rand < 50:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand >= 50 and modVar_AF_Rand < 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A4' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B4' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand > 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A5' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B5' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- end
- elseif strpos($modVar_AF_MatchBall,'4') ! 0:
- if modVar_AF_Rand < 50:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand >= 50 and modVar_AF_Rand < 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A3' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B3' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand > 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A5' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B5' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- end
- elseif strpos($modVar_AF_MatchBall,'5') ! 0:
- if modVar_AF_Rand < 50:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand >= 50 and modVar_AF_Rand < 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A4' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B4' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand > 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A6' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B6' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- end
- elseif strpos($modVar_AF_MatchBall,'6') ! 0:
- if modVar_AF_Rand < 50:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A1' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B1' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand >= 50 and modVar_AF_Rand < 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B2' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- elseif modVar_AF_Rand > 100:
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'A5' & gt 'mod_addedflavour_Volleyball' , 'Match'
- else
- modVar_AF_MatchTouches += 1 & $modVar_AF_MatchAction = 'Pass' & $modVar_AF_MatchBallPrev = $modVar_AF_MatchBall & $modVar_AF_MatchBall = 'B5' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- end
- end
- end
-
- if $ARGS[0] = 'FumbleAction':
- modVar_AF_Temp = modVar_AF_MatchZones['<<$modVar_AF_MatchBallPrev>>']
- if $modVar_AF_MatchBallTeam = 'A' : modArr_AF_MatchBScorers[modVar_AF_Temp] += 1
- if $modVar_AF_MatchBallTeam = 'B' : modArr_AF_MatchAScorers[modVar_AF_Temp] += 1
- if modVar_AF_MatchRound = 13 and modVar_AF_MatchPointsA = modVar_AF_MatchPointsB:
- *nl
- '<b>Tie Break!</b> There is one extra round to decide the winner!'
- end
- if modVar_AF_MatchRound = 7:
- act 'Half-Time Break' : gs 'mod_addedflavour_Volleyball' , 'NewRound' & gt 'mod_addedflavour_Volleyball' , 'HalfTime'
- elseif modVar_AF_MatchRound >= 13 and modVar_AF_MatchPointsA ! modVar_AF_MatchPointsB:
- act 'See Result' : gt 'mod_addedflavour_Volleyball' , 'FullTime'
- else
- act 'Next Round' : gs 'mod_addedflavour_Volleyball' , 'NewRound' & gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- end
-
- if $ARGS[0] = 'CalcEvent':
- modVar_AF_Temp = modVar_AF_MatchZones['<<$modVar_AF_MatchBall>>']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchBallPrev>>']
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_MatchAttackValue = modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2]
- modVar_AF_MatchDefendValue = modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]
- else
- modVar_AF_MatchAttackValue = modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2]
- modVar_AF_MatchDefendValue = modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]
- end
- if $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBallPrev>>'] = 'Attack' : modVar_AF_MatchAttackValue += rand(5,15)
- if $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBallPrev>>'] = 'Wide' : modVar_AF_MatchAttackValue += rand(10,20)
- if $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBall>>'] ! 'Defend' : modVar_AF_MatchDefendValue -= rand(5,10)
- if $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBall>>'] ! 'Defend' : modVar_AF_MatchDefendValue -= rand(5,10)
- if $ARGS[1] = 'Tip':
- if $modVar_AF_MatchGridAction['<<$modVar_AF_MatchBall>>'] = 'Attack' : modVar_AF_MatchDefendValue += rand(5,10)
- elseif $ARGS[1] = 'Spike':
- if $modVar_AF_MatchBall = 'A1' : $modVar_AF_TempStr = 'A6'
- if $modVar_AF_MatchBall = 'A2' : $modVar_AF_TempStr = 'A5'
- if $modVar_AF_MatchBall = 'A3' : $modVar_AF_TempStr = 'A4'
- if $modVar_AF_MatchBall = 'B1' : $modVar_AF_TempStr = 'B6'
- if $modVar_AF_MatchBall = 'B2' : $modVar_AF_TempStr = 'B5'
- if $modVar_AF_MatchBall = 'B3' : $modVar_AF_TempStr = 'B4'
- if $modVar_AF_MatchGridAction['<<$modVar_AF_TempStr>>'] = 'Attack' : modVar_AF_MatchDefendValue -= rand(10,20)
- end
- modVar_AF_MatchAttackValue += modVar_AF_MatchAttackValue * 2
- modVar_AF_MatchDefendValue += modVar_AF_MatchDefendValue * 2
- !Repeated to flush out oddities in the Random Number Generator
- modVar_AF_Rand = rand(1,(modVar_AF_MatchAttackValue + modVar_AF_MatchDefendValue))
- modVar_AF_Rand = rand(1,(modVar_AF_MatchAttackValue + modVar_AF_MatchDefendValue))
- modVar_AF_Rand = rand(1,(modVar_AF_MatchAttackValue + modVar_AF_MatchDefendValue))
- if modVar_AF_Rand >= modVar_AF_MatchAttackValue:
- $modVar_AF_TempStr = 'Success'
- else
- $modVar_AF_TempStr = 'Fail'
- end
- end
-
- if $ARGS[0] = 'ManageStamina':
- if $ARGS[1] = 'Event':
- modVar_AF_Temp = modVar_AF_MatchZones['A1']
- modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] -= rand(0,1)
- modVar_AF_Temp = modVar_AF_MatchZones['A2']
- modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] -= rand(0,1)
- modVar_AF_Temp = modVar_AF_MatchZones['A3']
- modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] -= rand(0,1)
- modVar_AF_Temp = modVar_AF_MatchZones['A4']
- modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] -= rand(0,1)
- modVar_AF_Temp = modVar_AF_MatchZones['A5']
- modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] -= rand(0,1)
- modVar_AF_Temp = modVar_AF_MatchZones['A6']
- modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] -= rand(0,1)
- if $modVar_AF_MatchBallTeam = 'A':
- modVar_AF_Temp = modVar_AF_MatchZones['<<$modVar_AF_MatchBall>>']
- modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] -= 3
- end
- modVar_AF_Temp = modVar_AF_MatchZones['B1']
- modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] -= rand(0,1)
- modVar_AF_Temp = modVar_AF_MatchZones['B2']
- modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] -= rand(0,1)
- modVar_AF_Temp = modVar_AF_MatchZones['B3']
- modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] -= rand(0,1)
- modVar_AF_Temp = modVar_AF_MatchZones['B4']
- modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] -= rand(0,1)
- modVar_AF_Temp = modVar_AF_MatchZones['B5']
- modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] -= rand(0,1)
- modVar_AF_Temp = modVar_AF_MatchZones['B6']
- modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] -= rand(0,1)
- if $modVar_AF_MatchBallTeam = 'B':
- modVar_AF_Temp = modVar_AF_MatchZones['<<$modVar_AF_MatchBall>>']
- modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] -= 3
- end
- elseif $ARGS[1] = 'Gain':
- modVar_AF_Temp = modVar_AF_MatchZones['A1']
- modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] += $ARGS[2]
- modVar_AF_Temp = modVar_AF_MatchZones['A2']
- modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] += $ARGS[2]
- modVar_AF_Temp = modVar_AF_MatchZones['A3']
- modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] += $ARGS[2]
- modVar_AF_Temp = modVar_AF_MatchZones['A4']
- modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] += $ARGS[2]
- modVar_AF_Temp = modVar_AF_MatchZones['A5']
- modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] += $ARGS[2]
- modVar_AF_Temp = modVar_AF_MatchZones['A6']
- modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] += $ARGS[2]
- modVar_AF_Temp = modVar_AF_MatchZones['B1']
- modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] += $ARGS[2]
- modVar_AF_Temp = modVar_AF_MatchZones['B2']
- modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] += $ARGS[2]
- modVar_AF_Temp = modVar_AF_MatchZones['B3']
- modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] += $ARGS[2]
- modVar_AF_Temp = modVar_AF_MatchZones['B4']
- modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] += $ARGS[2]
- modVar_AF_Temp = modVar_AF_MatchZones['B5']
- modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] += $ARGS[2]
- modVar_AF_Temp = modVar_AF_MatchZones['B6']
- modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] += $ARGS[2]
- end
- modVar_AF_Temp = modVar_AF_MatchZones['A1']
- if modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] < 0 : modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] = 0
- if modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] > 100 : modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] = 100
- modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] = modVar_AF_TeamA_PlayerBaseSkill[modVar_AF_Temp] - ((modVar_AF_TeamA_PlayerBaseSkill[modVar_AF_Temp] * (100 - modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp])) / 100) / 2
- modVar_AF_Temp = modVar_AF_MatchZones['A2']
- if modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] < 0 : modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] = 0
- if modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] > 100 : modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] = 100
- modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] = modVar_AF_TeamA_PlayerBaseSkill[modVar_AF_Temp] - ((modVar_AF_TeamA_PlayerBaseSkill[modVar_AF_Temp] * (100 - modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp])) / 100) / 2
- modVar_AF_Temp = modVar_AF_MatchZones['A3']
- if modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] < 0 : modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] = 0
- if modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] > 100 : modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] = 100
- modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] = modVar_AF_TeamA_PlayerBaseSkill[modVar_AF_Temp] - ((modVar_AF_TeamA_PlayerBaseSkill[modVar_AF_Temp] * (100 - modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp])) / 100) / 2
- modVar_AF_Temp = modVar_AF_MatchZones['A4']
- if modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] < 0 : modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] = 0
- if modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] > 100 : modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] = 100
- modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] = modVar_AF_TeamA_PlayerBaseSkill[modVar_AF_Temp] - ((modVar_AF_TeamA_PlayerBaseSkill[modVar_AF_Temp] * (100 - modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp])) / 100) / 2
- modVar_AF_Temp = modVar_AF_MatchZones['A5']
- if modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] < 0 : modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] = 0
- if modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] > 100 : modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] = 100
- modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] = modVar_AF_TeamA_PlayerBaseSkill[modVar_AF_Temp] - ((modVar_AF_TeamA_PlayerBaseSkill[modVar_AF_Temp] * (100 - modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp])) / 100) / 2
- modVar_AF_Temp = modVar_AF_MatchZones['A6']
- if modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] < 0 : modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] = 0
- if modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] > 100 : modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp] = 100
- modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] = modVar_AF_TeamA_PlayerBaseSkill[modVar_AF_Temp] - ((modVar_AF_TeamA_PlayerBaseSkill[modVar_AF_Temp] * (100 - modVar_AF_TeamA_PlayerStamina[modVar_AF_Temp])) / 100) / 2
- modVar_AF_Temp = modVar_AF_MatchZones['B1']
- if modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] < 0 : modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] = 0
- if modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] > 100 : modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] = 100
- modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] = modVar_AF_TeamB_PlayerBaseSkill[modVar_AF_Temp] - ((modVar_AF_TeamB_PlayerBaseSkill[modVar_AF_Temp] * (100 - modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp])) / 100) / 2
- modVar_AF_Temp = modVar_AF_MatchZones['B2']
- if modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] < 0 : modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] = 0
- if modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] > 100 : modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] = 100
- modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] = modVar_AF_TeamB_PlayerBaseSkill[modVar_AF_Temp] - ((modVar_AF_TeamB_PlayerBaseSkill[modVar_AF_Temp] * (100 - modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp])) / 100) / 2
- modVar_AF_Temp = modVar_AF_MatchZones['B3']
- if modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] < 0 : modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] = 0
- if modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] > 100 : modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] = 100
- modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] = modVar_AF_TeamB_PlayerBaseSkill[modVar_AF_Temp] - ((modVar_AF_TeamB_PlayerBaseSkill[modVar_AF_Temp] * (100 - modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp])) / 100) / 2
- modVar_AF_Temp = modVar_AF_MatchZones['B4']
- if modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] < 0 : modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] = 0
- if modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] > 100 : modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] = 100
- modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] = modVar_AF_TeamB_PlayerBaseSkill[modVar_AF_Temp] - ((modVar_AF_TeamB_PlayerBaseSkill[modVar_AF_Temp] * (100 - modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp])) / 100) / 2
- modVar_AF_Temp = modVar_AF_MatchZones['B5']
- if modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] < 0 : modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] = 0
- if modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] > 100 : modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] = 100
- modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] = modVar_AF_TeamB_PlayerBaseSkill[modVar_AF_Temp] - ((modVar_AF_TeamB_PlayerBaseSkill[modVar_AF_Temp] * (100 - modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp])) / 100) / 2
- modVar_AF_Temp = modVar_AF_MatchZones['B6']
- if modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] < 0 : modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] = 0
- if modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] > 100 : modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp] = 100
- modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] = modVar_AF_TeamB_PlayerBaseSkill[modVar_AF_Temp] - ((modVar_AF_TeamB_PlayerBaseSkill[modVar_AF_Temp] * (100 - modVar_AF_TeamB_PlayerStamina[modVar_AF_Temp])) / 100) / 2
- end
-
- if $ARGS[0] = 'NewRound':
- gs 'mod_addedflavour_Volleyball' , 'ManageStamina' , 'Gain' , 10
- modVar_AF_MatchTouches = 0
- $modVar_AF_MatchAction = 'Serve'
- $modVar_AF_MatchBallPrev = 'XX'
- if $modVar_AF_MatchBallTeam = 'A':
- $modVar_AF_MatchBallTeam = 'B'
- $modVar_AF_MatchBall = 'B1'
- else
- $modVar_AF_MatchBallTeam = 'A'
- $modVar_AF_MatchBall = 'A1'
- end
- $modVar_AF_MatchGridAction['A1'] = 'Defend'
- $modVar_AF_MatchGridAction['A2'] = 'Defend'
- $modVar_AF_MatchGridAction['A3'] = 'Defend'
- $modVar_AF_MatchGridAction['A4'] = 'Defend'
- $modVar_AF_MatchGridAction['A5'] = 'Defend'
- $modVar_AF_MatchGridAction['A6'] = 'Defend'
- $modVar_AF_MatchGridAction['B1'] = 'Defend'
- $modVar_AF_MatchGridAction['B2'] = 'Defend'
- $modVar_AF_MatchGridAction['B3'] = 'Defend'
- $modVar_AF_MatchGridAction['B4'] = 'Defend'
- $modVar_AF_MatchGridAction['B5'] = 'Defend'
- $modVar_AF_MatchGridAction['B6'] = 'Defend'
- modVar_AF_MatchZones['XX'] = modVar_AF_MatchZones['A6']
- modVar_AF_MatchZones['A6'] = modVar_AF_MatchZones['A5']
- modVar_AF_MatchZones['A5'] = modVar_AF_MatchZones['A4']
- modVar_AF_MatchZones['A4'] = modVar_AF_MatchZones['A3']
- modVar_AF_MatchZones['A3'] = modVar_AF_MatchZones['A2']
- modVar_AF_MatchZones['A2'] = modVar_AF_MatchZones['A1']
- modVar_AF_MatchZones['A1'] = modVar_AF_MatchZones['XX']
- modVar_AF_MatchZones['XX'] = modVar_AF_MatchZones['B6']
- modVar_AF_MatchZones['B6'] = modVar_AF_MatchZones['B5']
- modVar_AF_MatchZones['B5'] = modVar_AF_MatchZones['B4']
- modVar_AF_MatchZones['B4'] = modVar_AF_MatchZones['B3']
- modVar_AF_MatchZones['B3'] = modVar_AF_MatchZones['B2']
- modVar_AF_MatchZones['B2'] = modVar_AF_MatchZones['B1']
- modVar_AF_MatchZones['B1'] = modVar_AF_MatchZones['XX']
- if $modVar_AF_MatchPlayerLoc = 'A1':
- $modVar_AF_MatchPlayerLoc = 'A2'
- elseif $modVar_AF_MatchPlayerLoc = 'A2':
- $modVar_AF_MatchPlayerLoc = 'A3'
- elseif $modVar_AF_MatchPlayerLoc = 'A3':
- $modVar_AF_MatchPlayerLoc = 'A4'
- elseif $modVar_AF_MatchPlayerLoc = 'A4':
- $modVar_AF_MatchPlayerLoc = 'A5'
- elseif $modVar_AF_MatchPlayerLoc = 'A5':
- $modVar_AF_MatchPlayerLoc = 'A6'
- elseif $modVar_AF_MatchPlayerLoc = 'A6':
- $modVar_AF_MatchPlayerLoc = 'A1'
- elseif $modVar_AF_MatchPlayerLoc = 'B1':
- $modVar_AF_MatchPlayerLoc = 'B2'
- elseif $modVar_AF_MatchPlayerLoc = 'B2':
- $modVar_AF_MatchPlayerLoc = 'B3'
- elseif $modVar_AF_MatchPlayerLoc = 'B3':
- $modVar_AF_MatchPlayerLoc = 'B4'
- elseif $modVar_AF_MatchPlayerLoc = 'B4':
- $modVar_AF_MatchPlayerLoc = 'B5'
- elseif $modVar_AF_MatchPlayerLoc = 'B5':
- $modVar_AF_MatchPlayerLoc = 'B6'
- elseif $modVar_AF_MatchPlayerLoc = 'B6':
- $modVar_AF_MatchPlayerLoc = 'B1'
- end
- end
-
- if $ARGS[0] = 'HalfTime':
- gs 'mod_addedflavour_Volleyball' , 'ManageStamina' , 'Gain' , 30
- gs 'stat'
- '<center><b>' + iif($modVar_AF_MatchBallTeam = 'A','<u>','') + '<<$modVar_AF_TeamA_PlayerTeam>>' + iif($modVar_AF_MatchBallTeam = 'A','</u>','') + '</b> - <<modVar_AF_MatchPointsA>> -vs- <<modVar_AF_MatchPointsB>> - <b>' + iif($modVar_AF_MatchBallTeam = 'B','<u>','') + '<<$modVar_AF_TeamB_PlayerTeam>>' + iif($modVar_AF_MatchBallTeam = 'B','</u>','') + '</b></center>'
- '<center><img style="<<$modVar_AF_ImageRestrictions>>" src="mod/addedflavour/images/shared/Volleyball/Huddle<<rand(1,4)>>.jpg"></center>'
- *nl
- 'All the players huddle in for a half-time break. After everyone has regained their composure you all take your places...'
- *nl
- '<b><<$modVar_AF_TeamA_PlayerTeam>> Makes the Following Substitutions:</b>'
- *nl
- makesubscount = 6
- :makesubscountAloopstart
- if makesubscount = 10 : jump 'makesubscountAloopend'
- KILLVAR 'modArr_AF_Rand'
- modArr_AF_Rand[] = 1
- modArr_AF_Rand[] = 2
- modArr_AF_Rand[] = 3
- modArr_AF_Rand[] = 4
- modArr_AF_Rand[] = 5
- modArr_AF_Rand[] = 6
- modVar_AF_Rand = (rand(1,arrsize('modArr_AF_Rand'))) - 1
- modVar_AF_Temp = modArr_AF_Rand[modVar_AF_Rand]
- modVar_AF_Temp2 = modVar_AF_MatchZones['A<<modVar_AF_Temp>>']
- if modVar_AF_TeamA_PlayerSkill[makesubscount] > modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] or (modVar_AF_MatchPracticeSub = 1 and $modVar_AF_TeamA_PlayerName[makesubscount] = '<<$pcs_firstname>> <<$pcs_lastname>>'):
- KILLVAR 'modArr_AF_Rand' , modVar_AF_Rand
- '<<$modVar_AF_TeamA_PlayerName[makesubscount]>> - <font color="Green">IN</font> / <<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp2]>> - <font color="Red">OUT</font>'
- if $modVar_AF_TeamA_PlayerName[makesubscount] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'A<<modVar_AF_Temp>>'
- if $modVar_AF_TeamA_PlayerName[modVar_AF_Temp2] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'AX'
- modVar_AF_MatchZones['A<<modVar_AF_Temp>>'] = makesubscount
- end
- makesubscount += 1
- jump 'makesubscountAloopstart'
- :makesubscountAloopend
- *nl
- '<b><<$modVar_AF_TeamB_PlayerTeam>> Makes the Following Substitutions:</b>'
- *nl
- makesubscount = 6
- :makesubscountBloopstart
- if makesubscount = 10 : jump 'makesubscountBloopend'
- KILLVAR 'modArr_AF_Rand'
- modArr_AF_Rand[] = 1
- modArr_AF_Rand[] = 2
- modArr_AF_Rand[] = 3
- modArr_AF_Rand[] = 4
- modArr_AF_Rand[] = 5
- modArr_AF_Rand[] = 6
- modVar_AF_Rand = (rand(1,arrsize('modArr_AF_Rand'))) - 1
- modVar_AF_Temp = modArr_AF_Rand[modVar_AF_Rand]
- modVar_AF_Temp2 = modVar_AF_MatchZones['B<<modVar_AF_Temp>>']
- if modVar_AF_TeamB_PlayerSkill[makesubscount] > modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] or (modVar_AF_MatchPracticeSub = 1 and $modVar_AF_TeamB_PlayerName[makesubscount] = '<<$pcs_firstname>> <<$pcs_lastname>>'):
- KILLVAR 'modArr_AF_Rand' , modVar_AF_Rand
- '<<$modVar_AF_TeamB_PlayerName[makesubscount]>> - <font color="Green">IN</font> / <<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp2]>> - <font color="Red">OUT</font>'
- if $modVar_AF_TeamB_PlayerName[makesubscount] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'B<<modVar_AF_Temp>>'
- if $modVar_AF_TeamB_PlayerName[modVar_AF_Temp2] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'BX'
- modVar_AF_MatchZones['B<<modVar_AF_Temp>>'] = makesubscount
- end
- makesubscount += 1
- jump 'makesubscountBloopstart'
- :makesubscountBloopend
- act 'Get to your Zone' : gt 'mod_addedflavour_Volleyball' , 'Match'
- end
-
- if $ARGS[0] = 'FullTime':
- CLOSE ALL
- minut += rand(55,70)
- gs 'stat'
- Enable_FaceTurn = modVar_AF_MatchFaceSetting
- KILLVAR 'modVar_AF_MatchFaceSetting'
- '<center><b>' + iif($modVar_AF_MatchBallTeam = 'A','<u>','') + '<<$modVar_AF_TeamA_PlayerTeam>>' + iif($modVar_AF_MatchBallTeam = 'A','</u>','') + '</b> - <<modVar_AF_MatchPointsA>> -vs- <<modVar_AF_MatchPointsB>> - <b>' + iif($modVar_AF_MatchBallTeam = 'B','<u>','') + '<<$modVar_AF_TeamB_PlayerTeam>>' + iif($modVar_AF_MatchBallTeam = 'B','</u>','') + '</b></center>'
- modVar_AF_Temp = 0
- if strpos($modVar_AF_MatchPlayerLoc,'A') ! 0:
- if modVar_AF_MatchPointsA > modVar_AF_MatchPointsB : modVar_AF_Temp = 1
- else
- if modVar_AF_MatchPointsB > modVar_AF_MatchPointsA : modVar_AF_Temp = 1
- end
- if modVar_AF_Temp = 1:
- vball_lvl += 3 & vball_lvlst = vball_lvl
- pcs_mood += 20
- '<center><img style="<<$modVar_AF_ImageRestrictions>>" src="mod/addedflavour/images/shared/Volleyball/Win<<rand(1,4)>>.jpg"></center>'
- *nl
- 'Your Team has WON the match!!!'
- else
- vball_lvl += 1 & vball_lvlst = vball_lvl
- pcs_mood -= 10
- '<center><img style="<<$modVar_AF_ImageRestrictions>>" src="mod/addedflavour/images/shared/Volleyball/Loss<<rand(1,2)>>.jpg"></center>'
- *nl
- 'Your Team has Lost the match...'
- end
- *nl
- '<b>Points Scored:</b>'
- *nl
- if modArr_AF_MatchAScorers[0] > 0 : '<<$modVar_AF_TeamA_PlayerName[0]>> (<<$modVar_AF_TeamA_PlayerTeam>>) - <<modArr_AF_MatchAScorers[0]>>'
- if modArr_AF_MatchAScorers[1] > 0 : '<<$modVar_AF_TeamA_PlayerName[1]>> (<<$modVar_AF_TeamA_PlayerTeam>>) - <<modArr_AF_MatchAScorers[1]>>'
- if modArr_AF_MatchAScorers[2] > 0 : '<<$modVar_AF_TeamA_PlayerName[2]>> (<<$modVar_AF_TeamA_PlayerTeam>>) - <<modArr_AF_MatchAScorers[2]>>'
- if modArr_AF_MatchAScorers[3] > 0 : '<<$modVar_AF_TeamA_PlayerName[3]>> (<<$modVar_AF_TeamA_PlayerTeam>>) - <<modArr_AF_MatchAScorers[3]>>'
- if modArr_AF_MatchAScorers[4] > 0 : '<<$modVar_AF_TeamA_PlayerName[4]>> (<<$modVar_AF_TeamA_PlayerTeam>>) - <<modArr_AF_MatchAScorers[4]>>'
- if modArr_AF_MatchAScorers[5] > 0 : '<<$modVar_AF_TeamA_PlayerName[5]>> (<<$modVar_AF_TeamA_PlayerTeam>>) - <<modArr_AF_MatchAScorers[5]>>'
- if modArr_AF_MatchAScorers[6] > 0 : '<<$modVar_AF_TeamA_PlayerName[6]>> (<<$modVar_AF_TeamA_PlayerTeam>>) - <<modArr_AF_MatchAScorers[6]>>'
- if modArr_AF_MatchAScorers[7] > 0 : '<<$modVar_AF_TeamA_PlayerName[7]>> (<<$modVar_AF_TeamA_PlayerTeam>>) - <<modArr_AF_MatchAScorers[7]>>'
- if modArr_AF_MatchAScorers[8] > 0 : '<<$modVar_AF_TeamA_PlayerName[8]>> (<<$modVar_AF_TeamA_PlayerTeam>>) - <<modArr_AF_MatchAScorers[8]>>'
- if modArr_AF_MatchAScorers[9] > 0 : '<<$modVar_AF_TeamA_PlayerName[9]>> (<<$modVar_AF_TeamA_PlayerTeam>>) - <<modArr_AF_MatchAScorers[9]>>'
- if modArr_AF_MatchBScorers[0] > 0 : '<<$modVar_AF_TeamB_PlayerName[0]>> (<<$modVar_AF_TeamB_PlayerTeam>>) - <<modArr_AF_MatchBScorers[0]>>'
- if modArr_AF_MatchBScorers[1] > 0 : '<<$modVar_AF_TeamB_PlayerName[1]>> (<<$modVar_AF_TeamB_PlayerTeam>>) - <<modArr_AF_MatchBScorers[1]>>'
- if modArr_AF_MatchBScorers[2] > 0 : '<<$modVar_AF_TeamB_PlayerName[2]>> (<<$modVar_AF_TeamB_PlayerTeam>>) - <<modArr_AF_MatchBScorers[2]>>'
- if modArr_AF_MatchBScorers[3] > 0 : '<<$modVar_AF_TeamB_PlayerName[3]>> (<<$modVar_AF_TeamB_PlayerTeam>>) - <<modArr_AF_MatchBScorers[3]>>'
- if modArr_AF_MatchBScorers[4] > 0 : '<<$modVar_AF_TeamB_PlayerName[4]>> (<<$modVar_AF_TeamB_PlayerTeam>>) - <<modArr_AF_MatchBScorers[4]>>'
- if modArr_AF_MatchBScorers[5] > 0 : '<<$modVar_AF_TeamB_PlayerName[5]>> (<<$modVar_AF_TeamB_PlayerTeam>>) - <<modArr_AF_MatchBScorers[5]>>'
- if modArr_AF_MatchBScorers[6] > 0 : '<<$modVar_AF_TeamB_PlayerName[6]>> (<<$modVar_AF_TeamB_PlayerTeam>>) - <<modArr_AF_MatchBScorers[6]>>'
- if modArr_AF_MatchBScorers[7] > 0 : '<<$modVar_AF_TeamB_PlayerName[7]>> (<<$modVar_AF_TeamB_PlayerTeam>>) - <<modArr_AF_MatchBScorers[7]>>'
- if modArr_AF_MatchBScorers[8] > 0 : '<<$modVar_AF_TeamB_PlayerName[8]>> (<<$modVar_AF_TeamB_PlayerTeam>>) - <<modArr_AF_MatchBScorers[8]>>'
- if modArr_AF_MatchBScorers[9] > 0 : '<<$modVar_AF_TeamB_PlayerName[9]>> (<<$modVar_AF_TeamB_PlayerTeam>>) - <<modArr_AF_MatchBScorers[9]>>'
- if modVar_AF_EventProgress['A69-LeagueMatches'] = 1:
- act 'Leave Court' : gt 'mod_addedflavour_A69_Events' , 'A69-Saturday-5'
- elseif modVar_AF_EventProgress['A69-LeagueMatches'] = 2:
- act 'Leave Court' : gt 'mod_addedflavour_A69_Events' , 'A69-Saturday-7'
- elseif modVar_AF_EventProgress['A69-LeagueMatches'] = 3:
- act 'Leave Court' : gt 'mod_addedflavour_A69_Events' , 'A69-Saturday-9'
- elseif modVar_AF_EventProgress['A69-KnockoutMatches'] = 1:
- act 'Leave Court' : gt 'mod_addedflavour_A69_Events' , 'A69-Sunday-5'
- elseif modVar_AF_EventProgress['A69-KnockoutMatches'] = 2:
- act 'Leave Court' : gt 'mod_addedflavour_A69_Events' , 'A69-Sunday-7'
- else
- act 'Leave Court' : gt $loc, $loc_arg
- end
- end
-
- if $ARGS[0] = 'PlayerKnowledge':
- *nl
- '<b>What you know:</b>'
- *nl
- modVar_AF_Temp = modVar_AF_MatchZones['<<$modVar_AF_MatchPlayerLoc>>']
- if strpos($modVar_AF_MatchPlayerLoc,'A') ! 0:
- modVar_AF_Temp2 = modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]
- else
- modVar_AF_Temp2 = modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]
- end
- $modVar_AF_TempStr = $modVar_AF_MatchGridAction['<<$modVar_AF_MatchPlayerLoc>>']
- if $modVar_AF_MatchPlayerLoc ! 'AX' and $modVar_AF_MatchPlayerLoc ! 'BX' : 'You(<<modVar_AF_Temp2>>) - <<$modVar_AF_TempStr>> (<<$modVar_AF_MatchPlayerLoc>>)'
- view 'mod/addedflavour/images/shared/Volleyball/<<$modVar_AF_MatchBall>>.png'
- *nl
- if strpos($modVar_AF_MatchPlayerLoc,'A') ! 0:
- modVar_AF_Temp = modVar_AF_MatchZones['B1']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchPlayerLoc>>']
- 'Opponent Zone 1 - ' + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] + 5 >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],'<<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>>','Unknown') + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],' (<<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>)','') + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] - 5 >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],' - Current State: <<$modVar_AF_MatchGridAction[''B1'']>>','')
- else
- modVar_AF_Temp = modVar_AF_MatchZones['A1']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchPlayerLoc>>']
- 'Opponent Zone 1 - ' + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] + 5 >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],'<<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>>','Unknown') + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],' (<<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>)','') + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] - 5 >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],' - Current State: <<$modVar_AF_MatchGridAction[''A1'']>>','')
- end
- if strpos($modVar_AF_MatchPlayerLoc,'A') ! 0:
- modVar_AF_Temp = modVar_AF_MatchZones['B2']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchPlayerLoc>>']
- 'Opponent Zone 2 - ' + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] + 5 >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],'<<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>>','Unknown') + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],' (<<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>)','') + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] - 5 >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],' - Current State: <<$modVar_AF_MatchGridAction[''B2'']>>','')
- else
- modVar_AF_Temp = modVar_AF_MatchZones['A2']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchPlayerLoc>>']
- 'Opponent Zone 2 - ' + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] + 5 >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],'<<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>>','Unknown') + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],' (<<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>)','') + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] - 5 >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],' - Current State: <<$modVar_AF_MatchGridAction[''A2'']>>','')
- end
- if strpos($modVar_AF_MatchPlayerLoc,'A') ! 0:
- modVar_AF_Temp = modVar_AF_MatchZones['B3']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchPlayerLoc>>']
- 'Opponent Zone 3 - ' + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] + 5 >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],'<<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>>','Unknown') + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],' (<<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>)','') + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] - 5 >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],' - Current State: <<$modVar_AF_MatchGridAction[''B3'']>>','')
- else
- modVar_AF_Temp = modVar_AF_MatchZones['A3']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchPlayerLoc>>']
- 'Opponent Zone 3 - ' + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] + 5 >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],'<<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>>','Unknown') + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],' (<<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>)','') + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] - 5 >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],' - Current State: <<$modVar_AF_MatchGridAction[''A3'']>>','')
- end
- if strpos($modVar_AF_MatchPlayerLoc,'A') ! 0:
- modVar_AF_Temp = modVar_AF_MatchZones['B4']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchPlayerLoc>>']
- 'Opponent Zone 4 - ' + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] + 5 >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],'<<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>>','Unknown') + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],' (<<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>)','') + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] - 5 >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],' - Current State: <<$modVar_AF_MatchGridAction[''B4'']>>','')
- else
- modVar_AF_Temp = modVar_AF_MatchZones['A4']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchPlayerLoc>>']
- 'Opponent Zone 4 - ' + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] + 5 >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],'<<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>>','Unknown') + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],' (<<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>)','') + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] - 5 >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],' - Current State: <<$modVar_AF_MatchGridAction[''A4'']>>','')
- end
- if strpos($modVar_AF_MatchPlayerLoc,'A') ! 0:
- modVar_AF_Temp = modVar_AF_MatchZones['B5']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchPlayerLoc>>']
- 'Opponent Zone 5 - ' + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] + 5 >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],'<<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>>','Unknown') + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],' (<<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>)','') + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] - 5 >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],' - Current State: <<$modVar_AF_MatchGridAction[''B5'']>>','')
- else
- modVar_AF_Temp = modVar_AF_MatchZones['A5']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchPlayerLoc>>']
- 'Opponent Zone 5 - ' + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] + 5 >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],'<<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>>','Unknown') + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],' (<<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>)','') + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] - 5 >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],' - Current State: <<$modVar_AF_MatchGridAction[''A5'']>>','')
- end
- if strpos($modVar_AF_MatchPlayerLoc,'A') ! 0:
- modVar_AF_Temp = modVar_AF_MatchZones['B6']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchPlayerLoc>>']
- 'Opponent Zone 6 - ' + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] + 5 >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],'<<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>>','Unknown') + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],' (<<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>)','') + iif(modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] - 5 >= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp],' - Current State: <<$modVar_AF_MatchGridAction[''B6'']>>','')
- else
- modVar_AF_Temp = modVar_AF_MatchZones['A6']
- modVar_AF_Temp2 = modVar_AF_MatchZones['<<$modVar_AF_MatchPlayerLoc>>']
- 'Opponent Zone 6 - ' + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] + 5 >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],'<<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>>','Unknown') + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],' (<<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>)','') + iif(modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] - 5 >= modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp],' - Current State: <<$modVar_AF_MatchGridAction[''A6'']>>','')
- end
- *nl
- if strpos($modVar_AF_MatchPlayerLoc,'A') ! 0:
- if ($modVar_AF_MatchPlayerLoc ! 'A1' and $modVar_AF_MatchPlayerLoc = 'A2') or $modVar_AF_MatchPlayerLoc = 'AX':
- modVar_AF_Temp = modVar_AF_MatchZones['A1']
- 'Team Zone 1 - <<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>> (<<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>) - Current State: <<$modVar_AF_MatchGridAction[''A1'']>>'
- end
- else
- if ($modVar_AF_MatchPlayerLoc ! 'B1' and $modVar_AF_MatchPlayerLoc = 'B2') or $modVar_AF_MatchPlayerLoc = 'BX':
- modVar_AF_Temp = modVar_AF_MatchZones['B1']
- 'Team Zone 1 - <<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>> (<<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>) - Current State: <<$modVar_AF_MatchGridAction[''B1'']>>'
- end
- end
- if strpos($modVar_AF_MatchPlayerLoc,'A') ! 0:
- if ($modVar_AF_MatchPlayerLoc ! 'A2' and ($modVar_AF_MatchPlayerLoc = 'A1' or $modVar_AF_MatchPlayerLoc = 'A3')) or $modVar_AF_MatchPlayerLoc = 'AX':
- modVar_AF_Temp = modVar_AF_MatchZones['A2']
- 'Team Zone 2 - <<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>> (<<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>) - Current State: <<$modVar_AF_MatchGridAction[''A2'']>>'
- end
- else
- if ($modVar_AF_MatchPlayerLoc ! 'B2' and ($modVar_AF_MatchPlayerLoc = 'B1' or $modVar_AF_MatchPlayerLoc = 'B3')) or $modVar_AF_MatchPlayerLoc = 'BX':
- modVar_AF_Temp = modVar_AF_MatchZones['B2']
- 'Team Zone 2 - <<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>> (<<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>) - Current State: <<$modVar_AF_MatchGridAction[''B2'']>>'
- end
- end
- if strpos($modVar_AF_MatchPlayerLoc,'A') ! 0:
- if ($modVar_AF_MatchPlayerLoc ! 'A3' and $modVar_AF_MatchPlayerLoc = 'A2') or $modVar_AF_MatchPlayerLoc = 'AX':
- modVar_AF_Temp = modVar_AF_MatchZones['A3']
- 'Team Zone 3 - <<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>> (<<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>) - Current State: <<$modVar_AF_MatchGridAction[''A3'']>>'
- end
- else
- if ($modVar_AF_MatchPlayerLoc ! 'B3' and $modVar_AF_MatchPlayerLoc = 'B2') or $modVar_AF_MatchPlayerLoc = 'BX':
- modVar_AF_Temp = modVar_AF_MatchZones['B3']
- 'Team Zone 3 - <<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>> (<<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>) - Current State: <<$modVar_AF_MatchGridAction[''B3'']>>'
- end
- end
- if strpos($modVar_AF_MatchPlayerLoc,'A') ! 0:
- if ($modVar_AF_MatchPlayerLoc ! 'A4' and ($modVar_AF_MatchPlayerLoc = 'A1' or $modVar_AF_MatchPlayerLoc = 'A2' or $modVar_AF_MatchPlayerLoc = 'A3' or $modVar_AF_MatchPlayerLoc = 'A5')) or $modVar_AF_MatchPlayerLoc = 'AX':
- modVar_AF_Temp = modVar_AF_MatchZones['A4']
- 'Team Zone 4 - <<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>> (<<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>) - Current State: <<$modVar_AF_MatchGridAction[''A4'']>>'
- end
- else
- if ($modVar_AF_MatchPlayerLoc ! 'B4' and ($modVar_AF_MatchPlayerLoc = 'B1' or $modVar_AF_MatchPlayerLoc = 'B2' or $modVar_AF_MatchPlayerLoc = 'B3' or $modVar_AF_MatchPlayerLoc = 'B5')) or $modVar_AF_MatchPlayerLoc = 'BX':
- modVar_AF_Temp = modVar_AF_MatchZones['B4']
- 'Team Zone 4 - <<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>> (<<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>) - Current State: <<$modVar_AF_MatchGridAction[''B4'']>>'
- end
- end
- if strpos($modVar_AF_MatchPlayerLoc,'A') ! 0:
- if ($modVar_AF_MatchPlayerLoc ! 'A5' and ($modVar_AF_MatchPlayerLoc = 'A1' or $modVar_AF_MatchPlayerLoc = 'A2' or $modVar_AF_MatchPlayerLoc = 'A3' or $modVar_AF_MatchPlayerLoc = 'A4' or $modVar_AF_MatchPlayerLoc = 'A6')) or $modVar_AF_MatchPlayerLoc = 'AX':
- modVar_AF_Temp = modVar_AF_MatchZones['A5']
- 'Team Zone 5 - <<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>> (<<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>) - Current State: <<$modVar_AF_MatchGridAction[''A5'']>>'
- end
- else
- if ($modVar_AF_MatchPlayerLoc ! 'B5' and ($modVar_AF_MatchPlayerLoc = 'B1' or $modVar_AF_MatchPlayerLoc = 'B2' or $modVar_AF_MatchPlayerLoc = 'B3' or $modVar_AF_MatchPlayerLoc = 'B4' or $modVar_AF_MatchPlayerLoc = 'B6')) or $modVar_AF_MatchPlayerLoc = 'BX':
- modVar_AF_Temp = modVar_AF_MatchZones['B5']
- 'Team Zone 5 - <<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>> (<<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>) - Current State: <<$modVar_AF_MatchGridAction[''B5'']>>'
- end
- end
- if strpos($modVar_AF_MatchPlayerLoc,'A') ! 0:
- if ($modVar_AF_MatchPlayerLoc ! 'A6' and ($modVar_AF_MatchPlayerLoc = 'A1' or $modVar_AF_MatchPlayerLoc = 'A2' or $modVar_AF_MatchPlayerLoc = 'A3' or $modVar_AF_MatchPlayerLoc = 'A5')) or $modVar_AF_MatchPlayerLoc = 'AX':
- modVar_AF_Temp = modVar_AF_MatchZones['A6']
- 'Team Zone 6 - <<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>> (<<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>) - Current State: <<$modVar_AF_MatchGridAction[''A6'']>>'
- end
- else
- if ($modVar_AF_MatchPlayerLoc ! 'B6' and ($modVar_AF_MatchPlayerLoc = 'B1' or $modVar_AF_MatchPlayerLoc = 'B2' or $modVar_AF_MatchPlayerLoc = 'B3' or $modVar_AF_MatchPlayerLoc = 'B5')) or $modVar_AF_MatchPlayerLoc = 'BX':
- modVar_AF_Temp = modVar_AF_MatchZones['B6']
- 'Team Zone 6 - <<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>> (<<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>) - Current State: <<$modVar_AF_MatchGridAction[''B6'']>>'
- end
- end
- end
-
- if $ARGS[0] = 'AIAction':
- modVar_AF_Temp = (rand(1,arrsize('$modArr_AF_MatchAIOptions'))) - 1
- $modVar_AF_MatchAIChoice = $modArr_AF_MatchAIOptions[modVar_AF_Temp]
- if $modVar_AF_MatchAIChoice = 'Rebound':
- gs 'mod_addedflavour_Volleyball' , 'ReboundAction'
- elseif $modVar_AF_MatchAIChoice = 'Block':
- gs 'mod_addedflavour_Volleyball' , 'BlockAction'
- elseif $modVar_AF_MatchAIChoice = 'SpikeAttack':
- gs 'mod_addedflavour_Volleyball' , 'SpikeAction'
- elseif $modVar_AF_MatchAIChoice = 'TipAttack':
- gs 'mod_addedflavour_Volleyball' , 'TipAction'
- elseif $modVar_AF_MatchAIChoice = 'Pass-1':
- gs 'mod_addedflavour_Volleyball' , 'PassAction' , '1'
- elseif $modVar_AF_MatchAIChoice = 'Pass-2':
- gs 'mod_addedflavour_Volleyball' , 'PassAction' , '2'
- elseif $modVar_AF_MatchAIChoice = 'Pass-3':
- gs 'mod_addedflavour_Volleyball' , 'PassAction' , '3'
- elseif $modVar_AF_MatchAIChoice = 'Pass-4':
- gs 'mod_addedflavour_Volleyball' , 'PassAction' , '4'
- elseif $modVar_AF_MatchAIChoice = 'Pass-5':
- gs 'mod_addedflavour_Volleyball' , 'PassAction' , '5'
- elseif $modVar_AF_MatchAIChoice = 'Pass-6':
- gs 'mod_addedflavour_Volleyball' , 'PassAction' , '6'
- elseif $modVar_AF_MatchAIChoice = 'Serve-1':
- gs 'mod_addedflavour_Volleyball' , 'ServeAction' , '1'
- elseif $modVar_AF_MatchAIChoice = 'Serve-2':
- gs 'mod_addedflavour_Volleyball' , 'ServeAction' , '2'
- elseif $modVar_AF_MatchAIChoice = 'Serve-3':
- gs 'mod_addedflavour_Volleyball' , 'ServeAction' , '3'
- end
- end
-
- if $ARGS[0] = 'AIStance':
- if $modVar_AF_MatchAction ! 'Serve' and $modVar_AF_MatchBall ! modVar_AF_MatchZones['A1'] and $modVar_AF_MatchPlayerLoc ! 'A1':
- modVar_AF_Temp = modVar_AF_MatchZones['A1']
- if modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] >= 55:
- if strpos($modVar_AF_MatchBall,'A') ! 0:
- if $modVar_AF_MatchGridAction['A1'] = 'Defend' : $modVar_AF_MatchGridAction['A1'] = 'Wide'
- else
- if $modVar_AF_MatchGridAction['A1'] = 'Wide' : $modVar_AF_MatchGridAction['A1'] = 'Defend'
- end
- elseif modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] >= 40 and rand(1,50) > 25:
- if $modVar_AF_MatchGridAction['A1'] = 'Defend' : $modVar_AF_MatchGridAction['A1'] = 'Wide'
- if $modVar_AF_MatchGridAction['A1'] = 'Wide' : $modVar_AF_MatchGridAction['A1'] = 'Defend'
- end
- end
- if $modVar_AF_MatchAction ! 'Serve' and $modVar_AF_MatchBall ! modVar_AF_MatchZones['A3'] and $modVar_AF_MatchPlayerLoc ! 'A3':
- modVar_AF_Temp = modVar_AF_MatchZones['A3']
- if modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] >= 55:
- if strpos($modVar_AF_MatchBall,'A') ! 0:
- if $modVar_AF_MatchGridAction['A3'] = 'Defend' : $modVar_AF_MatchGridAction['A3'] = 'Wide'
- else
- if $modVar_AF_MatchGridAction['A3'] = 'Wide' : $modVar_AF_MatchGridAction['A3'] = 'Defend'
- end
- elseif modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] >= 40 and rand(1,50) > 25:
- if $modVar_AF_MatchGridAction['A3'] = 'Defend' : $modVar_AF_MatchGridAction['A3'] = 'Wide'
- if $modVar_AF_MatchGridAction['A3'] = 'Wide' : $modVar_AF_MatchGridAction['A3'] = 'Defend'
- end
- end
- if $modVar_AF_MatchAction ! 'Serve' and $modVar_AF_MatchBall ! modVar_AF_MatchZones['A4'] and $modVar_AF_MatchPlayerLoc ! 'A4':
- modVar_AF_Temp = modVar_AF_MatchZones['A4']
- if modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] >= 55:
- if $modVar_AF_MatchBallTeam = 'B' and (strpos($modVar_AF_MatchBall,'4') ! 0 or strpos($modVar_AF_MatchBall,'5') ! 0 or strpos($modVar_AF_MatchBall,'6') ! 0):
- if $modVar_AF_MatchGridAction['A4'] = 'Defend' : $modVar_AF_MatchGridAction['A4'] = 'Attack'
- else
- if $modVar_AF_MatchGridAction['A4'] = 'Attack' : $modVar_AF_MatchGridAction['A4'] = 'Defend'
- end
- elseif modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] >= 40 and rand(1,50) > 25:
- if $modVar_AF_MatchGridAction['A4'] = 'Defend' : $modVar_AF_MatchGridAction['A4'] = 'Attack'
- if $modVar_AF_MatchGridAction['A4'] = 'Attack' : $modVar_AF_MatchGridAction['A4'] = 'Defend'
- end
- end
- if $modVar_AF_MatchAction ! 'Serve' and $modVar_AF_MatchBall ! modVar_AF_MatchZones['A5'] and $modVar_AF_MatchPlayerLoc ! 'A5':
- modVar_AF_Temp = modVar_AF_MatchZones['A5']
- if modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] >= 55:
- if $modVar_AF_MatchBallTeam = 'B' and (strpos($modVar_AF_MatchBall,'4') ! 0 or strpos($modVar_AF_MatchBall,'5') ! 0 or strpos($modVar_AF_MatchBall,'6') ! 0):
- if $modVar_AF_MatchGridAction['A5'] = 'Defend' : $modVar_AF_MatchGridAction['A5'] = 'Attack'
- else
- if $modVar_AF_MatchGridAction['A5'] = 'Attack' : $modVar_AF_MatchGridAction['A5'] = 'Defend'
- end
- elseif modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] >= 40 and rand(1,50) > 25:
- if $modVar_AF_MatchGridAction['A5'] = 'Defend' : $modVar_AF_MatchGridAction['A5'] = 'Attack'
- if $modVar_AF_MatchGridAction['A5'] = 'Attack' : $modVar_AF_MatchGridAction['A5'] = 'Defend'
- end
- end
- if $modVar_AF_MatchAction ! 'Serve' and $modVar_AF_MatchBall ! modVar_AF_MatchZones['A4'] and $modVar_AF_MatchPlayerLoc ! 'A6':
- modVar_AF_Temp = modVar_AF_MatchZones['A6']
- if modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] >= 55:
- if $modVar_AF_MatchBallTeam = 'B' and (strpos($modVar_AF_MatchBall,'4') ! 0 or strpos($modVar_AF_MatchBall,'5') ! 0 or strpos($modVar_AF_MatchBall,'6') ! 0):
- if $modVar_AF_MatchGridAction['A6'] = 'Defend' : $modVar_AF_MatchGridAction['A6'] = 'Attack'
- else
- if $modVar_AF_MatchGridAction['A6'] = 'Attack' : $modVar_AF_MatchGridAction['A6'] = 'Defend'
- end
- elseif modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp] >= 40 and rand(1,50) > 25:
- if $modVar_AF_MatchGridAction['A6'] = 'Defend' : $modVar_AF_MatchGridAction['A6'] = 'Attack'
- if $modVar_AF_MatchGridAction['A6'] = 'Attack' : $modVar_AF_MatchGridAction['A6'] = 'Defend'
- end
- end
- if $modVar_AF_MatchAction ! 'Serve' and $modVar_AF_MatchBall ! modVar_AF_MatchZones['B1'] and $modVar_AF_MatchPlayerLoc ! 'B1':
- modVar_AF_Temp = modVar_AF_MatchZones['B1']
- if modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] >= 55:
- if strpos($modVar_AF_MatchBall,'B') ! 0:
- if $modVar_AF_MatchGridAction['B1'] = 'Defend' : $modVar_AF_MatchGridAction['B1'] = 'Wide'
- else
- if $modVar_AF_MatchGridAction['B1'] = 'Wide' : $modVar_AF_MatchGridAction['B1'] = 'Defend'
- end
- elseif modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] >= 40 and rand(1,50) > 25:
- if $modVar_AF_MatchGridAction['B1'] = 'Defend' : $modVar_AF_MatchGridAction['B1'] = 'Wide'
- if $modVar_AF_MatchGridAction['B1'] = 'Wide' : $modVar_AF_MatchGridAction['B1'] = 'Defend'
- end
- end
- if $modVar_AF_MatchAction ! 'Serve' and $modVar_AF_MatchBall ! modVar_AF_MatchZones['B3'] and $modVar_AF_MatchPlayerLoc ! 'B3':
- modVar_AF_Temp = modVar_AF_MatchZones['B3']
- if modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] >= 55:
- if strpos($modVar_AF_MatchBall,'B') ! 0:
- if $modVar_AF_MatchGridAction['B3'] = 'Defend' : $modVar_AF_MatchGridAction['B3'] = 'Wide'
- else
- if $modVar_AF_MatchGridAction['B3'] = 'Wide' : $modVar_AF_MatchGridAction['B3'] = 'Defend'
- end
- elseif modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] >= 40 and rand(1,50) > 25:
- if $modVar_AF_MatchGridAction['B3'] = 'Defend' : $modVar_AF_MatchGridAction['B3'] = 'Wide'
- if $modVar_AF_MatchGridAction['B3'] = 'Wide' : $modVar_AF_MatchGridAction['B3'] = 'Defend'
- end
- end
- if $modVar_AF_MatchAction ! 'Serve' and $modVar_AF_MatchBall ! modVar_AF_MatchZones['B4'] and $modVar_AF_MatchPlayerLoc ! 'B4':
- modVar_AF_Temp = modVar_AF_MatchZones['B4']
- if modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] >= 55:
- if $modVar_AF_MatchBallTeam = 'A' and (strpos($modVar_AF_MatchBall,'4') ! 0 or strpos($modVar_AF_MatchBall,'5') ! 0 or strpos($modVar_AF_MatchBall,'6') ! 0):
- if $modVar_AF_MatchGridAction['B4'] = 'Defend' : $modVar_AF_MatchGridAction['B4'] = 'Attack'
- else
- if $modVar_AF_MatchGridAction['B4'] = 'Attack' : $modVar_AF_MatchGridAction['B4'] = 'Defend'
- end
- elseif modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] >= 40 and rand(1,50) > 25:
- if $modVar_AF_MatchGridAction['B4'] = 'Defend' : $modVar_AF_MatchGridAction['B4'] = 'Attack'
- if $modVar_AF_MatchGridAction['B4'] = 'Attack' : $modVar_AF_MatchGridAction['B4'] = 'Defend'
- end
- end
- if $modVar_AF_MatchAction ! 'Serve' and $modVar_AF_MatchBall ! modVar_AF_MatchZones['B5'] and $modVar_AF_MatchPlayerLoc ! 'B5':
- modVar_AF_Temp = modVar_AF_MatchZones['B5']
- if modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] >= 55:
- if $modVar_AF_MatchBallTeam = 'A' and (strpos($modVar_AF_MatchBall,'4') ! 0 or strpos($modVar_AF_MatchBall,'5') ! 0 or strpos($modVar_AF_MatchBall,'6') ! 0):
- if $modVar_AF_MatchGridAction['B5'] = 'Defend' : $modVar_AF_MatchGridAction['B5'] = 'Attack'
- else
- if $modVar_AF_MatchGridAction['B5'] = 'Attack' : $modVar_AF_MatchGridAction['B5'] = 'Defend'
- end
- elseif modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] >= 40 and rand(1,50) > 25:
- if $modVar_AF_MatchGridAction['B5'] = 'Defend' : $modVar_AF_MatchGridAction['B5'] = 'Attack'
- if $modVar_AF_MatchGridAction['B5'] = 'Attack' : $modVar_AF_MatchGridAction['B5'] = 'Defend'
- end
- end
- if $modVar_AF_MatchAction ! 'Serve' and $modVar_AF_MatchBall ! modVar_AF_MatchZones['B4'] and $modVar_AF_MatchPlayerLoc ! 'B6':
- modVar_AF_Temp = modVar_AF_MatchZones['B6']
- if modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] >= 55:
- if $modVar_AF_MatchBallTeam = 'A' and (strpos($modVar_AF_MatchBall,'4') ! 0 or strpos($modVar_AF_MatchBall,'5') ! 0 or strpos($modVar_AF_MatchBall,'6') ! 0):
- if $modVar_AF_MatchGridAction['B6'] = 'Defend' : $modVar_AF_MatchGridAction['B6'] = 'Attack'
- else
- if $modVar_AF_MatchGridAction['B6'] = 'Attack' : $modVar_AF_MatchGridAction['B6'] = 'Defend'
- end
- elseif modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp] >= 40 and rand(1,50) > 25:
- if $modVar_AF_MatchGridAction['B6'] = 'Defend' : $modVar_AF_MatchGridAction['B6'] = 'Attack'
- if $modVar_AF_MatchGridAction['B6'] = 'Attack' : $modVar_AF_MatchGridAction['B6'] = 'Defend'
- end
- end
- end
-
- if $ARGS[0] = 'MatchBuildup':
- *clr & cla
- $location_type = 'public_indoors'
- gs 'stat'
- menu_off = 1
- KILLVAR 'modArr_AF_MatchZones'
- KILLVAR 'modArr_AF_Rand'
- modArr_AF_Rand[] = 1
- modArr_AF_Rand[] = 2
- modArr_AF_Rand[] = 3
- modArr_AF_Rand[] = 4
- modArr_AF_Rand[] = 5
- modArr_AF_Rand[] = 6
- matchbuilduprandomcount = 0
- :matchbuilduprandomAstart
- if matchbuilduprandomcount >= 6 : jump 'matchbuilduprandomAend'
- modVar_AF_Rand = (rand(1,arrsize('modArr_AF_Rand'))) - 1
- modVar_AF_Temp = modArr_AF_Rand[modVar_AF_Rand]
- KILLVAR 'modArr_AF_Rand' , modVar_AF_Rand
- modVar_AF_MatchZones['A<<modVar_AF_Temp>>'] = matchbuilduprandomcount
- matchbuilduprandomcount += 1
- jump 'matchbuilduprandomAstart'
- :matchbuilduprandomAend
- KILLVAR 'modArr_AF_Rand'
- modArr_AF_Rand[] = 1
- modArr_AF_Rand[] = 2
- modArr_AF_Rand[] = 3
- modArr_AF_Rand[] = 4
- modArr_AF_Rand[] = 5
- modArr_AF_Rand[] = 6
- matchbuilduprandomcount = 0
- :matchbuilduprandomBstart
- if matchbuilduprandomcount >= 6 : jump 'matchbuilduprandomBend'
- modVar_AF_Rand = (rand(1,arrsize('modArr_AF_Rand'))) - 1
- modVar_AF_Temp = modArr_AF_Rand[modVar_AF_Rand]
- KILLVAR 'modArr_AF_Rand' , modVar_AF_Rand
- modVar_AF_MatchZones['B<<modVar_AF_Temp>>'] = matchbuilduprandomcount
- matchbuilduprandomcount += 1
- jump 'matchbuilduprandomBstart'
- :matchbuilduprandomBend
- modVar_AF_MatchZones['AX'] = 10
- modVar_AF_MatchZones['BX'] = 10
- modVar_AF_TeamA_PlayerSkill[] = 100
- modVar_AF_TeamB_PlayerSkill[] = 100
- '<center><h2>Teams</h2>'
- '<b><<$modVar_AF_TeamA_PlayerTeam>></b>'
- *nl
- modVar_AF_Temp = modVar_AF_MatchZones['A1']
- 'Zone 1 : <<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>> (Skill - <<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>)'
- if $modVar_AF_TeamA_PlayerName[modVar_AF_Temp] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'A1' & modVar_AF_Temp2 = modVar_AF_Temp
- modVar_AF_Temp = modVar_AF_MatchZones['A2']
- 'Zone 2 : <<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>> (Skill - <<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>)'
- if $modVar_AF_TeamA_PlayerName[modVar_AF_Temp] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'A2' & modVar_AF_Temp2 = modVar_AF_Temp
- modVar_AF_Temp = modVar_AF_MatchZones['A3']
- 'Zone 3 : <<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>> (Skill - <<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>)'
- if $modVar_AF_TeamA_PlayerName[modVar_AF_Temp] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'A3' & modVar_AF_Temp2 = modVar_AF_Temp
- modVar_AF_Temp = modVar_AF_MatchZones['A4']
- 'Zone 4 : <<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>> (Skill - <<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>)'
- if $modVar_AF_TeamA_PlayerName[modVar_AF_Temp] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'A4' & modVar_AF_Temp2 = modVar_AF_Temp
- modVar_AF_Temp = modVar_AF_MatchZones['A5']
- 'Zone 5 : <<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>> (Skill - <<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>)'
- if $modVar_AF_TeamA_PlayerName[modVar_AF_Temp] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'A5' & modVar_AF_Temp2 = modVar_AF_Temp
- modVar_AF_Temp = modVar_AF_MatchZones['A6']
- 'Zone 6 : <<$modVar_AF_TeamA_PlayerName[modVar_AF_Temp]>> (Skill - <<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp]>>)'
- if $modVar_AF_TeamA_PlayerName[modVar_AF_Temp] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'A6' & modVar_AF_Temp2 = modVar_AF_Temp
- *nl
- 'Sub - <<$modVar_AF_TeamA_PlayerName[6]>> (Skill - <<modVar_AF_TeamA_PlayerSkill[6]>>)'
- if $modVar_AF_TeamA_PlayerName[6] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'AX' & modVar_AF_Temp2 = 6
- 'Sub - <<$modVar_AF_TeamA_PlayerName[7]>> (Skill - <<modVar_AF_TeamA_PlayerSkill[7]>>)'
- if $modVar_AF_TeamA_PlayerName[7] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'AX' & modVar_AF_Temp2 = 7
- 'Sub - <<$modVar_AF_TeamA_PlayerName[8]>> (Skill - <<modVar_AF_TeamA_PlayerSkill[8]>>)'
- if $modVar_AF_TeamA_PlayerName[8] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'AX' & modVar_AF_Temp2 = 8
- 'Sub - <<$modVar_AF_TeamA_PlayerName[9]>> (Skill - <<modVar_AF_TeamA_PlayerSkill[9]>>)'
- if $modVar_AF_TeamA_PlayerName[9] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'AX' & modVar_AF_Temp2 = 9
- *nl
- '<b><<$modVar_AF_TeamB_PlayerTeam>></b>'
- *nl
- modVar_AF_Temp = modVar_AF_MatchZones['B1']
- 'Zone 1 : <<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>> (Skill - <<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>)'
- if $modVar_AF_TeamB_PlayerName[modVar_AF_Temp] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'B1' & modVar_AF_Temp2 = modVar_AF_Temp
- modVar_AF_Temp = modVar_AF_MatchZones['B2']
- 'Zone 2 : <<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>> (Skill - <<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>)'
- if $modVar_AF_TeamB_PlayerName[modVar_AF_Temp] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'B2' & modVar_AF_Temp2 = modVar_AF_Temp
- modVar_AF_Temp = modVar_AF_MatchZones['B3']
- 'Zone 3 : <<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>> (Skill - <<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>)'
- if $modVar_AF_TeamB_PlayerName[modVar_AF_Temp] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'B3' & modVar_AF_Temp2 = modVar_AF_Temp
- modVar_AF_Temp = modVar_AF_MatchZones['B4']
- 'Zone 4 : <<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>> (Skill - <<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>)'
- if $modVar_AF_TeamB_PlayerName[modVar_AF_Temp] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'B4' & modVar_AF_Temp2 = modVar_AF_Temp
- modVar_AF_Temp = modVar_AF_MatchZones['B5']
- 'Zone 5 : <<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>> (Skill - <<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>)'
- if $modVar_AF_TeamB_PlayerName[modVar_AF_Temp] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'B5' & modVar_AF_Temp2 = modVar_AF_Temp
- modVar_AF_Temp = modVar_AF_MatchZones['B6']
- 'Zone 6 : <<$modVar_AF_TeamB_PlayerName[modVar_AF_Temp]>> (Skill - <<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp]>>)'
- if $modVar_AF_TeamB_PlayerName[modVar_AF_Temp] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'B6' & modVar_AF_Temp2 = modVar_AF_Temp
- *nl
- 'Sub - <<$modVar_AF_TeamB_PlayerName[6]>> (Skill - <<modVar_AF_TeamB_PlayerSkill[6]>>)'
- if $modVar_AF_TeamB_PlayerName[6] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'BX' & modVar_AF_Temp2 = 6
- 'Sub - <<$modVar_AF_TeamB_PlayerName[7]>> (Skill - <<modVar_AF_TeamB_PlayerSkill[7]>>)'
- if $modVar_AF_TeamB_PlayerName[7] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'BX' & modVar_AF_Temp2 = 7
- 'Sub - <<$modVar_AF_TeamB_PlayerName[8]>> (Skill - <<modVar_AF_TeamB_PlayerSkill[8]>>)'
- if $modVar_AF_TeamB_PlayerName[8] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'BX' & modVar_AF_Temp2 = 8
- 'Sub - <<$modVar_AF_TeamB_PlayerName[9]>> (Skill - <<modVar_AF_TeamB_PlayerSkill[9]>>)</center>'
- if $modVar_AF_TeamB_PlayerName[9] = '<<$pcs_firstname>> <<$pcs_lastname>>' : $modVar_AF_MatchPlayerLoc = 'BX' & modVar_AF_Temp2 = 9
- KILLVAR '$modVar_AF_MatchGridAction'
- KILLVAR 'modVar_AF_MatchTouches'
- KILLVAR '$modVar_AF_MatchBall'
- KILLVAR '$modVar_AF_MatchBallPrev'
- KILLVAR '$modVar_AF_MatchBallTeam'
- modVar_AF_MatchTouches = 0
- $modVar_AF_MatchGridAction['A1'] = 'Defend'
- $modVar_AF_MatchGridAction['A2'] = 'Defend'
- $modVar_AF_MatchGridAction['A3'] = 'Defend'
- $modVar_AF_MatchGridAction['A4'] = 'Defend'
- $modVar_AF_MatchGridAction['A5'] = 'Defend'
- $modVar_AF_MatchGridAction['A6'] = 'Defend'
- $modVar_AF_MatchGridAction['B1'] = 'Defend'
- $modVar_AF_MatchGridAction['B2'] = 'Defend'
- $modVar_AF_MatchGridAction['B3'] = 'Defend'
- $modVar_AF_MatchGridAction['B4'] = 'Defend'
- $modVar_AF_MatchGridAction['B5'] = 'Defend'
- $modVar_AF_MatchGridAction['B6'] = 'Defend'
- $modVar_AF_MatchBallPrev = 'XX'
- $modVar_AF_MatchAction = 'Serve'
- modVar_AF_MatchPointsA = 0
- modVar_AF_MatchPointsB = 0
- modVar_AF_MatchRound = 1
- if strpos($modVar_AF_MatchPlayerLoc,'A') ! 0 and modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] < 50:
- modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2] = rand(50,60)
- *nl
- '<b>Your Enthusiasm for the game has temporarily raised your Skill Level to <<modVar_AF_TeamA_PlayerSkill[modVar_AF_Temp2]>></b>'
- elseif strpos($modVar_AF_MatchPlayerLoc,'B') ! 0 and modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] < 50:
- modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2] = rand(50,60)
- *nl
- '<b>Your Enthusiasm for the game has temporarily raised your Skill Level to <<modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2]>></b>'
- end
- *nl
- '<b>Quick Rules:</b>'
- *nl
- '* Your position indicates where on the court you are playing with each Team having 6 Zones (A Map showing the Zones and where the Ball is is shown in the Image Window)'
- '* After the initial Serve; each Team keeps trying to get the ball onto the floor of the other Teams court until successful'
- '* After a Round is completed each Player rotates into their next zone'
- '* Zones 4, 5 & 6 are the Front Row; Players in this row can Move Forward into an Attacking Stance which increases their Attack Chance and Intercept Chance but hurts the Defense Chance of the Player in the Zone behind them'
- '* Zones 1, 2 & 4 are the Back Row; Players on the Side can Go Wide to make themselves available for a powerful Spike Attack but at a risk to their Defense Chance'
- '* Half Time is called after a Full Rotation (6 Rounds) whereupons Substitutions can be made'
- '* Full Time is called after Two Full Rotations (12 Rounds) unless the Game is a Tie, whereupon a Tie Break Round is run'
- '* Each Player has a Skill Level and a Stamina Level; having a greater Skill Level then your Opponent allows you to see more information about them'
- '* Player Stamina reduces with each Play which in turn lowers their Skill as they tire, but is raised during each break'
- '* Having a Higher Skill Level results in a Higher Chance of Succeeding in Actions (Passing and Serving are always successful)'
- '* If you are playing in a Practice Match then your Skill Level is automatically raised to be competitive and you will always be subbed on'
- act 'Start Match':
- *clr & cla
- '<center><h2>Coin Toss</h2></center>'
- '<center><img style="<<$modVar_AF_ImageRestrictions>>" src="mod/addedflavour/images/shared/Volleyball/CoinToss' + iif(modVar_AF_QSPVer = 1,'.gif','.webp') + '"></center>'
- *nl
- '<center>Flipping to see which team serves first...</center>'
- modVar_AF_MatchFaceSetting = Enable_FaceTurn
- act 'See Result':
- *clr & cla
- CLOSE ALL
- modVar_AF_Rand = rand(1,1000)
- if modVar_AF_Rand > 500:
- $modVar_AF_TempStr = $modVar_AF_TeamB_PlayerTeam
- $modVar_AF_MatchBall = 'B1'
- $modVar_AF_MatchBallTeam = 'B'
- act 'Get to your zone':
- gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- else
- $modVar_AF_TempStr = $modVar_AF_TeamA_PlayerTeam
- $modVar_AF_MatchBall = 'A1'
- $modVar_AF_MatchBallTeam = 'A'
- act 'Get to your zone':
- gt 'mod_addedflavour_Volleyball' , 'Match'
- end
- end
- Enable_FaceTurn = 4
- '<center><h2>Coin Toss</h2></center>'
- '<center><img style="<<$modVar_AF_ImageRestrictions>>" src="mod/addedflavour/images/shared/Volleyball/CoinToss' + iif(modVar_AF_QSPVer = 1,'.gif','.webp') + '"></center>'
- *nl
- '<center><<$modVar_AF_TempStr>> will serve first!</center>'
- end
- end
- end
-
- if $ARGS[0] = 'MatchSetup':
- !Arg 1 = Type; Arg 2 = Team A; Arg 3 = Team B; Arg 4 = Simulate
- KILLVAR '$modVar_AF_TeamA_PlayerName'
- KILLVAR '$modVar_AF_TeamA_PlayerTeam'
- KILLVAR 'modVar_AF_TeamA_PlayerSkill'
- KILLVAR 'modVar_AF_TeamA_PlayerBaseSkill'
- KILLVAR 'modVar_AF_TeamA_PlayerStamina'
- KILLVAR '$modVar_AF_TeamB_PlayerName'
- KILLVAR '$modVar_AF_TeamB_PlayerTeam'
- KILLVAR 'modVar_AF_TeamB_PlayerSkill'
- KILLVAR 'modVar_AF_TeamB_PlayerBaseSkill'
- KILLVAR 'modVar_AF_TeamB_PlayerStamina'
- KILLVAR 'modVar_AF_MatchPracticeSub'
- KILLVAR 'modVar_AF_MatchPointsA'
- KILLVAR 'modVar_AF_MatchPointsB'
- KILLVAR 'modArr_AF_MatchAScorers'
- KILLVAR 'modArr_AF_MatchBScorers'
- $modVar_AF_TeamA_PlayerTeam = $ARGS[2]
- $modVar_AF_TeamB_PlayerTeam = $ARGS[3]
- if $ARGS[1] = 'Tournament':
- matchsetuploopcount = 0
- :matchsetuploopstart
- if matchsetuploopcount >= arrsize('$modArr_AF_VBallT_PlayerName') : jump 'matchsetuploopend'
- if $modArr_AF_VBallT_PlayerTeam[matchsetuploopcount] = $modVar_AF_TeamA_PlayerTeam:
- $modVar_AF_TeamA_PlayerName[] = $modArr_AF_VBallT_PlayerName[matchsetuploopcount]
- modVar_AF_TeamA_PlayerSkill[] = modArr_AF_VBallT_PlayerSkill[matchsetuploopcount]
- modVar_AF_TeamA_PlayerBaseSkill[] = modArr_AF_VBallT_PlayerSkill[matchsetuploopcount]
- modVar_AF_TeamA_PlayerStamina[] = 100
- modArr_AF_MatchAScorers[] = 0
- elseif $modArr_AF_VBallT_PlayerTeam[matchsetuploopcount] = $modVar_AF_TeamB_PlayerTeam:
- $modVar_AF_TeamB_PlayerName[] = $modArr_AF_VBallT_PlayerName[matchsetuploopcount]
- modVar_AF_TeamB_PlayerSkill[] = modArr_AF_VBallT_PlayerSkill[matchsetuploopcount]
- modVar_AF_TeamB_PlayerBaseSkill[] = modArr_AF_VBallT_PlayerSkill[matchsetuploopcount]
- modVar_AF_TeamB_PlayerStamina[] = 100
- modArr_AF_MatchBScorers[] = 0
- end
- matchsetuploopcount += 1
- jump 'matchsetuploopstart'
- :matchsetuploopend
- :matchsetupsortA
- matchsetupsortcount = 0
- matchsetupbubblecount = 0
- :matchsetupbubbleAstart
- if matchsetupbubblecount >= 10 : jump 'matchsetupbubbleAend'
- if modVar_AF_TeamA_PlayerSkill[matchsetupbubblecount] < modVar_AF_TeamA_PlayerSkill[matchsetupbubblecount + 1]:
- $modVar_AF_TempStr = $modVar_AF_TeamA_PlayerName[matchsetupbubblecount]
- modVar_AF_Temp = modVar_AF_TeamA_PlayerSkill[matchsetupbubblecount]
- modVar_AF_Temp2 = modVar_AF_TeamA_PlayerBaseSkill[matchsetupbubblecount]
- $modVar_AF_TeamA_PlayerName[matchsetupbubblecount] = $modVar_AF_TeamA_PlayerName[matchsetupbubblecount + 1]
- modVar_AF_TeamA_PlayerSkill[matchsetupbubblecount] = modVar_AF_TeamA_PlayerSkill[matchsetupbubblecount + 1]
- modVar_AF_TeamA_PlayerBaseSkill[matchsetupbubblecount] = modVar_AF_TeamA_PlayerBaseSkill[matchsetupbubblecount + 1]
- $modVar_AF_TeamA_PlayerName[matchsetupbubblecount + 1] = $modVar_AF_TempStr
- modVar_AF_TeamA_PlayerSkill[matchsetupbubblecount + 1] = modVar_AF_Temp
- modVar_AF_TeamA_PlayerBaseSkill[matchsetupbubblecount + 1] = modVar_AF_Temp2
- matchsetupsortcount += 1
- end
- matchsetupbubblecount += 1
- jump 'matchsetupbubbleAstart'
- :matchsetupbubbleAend
- if matchsetupsortcount > 0 : jump 'matchsetupsortA'
- :matchsetupsortB
- matchsetupsortcount = 0
- matchsetupbubblecount = 0
- :matchsetupbubbleBstart
- if matchsetupbubblecount >= 10 : jump 'matchsetupbubbleBend'
- if modVar_AF_TeamB_PlayerSkill[matchsetupbubblecount] < modVar_AF_TeamB_PlayerSkill[matchsetupbubblecount + 1]:
- $modVar_AF_TempStr = $modVar_AF_TeamB_PlayerName[matchsetupbubblecount]
- modVar_AF_Temp = modVar_AF_TeamB_PlayerSkill[matchsetupbubblecount]
- modVar_AF_Temp2 = modVar_AF_TeamB_PlayerBaseSkill[matchsetupbubblecount]
- $modVar_AF_TeamB_PlayerName[matchsetupbubblecount] = $modVar_AF_TeamB_PlayerName[matchsetupbubblecount + 1]
- modVar_AF_TeamB_PlayerSkill[matchsetupbubblecount] = modVar_AF_TeamB_PlayerSkill[matchsetupbubblecount + 1]
- modVar_AF_TeamB_PlayerBaseSkill[matchsetupbubblecount] = modVar_AF_TeamB_PlayerBaseSkill[matchsetupbubblecount + 1]
- $modVar_AF_TeamB_PlayerName[matchsetupbubblecount + 1] = $modVar_AF_TempStr
- modVar_AF_TeamB_PlayerSkill[matchsetupbubblecount + 1] = modVar_AF_Temp
- modVar_AF_TeamB_PlayerBaseSkill[matchsetupbubblecount + 1] = modVar_AF_Temp2
- matchsetupsortcount += 1
- end
- matchsetupbubblecount += 1
- jump 'matchsetupbubbleBstart'
- :matchsetupbubbleBend
- if matchsetupsortcount > 0 : jump 'matchsetupsortB'
- if $ARGS[4] = 'Simulate' : gs 'mod_addedflavour_Volleyball' , 'SimulateMatch'
- elseif $ARGS[1] = 'Practice':
- modVar_AF_MatchPracticeSub = 1
- matchsetupPloopcount = 0
- :matchsetupPloopstart
- if matchsetupPloopcount >= arrsize('$modArr_AF_VBall_PlayerName') : jump 'matchsetupPloopend'
- if $modArr_AF_VBall_PlayerTeam[matchsetupPloopcount] = $modVar_AF_TeamA_PlayerTeam:
- $modVar_AF_TeamA_PlayerName[] = $modArr_AF_VBall_PlayerName[matchsetupPloopcount]
- modVar_AF_TeamA_PlayerSkill[] = modArr_AF_VBall_PlayerSkill[matchsetupPloopcount]
- modVar_AF_TeamA_PlayerBaseSkill[] = modArr_AF_VBall_PlayerSkill[matchsetupPloopcount]
- modVar_AF_TeamA_PlayerStamina[] = 100
- modArr_AF_MatchAScorers[] = 0
- elseif $modArr_AF_VBall_PlayerTeam[matchsetupPloopcount] = $modVar_AF_TeamB_PlayerTeam:
- $modVar_AF_TeamB_PlayerName[] = $modArr_AF_VBall_PlayerName[matchsetupPloopcount]
- modVar_AF_TeamB_PlayerSkill[] = modArr_AF_VBall_PlayerSkill[matchsetupPloopcount]
- modVar_AF_TeamB_PlayerBaseSkill[] = modArr_AF_VBall_PlayerSkill[matchsetupPloopcount]
- modVar_AF_TeamB_PlayerStamina[] = 100
- modArr_AF_MatchBScorers[] = 0
- end
- matchsetupPloopcount += 1
- jump 'matchsetupPloopstart'
- :matchsetupPloopend
- :matchsetupPsortA
- matchsetupPsortcount = 0
- matchsetupPbubblecount = 0
- :matchsetupPbubbleAstart
- if matchsetupPbubblecount >= 10 : jump 'matchsetupPbubbleAend'
- if modVar_AF_TeamA_PlayerSkill[matchsetupPbubblecount] < modVar_AF_TeamA_PlayerSkill[matchsetupPbubblecount + 1]:
- $modVar_AF_TempStr = $modVar_AF_TeamA_PlayerName[matchsetupPbubblecount]
- modVar_AF_Temp = modVar_AF_TeamA_PlayerSkill[matchsetupPbubblecount]
- modVar_AF_Temp2 = modVar_AF_TeamA_PlayerBaseSkill[matchsetupPbubblecount]
- $modVar_AF_TeamA_PlayerName[matchsetupPbubblecount] = $modVar_AF_TeamA_PlayerName[matchsetupPbubblecount + 1]
- modVar_AF_TeamA_PlayerSkill[matchsetupPbubblecount] = modVar_AF_TeamA_PlayerSkill[matchsetupPbubblecount + 1]
- modVar_AF_TeamA_PlayerBaseSkill[matchsetupPbubblecount] = modVar_AF_TeamA_PlayerBaseSkill[matchsetupPbubblecount + 1]
- $modVar_AF_TeamA_PlayerName[matchsetupPbubblecount + 1] = $modVar_AF_TempStr
- modVar_AF_TeamA_PlayerSkill[matchsetupPbubblecount + 1] = modVar_AF_Temp
- modVar_AF_TeamA_PlayerBaseSkill[matchsetupPbubblecount + 1] = modVar_AF_Temp2
- matchsetupPsortcount += 1
- end
- matchsetupPbubblecount += 1
- jump 'matchsetupPbubbleAstart'
- :matchsetupPbubbleAend
- if matchsetupPsortcount > 0 : jump 'matchsetupPsortA'
- :matchsetupPsortB
- matchsetupPsortcount = 0
- matchsetupPbubblecount = 0
- :matchsetupPbubbleBstart
- if matchsetupPbubblecount >= 10 : jump 'matchsetupPbubbleBend'
- if modVar_AF_TeamB_PlayerSkill[matchsetupPbubblecount] < modVar_AF_TeamB_PlayerSkill[matchsetupPbubblecount + 1]:
- $modVar_AF_TempStr = $modVar_AF_TeamB_PlayerName[matchsetupPbubblecount]
- modVar_AF_Temp = modVar_AF_TeamB_PlayerSkill[matchsetupPbubblecount]
- modVar_AF_Temp2 = modVar_AF_TeamB_PlayerBaseSkill[matchsetupPbubblecount]
- $modVar_AF_TeamB_PlayerName[matchsetupPbubblecount] = $modVar_AF_TeamB_PlayerName[matchsetupPbubblecount + 1]
- modVar_AF_TeamB_PlayerSkill[matchsetupPbubblecount] = modVar_AF_TeamB_PlayerSkill[matchsetupPbubblecount + 1]
- modVar_AF_TeamB_PlayerBaseSkill[matchsetupPbubblecount] = modVar_AF_TeamB_PlayerBaseSkill[matchsetupPbubblecount + 1]
- $modVar_AF_TeamB_PlayerName[matchsetupPbubblecount + 1] = $modVar_AF_TempStr
- modVar_AF_TeamB_PlayerSkill[matchsetupPbubblecount + 1] = modVar_AF_Temp
- modVar_AF_TeamB_PlayerBaseSkill[matchsetupPbubblecount + 1] = modVar_AF_Temp2
- matchsetupPsortcount += 1
- end
- matchsetupPbubblecount += 1
- jump 'matchsetupPbubbleBstart'
- :matchsetupPbubbleBend
- if matchsetupPsortcount > 0 : jump 'matchsetupPsortB'
- end
- end
-
- if $ARGS[0] = 'SimulateMatch':
- KILLVAR 'modArr_AF_Rand'
- simmatcherrorcount = 0
- matchsimplayercount = 0
- modVar_AF_RandUpper = 0
- :matchsimplayerloopstart
- if simmatcherrorcount >= 1000 : $modVar_AF_LoopErrorLoc = 'Volleyball Sim PlayerLoop' & jump 'matchsimplayerloopend'
- if matchsimplayercount >= 20 : jump'matchsimplayerloopend'
- if matchsimplayercount < 10:
- modVar_AF_RandUpper += modVar_AF_TeamA_PlayerSkill[matchsimplayercount]
- else
- modVar_AF_Temp2 = matchsimplayercount - 10
- modVar_AF_RandUpper += modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2]
- end
- matchsimplayercount += 1
- simmatcherrorcount += 1
- jump 'matchsimplayerloopstart'
- :matchsimplayerloopend
- matchsimresultcount = 1
- :matchsimresultloopstart
- modVar_AF_Temp = 0
- if simmatcherrorcount >= 1000 : $modVar_AF_LoopErrorLoc = 'Volleyball Sim ScorerLoop' & jump 'matchsimresultloopend'
- simmatcherrorcount += 1
- if matchsimresultcount >= 13 and modVar_AF_MatchPointsA ! modVar_AF_MatchPointsB : jump 'matchsimresultloopend'
- !Repeated to flush out Random Number Generator
- modVar_AF_Rand = rand(1,modVar_AF_RandUpper)
- modVar_AF_Rand = rand(1,modVar_AF_RandUpper)
- modVar_AF_Rand = rand(1,modVar_AF_RandUpper)
- modVar_AF_RandLower = modVar_AF_Rand
- matchsimfindscorercount = 0
- :matchsimfindscorerloopstart
- if simmatcherrorcount >= 1000 : $modVar_AF_LoopErrorLoc = 'Volleyball Sim ScorerLoop' & jump 'matchsimresultloopend'
- simmatcherrorcount += 1
- if matchsimfindscorercount < 10:
- modVar_AF_Rand -= modVar_AF_TeamA_PlayerSkill[matchsimfindscorercount]
- else
- modVar_AF_Temp2 = matchsimfindscorercount - 10
- modVar_AF_Rand -= modVar_AF_TeamB_PlayerSkill[modVar_AF_Temp2]
- end
- if modVar_AF_Rand <= modVar_AF_Temp:
- if matchsimfindscorercount < 10:
- modVar_AF_MatchPointsA += 1
- modArr_AF_MatchAScorers[matchsimfindscorercount] += 1
- else
- modVar_AF_Temp2 = matchsimfindscorercount - 10
- modVar_AF_MatchPointsB += 1
- modArr_AF_MatchBScorers[modVar_AF_Temp2] += 1
- end
- matchsimresultcount += 1
- jump 'matchsimresultloopstart'
- else
- matchsimfindscorercount += 1
- jump 'matchsimfindscorerloopstart'
- end
- :matchsimresultloopend
- end
-
- if $ARGS[0] = 'SortTournamentPlayers':
- :sortplayerssortstart
- sortplayerssortcount = 0
- sortplayerssortbubblecount = 0
- :sortplayerssortbubblestart
- if sortplayerssortbubblecount >= arrsize('$modArr_AF_VBallT_PlayerName') : jump 'sortplayerssortbubbleend'
- if modArr_AF_VBallT_PlayerSkill[sortplayerssortbubblecount] < modArr_AF_VBallT_PlayerSkill[sortplayerssortbubblecount + 1]:
- $modVar_AF_TempStr = $modArr_AF_VBallT_PlayerName[sortplayerssortbubblecount]
- $modArr_AF_VBallT_PlayerName[sortplayerssortbubblecount] = $modArr_AF_VBallT_PlayerName[sortplayerssortbubblecount + 1]
- $modArr_AF_VBallT_PlayerName[sortplayerssortbubblecount + 1] = $modVar_AF_TempStr
- $modVar_AF_TempStr = $modArr_AF_VBallT_PlayerTeam[sortplayerssortbubblecount]
- $modArr_AF_VBallT_PlayerTeam[sortplayerssortbubblecount] = $modArr_AF_VBallT_PlayerTeam[sortplayerssortbubblecount + 1]
- $modArr_AF_VBallT_PlayerTeam[sortplayerssortbubblecount + 1] = $modVar_AF_TempStr
- modVar_AF_Temp = modArr_AF_VBallT_PlayerSkill[sortplayerssortbubblecount]
- modArr_AF_VBallT_PlayerSkill[sortplayerssortbubblecount] = modArr_AF_VBallT_PlayerSkill[sortplayerssortbubblecount + 1]
- modArr_AF_VBallT_PlayerSkill[sortplayerssortbubblecount + 1] = modVar_AF_Temp
- sortplayerssortcount += 1
- end
- sortplayerssortbubblecount += 1
- jump 'sortplayerssortbubblestart'
- :sortplayerssortbubbleend
- if sortplayerssortcount > 0 : jump 'sortplayerssortstart'
- end
-
- if $ARGS[0] = 'SortLeagues':
- if modArr_AF_VLeagueA_Wins[0] + modArr_AF_VLeagueA_Wins[1] + modArr_AF_VLeagueA_Wins[2] + modArr_AF_VLeagueA_Wins[3] = 0 : jump 'sortleaguesskipsort'
- :sortleaguesAsortstart
- sortleaguessortcount = 0
- sortleaguessortbubblecount = 0
- :sortleaguesAsortbubblestart
- if sortleaguessortbubblecount >= arrsize('$modArr_AF_VLeagueA_TeamName') : jump 'sortleaguesAsortbubbleend'
- if modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount] < modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount + 1]:
- $modVar_AF_TempStr = $modArr_AF_VLeagueA_TeamName[sortleaguessortbubblecount]
- modVar_AF_Temp = modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount]
- modVar_AF_Temp2 = modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount]
- modVar_AF_Temp3 = modArr_AF_VLeagueA_PointsAgainst[sortleaguessortbubblecount]
- $modArr_AF_VLeagueA_TeamName[sortleaguessortbubblecount] = $modArr_AF_VLeagueA_TeamName[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount] = modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount] = modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueA_PointsAgainst[sortleaguessortbubblecount] = modArr_AF_VLeagueA_PointsAgainst[sortleaguessortbubblecount + 1]
- $modArr_AF_VLeagueA_TeamName[sortleaguessortbubblecount + 1] = $modVar_AF_TempStr
- modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount + 1] = modVar_AF_Temp
- modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount + 1] = modVar_AF_Temp2
- modArr_AF_VLeagueA_PointsAgainst[sortleaguessortbubblecount + 1] = modVar_AF_Temp3
- sortleaguessortcount += 1
- elseif modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount] = modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount + 1] and modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount] < modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount + 1]:
- $modVar_AF_TempStr = $modArr_AF_VLeagueA_TeamName[sortleaguessortbubblecount]
- modVar_AF_Temp = modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount]
- modVar_AF_Temp2 = modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount]
- modVar_AF_Temp3 = modArr_AF_VLeagueA_PointsAgainst[sortleaguessortbubblecount]
- $modArr_AF_VLeagueA_TeamName[sortleaguessortbubblecount] = $modArr_AF_VLeagueA_TeamName[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount] = modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount] = modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueA_PointsAgainst[sortleaguessortbubblecount] = modArr_AF_VLeagueA_PointsAgainst[sortleaguessortbubblecount + 1]
- $modArr_AF_VLeagueA_TeamName[sortleaguessortbubblecount + 1] = $modVar_AF_TempStr
- modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount + 1] = modVar_AF_Temp
- modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount + 1] = modVar_AF_Temp2
- modArr_AF_VLeagueA_PointsAgainst[sortleaguessortbubblecount + 1] = modVar_AF_Temp3
- sortleaguessortcount += 1
- elseif modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount] = modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount + 1] and modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount] = modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount + 1] and modArr_AF_VLeagueA_PointsAgainst[sortleaguessortbubblecount] > modArr_AF_VLeagueA_PointsAgainst[sortleaguessortbubblecount + 1]:
- $modVar_AF_TempStr = $modArr_AF_VLeagueA_TeamName[sortleaguessortbubblecount]
- modVar_AF_Temp = modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount]
- modVar_AF_Temp2 = modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount]
- modVar_AF_Temp3 = modArr_AF_VLeagueA_PointsAgainst[sortleaguessortbubblecount]
- $modArr_AF_VLeagueA_TeamName[sortleaguessortbubblecount] = $modArr_AF_VLeagueA_TeamName[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount] = modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount] = modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueA_PointsAgainst[sortleaguessortbubblecount] = modArr_AF_VLeagueA_PointsAgainst[sortleaguessortbubblecount + 1]
- $modArr_AF_VLeagueA_TeamName[sortleaguessortbubblecount + 1] = $modVar_AF_TempStr
- modArr_AF_VLeagueA_Wins[sortleaguessortbubblecount + 1] = modVar_AF_Temp
- modArr_AF_VLeagueA_PointsFor[sortleaguessortbubblecount + 1] = modVar_AF_Temp2
- modArr_AF_VLeagueA_PointsAgainst[sortleaguessortbubblecount + 1] = modVar_AF_Temp3
- sortleaguessortcount += 1
- end
- sortleaguessortbubblecount += 1
- jump 'sortleaguesAsortbubblestart'
- :sortleaguesAsortbubbleend
- if sortleaguessortcount > 0 : jump 'sortleaguesAsortstart'
- :sortleaguesBsortstart
- sortleaguessortcount = 0
- sortleaguessortbubblecount = 0
- :sortleaguesBsortbubblestart
- if sortleaguessortbubblecount >= arrsize('$modArr_AF_VLeagueB_TeamName') : jump 'sortleaguesBsortbubbleend'
- if modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount] < modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount + 1]:
- $modVar_AF_TempStr = $modArr_AF_VLeagueB_TeamName[sortleaguessortbubblecount]
- modVar_AF_Temp = modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount]
- modVar_AF_Temp2 = modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount]
- modVar_AF_Temp3 = modArr_AF_VLeagueB_PointsAgainst[sortleaguessortbubblecount]
- $modArr_AF_VLeagueB_TeamName[sortleaguessortbubblecount] = $modArr_AF_VLeagueB_TeamName[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount] = modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount] = modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueB_PointsAgainst[sortleaguessortbubblecount] = modArr_AF_VLeagueB_PointsAgainst[sortleaguessortbubblecount + 1]
- $modArr_AF_VLeagueB_TeamName[sortleaguessortbubblecount + 1] = $modVar_AF_TempStr
- modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount + 1] = modVar_AF_Temp
- modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount + 1] = modVar_AF_Temp2
- modArr_AF_VLeagueB_PointsAgainst[sortleaguessortbubblecount + 1] = modVar_AF_Temp3
- sortleaguessortcount += 1
- elseif modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount] = modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount + 1] and modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount] < modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount + 1]:
- $modVar_AF_TempStr = $modArr_AF_VLeagueB_TeamName[sortleaguessortbubblecount]
- modVar_AF_Temp = modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount]
- modVar_AF_Temp2 = modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount]
- modVar_AF_Temp3 = modArr_AF_VLeagueB_PointsAgainst[sortleaguessortbubblecount]
- $modArr_AF_VLeagueB_TeamName[sortleaguessortbubblecount] = $modArr_AF_VLeagueB_TeamName[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount] = modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount] = modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueB_PointsAgainst[sortleaguessortbubblecount] = modArr_AF_VLeagueB_PointsAgainst[sortleaguessortbubblecount + 1]
- $modArr_AF_VLeagueB_TeamName[sortleaguessortbubblecount + 1] = $modVar_AF_TempStr
- modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount + 1] = modVar_AF_Temp
- modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount + 1] = modVar_AF_Temp2
- modArr_AF_VLeagueB_PointsAgainst[sortleaguessortbubblecount + 1] = modVar_AF_Temp3
- sortleaguessortcount += 1
- elseif modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount] = modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount + 1] and modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount] = modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount + 1] and modArr_AF_VLeagueB_PointsAgainst[sortleaguessortbubblecount] > modArr_AF_VLeagueB_PointsAgainst[sortleaguessortbubblecount + 1]:
- $modVar_AF_TempStr = $modArr_AF_VLeagueB_TeamName[sortleaguessortbubblecount]
- modVar_AF_Temp = modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount]
- modVar_AF_Temp2 = modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount]
- modVar_AF_Temp3 = modArr_AF_VLeagueB_PointsAgainst[sortleaguessortbubblecount]
- $modArr_AF_VLeagueB_TeamName[sortleaguessortbubblecount] = $modArr_AF_VLeagueB_TeamName[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount] = modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount] = modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount + 1]
- modArr_AF_VLeagueB_PointsAgainst[sortleaguessortbubblecount] = modArr_AF_VLeagueB_PointsAgainst[sortleaguessortbubblecount + 1]
- $modArr_AF_VLeagueB_TeamName[sortleaguessortbubblecount + 1] = $modVar_AF_TempStr
- modArr_AF_VLeagueB_Wins[sortleaguessortbubblecount + 1] = modVar_AF_Temp
- modArr_AF_VLeagueB_PointsFor[sortleaguessortbubblecount + 1] = modVar_AF_Temp2
- modArr_AF_VLeagueB_PointsAgainst[sortleaguessortbubblecount + 1] = modVar_AF_Temp3
- sortleaguessortcount += 1
- end
- sortleaguessortbubblecount += 1
- jump 'sortleaguesBsortbubblestart'
- :sortleaguesBsortbubbleend
- if sortleaguessortcount > 0 : jump 'sortleaguesBsortstart'
- :sortleaguesskipsort
- end
-
- if $ARGS[0] = 'SetupPractice':
- KILLVAR '$modArr_AF_VBall_PlayerName'
- KILLVAR '$modArr_AF_VBall_PlayerTeam'
- KILLVAR 'modArr_AF_VBall_PlayerSkill'
- KILLVAR 'modArr_AF_Rand'
- modArr_AF_Rand[] = rand(1,2)
- modArr_AF_Rand[] = rand(1,2)
- modArr_AF_Rand[] = rand(1,2)
- modArr_AF_Rand[] = rand(1,2)
- $tempname = $ARGS[1]
- vballpracticecount = 0
- :vballpracticeloopstart
- gs 'mod_addedflavour_GameFunctions' , 'SetupTeam' , $tempname , 2 , 10 , 50 , 80
- if (modArr_AF_Rand[0] = 1 and $tempname = $ARGS[1]) or (modArr_AF_Rand[0] = 2 and $tempname = $ARGS[2]): $modArr_AF_PlayerNameTemp[0] = '<<$pcs_firstname>> <<$pcs_lastname>>'
- if (modArr_AF_Rand[0] = 1 and $tempname = $ARGS[1]) or (modArr_AF_Rand[0] = 2 and $tempname = $ARGS[2]): modArr_AF_PlayerSkillTemp[0] = pcs_vball
- if (modArr_AF_Rand[1] = 1 and $tempname = 'Pavlovsk Falcons A') or (modArr_AF_Rand[1] = 2 and $tempname = 'Pavlovsk Falcons B'): $modArr_AF_PlayerNameTemp[1] = 'Christina Zvernava'
- if (modArr_AF_Rand[1] = 1 and $tempname = 'Pavlovsk Falcons A') or (modArr_AF_Rand[1] = 2 and $tempname = 'Pavlovsk Falcons B'): modArr_AF_PlayerSkillTemp[1] = 70
- if (modArr_AF_Rand[2] = 1 and $tempname = 'Pavlovsk Falcons A') or (modArr_AF_Rand[2] = 2 and $tempname = 'Pavlovsk Falcons B'): $modArr_AF_PlayerNameTemp[2] = 'Avelina Starov'
- if (modArr_AF_Rand[2] = 1 and $tempname = 'Pavlovsk Falcons A') or (modArr_AF_Rand[2] = 2 and $tempname = 'Pavlovsk Falcons B'): modArr_AF_PlayerSkillTemp[2] = 55
- if (modArr_AF_Rand[3] = 1 and $tempname = 'Pavlovsk Falcons A') or (modArr_AF_Rand[3] = 2 and $tempname = 'Pavlovsk Falcons B'): $modArr_AF_PlayerNameTemp[3] = 'Lariska Gruzdeva'
- if (modArr_AF_Rand[3] = 1 and $tempname = 'Pavlovsk Falcons A') or (modArr_AF_Rand[3] = 2 and $tempname = 'Pavlovsk Falcons B'): modArr_AF_PlayerSkillTemp[3] = 80
- vballpracticesubcount = 0
- :vballpracticesubloopstart
- if vballpracticesubcount >= 10 : jump 'vballpracticesubloopend'
- $modArr_AF_VBall_PlayerName[] = $modArr_AF_PlayerNameTemp[vballpracticesubcount]
- $modArr_AF_VBall_PlayerTeam[] = $modArr_AF_PlayerTeamTemp[vballpracticesubcount]
- modArr_AF_VBall_PlayerSkill[] = modArr_AF_PlayerSkillTemp[vballpracticesubcount]
- vballpracticesubcount += 1
- jump 'vballpracticesubloopstart'
- :vballpracticesubloopend
- if $tempname = $ARGS[1] : $tempname = $ARGS[2] & jump 'vballpracticeloopstart'
- $modVar_AF_Music = 'VolleyballPractice'
- end
-
- if $ARGS[0] = 'SetupTournament':
- KILLVAR '$modArr_AF_VBallT_PlayerName'
- KILLVAR '$modArr_AF_VBallT_PlayerTeam'
- KILLVAR 'modArr_AF_VBallT_PlayerSkill'
- $tempname = 'Pavlovsk Falcons'
- vballtournamentcount = 0
- :vballtournamentloopstart
- gs 'mod_addedflavour_GameFunctions' , 'SetupTeam' , $tempname , 2 , 10 , 50 , 80
- if $tempname = 'Pavlovsk Falcons':
- $modArr_AF_PlayerNameTemp[0] = '<<$pcs_firstname>> <<$pcs_lastname>>'
- modArr_AF_PlayerSkillTemp[0] = pcs_vball
- $modArr_AF_PlayerNameTemp[1] = 'Avelina Starov'
- modArr_AF_PlayerSkillTemp[1] = 55
- $modArr_AF_PlayerNameTemp[2] = 'Christina Zvernava'
- modArr_AF_PlayerSkillTemp[2] = 70
- $modArr_AF_PlayerNameTemp[3] = 'Lariska Gruzdeva'
- modArr_AF_PlayerSkillTemp[3] = 80
- end
- vballtournamentsubcount = 0
- :vballtournamentsubloopstart
- if vballtournamentsubcount >= 10 : jump 'vballtournamentsubloopend'
- $modArr_AF_VBallT_PlayerName[] = $modArr_AF_PlayerNameTemp[vballtournamentsubcount]
- $modArr_AF_VBallT_PlayerTeam[] = $modArr_AF_PlayerTeamTemp[vballtournamentsubcount]
- modArr_AF_VBallT_PlayerSkill[] = modArr_AF_PlayerSkillTemp[vballtournamentsubcount]
- vballtournamentsubcount += 1
- jump 'vballtournamentsubloopstart'
- :vballtournamentsubloopend
- if $tempname = 'Pavlovsk Falcons' : $tempname = 'Gatchina Chiefs' & jump 'vballtournamentloopstart'
- if $tempname = 'Gatchina Chiefs' : $tempname = 'Kolpino Panthers' & jump 'vballtournamentloopstart'
- if $tempname = 'Kolpino Panthers' : $tempname = 'Bor Bears' & jump 'vballtournamentloopstart'
- if $tempname = 'Bor Bears' : $tempname = 'Vsevolozhsk Jets' & jump 'vballtournamentloopstart'
- if $tempname = 'Vsevolozhsk Jets' : $tempname = 'Olkhovsky Warriors' & jump 'vballtournamentloopstart'
- if $tempname = 'Olkhovsky Warriors' : $tempname = 'Bolshaya Chargers' & jump 'vballtournamentloopstart'
- if $tempname = 'Bolshaya Chargers' : $tempname = 'Primorsky Predators' & jump 'vballtournamentloopstart'
- gs 'mod_addedflavour_Volleyball' , 'ApplyTournamentBias'
- $modVar_AF_Music = 'VolleyballTournament'
- KILLVAR '$modArr_AF_PlayerNameTemp'
- KILLVAR '$modArr_AF_PlayerTeamTemp'
- KILLVAR 'modArr_AF_PlayerSkillTemp'
- KILLVAR '$modArr_AF_FNamePool'
- KILLVAR '$modArr_AF_LNamePool'
- end
-
- if $ARGS[0] = 'SetupLeagues':
- KILLVAR '$modArr_AF_VLeagueA_TeamName'
- KILLVAR 'modArr_AF_VLeagueA_Wins'
- KILLVAR 'modArr_AF_VLeagueA_PointsFor'
- KILLVAR 'modArr_AF_VLeagueA_PointsAgainst'
- KILLVAR '$modArr_AF_VLeagueA_Games'
- KILLVAR '$modArr_AF_VLeagueB_TeamName'
- KILLVAR 'modArr_AF_VLeagueB_Wins'
- KILLVAR 'modArr_AF_VLeagueB_PointsFor'
- KILLVAR 'modArr_AF_VLeagueB_PointsAgainst'
- KILLVAR '$modArr_AF_VLeagueB_Games'
- KILLVAR '$modArr_AF_Rand'
- $modArr_AF_Rand[] = 'Gatchina Chiefs'
- $modArr_AF_Rand[] = 'Kolpino Panthers'
- $modArr_AF_Rand[] = 'Vsevolozhsk Jets'
- $modArr_AF_Rand[] = 'Olkhovsky Warriors'
- $modArr_AF_Rand[] = 'Bolshaya Chargers'
- $modArr_AF_Rand[] = 'Primorsky Predators'
- $modArr_AF_VLeagueA_TeamName[] = 'Pavlovsk Falcons'
- modArr_AF_VLeagueA_Wins[] = 0
- modArr_AF_VLeagueA_PointsFor[] = 0
- modArr_AF_VLeagueA_PointsAgainst[] = 0
- $modArr_AF_VLeagueB_TeamName[] = 'Bor Bears'
- modArr_AF_VLeagueB_Wins[] = 0
- modArr_AF_VLeagueB_PointsFor[] = 0
- modArr_AF_VLeagueB_PointsAgainst[] = 0
- setupleaguesloopcount = 0
- modVar_AF_Temp2 = 1
- :setupleaguesloopstart
- if setupleaguesloopcount = 6 : jump 'setupleaguesloopend'
- modVar_AF_Rand = rand(1,arrsize('$modArr_AF_Rand')) - 1
- $modVar_AF_TempStr = $modArr_AF_Rand[modVar_AF_Rand]
- KILLVAR '$modArr_AF_Rand' , modVar_AF_Rand
- if modVar_AF_Temp2 = 1:
- $modArr_AF_VLeagueA_TeamName[] = $modVar_AF_TempStr
- modArr_AF_VLeagueA_Wins[] = 0
- modArr_AF_VLeagueA_PointsFor[] = 0
- modArr_AF_VLeagueA_PointsAgainst[] = 0
- elseif modVar_AF_Temp2 = 2:
- $modArr_AF_VLeagueB_TeamName[] = $modVar_AF_TempStr
- modArr_AF_VLeagueB_Wins[] = 0
- modArr_AF_VLeagueB_PointsFor[] = 0
- modArr_AF_VLeagueB_PointsAgainst[] = 0
- end
- if modVar_AF_Temp2 = 1:
- modVar_AF_Temp2 = 2
- elseif modVar_AF_Temp2 = 2:
- modVar_AF_Temp2 = 1
- end
- setupleaguesloopcount += 1
- jump 'setupleaguesloopstart'
- :setupleaguesloopend
- $modArr_AF_VLeagueA_Games[] = $modArr_AF_VLeagueA_TeamName[0]
- $modArr_AF_VLeagueA_Games[] = $modArr_AF_VLeagueA_TeamName[1]
- $modArr_AF_VLeagueA_Games[] = $modArr_AF_VLeagueA_TeamName[2]
- $modArr_AF_VLeagueA_Games[] = $modArr_AF_VLeagueA_TeamName[3]
- $modArr_AF_VLeagueA_Games[] = $modArr_AF_VLeagueA_TeamName[0]
- $modArr_AF_VLeagueA_Games[] = $modArr_AF_VLeagueA_TeamName[2]
- $modArr_AF_VLeagueA_Games[] = $modArr_AF_VLeagueA_TeamName[1]
- $modArr_AF_VLeagueA_Games[] = $modArr_AF_VLeagueA_TeamName[3]
- $modArr_AF_VLeagueA_Games[] = $modArr_AF_VLeagueA_TeamName[0]
- $modArr_AF_VLeagueA_Games[] = $modArr_AF_VLeagueA_TeamName[3]
- $modArr_AF_VLeagueA_Games[] = $modArr_AF_VLeagueA_TeamName[1]
- $modArr_AF_VLeagueA_Games[] = $modArr_AF_VLeagueA_TeamName[2]
- $modArr_AF_VLeagueB_Games[] = $modArr_AF_VLeagueB_TeamName[0]
- $modArr_AF_VLeagueB_Games[] = $modArr_AF_VLeagueB_TeamName[1]
- $modArr_AF_VLeagueB_Games[] = $modArr_AF_VLeagueB_TeamName[2]
- $modArr_AF_VLeagueB_Games[] = $modArr_AF_VLeagueB_TeamName[3]
- $modArr_AF_VLeagueB_Games[] = $modArr_AF_VLeagueB_TeamName[0]
- $modArr_AF_VLeagueB_Games[] = $modArr_AF_VLeagueB_TeamName[2]
- $modArr_AF_VLeagueB_Games[] = $modArr_AF_VLeagueB_TeamName[1]
- $modArr_AF_VLeagueB_Games[] = $modArr_AF_VLeagueB_TeamName[3]
- $modArr_AF_VLeagueB_Games[] = $modArr_AF_VLeagueB_TeamName[0]
- $modArr_AF_VLeagueB_Games[] = $modArr_AF_VLeagueB_TeamName[3]
- $modArr_AF_VLeagueB_Games[] = $modArr_AF_VLeagueB_TeamName[1]
- $modArr_AF_VLeagueB_Games[] = $modArr_AF_VLeagueB_TeamName[2]
- end
-
- if $ARGS[0] = 'ApplyTournamentBias':
- vballtournamentbiasloopcount = 0
- modVar_AF_Temp = (20 * ((volsesonwin * 100) / volsesongame)) / 100
- :vballtournamentbiasloopstart
- if vballtournamentbiasloopcount >= arrsize('$modArr_AF_VBallT_PlayerName') : jump 'vballtournamentbiasloopend'
- if $modArr_AF_VBallT_PlayerTeam[vballtournamentbiasloopcount] = 'Pavlovsk Falcons' : modArr_AF_VBallT_PlayerSkill[vballtournamentbiasloopcount] += rand((modVar_AF_Temp - 10),(modVar_AF_Temp + 10))
- if $modArr_AF_VBallT_PlayerTeam[vballtournamentbiasloopcount] = 'Gatchina Chiefs' : modArr_AF_VBallT_PlayerSkill[vballtournamentbiasloopcount] += rand(-8,12)
- if $modArr_AF_VBallT_PlayerTeam[vballtournamentbiasloopcount] = 'Kolpino Panthers' : modArr_AF_VBallT_PlayerSkill[vballtournamentbiasloopcount] += rand(-5,15)
- if $modArr_AF_VBallT_PlayerTeam[vballtournamentbiasloopcount] = 'Bor Bears' : modArr_AF_VBallT_PlayerSkill[vballtournamentbiasloopcount] += rand(10,20)
- if $modArr_AF_VBallT_PlayerTeam[vballtournamentbiasloopcount] = 'Vsevolozhsk Jets' : modArr_AF_VBallT_PlayerSkill[vballtournamentbiasloopcount] += rand(-2,18)
- if $modArr_AF_VBallT_PlayerTeam[vballtournamentbiasloopcount] = 'Olkhovsky Warriors' : modArr_AF_VBallT_PlayerSkill[vballtournamentbiasloopcount] += rand(-7,13)
- if $modArr_AF_VBallT_PlayerTeam[vballtournamentbiasloopcount] = 'Bolshaya Chargers' : modArr_AF_VBallT_PlayerSkill[vballtournamentbiasloopcount] += rand(-4,16)
- if $modArr_AF_VBallT_PlayerTeam[vballtournamentbiasloopcount] = 'Primorsky Predators' : modArr_AF_VBallT_PlayerSkill[vballtournamentbiasloopcount] += rand(-5,15)
- vballtournamentbiasloopcount += 1
- jump 'vballtournamentbiasloopstart'
- :vballtournamentbiasloopend
- end
- --- mod_addedflavour_Volleyball ---------------------------------
|