Cái Gì thế Này.......^_^

  • Thread starter Thread starter girl87
  • Ngày gửi Ngày gửi

girl87

Mr & Ms Pac-Man
Tham gia ngày
4/2/06
Bài viết
150
Reaction score
0
Các Anh ơi cho em hỏi chút. đây là đoạn scrip của em.
em copy tử scrip cự lộc nên nó toàn bắn hỏa tiễn con thứ 2
giờ em muốn chỉnh nó bắn hỏa tiễn con thứ 3 hay 4.. thì làm như nào.
và tiện thể cho em hỏi chỉnh như nào thì nó bắn và đánh con có lv cao nhất
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

var 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

function MyAttack(){
ts.delay(100);
turn1++;
if (turn1 == 1) {
sk = SkillID("Fire Arrow");

ts.SendAttack(
ts.Character.Row
, ts.Character.Col
, 0
, 2
, sk
)
}
if (turn1 >= 2) {
ts.delay(100);
sk =SkillID("Fire Arrow");

ts.SendAttack(
ts.Character.Row
, ts.Character.Col
, 0
, 2
, sk
)
}
}

function MyPartnerAttack(){
petturn++;
if (petturn == 1) {
ts.delay(100);
sk = SkillID("Fire Arrow");

ts.SendAttack(
ts.CurrentPartner.Row
, ts.CurrentPartner.Col
, 0
, 2
, sk
)
}
if (petturn >= 2) {
ts.delay(100);
sk = SkillID("Fire Arrow");

ts.SendAttack(
ts.CurrentPartner.Row
, ts.CurrentPartner.Col
, 0
, 2
, sk
)
}
}

function BattleStarted(){
turn1 = 0;
petturn = 0;
}
function BattleStoped(){
/* Just safty first. for Warrior not leave you call function SaveWarrior() every end battle. */
SaveWarrior();
CheckDisconnect();
EatHP()
ViewState()
//ts.ClickOnNPC(1)
}

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 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 SaveWarrior(){
if(ts.CurrentPartner.HP< ((0.20) * ts.CurrentPartner.MAXHP)){
ts.Disconect();
debug(" SAVE THE FAI DISCONNECT NOW! : ",0x0000FF);
}
}

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 RemoveGhost(){
ErasingGhost = true
ts.ClickOnNPC(21)
}

function NpcDialogMenu(DialogId){
debug("Menu "+DialogId,0x0000FF)
ts.SelectChoice(1);
ts.SendEnd();
}

function NpcDialog(DialogId){
debug("Dialog "+DialogId,0x0000FF)
if(DialogId == 12077){
ts.ClickOnNPC(1)

///***********************
for(var i=1;i<=25;i++){
var oSlot = ts.MyItems(i);
if( oSlot.itemid == 0){ continue; }
var oItem = ITEMS.Item(oSlot.itemid);
var itemname = oItem.getName()
if( (itemname == "RefreshPill"
|| itemname == "Morale pill"
|| itemname == "PainKiller"
)
&& oSlot.num ==50){
ts.Contribute(0,oSlot.slot);
}else if((itemname == "RefreshPill--"
|| itemname == "Morale pill--"
|| itemname == "PainKiller--"
)
&& oSlot.num ==50){
// ts.SendItemTo(VN00365940,oSlot.slot,oSlot.num)
}
}
//*************************************/


ts.ClickOnNPC(1)
}else{
ts.SendEnd();
}
}

function onAnswerWrong(q,a){
//ts.ClickOnNPC(21)
//RemoveGhost()
}

function FinishAnswerFuckGod(){
god_count++;
if(ghost_count>=2){
debug("2 ghost, disconnect now",0x00aaaa)
ts.Disconect();
}
ts.ClickOnNPC(1)
}

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 Start(){
// no remove this function
fx = ts.Character.x
fy = ts.Character.y
state = "HoneyPill"
HoneyPill()
}

function Stop(){
state= "stop"
// no remove this function
}

function CheckDisconnect(){
if(ts.CurrentPartner.HP == 0){
pet_die_count++
}
if(ts.Character.HP <= 0){
die_count++
}
if(die_count>2){
ts.Disconect();
}

}

function OnChat(PlayerName , Msg){
//debug(PlayerName + " " + Msg , 0 )
}

function InitBot(){
// moveto(302,1615,600)
SetPartyFriend("TUYETPHI")
SetSena("TUYETPHI")
debug("jian yong" , 0x00FF00 )
}

function autoSendItem(){
for(var i=1;i<=25;i++){
var oSlot = ts.MyItems(i)
var oItem = ITEMS.Item(oSlot.itemid)
var itemname = oItem.getName()

if( oSlot.itemid == 0){ continue; }

if( (itemname == "Honey pill"
|| itemname == "AutoAttackPill"
|| itemname == "AutoTonicPill"
)
&& oSlot.num >= 50){

//ts.SendItemTo(playerid,oSlot.slot,oSlot.num)
ts.SendItemTo(VN00342876,oSlot.slot,oSlot.num)}
}
}

function AcceptedParty(playerid){
// If you not understand No change anything in this function
for(var i=0;i<PartyFriends.length;i++){
if(playerid == PartyFriends){
ts.AcceptParty(playerid)
if(playerid == DefaultSena){
ts.sena(playerid)
}
break;
}
}
}

function PartyStop( playerid ){
if(playerid == 129536 || playerid == 129531){
ts.Disconect()
}
}

function onPlayerWalk( uid , x , y ){
if(uid == 129531 ){

}else{
//ts.Disconect()
}
}

function OnTimer(){
if(state=="autowarp"){
ts.Chat(3,"ok.",86269)
}
}

function warpFinish(){
//state="autowarp"
}

//state="autowarp"

InitBot()
debug(ts.Character.Ghost,0x0000FF)
function OnTimer(){
if (ts.CurrentParty == 0) ts.RequestParty(735868);
}
function InitBot(){
Timer.Enabled=true;
}

//ts.warp()
//ts.walk(,)
 
bắn 2 con hàng trên thì ts.SendAttack(ts.Character.Row, ts.Character.Col, 0 , 2 , sk ) } sửa thành 1, 2. Bắn con cao nhất thì chỉnh 0, 3 thử xem :)
 
ts.SendAttack(
ts.Character.Row
, ts.Character.Col
, 0
, 2
, sk
)
}
if (turn1 >= 2) {
ts.delay(100);
sk =SkillID("Fire Arrow");

ts.SendAttack(
ts.Character.Row
, ts.Character.Col
, 0,
2, sk
)
}
}

function MyPartnerAttack(){
petturn++;
if (petturn == 1) {
ts.delay(100);
sk = SkillID("Fire Arrow");

ts.SendAttack(
ts.CurrentPartner.Row
, ts.CurrentPartner.Col
,[COLOR=DarkRed] 0 [/COLOR] , 2 , sk
)
}
if (petturn >= 2) {
ts.delay(100);
sk = SkillID("Fire Arrow");

ts.SendAttack(
ts.CurrentPartner.Row
, ts.CurrentPartner.Col
, 0, 2
, sk
)
}
màu cam là chỉnh hàng trên và hàng dưới
còn màu xanh là chỉnh vị trí bắn của bạn muốn
 
Các Anh ơi cho em hỏi chút. đây là đoạn scrip của em.
em copy tử scrip cự lộc nên nó toàn bắn hỏa tiễn con thứ 2
giờ em muốn chỉnh nó bắn hỏa tiễn con thứ 3 hay 4.. thì làm như nào.
và tiện thể cho em hỏi chỉnh như nào thì nó bắn và đánh con có lv cao nhất
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

var 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

function MyAttack(){
ts.delay(100);
turn1++;
if (turn1 == 1) {
sk = SkillID("Fire Arrow");

ts.SendAttack(
ts.Character.Row
, ts.Character.Col
, 0
, 2
, sk
)
}
if (turn1 >= 2) {
ts.delay(100);
sk =SkillID("Fire Arrow");

ts.SendAttack(
ts.Character.Row
, ts.Character.Col
, 0
, 2
, sk
)
}
}

function MyPartnerAttack(){
petturn++;
if (petturn == 1) {
ts.delay(100);
sk = SkillID("Fire Arrow");

ts.SendAttack(
ts.CurrentPartner.Row
, ts.CurrentPartner.Col
, 0
, 2
, sk
)
}
if (petturn >= 2) {
ts.delay(100);
sk = SkillID("Fire Arrow");

ts.SendAttack(
ts.CurrentPartner.Row
, ts.CurrentPartner.Col
, 0
, 2
, sk
)
}
}

function BattleStarted(){
turn1 = 0;
petturn = 0;
}
function BattleStoped(){
/* Just safty first. for Warrior not leave you call function SaveWarrior() every end battle. */
SaveWarrior();
CheckDisconnect();
EatHP()
ViewState()
//ts.ClickOnNPC(1)
}

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 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 SaveWarrior(){
if(ts.CurrentPartner.HP< ((0.20) * ts.CurrentPartner.MAXHP)){
ts.Disconect();
debug(" SAVE THE FAI DISCONNECT NOW! : ",0x0000FF);
}
}

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 RemoveGhost(){
ErasingGhost = true
ts.ClickOnNPC(21)
}

function NpcDialogMenu(DialogId){
debug("Menu "+DialogId,0x0000FF)
ts.SelectChoice(1);
ts.SendEnd();
}

function NpcDialog(DialogId){
debug("Dialog "+DialogId,0x0000FF)
if(DialogId == 12077){
ts.ClickOnNPC(1)

///***********************
for(var i=1;i<=25;i++){
var oSlot = ts.MyItems(i);
if( oSlot.itemid == 0){ continue; }
var oItem = ITEMS.Item(oSlot.itemid);
var itemname = oItem.getName()
if( (itemname == "RefreshPill"
|| itemname == "Morale pill"
|| itemname == "PainKiller"
)
&& oSlot.num ==50){
ts.Contribute(0,oSlot.slot);
}else if((itemname == "RefreshPill--"
|| itemname == "Morale pill--"
|| itemname == "PainKiller--"
)
&& oSlot.num ==50){
// ts.SendItemTo(VN00365940,oSlot.slot,oSlot.num)
}
}
//*************************************/


ts.ClickOnNPC(1)
}else{
ts.SendEnd();
}
}

function onAnswerWrong(q,a){
//ts.ClickOnNPC(21)
//RemoveGhost()
}

function FinishAnswerFuckGod(){
god_count++;
if(ghost_count>=2){
debug("2 ghost, disconnect now",0x00aaaa)
ts.Disconect();
}
ts.ClickOnNPC(1)
}

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 Start(){
// no remove this function
fx = ts.Character.x
fy = ts.Character.y
state = "HoneyPill"
HoneyPill()
}

function Stop(){
state= "stop"
// no remove this function
}

function CheckDisconnect(){
if(ts.CurrentPartner.HP == 0){
pet_die_count++
}
if(ts.Character.HP <= 0){
die_count++
}
if(die_count>2){
ts.Disconect();
}

}

function OnChat(PlayerName , Msg){
//debug(PlayerName + " " + Msg , 0 )
}

function InitBot(){
// moveto(302,1615,600)
SetPartyFriend("TUYETPHI")
SetSena("TUYETPHI")
debug("jian yong" , 0x00FF00 )
}

function autoSendItem(){
for(var i=1;i<=25;i++){
var oSlot = ts.MyItems(i)
var oItem = ITEMS.Item(oSlot.itemid)
var itemname = oItem.getName()

if( oSlot.itemid == 0){ continue; }

if( (itemname == "Honey pill"
|| itemname == "AutoAttackPill"
|| itemname == "AutoTonicPill"
)
&& oSlot.num >= 50){

//ts.SendItemTo(playerid,oSlot.slot,oSlot.num)
ts.SendItemTo(VN00342876,oSlot.slot,oSlot.num)}
}
}

function AcceptedParty(playerid){
// If you not understand No change anything in this function
for(var i=0;i<PartyFriends.length;i++){
if(playerid == PartyFriends){
ts.AcceptParty(playerid)
if(playerid == DefaultSena){
ts.sena(playerid)
}
break;
}
}
}

function PartyStop( playerid ){
if(playerid == 129536 || playerid == 129531){
ts.Disconect()
}
}

function onPlayerWalk( uid , x , y ){
if(uid == 129531 ){

}else{
//ts.Disconect()
}
}

function OnTimer(){
if(state=="autowarp"){
ts.Chat(3,"ok.",86269)
}
}

function warpFinish(){
//state="autowarp"
}

//state="autowarp"

InitBot()
debug(ts.Character.Ghost,0x0000FF)
function OnTimer(){
if (ts.CurrentParty == 0) ts.RequestParty(735868);
}
function InitBot(){
Timer.Enabled=true;
}

//ts.warp()
//ts.walk(,)
 
ặc thằng bazzani này câu bài ghê thía Mod cho nó 1 sẹo đi nó câu bài kìa
này thì 30 charr rrrrrrrr rrrrrrr rrrrrrrr
 
ack sao bác nài lại copy bài của người khác trắng trợn thế kia [-(
 
câu bài ghê wa cho nó an 1 seo di mod :))
 
2 ông này câu bài ghê wá đi!!! hix câu bài gớm wá post kiểu này ai mà coi cho đc chứ post ra cái hàm đánh thui tôi còn fixx cho chứ post lên kiểu full nhìn ngán nói chi là fix hix hix
 
Back
Top