|
You last visited: Today at 01:49
Advertisement
Boscript für Muddys
Discussion on Boscript für Muddys within the Diablo 2 Programming forum part of the Diablo 2 category.
11/08/2011, 14:38
|
#1
|
elite*gold: 0
Join Date: Dec 2009
Posts: 38
Received Thanks: 11
|
Boscript für Muddys
Sers,
ich möchte, das bevor mein Bot mit dem Run startet, er sich erst mal Bo von nem Bobarb geben lässt.
Da ich noch in den Anfangsphasen des "verstehens" bin, habe ich mir folgendes "zusammengebastelt"
Code:
var _BoTime = false;
function NTMain() {
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
NTC_IncludeConfig("NTBot/char_configs");
NT_LoadConfig();
NTSI_LoadNIPFiles("NTBot/item_configs");
NTA_Initialize();
if(!NTTM_CheckAct()) {
NTC_SendMsgToScript("MWBotGame.ntj", "NTTM_CheckAct()");
return;
}
NTC_Delay(1000);
if(!NTTM_CheckAct(4)) {
NTC_SendMsgToScript("MWBotGame.ntj", "NTTM_CheckAct()");
return;
}
RegisterEvent(EVENT_GAMEMSG, quitfunc);
RegisterEvent(EVENT_GAMEMSG, NT_GameMsgEvents);
if(me.classid == 3) {
if(!NTTM_CheckAct(4)) {
NTC_SendMsgToScript("MWBotGame.ntj", "NTTM_CheckAct()");
return;
}
Print("Loading Pala function");
NTTMGR_TownManager();
Palafunc();
return;
}
if(me.classid == 4) {
Print("Loading barb function");
NTTM_TownMove("portalspot");
NTC_Delay(2500);
}
for(i = 0; i <= 200; i++)
{
if(NTC_InMyParty(NTConfig_Leader))
break;
if(!NTConfig_Leader)
{
_portal = NTM_FindPortalAreaInt(108, 0);
if(_portal != -1)
{
_owner = _portal.GetParent();
if(_owner && !NTC_InMyParty(_owner))
NTConfig_Leader = _owner;
}
}
NTC_Delay(200);
}
if(MWConfig_BoTime)
_BoTime = true;
while(NTC_InTown() && NTC_InMyParty(NTConfig_Leader))
{
if(_BoTime)
NTM_UsePortal("BluePortal", 108, NTConfig_Leader);
NTP_DoPrecast(true);
NTC_Delay(500);
}
NTC_SendMsgToScript("MWBotGame.ntj", "SCRIPT_END");
}
function Palafunc() {
NTC_Delay(500);
if(!NTTM_TownMove("waypoint")) {
NTC_SendMsgToScript("MWBotGame.ntj", "NTTM_TownMove()");
return;
}
if(!NTM_TakeWaypoint(107)) {
NTC_SendMsgToScript("MWBotGame.ntj", "NTM_TakeWaypoint()");
return;
}
NTC_Delay(5000);
NTM_MoveTo(me.areaid, me.x+5, me.y);
for(var i = 0 ; i < 5 ; i++) {
if(NTM_MakeTP())
Say(MWConfig_Announcements.BoTime);
break;
}
while(!me.GetState(32))
NTC_Delay(500);
NTP_DoPrecast(true);
return;
}
function quitfunc(msg, type) {
if(msg.indexOf(NTConfig_Leader) != -1 && (msg.indexOf("weaken") != -1 || msg.indexOf("timeout") != -1)) {
NTC_Delay(500);
ExitGame();
}
}
function NT_GameMsgEvents(msg, type)
{
var _msg = msg.toLowerCase();
if(type == 0 && _msg.indexOf(NTConfig_Leader.toLowerCase()) > -1 && MWConfig_Announcements.BoTime && _msg.indexOf(MWConfig_Announcements.BoTime.toLowerCase()) > -1)
_BoTime = true;
}
Es funktioniert auch insofern, das der Pala sein Tp macht, brav sein Sprüchchen sagt, woraufhin der Barb auch det Tp nimmt und Bo gibt.
Nur macht der Pala dann nicht mit seinen anderen Scripts weiter.
Was mache ich falsch bzw. übersehe ich?
Wäre mich über jede Hilfe freuen.
Greetz
|
|
|
11/08/2011, 20:03
|
#2
|
elite*gold: 0
Join Date: Aug 2011
Posts: 126
Received Thanks: 87
|
Hey,
ich bin auch noch in der Anfangsphase des Verstehens und kann Dir somit leider nicht helfen.
Aber ich hab ein BO-Skript ausm Etal-Forum (Danke an Grassroots) für Muddys Version angepasst. Wenn Du möchtest, kann ich Dir das schicken.
Ansonsten alles Gute für deine eigene Version.
|
|
|
11/08/2011, 20:10
|
#3
|
elite*gold: 250
Join Date: Mar 2010
Posts: 840
Received Thanks: 184
|
bekommt der Pala irgendeine error message nach dem er den bo bekommen hat?
also ich hab mal eben meine gefunden die ich mir mal zusammengebastelt habe und auch funktioniert haben (für classic und anfang der ladder)
Für den Bo Barb:
Code:
function NTMain()
{
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
NTC_IncludeConfig("NTBot/char_configs");
NT_LoadConfig();
NTSI_LoadNIPFiles("NTBot/item_configs");
NTA_Initialize();
NTTM_CheckAct();
RegisterEvent(EVENT_GAMEMSG, NT_GameMsgEvents);
if(BoForAndariel)
{
NTTMGR_TownManager();
NTTM_TownMove("waypoint");
NTM_TakeWaypoint(35);
NTC_Delay(600);
while(!NTC_IsQuesterIn(35))
NTC_Delay(500);
NTM_MoveTo(me.areaid, me.x+10, me.y);
NTP_DoPrecast(true);
NTC_Delay(200);
NTTM_TownMove("waypoint");
NTM_TakeWaypoint(1);
}
if(BoForMephisto)
{
NTTMGR_TownManager();
NTTM_TownMove("waypoint");
NTM_TakeWaypoint(101);
while(!NTC_IsQuesterIn())
NTC_Delay(500);
NTM_MoveTo(me.areaid, me.x+5, me.y);
NTP_DoPrecast(true);
NTC_Delay(200);
NTP_DoPrecast(true);
NTTM_TownMove("waypoint");
NTM_TakeWaypoint(1);
}
while(1)
Delay(500);
}
function NT_GameMsgEvents(msg, type)
{
if(msg.indexOf("weaken") != -1)
{
ExitGame();
}
}
function NTC_IsQuesterIn(area, name)
{
var _player;
var _myPartyId;
var _area;
_player = GetPlayerUnit();
_myPartyId = _player.partyid;
if(arguments.length < 1)
_area = me.areaid
if(arguments.length > 0)
_area = area;
do
{
if(_player.areaid == _area && _myPartyId == _player.partyid)
{
if(!name)
return true;
else if(_player.name == name)
return true;
}
NTC_Delay(100);
} while(_player.GetNext());
return false;
}
function NTC_IsQuesterOut(area)
{
var _player;
var _myPartyId;
_player = GetPlayerUnit();
_myPartyId = _player.partyid;
if(arguments.length < 1)
_area = me.areaid;
else
_area = area;
do
{
if(_player.areaid == _area && _myPartyId == _player.partyid)
return false;
NTC_Delay(100);
} while(_player.GetNext());
return true;
}
function NTM_MoveToObject(areaid, unittype, low, high, offsetx, offsety, clearpath)
{
var _unit;
if(arguments.length < 4)
high = low;
if(arguments.length < 5)
{
offsetx = 0;
offsety = 0;
}
if(arguments.length < 7)
clearpath = false;
_unit = GetPresetUnits(areaid, unittype);
if(!_unit)
return false;
for(var i = 0 ; i < _unit.length ; i++)
{
if(_unit[i].id >= low && _unit[i].id <= high)
return NTM_MoveTo(areaid, _unit[i].roomx*5+_unit[i].x+offsetx, _unit[i].roomy*5+_unit[i].y+offsety, 2, clearpath);
}
return false;
}
function NTC_GetUnit(unittype, classid)
{
var _unit;
for(var i = 0 ; i < 2 ; i++)
{
if(arguments.length < 2)
_unit = GetUnit(unittype);
else
_unit = GetUnit(unittype, classid);
if(_unit)
return _unit;
if(i < 1)
NTC_PingDelay(200);
}
return false;
}
für die sorc oder pala
Andariel:
Code:
function NTMain()
{
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
NTC_IncludeConfig("NTBot/char_configs");
NT_LoadConfig();
NTSI_LoadNIPFiles("NTBot/item_configs");
NTA_Initialize();
me.maxgametime = 0;
NTTM_CheckAct();
NTTMGR_TownManager();
/////////////////////////////////////////
///////////////Andy//////////////////////
/////////////////////////////////////////
if(KillAndariel)
{
while(!NTC_IsQuesterIn(35))
NTC_Delay(500);
NTTM_TownMove("waypoint");
NTM_TakeWaypoint(35);
NTM_MoveTo(me.areaid, me.x+10, me.y);
NTP_DoPrecast(true);
while(!NTC_IsQuesterOut(35))
NTC_Delay(500);
var i;
var _attackpos = [22574, 9612,
22561, 9627,
22550, 9642,
22541, 9653,
22524, 9640,
22524, 9629,
22502, 9577,
22512, 9587,
22534, 9607,
22565, 9593,
22548, 9583];
NTP_DoPrecast();
for(var i = 0 ; i < 2 ; i++)
{
if(!NTM_MoveToStair(me.areaid, 36+i))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
return;
}
if(!NTM_TakeStair(36+i))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
return;
}
}
NTP_DoPrecast();
for(i = 0 ; i < _attackpos.length ; i += 2)
{
NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);
NTA_ClearPosition(20);
NTSI_PickItems();
}
NTTMGR_CheckSafe(NTConfig_CheckSelfSafe);
NTC_Delay(500);
NTM_MoveTo(me.areaid, 22550, 9560);
NTC_Delay(1250);
NTM_MoveTo(me.areaid, 22550, 9588);
NTC_Delay(1750);
NTM_MoveTo(me.areaid, 22545, 9612);
NTC_Delay(2000);
var _andy;
_andy = NTC_FindUnit(NTC_UNIT_MONSTER, 156, 5);
while(_andy && _andy.hp > 0) {
for(i= 0 ; i < 5 ; i ++) {
NTC_Delay(2000);
NTC_CastSkill(59, NTC_HAND_RIGHT, 22545, 9612);
}
NTM_MoveTo(me.areaid, 22550, 9588);
NTC_CastSkill(59, NTC_HAND_RIGHT, 22550, 9560);
NTM_MoveTo(me.areaid, 22550, 9560);
NTC_Delay(500);
NTM_MoveTo(me.areaid, 22545, 9612);
}
NTM_MoveTo(me.areaid, 22543, 9602);
NTSI_PickItems();
}
function NTC_IsQuesterIn(area, name)
{
var _player;
var _myPartyId;
var _area;
_player = GetPlayerUnit();
_myPartyId = _player.partyid;
if(arguments.length < 1)
_area = me.areaid
if(arguments.length > 0)
_area = area;
do
{
if(_player.areaid == _area && _myPartyId == _player.partyid)
{
if(!name)
return true;
else if(_player.name == name)
return true;
}
NTC_Delay(100);
} while(_player.GetNext());
return false;
}
function NTC_IsQuesterOut(area)
{
var _player;
var _myPartyId;
_player = GetPlayerUnit();
_myPartyId = _player.partyid;
if(arguments.length < 1)
_area = me.areaid;
else
_area = area;
do
{
if(_player.areaid == _area && _myPartyId == _player.partyid)
return false;
NTC_Delay(100);
} while(_player.GetNext());
return true;
}
function NTM_MoveToObject(areaid, unittype, low, high, offsetx, offsety, clearpath)
{
var _unit;
if(arguments.length < 4)
high = low;
if(arguments.length < 5)
{
offsetx = 0;
offsety = 0;
}
if(arguments.length < 7)
clearpath = false;
_unit = GetPresetUnits(areaid, unittype);
if(!_unit)
return false;
for(var i = 0 ; i < _unit.length ; i++)
{
if(_unit[i].id >= low && _unit[i].id <= high)
return NTM_MoveTo(areaid, _unit[i].roomx*5+_unit[i].x+offsetx, _unit[i].roomy*5+_unit[i].y+offsety, 2, clearpath);
}
return false;
}
function NTC_GetUnit(unittype, classid)
{
var _unit;
for(var i = 0 ; i < 2 ; i++)
{
if(arguments.length < 2)
_unit = GetUnit(unittype);
else
_unit = GetUnit(unittype, classid);
if(_unit)
return _unit;
if(i < 1)
NTC_PingDelay(200);
}
return false;
}
NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
}
Summenor - Duriel + Meppl:
Code:
function NTMain()
{
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
NTC_IncludeConfig("NTBot/char_configs");
NT_LoadConfig();
NTSI_LoadNIPFiles("NTBot/item_configs");
NTA_Initialize();
me.maxgametime = 0;
NTTM_CheckAct();
NTTMGR_TownManager();
/////////////////////////////////////////
///////////////Summoner//////////////////
/////////////////////////////////////////
if(KillSummoner)
{
NTTMGR_TownManager();
NTTM_TownMove("waypoint");
NTM_TakeWaypoint(74);
NTP_DoPrecast(true);
NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 357, 2, 2);
NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe);
NTA_KillMonster(250);
NTA_ClearPosition();
NTSI_PickItems();
NTM_MakeTP();
NTM_UsePortal("BluePortal");
}
/////////////////////////////////////////
///////////////Duriel////////////////////
/////////////////////////////////////////
if(KillDuriel)
{
NTTMGR_TownManager();
NTTM_TownMove("waypoint");
NTM_TakeWaypoint(46);
NTP_DoPrecast(true);
_tombs = GetRoom();
if(!_tombs)
{
NTC_SendMsgToScript("NTBotGame.ntj", "GetRoom()");
return;
}
NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_TILE, _tombs.correcttomb-28);
_unit = NTC_FindUnit(NTC_UNIT_TILE, _tombs.correcttomb-28, 5);
if(!_unit)
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTC_FindUnit()");
return;
}
NTM_TakeStair(_unit.subareaid);
NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 152, -2, 2);
if(NTConfig_ClearPosition)
NTA_ClearPosition(20, true);
NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe);
NTC_FindUnit(NTC_UNIT_OBJECT, 100, 10);
NTM_TakeUnit(NTC_UNIT_OBJECT, 100);
NTA_KillMonster(211);
NTSI_PickItems();
NTM_MakeTP();
NTM_UsePortal("BluePortal");
}
/////////////////////////////////////////
///////////////Meph//////////////////////
/////////////////////////////////////////
if(KillMephisto)
{
NTTMGR_TownManager();
NTTM_TownMove("waypoint");
NTM_TakeWaypoint(101);
while(!NTC_IsQuesterIn(101))
NTC_Delay(500);
NTM_MoveTo(me.areaid, me.x+5, me.y);
NTP_DoPrecast();
while(!NTC_IsQuesterOut())
NTC_Delay(500);
NTM_MoveToStair(me.areaid, 102);
NTM_TakeStair(102);
NTP_DoPrecast();
NTM_MoveTo(me.areaid, 17590, 8070);
NTA_KillMonster(242);
NTC_PingDelay(1000);
NTSI_PickItems();
}
function NTC_IsQuesterIn(area, name)
{
var _player;
var _myPartyId;
var _area;
_player = GetPlayerUnit();
_myPartyId = _player.partyid;
if(arguments.length < 1)
_area = me.areaid
if(arguments.length > 0)
_area = area;
do
{
if(_player.areaid == _area && _myPartyId == _player.partyid)
{
if(!name)
return true;
else if(_player.name == name)
return true;
}
NTC_Delay(100);
} while(_player.GetNext());
return false;
}
function NTC_IsQuesterOut(area)
{
var _player;
var _myPartyId;
_player = GetPlayerUnit();
_myPartyId = _player.partyid;
if(arguments.length < 1)
_area = me.areaid;
else
_area = area;
do
{
if(_player.areaid == _area && _myPartyId == _player.partyid)
return false;
NTC_Delay(100);
} while(_player.GetNext());
return true;
}
function NTM_MoveToObject(areaid, unittype, low, high, offsetx, offsety, clearpath)
{
var _unit;
if(arguments.length < 4)
high = low;
if(arguments.length < 5)
{
offsetx = 0;
offsety = 0;
}
if(arguments.length < 7)
clearpath = false;
_unit = GetPresetUnits(areaid, unittype);
if(!_unit)
return false;
for(var i = 0 ; i < _unit.length ; i++)
{
if(_unit[i].id >= low && _unit[i].id <= high)
return NTM_MoveTo(areaid, _unit[i].roomx*5+_unit[i].x+offsetx, _unit[i].roomy*5+_unit[i].y+offsety, 2, clearpath);
}
return false;
}
function NTC_GetUnit(unittype, classid)
{
var _unit;
for(var i = 0 ; i < 2 ; i++)
{
if(arguments.length < 2)
_unit = GetUnit(unittype);
else
_unit = GetUnit(unittype, classid);
if(_unit)
return _unit;
if(i < 1)
NTC_PingDelay(200);
}
return false;
}
NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
}
musst allerdings alle noch auf muddys Version anpassen.
In meinem Fall ist der Barb der leader also muss noch in die Charconfig von der sorc folgendes rein:
NTConfig_Leader = "Charname"
KillAndariel = true/false
KillSummenor = true/false
KillDuriel = true/false
KillMephisto = true/false
Bei dem Barb muss das rein:
BoforAndariel = true;
BoforMephisto = true;
Wenn magst kannst auch gerne an den scripten rumbauen etc
|
|
|
11/08/2011, 20:14
|
#4
|
elite*gold: 0
Join Date: Dec 2009
Posts: 38
Received Thanks: 11
|
Quote:
Originally Posted by Knutschkugel
bekommt der Pala irgendeine error message nach dem er den bo bekommen hat?
|
Nope, er steht einfach nur rum und tut nichts.
|
|
|
11/09/2011, 12:29
|
#5
|
elite*gold: 250
Join Date: Mar 2010
Posts: 840
Received Thanks: 184
|
versuch es mal mit dem script was ich oben reineditiert hab
|
|
|
11/09/2011, 13:01
|
#6
|
elite*gold: 0
Join Date: Dec 2009
Posts: 38
Received Thanks: 11
|
Quote:
Originally Posted by Knutschkugel
versuch es mal mit dem script was ich oben reineditiert hab
|
Oh, garnicht bemerkt dein edit.
PeterNeu hat mir sein Script geschickt, welches bestens funzt und das tut was ich wollte.
Werd mir deins trotzdem mal anschauen.
Danke für dein bemühen.
|
|
|
11/09/2011, 13:04
|
#7
|
elite*gold: 0
Join Date: Aug 2009
Posts: 3
Received Thanks: 0
|
Moin Peter,
falls du willst, stelle dein script uns doch allen zur Verfügung.
grüße
|
|
|
11/11/2011, 00:07
|
#8
|
elite*gold: 0
Join Date: Aug 2011
Posts: 126
Received Thanks: 87
|
Sorry, jetzt erst bemerkt.
Es ist nicht mein Skript. Und meine Variante ist hässlich. Das Original gibts im Etal Forum vom Nutzer Grassroots. Link nicht erlaubt wegen fehlendem Backlink
|
|
|
 |
Similar Threads
|
problem mit muddys
11/04/2011 - Diablo 2 - 3 Replies
Hi zusammen, wollte mal den muddys bot ausprobieren aber bekomme immer beim einloggen angezeigt, dass battle net meine version nicht verifizieren kann... das problem kenne ich auch wenn ich d2 manuell starte und lässt sich beheben indem ich d2 als admin starte. nun habe ich schon bei eigenschaften angegeben, dass d2 immer als admin ausgeführt werden soll, was aber nichts am ergebnis ändert... ich benutze win7 64 bit
für tips und hilfen wäre ich sehr dankbar
|
Muddys D2NT
11/03/2011 - Diablo 2 Programming - 2 Replies
kann man den wieder unclosen?
oder ansonsten nochma neu öffnen das topic
|
problem bei muddys
11/02/2011 - Diablo 2 - 3 Replies
also hab eingestellt dass er bei 60% nen life trank nehmen soll
jetz is es so wenn er zb andy macht telt er hin und wenn er dmg frisst nimmt er vll einmal einen trank und danach nichtmehr...
jmd ne ahnung wie man das fixxen könnte? kommt oft zu chickens...
|
Muddys Mulebot
07/27/2011 - Diablo 2 Programming - 3 Replies
I was wondering if there was a english version or tutorial for muddys mule bot and muddys d2nt. Thanks ; )
|
[Brauche bitte Hilfe] Spezielles Boscript
06/07/2011 - Diablo 2 Programming - 8 Replies
Hoi, ich hab mich selber damit versucht, da kam aber nix bei raus :(
Das es sonst bestimmt zu schwer zu verstehen ist, schreibe ich mal alles geordnet auf.^^
Ich möchte das mein Barbar einen bestimmten Wegepunkt nimmt ( z.B. Flammenfluss ) und dort alle anderen sich in diesem Spiel befindlichen Chars ( in diesem Fall 7 weitere ) anschreit. Dann soll jeder seinen Weg gehen.
Der Plan:
Der Leader erstellt das Spiel, alle anderen inklusive Barbar betreten das Spiel.
|
All times are GMT +1. The time now is 01:49.
|
|