| View previous topic :: View next topic |
| Author |
Message |
thegangster219
Joined: 04 Jul 2008 Posts: 2
|
Posted: Fri Jul 04, 2008 7:22 am Post subject: please fix this so it can work for iro troy game hugel anniv |
|
|
macro for hugel minigames npc
made by rastalo
Using OpenKore 2.0.1
Using Macro Plugin 1.3.5a
U CAN USE THIS MACRO ONLY IF YOU AGREE WITH THE GENERAL OPEN SOURCE DISCLAMER
created : 24/06/2008
last modified : 29/06/2008
auto-answer for playing the game
answer r1 to play
automacro TroyRespGame {
console /Game rules/
call TroyRespGameB
}
macro TroyRespGameB {
pause 1
do talk resp 1
do talk cont
}
#answer r0 to play
automacro TroyRespPay {
console /Do Not Pay/
call TroyRespPayB
}
keep track of troy's last answer
macro TroyRespPayB {
# pause 1
do talk resp 0
do talk cont
release TroyResp
do talk cont
}
automacro Troysword {
console /Troy#fes: Sword!/
call TroyswordB
}
macro TroyswordB {
$troyLast = sword
call TroyRespC
}
automacro Troyshield {
console /Troy#fes: Shield!/
call TroyshieldB
}
macro TroyshieldB {
$troyLast = shield
call TroyRespC
}
automacro Troybow {
console /Troy#fes: Bow!/
call TroybowB
}
macro TroybowB {
$troyLast = box
call TroyRespC
}
if option 'whats going on' show up,
calculate the winnin resp
automacro WhatsG0 {
console /0\s\swhat/
call WhatsG0B
}
automacro WhatsG1 {
console /1\s\swhat/
call WhatsG1B
}
automacro WhatsG2 {
console /2\s\swhat/
call WhatsG2B
}
automacro WhatsG3 {
console /3\s\swhat/
call WhatsG3B
}
macro WhatsG0B {
whats going on is choice 0
move up all aswers
if ($troyLast == sword) goto T0Going1
if ($troyLast == shield) goto T0Going2
if ($troyLast == box) goto T0Going3
:T0Going1
dernier choix sword
$switch = 3
goto T0GoingEnd
:T0Going2
dernier choix shield
$switch = 1
goto T0GoingEnd
:T0Going3
dernier choix box
$switch = 2
goto T0GoingEnd
:T0GoingEnd
call TroyRespB
}
macro WhatsG1B {
whats going on is choice 1
move up aswers till 1
if ($troyLast == sword) goto T1Going1
if ($troyLast == shield) goto T1Going2
if ($troyLast == box) goto T1Going3
:T1Going1
dernier choix sword
$switch = 3
goto T1GoingEnd
:T1Going2
dernier choix shield
$switch = 0
goto T1GoingEnd
:T1Going3
dernier choix box
$switch = 2
goto T1GoingEnd
:T1GoingEnd
call TroyRespB
}
macro WhatsG2B {
whats going on is choice 2
move up aswers till 2
if ($troyLast == sword) goto T2Going1
if ($troyLast == shield) goto T2Going2
if ($troyLast == box) goto T2Going3
:T2Going1
dernier choix sword
$switch = 3
goto T2GoingEnd
:T2Going2
dernier choix shield
$switch = 0
goto T2GoingEnd
:T2Going3
dernier choix box
$switch = 1
goto T2GoingEnd
:T2GoingEnd
call TroyRespB
}
macro WhatsG3B {
#whats going on is choice 3
# => we don't care
if ($troyLast == sword) goto T3Going1
if ($troyLast == shield) goto T3Going2
if ($troyLast == box) goto T3Going3
:T3Going1
# dernier choix sword
$switch = 2
goto T3GoingEnd
:T3Going2
# dernier choix shield
$switch = 0
goto T3GoingEnd
:T3Going3
# dernier choix box
$switch = 1
goto T3GoingEnd
:T3GoingEnd
call TroyRespB
}
if 'whats going on' don't show up
automacro TroyResp {
run-once 1
console /3\s\sCancel Chat/
call TroyRespNext
}
make sure we don't answer cancel
macro TroyRespNext {
if ($switch < 3) goto TroyRespSwitch
$switch = 2
:TroyRespSwitch
call TroyRespB
}
respond to npc
macro TroyRespB {
pause 1
log switch is $switch
if ($switch == 0) goto switch0
if ($switch == 1) goto switch1
if ($switch == 2) goto switch2
if ($switch == 3) goto switch3
:switch0
do talk resp 0
call TroyRespC
:switch1
do talk resp 1
call TroyRespC
:switch2
do talk resp 2
call TroyRespC
:switch3
do talk resp 3
call TroyRespC
}
macro TroyRespC {
do talk cont
log last answer is $troyLast
do talk cont
pause 1
release TroyResp
do talk cont
}
in case of a tie: change answer for another
automacro TroyCollision {
console /Troy#fes: A head-on collision!/
call TroyColB
}
macro TroyColB {
log COLLISION !!!!!!!!!!!
if ($switch == 0) goto switchCol0
if ($switch == 1) goto switchCol1
if ($switch == 2) goto switchCol2
if ($switch == 3) goto switchCol3
:switchCol0
$switch = @rand(0,2)
if ($switch != 0) goto switchEnd
$switch = 1
goto switchEnd
:switchCol1
$switch = @rand(0,2)
if ($switch != 1) goto switchEnd
$switch = 2
goto switchEnd
:switchCol2
$switch = @rand(0,2)
if ($switch != 2) goto switchEnd
$switch = 1
goto switchEnd
:switchCol3
$switch = @rand(0,2)
goto switchEnd
:switchEnd
log NEW Switch IS $switch
call TroyRespC
}
If troy win, we need to change answer or it keep spamm and winning
automacro TroyWin {
console /Hahaha, Troy wins!/
call TroyWinB
}
macro TroyWinB {
log TROY WIN !!!!!!!!!!!
$temp = $switch
:TroyWinR
$switch = @rand (0,2)
if ($switch == $temp) goto TroyWinR
call TroyRespC
}
THIS IS THE START MACRO
macro hugelTroy{
pause 1
$passe++
log =============== PASSE NUM $passe ==============
release TroyResp
# default answer is shield
$switch = 1
$troyLast = box
do talk 0
pause 1
do talk cont
do talk cont
pause 1
on joue
do talk resp 1
do talk cont
pause 1
on paye
do talk resp 0
do talk cont
do talk cont
pause 1
passe 1
do talk resp 1
do talk cont
do talk cont
do talk cont
pause 1
passe 2
do talk resp 1
do talk cont
do talk cont
do talk cont
pause 1
passe 3
do talk resp 1
do talk cont
do talk cont
do talk cont
pause 1
passe 4
do talk resp 1
do talk cont
do talk cont
do talk cont
pause 1
passe 5
do talk resp 1
do talk cont
do talk cont
do talk cont
}
do it again again again again again again again again ...
untill the comp is dead
automacro TroyRestart {
console /Done talking/
call hugelTroy
} |
|
| Back to top |
|
 |
neXt
Joined: 19 Mar 2007 Posts: 463
|
Posted: Fri Jul 04, 2008 7:43 am Post subject: |
|
|
wrong website _________________ simplified csv - easy way to handle csv files. |
|
| Back to top |
|
 |
thegangster219
Joined: 04 Jul 2008 Posts: 2
|
Posted: Fri Jul 04, 2008 7:50 am Post subject: |
|
|
| can u turn it unto a hot key? |
|
| Back to top |
|
 |
Guest
|
|
| Back to top |
|
 |
|