Quote:
Hab schon so paar leute gefragt und keiner konnte mir weiterhelfen also frag ich eben hier nach :)
Und zwar such ich die funktion das in einem neuen game die chars zu einem Healer gehen wenn diese under xx& life sind
NEIN ich meine nicht
in der char config is es mit drinCode:Town.doChores();
hab ein wenig in der town.js umgeschaut und folgendes gefundenCode:Config.HealHP = 75; // Go to a healer if under designated percent of life. Config.HealMP = 75; // Go to a healer if under designated percent of mana.
Code:tasks: [ {Heal: NPC.Akara, Shop: NPC.Akara, Gamble: NPC.Gheed, Repair: NPC.Charsi, Merc: NPC.Kashya, Key: NPC.Akara, CainID: NPC.Cain}, {Heal: NPC.Fara, Shop: NPC.Drognan, Gamble: NPC.Elzix, Repair: NPC.Fara, Merc: NPC.Greiz, Key: NPC.Lysander, CainID: NPC.Cain}, {Heal: NPC.Ormus, Shop: NPC.Ormus, Gamble: NPC.Alkor, Repair: NPC.Hratli, Merc: NPC.Asheara, Key: NPC.Hratli, CainID: NPC.Cain}, {Heal: NPC.Jamella, Shop: NPC.Jamella, Gamble: NPC.Jamella, Repair: NPC.Halbu, Merc: NPC.Tyrael, Key: NPC.Jamella, CainID: NPC.Cain}, {Heal: NPC.Malah, Shop: NPC.Malah, Gamble: NPC.Anya, Repair: NPC.Larzuk, Merc: NPC["Qual-Kehk"], Key: NPC.Malah, CainID: NPC.Cain} ],Code:// Go to a town healer heal: function () { if (!this.needHealing()) { return true; } if (!this.initNPC("Heal")) { return false; } return true; }, // Check if healing is needed, based on character config needHealing: function () { if (me.hp * 100 / me.hpmax <= Config.HealHP || me.mp * 100 / me.mpmax <= Config.HealMP) { return true; } // Status effects if (Config.HealStatus && (me.getState(2) || me.getState(9) || me.getState(61))) { return true; } return false; },
und in zeile 80 steht ja noch
das ist warscheinlich die reihenfolge in derCode:this.heal(); this.identify(); this.shopItems(); this.fillTome(518); if (Config.FieldID) { this.fillTome(519); } this.buyPotions(); this.clearInventory(); Item.autoEquip(); this.buyKeys(); this.repair(); this.gamble(); this.reviveMerc(); Cubing.doCubing(); Runewords.makeRunewords(); this.stash(true); this.clearScrolls();ausgeführt wird ?Code:Town.doChores();
wie baue ich das nun in meinem script mit ein ? z.b. beim follower script ???
Leider kann ich das gerade nicht testen aber ich dachte mir eventuell?
???Code:Town.Heal();
Ich würde ein "healcheck" script machen womit du anfängst, wird wohl das einfachste sein.