Postado Março 25, 2011 14 anos Olá. Preciso de modificações simples em 2 scripts que tenho: 1º: Diz: training pls no kill. Mas esse script roda apenas 1 vez, gostaria de que funcionasse até que eu o parasse manualmente pelo NG. Const Text = 'training please no kill' function PlayerOnScreen : boolean; begin Result := False; if Creatures.Count > 1 then begin for x := 0 to Creatures.Count - 1 do begin Skip := False; if Terminated then Break; if Creatures.Creature[x].Name = Self.Name then Continue; if Creatures.Creature[x].NPC then Continue; if Creatures.Creature[x].Visible then begin if Skip then Continue; Result := True; end; end; end; end; while not terminated do begin UpdateWorld; if PlayerOnScreen then begin Self.Say(Text); break; end; sleep(500); end; 2º: O script abaixo está quase perfeito, mas gostaria de que ele ao trocar para a arma forte aos 200 de HP, ele também colocasse no modo Offensive Fight, e ao retornar a arma fraca aos 300 de HP, ele voltasse para o modo Defensive Fight. Const Strong=7385;//the strong weapon ID that we will be using if we get to StrongHP health. Weak=3291;//weapon ID of the weak one. StrongHP=200; //thats the low hp to switch to stronger weapon. WeakHP=300;//high hp for using the weaker weapon. function GetItemFromOpenBackpack(ID: integer): TItem; var x: integer; y: integer; begin Result := nil; for x := 0 to Self.Containers.Count - 1 do begin if x >= Self.Containers.Count then Break; for y := 0 to Self.Containers.Container[x].Count - 1 do begin if y >= Self.Containers.Container[x].Count then Break; if Self.Containers.Container[x].Item[y].ID = ID then begin Result := Self.Containers.Container[x].Item[y]; Exit; end; end; end; end; Procedure PutWeaponInHand(ID:Integer); var Weapon:TItem; begin Weapon:=GetItemFromOpenBackpack(ID); if Weapon <> nil then begin Weapon.MoveToBody(self.LeftHand, 0); sleep(1000); end; end; begin while not terminated do begin updateworld; if Self.Health>=WeakHP then if Self.LeftHand.ID<>Weak then PutWeaponInHand(Weak); if Self.Health<=StrongHP then if Self.LeftHand.ID<>Strong then PutWeaponInHand(Strong); Sleep(1000); end; end; Obrigado.
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.