Hellow guys... Im enchancing the BTA script of Bahmut .. Its already edited as you can see the codes... I just have problem when running the script can you help me find the error?
//===== rAthena Script =======================================
//= MVP Time Attack
//===== By: ==================================================
//= Bahmut
//= Freecs => http://rathena.org/board/user/949-jin-freecs/
//===== Current Version: =====================================
//= 1.0 Initial Release
//============================================================
- script BTA -1,{
OnInit:
// ---------------------------------------------------------------------------
// - NPC Command
bindatcmd "bta","BTA::OnDoBTA",99,99;
end;
OnDoBTA:
// - NPC Config
// ---------------------------------------------------------------------------
set .@mapName$,"pvp_2vs2"; // On which map should the event be
set .@spawnCordX,40; // X-Cordinate where the mob spawns
set .@spawnCordY,33; // Y-Cordinate where the mob spawns
set .@minGmRank,99; // Minimal GM level to use this script
set .@globalAnnounce,0; // Should the script announce kills global
set .@MvPList[0],1150,1511,1373,1719,1785,1768;
if (getgmlevel() < .@minGmRank) end;
if ( compare( .@atcmd_parameters$, "on" ) ) {
goto OnEnable;
}else if ( compare( .@atcmd_parameters$, "off" ) ) {
goto OnDisable;
}
end;
// ---------------------------------------------------------------------------
// - End Monster Labels ------------------------------------------------------
// ---------------------------------------------------------------------------
OnEnable:
if (.@globalAnnounce == 1) {
announce "Boss Time Attack: We will start in 5",0;
sleep2 1500;
announce "Boss Time Attack: 4",0;
sleep2 1500;
announce "Boss Time Attack: 3",0;
sleep2 1500;
announce "Boss Time Attack: 2",0;
sleep2 1500;
announce "Boss Time Attack: 1",0;
sleep2 1500;
announce "Boss Time Attack: GO!",0;
sleep2 1000;
announce "Boss Time Attack: Moonlight Flower will be summoned.",0;
} else {
mapannounce .@mapName$,"Boss Time Attack: We will start in 5",0;
sleep2 1500;
mapannounce .@mapName$,"Boss Time Attack: 4",0;
sleep2 1500;
mapannounce .@mapName$,"Boss Time Attack: 3",0;
sleep2 1500;
mapannounce .@mapName$,"Boss Time Attack: 2",0;
sleep2 1500;
mapannounce .@mapName$,"Boss Time Attack: 1",0;
sleep2 1500;
mapannounce .@mapName$,"Boss Time Attack: GO!",0;
sleep2 1500;
mapannounce .@mapName$,"Boss Time Attack: Moonlight Flower will be summoned.",0;
}
sleep2 1000;
set .MOBStartTick, gettimetick(2);
set .MOBKillTime, 0;
set .MOBKillCount, 0;
set .@i,1;
goto OnSpawn;
end;
OnSpawn:
monster .@mapName$,.@spawnCordX,.@spawnCordY,"+getmonsterinfo(.@MvPList[.@i],0)+","+.@MvPList[.@i]+",1,"BTA::OnBTAKilled";
end;
OnBTAKilled:
set .MOBKillCount, .MOBKillCount+ 1;
set .@i,.@i + 1;
if(.MOBKillCount < getarraysize(.@MvPList)){
goto OnSpawn;
}else{
goto OnBTAKilledall;
}
end;
OnBTAKilledall:
set .MOBKillTime, gettimetick(2) - .MOBStartTick;
if (.@globalAnnounce == 1) {
announce "Boss Time Attack: Time " + (.MOBKillTime / 60)+ "min" + (.MOBKillTime % 60) + "sec",0;
}else{
mapannounce .@mapName$,"Boss Time Attack: Time " + (.MOBKillTime / 60)+ "min" + (.MOBKillTime % 60) + "sec",0;
}
end;
OnDisable:
killmonster .@mapName$,"All";
set .MOBKillTime, gettimetick(2) - .MOBStartTick;
if (.@globalAnnounce == 1) {
announce "Boss Time Attack: Concede Time " + (.MOBKillTime / 60)+ "min" + (.MOBKillTime % 60) + "sec",0;
}else{
mapannounce .@mapName$,"Boss Time Attack: Concede Time " + (.MOBKillTime / 60)+ "min" + (.MOBKillTime % 60) + "sec",0;
}
end;
}
pvp_2vs2 mapflag monster_noteleport
pvp_2vs2 mapflag nobranch
pvp_2vs2 mapflag noreturn
pvp_2vs2 mapflag noteleport
pvp_2vs2 mapflag nomemo
pvp_2vs2 mapflag nowarpto
pvp_2vs2 mapflag nowarp
Question
nasagnilac
Hellow guys... Im enchancing the BTA script of Bahmut .. Its already edited as you can see the codes... I just have problem when running the script can you help me find the error?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.