seikenxiii
Mr & Ms Pac-Man
- 17/8/05
- 171
- 0
undefinedvar state = ""
var ghost_count = 0;
var god_count = 0;
var die_count = 0;
var pet_die_count = 0;
var battle_count = 0;
var DisconnectFlag = 0.3;
var HealingFlag = 0.5;
var hpFraction = 0.8;
var spFraction = 0.7;
var MyMapID = 15802;
var battle_round;
var myParty = new Array(11111,22222,33333,44444,55555); //ca'c id trong pt
pt_leader = myParty[0]; //id chu pt
pt_sena = myParty[1]; //id quan su
function MyAttack(){ // cách dánh c?a mình
m = SelectF1Target()
sk = 12003; // dây là dánh thu?ng
ts.SendAttack(
ts.Character.Row
, ts.Character.Col
, m.Row
, m.Col
, sk
)
}
function MyPartnerAttack(){ // cách dánh c?a con Ð?
m = SelectF1Target()
sk = 12003; // dây là dánh thu?ng
ts.SendAttack(
ts.CurrentPartner.Row
, ts.CurrentPartner.Col
, m.Row
, m.Col
, sk
)
}
function BattleStarted(){
battle_count++;
battle_round=0;
}
function BattleStoped(){
EatHP();
EatSP();
ViewState();
}
function EatHP(){
if (ts.Character.HP < (ts.Character.MAXHP * hpFraction)){
doEatHP(0,(ts.Character.MAXHP * hpFraction)-ts.Character.HP)
}
if (ts.CurrentPartner.HP < (ts.CurrentPartner.MAXHP * hpFraction)){
doEatHP(ts.CurrentPartner.Order,(ts.CurrentPartner.MAXHP * hpFraction)-ts.CurrentPartner.HP)
}
}
function EatSP(){
if (ts.Character.SP < (ts.Character.MAXSP * spFraction)){
doEatSP(0,(ts.Character.MAXSP * spFraction)-ts.Character.SP)
}
if (ts.CurrentPartner.SP < (ts.CurrentPartner.MAXSP * spFraction)){
doEatSP(ts.CurrentPartner.Order,(ts.CurrentPartner.MAXSP * spFraction)-ts.CurrentPartner.SP)
}
}
function ViewState(){
debug("************************************",0xFF0000)
debug(" Battle Count : " + battle_count ,0xFF0000)
debug(" Dead Count : " + die_count ,0xFF0000)
debug(" Pet KO Count : " + pet_die_count, 0xFF0000)
debug(" Lucky Count : " + god_count, 0xFF0000)
debug(" Ghost Count : " + ts.Character.Ghost ,0xFF0000)
debug(" Warrior's FAI : " + ts.CurrentPartner.CharName +" : " + ts.CurrentPartner.fai,0xFF0000)
debug("************************************",0xFF0000)
}
function onEvilGod(){
ghost_count++
debug("E V I L G O D."+"["+ghost_count+"]",0x0000FF)
msg = "Wrong.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")"
WriteLog("Wrong.js",msg)
}
function onLuckyGod(){
debug("LUCKY G O D.",0xFF0000)
if(!QA.Exists(ts.LastQuestion)){
QA.Add(ts.LastQuestion,ts.LastResponseAnswer)
msg = "QA.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")"
WriteLog("QA.js",msg)
}
}
function onNPCAppear( npcmapid , x , y ){
//debug(npcmapid,0)
if(npcmapid == npcmapid){
ts.ClickOnNPC(npcmapid)
ts.ClickOnNPC(npcmapid)
}
}
function FinishAnswerFuckGod(){
cdelay(3)
god_count++;
if(ghost_count>=3){
debug("3 ghost, disconnect now",0x00aaaa)
frm.mnuEnableReconnect.Checked = false;
ts.Disconect();
}
}
function doEatHP(order,difHp){
for(var i = 1;i<= 25 ;i++){
var oSlot = ts.MyItems.Item(i)
var oItem = ITEMS.Item(oSlot.itemid)
if (oSlot.itemid == 0){ continue; }
if(oItem.isHPItem()){
if (oItem.itemvalue > difHp){ continue; }
var eatHpAmt = (difHp - (difHp % oItem.itemvalue)) / oItem.itemvalue
if (eatHpAmt> 0){
if (eatHpAmt > oSlot.num){eatHpAmt = oSlot.num; }
ts.EatItem(i,eatHpAmt,order)
debug( "?"+oItem.itemname+" HP "+oItem.itemvalue+"at slot "+i+" decrease "+eatHpAmt+"?" ,0xC08008 )
difHp = difHp - eatHpAmt * oItem.itemvalue
}
}
}
}
function doEatSP(order,difSp){
for(var i = 1;i<= 25 ;i++){
var oSlot = ts.MyItems.Item(i)
var oItem = ITEMS.Item(oSlot.itemid)
if (oSlot.itemid == 0){ continue; }
if(oItem.isSPItem()){
if (oItem.itemvalue > difSp){ continue; }
var eatSpAmt = (difSp - (difSp % oItem.itemvalue)) / oItem.itemvalue
if (eatSpAmt> 0){
if (eatSpAmt > oSlot.num){eatSpAmt = oSlot.num; }
ts.EatItem(i,eatSpAmt,order);
debug( "?"+oItem.itemname+" SP "+oItem.itemvalue+"at slot "+i+" decrease "+eatSpAmt+"?" ,0xC08008 );
difSp = difSp - eatSpAmt * oItem.itemvalue ;
}
}
}
}
function Start(){
}
function Stop(){
}
function CheckDisconnect(){
if(ts.Character.HP < (DisconnectFlag * ts.Character.MAXHP)
|| ts.CurrentPartner.HP <(DisconnectFlag * ts.CurrentPartner.MAXHP)
){
frm.mnuEnableReconnect.Checked = false;
ts.Disconect();
}
}
function OnPrivateMsg(PlayerName , Msg){
debug(PlayerName + ": " + Msg,0);
}
function InitBot() {
debug("my bot" , 0x00FF00 );
EatHP();
EatSP();
Timer.Enabled=true;
}
function OnTimer(){
if (ts.CurrentParty==0) ts.RequestParty(pt_leader);
}
function WaitAcceptParty(playerid){
for (var i=0; i<myParty.length;i++) {
if (playerid ==myParty) { ts.AcceptParty(playerid); }
}
}
function AcceptedParty(playerid){
//pname = getPlayerName(playerid)
if(playerid == pt_sena)
{
ts.sena(playerid) //set strategist
}
pt_count++;
if (pt_count==4) { //full pt 5 nguoi
Start();
}
}
function RequestPartyAcceptFrom(PlayerId ){
}
function PartyStop( playerid ){
for (var i=0; i<myParty.length;i++) {
if (playerid ==myParty) { ts.Disconect(); }
}
}
function onPlayerWalk( uid , x , y ){
//debug("uid = " + uid + " x = " + x + " y = " + y,0);
}
function warpFinish(){
}
InitBot()
debug(ts.Character.Ghost,0x0000FF)
-------------------------------------------------------------
Mình treo hỏa mage 2 con ở Phong, 1 nick dùng alogin làm chủ pt còn 1 nick dùng truebot với script trên nhưng sau con dùng truebot toàn attack mà ko bắn tên, hic hic. Bạn nào chỉ mình với, mình chỉ có nhu cầu treo máy bắn tên thôi.
Cảm ơn trước.
var ghost_count = 0;
var god_count = 0;
var die_count = 0;
var pet_die_count = 0;
var battle_count = 0;
var DisconnectFlag = 0.3;
var HealingFlag = 0.5;
var hpFraction = 0.8;
var spFraction = 0.7;
var MyMapID = 15802;
var battle_round;
var myParty = new Array(11111,22222,33333,44444,55555); //ca'c id trong pt
pt_leader = myParty[0]; //id chu pt
pt_sena = myParty[1]; //id quan su
function MyAttack(){ // cách dánh c?a mình
m = SelectF1Target()
sk = 12003; // dây là dánh thu?ng
ts.SendAttack(
ts.Character.Row
, ts.Character.Col
, m.Row
, m.Col
, sk
)
}
function MyPartnerAttack(){ // cách dánh c?a con Ð?
m = SelectF1Target()
sk = 12003; // dây là dánh thu?ng
ts.SendAttack(
ts.CurrentPartner.Row
, ts.CurrentPartner.Col
, m.Row
, m.Col
, sk
)
}
function BattleStarted(){
battle_count++;
battle_round=0;
}
function BattleStoped(){
EatHP();
EatSP();
ViewState();
}
function EatHP(){
if (ts.Character.HP < (ts.Character.MAXHP * hpFraction)){
doEatHP(0,(ts.Character.MAXHP * hpFraction)-ts.Character.HP)
}
if (ts.CurrentPartner.HP < (ts.CurrentPartner.MAXHP * hpFraction)){
doEatHP(ts.CurrentPartner.Order,(ts.CurrentPartner.MAXHP * hpFraction)-ts.CurrentPartner.HP)
}
}
function EatSP(){
if (ts.Character.SP < (ts.Character.MAXSP * spFraction)){
doEatSP(0,(ts.Character.MAXSP * spFraction)-ts.Character.SP)
}
if (ts.CurrentPartner.SP < (ts.CurrentPartner.MAXSP * spFraction)){
doEatSP(ts.CurrentPartner.Order,(ts.CurrentPartner.MAXSP * spFraction)-ts.CurrentPartner.SP)
}
}
function ViewState(){
debug("************************************",0xFF0000)
debug(" Battle Count : " + battle_count ,0xFF0000)
debug(" Dead Count : " + die_count ,0xFF0000)
debug(" Pet KO Count : " + pet_die_count, 0xFF0000)
debug(" Lucky Count : " + god_count, 0xFF0000)
debug(" Ghost Count : " + ts.Character.Ghost ,0xFF0000)
debug(" Warrior's FAI : " + ts.CurrentPartner.CharName +" : " + ts.CurrentPartner.fai,0xFF0000)
debug("************************************",0xFF0000)
}
function onEvilGod(){
ghost_count++
debug("E V I L G O D."+"["+ghost_count+"]",0x0000FF)
msg = "Wrong.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")"
WriteLog("Wrong.js",msg)
}
function onLuckyGod(){
debug("LUCKY G O D.",0xFF0000)
if(!QA.Exists(ts.LastQuestion)){
QA.Add(ts.LastQuestion,ts.LastResponseAnswer)
msg = "QA.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")"
WriteLog("QA.js",msg)
}
}
function onNPCAppear( npcmapid , x , y ){
//debug(npcmapid,0)
if(npcmapid == npcmapid){
ts.ClickOnNPC(npcmapid)
ts.ClickOnNPC(npcmapid)
}
}
function FinishAnswerFuckGod(){
cdelay(3)
god_count++;
if(ghost_count>=3){
debug("3 ghost, disconnect now",0x00aaaa)
frm.mnuEnableReconnect.Checked = false;
ts.Disconect();
}
}
function doEatHP(order,difHp){
for(var i = 1;i<= 25 ;i++){
var oSlot = ts.MyItems.Item(i)
var oItem = ITEMS.Item(oSlot.itemid)
if (oSlot.itemid == 0){ continue; }
if(oItem.isHPItem()){
if (oItem.itemvalue > difHp){ continue; }
var eatHpAmt = (difHp - (difHp % oItem.itemvalue)) / oItem.itemvalue
if (eatHpAmt> 0){
if (eatHpAmt > oSlot.num){eatHpAmt = oSlot.num; }
ts.EatItem(i,eatHpAmt,order)
debug( "?"+oItem.itemname+" HP "+oItem.itemvalue+"at slot "+i+" decrease "+eatHpAmt+"?" ,0xC08008 )
difHp = difHp - eatHpAmt * oItem.itemvalue
}
}
}
}
function doEatSP(order,difSp){
for(var i = 1;i<= 25 ;i++){
var oSlot = ts.MyItems.Item(i)
var oItem = ITEMS.Item(oSlot.itemid)
if (oSlot.itemid == 0){ continue; }
if(oItem.isSPItem()){
if (oItem.itemvalue > difSp){ continue; }
var eatSpAmt = (difSp - (difSp % oItem.itemvalue)) / oItem.itemvalue
if (eatSpAmt> 0){
if (eatSpAmt > oSlot.num){eatSpAmt = oSlot.num; }
ts.EatItem(i,eatSpAmt,order);
debug( "?"+oItem.itemname+" SP "+oItem.itemvalue+"at slot "+i+" decrease "+eatSpAmt+"?" ,0xC08008 );
difSp = difSp - eatSpAmt * oItem.itemvalue ;
}
}
}
}
function Start(){
}
function Stop(){
}
function CheckDisconnect(){
if(ts.Character.HP < (DisconnectFlag * ts.Character.MAXHP)
|| ts.CurrentPartner.HP <(DisconnectFlag * ts.CurrentPartner.MAXHP)
){
frm.mnuEnableReconnect.Checked = false;
ts.Disconect();
}
}
function OnPrivateMsg(PlayerName , Msg){
debug(PlayerName + ": " + Msg,0);
}
function InitBot() {
debug("my bot" , 0x00FF00 );
EatHP();
EatSP();
Timer.Enabled=true;
}
function OnTimer(){
if (ts.CurrentParty==0) ts.RequestParty(pt_leader);
}
function WaitAcceptParty(playerid){
for (var i=0; i<myParty.length;i++) {
if (playerid ==myParty) { ts.AcceptParty(playerid); }
}
}
function AcceptedParty(playerid){
//pname = getPlayerName(playerid)
if(playerid == pt_sena)
{
ts.sena(playerid) //set strategist
}
pt_count++;
if (pt_count==4) { //full pt 5 nguoi
Start();
}
}
function RequestPartyAcceptFrom(PlayerId ){
}
function PartyStop( playerid ){
for (var i=0; i<myParty.length;i++) {
if (playerid ==myParty) { ts.Disconect(); }
}
}
function onPlayerWalk( uid , x , y ){
//debug("uid = " + uid + " x = " + x + " y = " + y,0);
}
function warpFinish(){
}
InitBot()
debug(ts.Character.Ghost,0x0000FF)
-------------------------------------------------------------
Mình treo hỏa mage 2 con ở Phong, 1 nick dùng alogin làm chủ pt còn 1 nick dùng truebot với script trên nhưng sau con dùng truebot toàn attack mà ko bắn tên, hic hic. Bạn nào chỉ mình với, mình chỉ có nhu cầu treo máy bắn tên thôi.
Cảm ơn trước.


