Posts: 20
Threads: 3
Joined: Jan 2011
Reputation:
0
How can i find the number of javels in the weapon i use with the bot ?
My amaz use eth weapon, and when it is broke (= zero javel left) sh go to city to repair, but she cannot.
There is a variable for that (number of javel in the weapon) ?
THX
Posts: 955
Threads: 6
Joined: Dec 2011
Reputation:
0
Adamz Wrote:How can i find the number of javels in the weapon i use with the bot ?
My amaz use eth weapon, and when it is broke (= zero javel left) sh go to city to repair, but she cannot.
There is a variable for that (number of javel in the weapon) ?
THX
ok I am going to ask a dumb ? because I don't know about eth [SIZE=-1]javelin[/SIZE]s but if you are using a eth weapon and it gets to the point of breaking it can't be repaired right?
which bot are you using
Please add to my Reputation if you find my post reasonable, beneficial, or helpful.
Bottom left corner of the post.
Thanks 
Posts: 20
Threads: 3
Joined: Jan 2011
Reputation:
0
i'm using D2NT
my amaz is using ETH TITANS (there is the replenish mod ... but it needs time)
i need the number of javels so i can adjust the script, and change the attack skill 35 with the attack skill 24, when the number of javels is under 10 (or other quantity... i need some tries).
i've already change the attack function (that one make attack-click), but it works only when the weapon is broke (javel number = 0), and the problem is that with 0 javel neither attack-skill-24 works (this one needs at least 1 javel to works).
i could be more accure this evening, now i'm not at my PC.
Posts: 955
Threads: 6
Joined: Dec 2011
Reputation:
0
Adamz Wrote:i'm using D2NT
my amaz is using ETH TITANS (there is the replenish mod ... but it needs time)
i need the number of javels so i can adjust the script, and change the attack skill 35 with the attack skill 24, when the number of javels is under 10 (or other quantity... i need some tries).
i've already change the attack function (that one make attack-click), but it works only when the weapon is broke (javel number = 0), and the problem is that with 0 javel neither attack-skill-24 works (this one needs at least 1 javel to works).
i could be more accure this evening, now i'm not at my PC.
do you have your skills set like this
NTConfig_AttackSkill[1] = 35;
NTConfig_AttackSkill[2] = 35;
NTConfig_AttackSkill[3] = 35;
NTConfig_AttackSkill[4] = 35;
NTConfig_AttackSkill[5] = 35;
NTConfig_AttackSkill[6] = 35;
NTConfig_AttackSkill[7] = 24; and can you go and do a repair to replenish your javelins and if not then you need like some cool down periods like for her to stay in town a little longer would that work? I am in about the same boat as you I havn't ran a zon, but I see if I can get some help with this
thanks
Please add to my Reputation if you find my post reasonable, beneficial, or helpful.
Bottom left corner of the post.
Thanks 
Posts: 20
Threads: 3
Joined: Jan 2011
Reputation:
0
Maybe i found a way.
I need to test and adjust.
In NTC_PutSkill, i added this code
Code: if (skillid == 35){
var _weapon;
_weapon = [COLOR=#ff0000]me.GetItems()[/COLOR];
if(_weapon){
for(var i = 0 ; i < _weapon.length ; i++){
if((_weapon[i].itemflag&0x100) || [COLOR=#ff0000]((_weapon[i].itemtype == 44 || _weapon[i].itemtype == 87) && (_weapon[i].GetStat(70) < 10))[/COLOR]){ // weapon broke or less then 10 javel
if(_weapon[i].mode == 1 && _weapon[i].itemloc == 4 || _weapon[i].itemloc == 5){
Print(COLOR_8 + "My weapon broke, I use another skill.");
skillid = 24;
break;
}
}
}
}
}
i check all the "weapon" returned the function "me.GetItems", for the type.
amazonjavelin -> 87
javelin -> 44 (i non need this one, but so it is compkete).
then i use the stat 70 (i found it in the bow script, for the arrow ...  )
if the weapon type is 87 (or 44), and the stat 70 is less then 10, it change the skill (from 35 to 24).
Posts: 955
Threads: 6
Joined: Dec 2011
Reputation:
0
Adamz Wrote:Maybe i found a way.
I need to test and adjust.
In NTC_PutSkill, i added this code
Code: if (skillid == 35){
var _weapon;
_weapon = [COLOR=#ff0000]me.GetItems()[/COLOR];
if(_weapon){
for(var i = 0 ; i < _weapon.length ; i++){
if((_weapon[i].itemflag&0x100) || [COLOR=#ff0000]((_weapon[i].itemtype == 44 || _weapon[i].itemtype == 87) && (_weapon[i].GetStat(70) < 10))[/COLOR]){ // weapon broke or less then 10 javel
if(_weapon[i].mode == 1 && _weapon[i].itemloc == 4 || _weapon[i].itemloc == 5){
Print(COLOR_8 + "My weapon broke, I use another skill.");
skillid = 24;
break;
}
}
}
}
}
i check all the "weapon" returned the function "me.GetItems", for the type.
amazonjavelin -> 87
javelin -> 44 (i non need this one, but so it is compkete).
then i use the stat 70 (i found it in the bow script, for the arrow ... )
if the weapon type is 87 (or 44), and the stat 70 is less then 10, it change the skill (from 35 to 24).
does that work for you and do you need a function for it to switch back to skill 35?
Please add to my Reputation if you find my post reasonable, beneficial, or helpful.
Bottom left corner of the post.
Thanks 
Posts: 20
Threads: 3
Joined: Jan 2011
Reputation:
0
NTC_PutSkill is the function that set the skill, point the mouse and click. (i understand so reading the code)
i added the code before all instruction in that function.
the "code" check if the skill passed is "35" (Lighting fury), if so ask for the weapons of the PG, check if the weapons is broke or if it has less the 10 javel. If so, change the skill from 35 to 24.
NO NEED to change back. Why ? Because the "code" change only for that attack. No change the global variable.
This control is runned every attack. (Every attack is called this function).
It should goes ... but i need to check more time.
PS: i added some code also in the function that send the PG to repair the weapon broke. There, i added "if the weapon is ETH, the PG write the weapon is broke but doen't go to repair (it is impossible)".
Why i did it ? Because, with the eth weapon, when my amaz finished the javels, my amaz go in and out from citis to repair the weapon she cannot repair and lost much time. With the change she stay in game ... with the above change she "should" change skill and kill.
PS2: another solution, is to use NON-ETH weapon. But i like to try
Posts: 955
Threads: 6
Joined: Dec 2011
Reputation:
0
Adamz Wrote:NTC_PutSkill is the function that set the skill, point the mouse and click. (i understand so reading the code)
i added the code before all instruction in that function.
the "code" check if the skill passed is "35" (Lighting fury), if so ask for the weapons of the PG, check if the weapons is broke or if it has less the 10 javel. If so, change the skill from 35 to 24.
NO NEED to change back. Why ? Because the "code" change only for that attack. No change the global variable.
This control is runned every attack. (Every attack is called this function).
It should goes ... but i need to check more time.
PS: i added some code also in the function that send the PG to repair the weapon broke. There, i added "if the weapon is ETH, the PG write the weapon is broke but doen't go to repair (it is impossible)".
Why i did it ? Because, with the eth weapon, when my amaz finished the javels, my amaz go in and out from citis to repair the weapon she cannot repair and lost much time. With the change she stay in game ... with the above change she "should" change skill and kill.
PS2: another solution, is to use NON-ETH weapon. But i like to try 
this all sounds good and when you get it up and running and you feel it is working good can you let me know
thanks
Please add to my Reputation if you find my post reasonable, beneficial, or helpful.
Bottom left corner of the post.
Thanks 
Posts: 20
Threads: 3
Joined: Jan 2011
Reputation:
0
03-12-2012, 12:33 AM
(This post was last modified: 03-12-2012, 01:32 AM by Adamz.)
i did it for personal use ... but because u like it  i tried to write a script that everyone can use.
1. we need to change NTAttack.ntl -> NTA_IsWeaponBroken() :
where u find
Code: Print(COLOR_8 + "My weapon broke, I am going to town to repair it.");
NTTMGR_VisitTown();
NTTMGR_TownManager();
break;
u put this code (change the above 4 raw with these below)
Code: var msg = "My weapon broke, ";
if(_weapon[i].itemflag&0x400000){
msg += "I cannot repair it.";
Print(COLOR_8 + msg);
}else{
msg += "I am going to town to repair it.";
Print(COLOR_8 + msg);
NTTMGR_VisitTown();
NTTMGR_TownManager();
break;
}
What it does ? It check if the broke-weapon is ethereal: a)if ethereal -> it write "cannot repair it" and continue the script (i do it because my amaz goes with other PG, so if she cannot attack the other kill also for her); b) if not ethereal -> go to city to repair (as original script).
Why i do it ? Because, if u use an eth weapon, when the weapon is broke, the PG go to city and come back continusly because he cannot repair weapon. (Usually u don't use eth weapon, or the eth-weapon r undestructible. Titans need times to auto-repair so i need this code).
2. we need to change NTCommon.ntl -> NTC_PutSkill
adding this code athe beginning (just after the first "{" of that function)
Code: if (skillid == 35){
var _weapon;
_weapon = me.GetItems();
if(_weapon){
for(var i = 0 ; i < _weapon.length ; i++){
if([COLOR=#ee82ee](_weapon[i].itemflag&0x100)[/COLOR] || ([COLOR=#008000](_weapon[i].itemtype == 44 || _weapon[i].itemtype == 87)[/COLOR] && [COLOR=#00ffff](_weapon[i].itemflag&0x400000)[/COLOR] && [COLOR=#ff0000](_weapon[i].GetStat(70) < 10)[/COLOR]) ){ //weapon broke or less then 10 javel left
if(_weapon[i].mode == 1 && _weapon[i].itemloc == 4 || _weapon[i].itemloc == 5){
Print(COLOR_8 + "My weapon broke, I use another skill.");
skillid = 24; // <- here change the skill
break;
}
}
}
}
}
this part -> no need it, only a further check;
this part -> check if the item is javel or amazon-weapon;
this part -> check if the weapon is ethereal (for non ethereal it should go to repair it)
this part -> less then 10 javel left
What it does ? It check if the attack skill is 35 (lighting fury) and only with this skill it works (so if u don't use that skill it don't change anything from original script). If the skill is 35, if the weapon is ethereal (i added this check, so if u use non eth titans this script doesn't work) and if the javel r less then 10, it change the spell from 35 to 24.
I tried a bit and it works.
If u use and have any problems ... post here.
Posts: 955
Threads: 6
Joined: Dec 2011
Reputation:
0
Adamz Wrote:i did it for personal use ... but because u like it i tried to write a script that everyone can use.
1. we need to change NTAttack.ntl -> NTA_IsWeaponBroken() :
where u find
Code: Print(COLOR_8 + "My weapon broke, I am going to town to repair it.");
NTTMGR_VisitTown();
NTTMGR_TownManager();
break;
u put this code (change the above 4 raw with these below)
Code: var msg = "My weapon broke, ";
if(_weapon[i].itemflag&0x400000){
msg += "I cannot repair it.";
Print(COLOR_8 + msg);
}else{
msg += "I am going to town to repair it.";
Print(COLOR_8 + msg);
NTTMGR_VisitTown();
NTTMGR_TownManager();
break;
}
What it does ? It check if the broke-weapon is ethereal: a)if ethereal -> it write "cannot repair it" and continue the script (i do it because my amaz goes with other PG, so if she cannot attack the other kill also for her); b) if not ethereal -> go to city to repair (as original script).
Why i do it ? Because, if u use an eth weapon, when the weapon is broke, the PG go to city and come back continusly because he cannot repair weapon. (Usually u don't use eth weapon, or the eth-weapon r undestructible. Titans need times to auto-repair so i need this code).
2. we need to change NTCommon.ntl -> NTC_PutSkill
adding this code athe beginning (just after the first "{" of that function)
Code: if (skillid == 35){
var _weapon;
_weapon = me.GetItems();
if(_weapon){
for(var i = 0 ; i < _weapon.length ; i++){
if([COLOR=#ee82ee](_weapon[i].itemflag&0x100)[/COLOR] || ([COLOR=#008000](_weapon[i].itemtype == 44 || _weapon[i].itemtype == 87)[/COLOR] && [COLOR=#00ffff](_weapon[i].itemflag&0x400000)[/COLOR] && [COLOR=#ff0000](_weapon[i].GetStat(70) < 10)[/COLOR]) ){ //weapon broke or less then 10 javel left
if(_weapon[i].mode == 1 && _weapon[i].itemloc == 4 || _weapon[i].itemloc == 5){
Print(COLOR_8 + "My weapon broke, I use another skill.");
skillid = 24; // <- here change the skill
break;
}
}
}
}
}
this part -> no need it, only a further check;
this part -> check if the item is javel or amazon-weapon;
this part -> check if the weapon is ethereal (for non ethereal it should go to repair it)
this part -> less then 10 javel left
What it does ? It check if the attack skill is 35 (lighting fury) and only with this skill it works (so if u don't use that skill it don't change anything from original script). If the skill is 35, if the weapon is ethereal (i added this check, so if u use non eth titans this script doesn't work) and if the javel r less then 10, it change the spell from 35 to 24.
I tried a bit and it works.
If u use and have any problems ... post here.
thank you for this I will foreward it on to the etal team and see if it would be something they care to look at
thanks again
Please add to my Reputation if you find my post reasonable, beneficial, or helpful.
Bottom left corner of the post.
Thanks 
|