Tudo que Tricoder postou
-
[SCRIPT] UE com X Criaturas
Const MinMonsters = 5 //Quantidade de Bixo na tela UeSpell = exevo gran mas frigo // qual ue vai usar Delay = 2000 // Exausted por runa (1000 = 1 segundo) ShootOnSelf = 1 // nao muda while not terminated do begin A := 0; UpdateWorld; for i := 0 to creatures.count - 1 do begin if (i >= Creatures.Count) or (Terminated) then break; if Creatures.Creature.Z = self.Z then if Creatures.Creature.NPC then A := A + 1; end; if A >= MinMonsters then begin if ShootOnSelf then Self.Say(UeSpell) else Self.Say(UeSpell) sleep(Delay); end; sleep(500); end; Créditos: ngmax
-
[SCRIPT] Ficar mudando Outfit
var head, primary, secondary, detail: integer; begin while not Terminated do begin UpdateWorld; head := Random(0,110); primary := Random(0,110); secondary := Random(0,110); detail := Random(0,110); Self.ChangeOutfit(Self.Outfit, head, primary, secondary, detail, 0); Sleep(100); end; end; Créditos: ngmax
-
[SCRIPT] Comer Food em X segundos
Const FoodID = '3725' //id da food Sec = '10' // qto tempo pra come Begin While Not Terminated Do Begin Sleep(Sec * 1000) Self.Containers.UseItemWithSelf(FoodID); End End Créditos: ngmax
-
[Help] Erro na hora de criar o character
Bom, isso significa que não tem o sample de determinado vocação na sua database. Você precisa criar o sample de cada vocação.
- O seu novo Tibia King!
-
[SCRIPT] Anti-Paralyze
const minMana = 20; // AQUI COLOQUE A QUANTIA DA MANA QUE PRECISA PARA USAR A MAGIA while not Terminated do begin UpdateWorld; if Self.Mana > minMana then begin if Self.Slowed then Self.Say('exura'); Sleep(300); end; end; Créditos: ngmax
-
[SCRIPT] Alerta de determinado monstro na tela
Const MonsterName = 'dragon' // AQUI COLOQUE O NOME DO MONSTRO while not terminated do begin updateworld; for i:= 0 to creatures.count -1 do begin if Creatures.Creature.Name = MonsterName then playsound('C:\Windows\Media\Notify.wav'); sleep(100); end; sleep(100); end; Créditos: ngmax
-
[SCRIPT] Auto Utamo Vita
while not terminated do begin UpdateWorld; if not Self.MagicShield then begin Self.Say('Utamo Vita')* Sleep(2000)* end; sleep(100)* end; Créditos: ngmax
-
Bugs/Erros no TK? Poste aqui!
Está ocorrendo o seguinte problema ao acessar o fórum: Aguardo respostas, Obrigada.
- O seu novo Tibia King!
-
[SCRIPT] Utamo Vita com tal Criatura na Tela
Const MonsterName = 'Demon' //Personagem Ou Criatura while not terminated do begin updateworld; for i := 0 to creatures.count - 1 do begin if creatures.creature.name = MonsterName then if Creatures.Creature.npc = true then if Creatures.Creature.Z = Self.Z then begin Self.say('utamo vita'); sleep(1000); end; end; end; Créditos: ngmax
-
[SCRIPT] Mana Potion
Const minMana = 200; //Mana pra usar PotID = 268; //ID da potion. while not Terminated do begin UpdateWorld; if (Self.Mana < minMana) then begin Self.Containers.UseItemWithSelf(PotID) Sleep(1000); end; Sleep(100); end; Créditos: ngmax
-
[SCRIPT] Health Potion e Exura
Const minMana = 20; //Minimo de Mana para o exura minHealth = 600; //Vida para tomar potion maxHealth = 1000; //Vida pra usar exura. potionid = 266; //ID do potion spellnome = 'exura' //Nome da magia while not Terminated do begin UpdateWorld; if (Self.Health < minHealth) then begin Self.Containers.UseItemWithSelf(potionid); Sleep(1000); end; else begin if (Self.Health < maxHealth) and (Self.Mana > minMana ) then begin Self.Say(spellnome); Sleep(1500); end; end; Sleep(100); end; Créditos: ngmax
-
[SCRIPT] Atacar criaturas que o NG não ataca
Const Monster = 'Chicken' //pode ser alterado para o bixo que vc quizer function GetCreatureByName(Name: string): TCreature; var x: integer; begin Result := nil; for x := 0 to Creatures.Count - 1 do begin if x >= Creatures.Count then Break; if Creatures.Creature[x].Z <> Self.Z then Continue; if Creatures.Creature[x].Name = Name then begin Result := Creatures.Creature[x]; Exit; end; end; end; while not Terminated do begin UpdateWorld; if not Self.Attacking then begin Creature := GetCreatureByName(Monster); if Creature <> nil then Creature.Attacking := True; end; Sleep(1000); end; Créditos: ngmax
-
[SCRIPT] Antipush (Com Varios IDS)
Const WaitTime = 1 //Tempo que vai esperar para jogar cada item 1 é 1 segundo ItemDrop = 3031 //Id do item que vai jogar ItemDrop2 = 283 //Id do item que vai jogar ItemDrop3 = 284 //Id do item que vai jogar ItemDrop4 = 285 //Id do item que vai jogar 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; Var Flask : TItem; while not terminated do begin updateworld; Flask := GetItemFromOpenBackpack(ItemDrop); if Flask <> nil then Flask.MoveToGround(Self.x, Self.y, Self.z, 1); Flask2 := GetItemFromOpenBackpack(ItemDrop2); if Flask2 <> nil then Flask2.MoveToGround(Self.x, Self.y, Self.z, 1); Flask3 := GetItemFromOpenBackpack(ItemDrop3); if Flask3 <> nil then Flask3.MoveToGround(Self.x, Self.y, Self.z, 1); Flask4 := GetItemFromOpenBackpack(ItemDrop4); if Flask4 <> nil then Flask4.MoveToGround(Self.x, Self.y, Self.z, 1); sleep(WaitTime * 1000); end; Créditos: ngmax
-
[SCRIPT] Anti Trap (Poe os itens que o trapou na BP)
const Items = [2777, 2794, 2808, 6372, 2793, 2806, 2792, 2801, 2811] BP = 1 Procedure PickUpLoot(Loot: TItem); begin if Self.Containers.Container[BP-1].Item[Self.Containers.Container[BP-1].Capacity-1] <> nil then if Self.Containers.Container[BP-1].Item[Self.Containers.Container[BP-1].Capacity-1].Properties.Container then Self.Containers.Container[BP-1].Item[Self.Containers.Container[BP-1].Capacity-1].Open; else Self.DisplayText('Your Loot backpacks is full.'); if Self.Containers.Container[BP-1].Count <> 0 then begin if Self.Containers.Container[BP-1].Item[0].Properties.Container then Loot.MoveToContainer(Self.Containers.Container[BP-1], Self.Containers.Container[BP-1].Capacity-1, 0); else Loot.MoveToContainer(Self.Containers.Container[BP-1], 0, 0); end else Loot.MoveToContainer(Self.Containers.Container[BP-1], 0, 0); end; Procedure FindLoot; var x, y, z, i, f: integer; Tile: TTile; begin for x := -1 to 1 do begin for y := -1 to 1 do begin Tile := Screen.Tile[x + 7, y + 5]; begin for i := 0 to Tile.Count-1 do begin if i >= Tile.Count then Break; for j := Low(Items) to High(Items) do if Tile.Item[Tile.Count-1-i].ID = Items[j] then begin if i = 0 then PickUpLoot(Tile.Item[Tile.Count-1-i]); else if not Tile.Item[Tile.Count-i].Properties.Movable then PickUpLoot(Tile.Item[Tile.Count-i-1]); else Tile.Item[Tile.Count-i].MoveToGround(Self.X+Random(-1,2), Self.Y+Random(-1,2), Self.Z, 0); end; end; end; end; end; end; while not terminated do begin UpdateWorld; if Self.Containers.Count >= BP then FindLoot; Sleep(500); end; Créditos: ngmax
-
[SCRIPT] Andar no W, A, S, D
Const DiagnoalWalking = 1 // 1- Ativar diagonal e 0- desativar. procedure Event_KeyDown(Key:integer); begin Updateworld; case Key of 87:Self.MoveUp; //W 65:Self.MoveLeft; //A 83:self.MoveDown; //S 68:Self.MoveRight; //D end; if DiagnoalWalking then Case Key of 81:Self.MoveUpLeft; //Q 69:Self.MoveUpRight; //E 90:Self.MoveDownLeft; //Z 67:Self.MoveDownRight; //C end; end; while not terminated do begin ProcessEvents; Sleep(100); end; Créditos: ngmax
-
[SCRIPT] Alerta acabar Food
Const FoodID = 3725 // ID da food MusicPath = 'C:\Windows\Media\Notify.wav' // This is the main alert of windows. while not terminated do begin UpdateWorld; a:=0; For x:= 0 to Self.Containers.Count - 1 do begin for y := 0 to Self.Containers.Container[x].Count - 1 do begin if Self.Containers.Container[x].Item[y].ID = FoodID then a := 1; Sleep(100); end; sleep(100); end; sleep(100); if a = 0 then PlaySound(MusicPath); end; Créditos: ngmax
-
[SCRIPT] Alerta com X de Cap
Const Cap = 20 while not terminated do begin UpdateWorld; if self.capacity < Cap then PlaySound('C:\Windows\Media\notify.wav'); Sleep(100); end; Créditos: ngmax
-
[SCRIPT] Alerta com X Spears
Const WeaponId = 3277; // ID da spear WeaponOz = 20; // peso de cada spear AlertAmount = 5; // quantidade para usar o alerta TimeWait = 1; // em segundos SoundNoWeapon = 'C:\Windows\Media\Notify.wav'; AlertSound = 'C:\Windows\Media\Notify.wav'; procedure Notify(Sound : String); begin if (Pos('.wav', AlertSound) <> 0) then PlaySound(AlertSound); if (Pos('.wav', Sound) <> 0) then PlaySound(Sound); end; procedure CheckForWeapon; var QtyMove : integer; var QtyItems : integer; var HasWeapons : boolean; begin QtyMove := 0; HasWeapons := true; if Self.LeftHand.Amount <= AlertAmount then begin sleep(TimeWait * 1000); if Self.LeftHand.Amount <= AlertAmount then begin HasWeapons := false; for x := 0 to Self.Containers.Count - 1 do begin if HasWeapons then Break; if Self.Containers.Container[x].Count - 1 then begin for y := 0 to Self.Containers.Container[x].Count - 1 do begin if Self.Containers.Container[x].Item[y].ID = WeaponId then begin QtyItems := Abs(Self.Capacity / WeaponOz); if QtyItems >= 1 then begin if Self.Containers.Container[x].Item[y].Amount >= QtyItems then QtyMove := QtyItems; else QtyMove := Self.Containers.Container[x].Item[y].Amount; QtyMove := QtyMove - 1; if QtyMove then begin Self.Containers.Container[x].Item[y].MoveToBody(Self.LeftHand, QtyMove); HasWeapons := true; Break; end; end; end; end; end; end; end; end; if not HasWeapons then Notify(SoundNoWeapon); end; begin while not Terminated do begin UpdateWorld; CheckForWeapon; sleep(1000); end; end; Créditos: ngmax
-
[SCRIPT] Alerta poucos Potions (deixe a BP com os potions aberta)
Const PotID = 268 // Id do POT Count = 25 // quantidade MusicPath = 'C:\Windows\Media\Notify.wav' // O Local do arquivo de som do Alerta while not terminated do begin UpdateWorld; a:=0; For x:= 0 to Self.Containers.Count - 1 do begin for y := 0 to Self.Containers.Container[x].Count - 1 do begin if (Self.Containers.Container[x].Item[y].ID = PotID) and (Self.Containers.Container[x].Item[y].amount > Count) then a := 1; Sleep(10); end; sleep(10); end; sleep(10); if a = 0 then PlaySound(MusicPath); end; Créditos: ngmax
-
[SCRIPT] Change Gold (Gold pra Platinum)
procedure StackItems; var T: array of integer; x, y, z: integer; Temp: integer; begin UpdateWorld; T := VarArrayCreate([0, 19] , 3); Temp := -1; for x := 0 to Self.Containers.Count - 1 do begin if x >= Self.Containers.Count then Break; for z := 0 to Self.Containers.Container[x].Count - 1 do begin T[z] := Self.Containers.Container[x].Item[z].ID; end; 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].Properties.Pilable then begin if Self.Containers.Container[x].Item[y].Amount < 100 then begin for z := y + 1 to Self.Containers.Container[x].Count - 1 do begin if T[z] = Self.Containers.Container[x].Item[y].ID then begin if Self.Containers.Container[x].Item[z].Amount < 100 then begin Self.Containers.Container[x].Item[y].movetocontainer(Self.Containers.Container[x], z, 0); end; end; end; end; end; end; end; end; while not Terminated do begin UpdateWorld; StackItems; for x := 0 to Self.Containers.Count - 1 do begin for y := 0 to Self.Containers.Container[x].Count - 1 do begin if Self.Containers.Container[x].Item[y].ID = 3031 then // ID do GOLD begin if Self.Containers.Container[x].Item[y].Amount = 100 then begin Self.Containers.Container[x].Item[y].Use; Break; end; end; end; end; Sleep(1000); end; Créditos: ngmax
-
[SCRIPT] Change Gold (Platinum pra Crystal)
procedure StackItems; var T: array of integer; x, y, z: integer; Temp: integer; begin UpdateWorld; T := VarArrayCreate([0, 19] , 3); Temp := -1; for x := 0 to Self.Containers.Count - 1 do begin if x >= Self.Containers.Count then Break; for z := 0 to Self.Containers.Container[x].Count - 1 do begin T[z] := Self.Containers.Container[x].Item[z].ID; end; 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].Properties.Pilable then begin if Self.Containers.Container[x].Item[y].Amount < 100 then begin for z := y + 1 to Self.Containers.Container[x].Count - 1 do begin if T[z] = Self.Containers.Container[x].Item[y].ID then begin if Self.Containers.Container[x].Item[z].Amount < 100 then begin Self.Containers.Container[x].Item[y].movetocontainer(Self.Containers.Container[x], z, 0); end; end; end; end; end; end; end; end; while not Terminated do begin UpdateWorld; StackItems; for x := 0 to Self.Containers.Count - 1 do begin for y := 0 to Self.Containers.Container[x].Count - 1 do begin if Self.Containers.Container[x].Item[y].ID = 3035 then // ID do GOLD begin if Self.Containers.Container[x].Item[y].Amount = 100 then begin Self.Containers.Container[x].Item[y].Use; Break; end; end; end; end; Sleep(1000); end; Créditos: ngmax
-
[SCRIPT] Controlar um char por outro Char (Magebomb)
//////////////////COMANDOS ///move up, down, left, right ///say text ///turn up, down, left, right ///follow name ///attack name ///sd name //////////////////FIM DOS COMANDOS const MasterList = ['Kilecore', 'Hoobastank'] //Nome dos chars que vão dar os comandos, ponha entre as '.' function GetCreatureByName(Name: string): TCreature; begin Result := nil; for x := 0 to Creatures.Count - 1 do begin if x >= Creatures.Count then Break; if AnsiLowerCase(Creatures.Creature[x].Name) = AnsiLowerCase(Name) then begin Result := Creatures.Creature[x]; Exit; end; end; end; function CommandSay(Text: String); begin Self.Say(Text); end; function CommandAttack(Name: String); var Creature: TCreature; begin Creature := GetCreatureByName(Name); if Creature <> nil then Creature.Attacking := True; end; function CommandFollow(Name: String); var Creature: TCreature; begin Creature := GetCreatureByName(Name); if Creature <> nil then Creature.Following := True; end; function CommandSD(Name: String); var Creature: TCreature; begin Creature := GetCreatureByName(Name); if Creature <> nil then Self.Containers.UseItemWithCreature(3155, Creature); end; function CommandTurn(Dir: String); begin Dir := AnsiLowerCase(Dir); case Dir of 'up': Self.FaceUp; 'right': Self.FaceRight; 'down': Self.FaceDown; 'left': Self.FaceLeft; end; end; function CommandMove(Dir: String); begin Dir := AnsiLowerCase(Dir); case Dir of 'up': Self.MoveUp; 'right': Self.MoveRight; 'down': Self.MoveDown; 'left': Self.MoveLeft; end; end; function ExecuteCommand(Command, Parameter: String); begin case Command of 'say': CommandSay(Parameter); 'attack': CommandAttack(Parameter); 'follow': CommandFollow(Parameter); 'sd': CommandSD(Parameter); 'turn': CommandTurn(Parameter); 'move': CommandMove(Parameter); end; end; function GetCommand(Text: String); var Command: String; Parameter: String; StrPos: Integer; begin StrPos := Pos(' ', Text); Command := AnsiLowerCase(Copy(Text, 1, StrPos - 1)); Parameter := Copy(Text, Length(Command) + 2, Length(Text) - (Length(Command) + 1)); ExecuteCommand(Command, Parameter); end; procedure Event_Message(Channel: integer; Name, Text: String); begin for x := Low(MasterList) to High(MasterList) do begin if AnsiLowerCase(MasterList[x]) = AnsiLowerCase(Name) then GetCommand(Text); end; end; while not Terminated do begin UpdateWorld; ProcessEvents; Sleep(100); end; Créditos: ngmax
-
[TFS 1.2] The Silencer Plateau - Lure Silencers
Video de Demonstração ________________________________________________ Baseado neste evento: http://www.tibiawiki.com.br/wiki/Silencer_Plateau ________________________________________________ data/actions/script/ResonanceChamber.lua --Config local config = { item = 22535, storage = 34380, position = { Position(33637, 32516, 5), -- Top Left Position(33664, 32537, 5), -- botton Right Position(33650, 32527, 5) -- Center }, raid = { [1] = {"silencer", math.random(8,15) }, [2] = {"silencer", math.random(11,18) }, [3] = {"silencer", math.random(8,15) }, [4] = {"Sight of Surrender", math.random(3,8) } }, globalEventTime = 30 * 60 * 1000, -- [30min] waiting time to get started again timeBetweenraid = 1 * 60 * 1000, -- [1min] Waiting time between each raid cleanraid = true -- Clean zone after globalEventTime } local function isWalkable(position) local tile = Tile(position) if not tile then return false end local ground = tile:getGround() if not ground or ground:hasProperty(CONST_PROP_BLOCKSOLID) then return false end local items = tile:getItems() for i = 1, tile:getItemCount() do local item = items[i] local itemType = item:getType() if itemType:getType() ~= ITEM_TYPE_MAGICFIELD and not itemType:isMovable() and item:hasProperty(CONST_PROP_BLOCKSOLID) then return false end end return true end local function raids(monster) local randX,randY,randZ = 0,0,0 randX = math.random(config.position[1].x, config.position[2].x) randY = math.random(config.position[1].y, config.position[2].y) randZ = math.random(config.position[1].z, config.position[2].z) if isWalkable(Position(randX, randY, randZ)) then Game.createMonster(monster, Position(randX, randY, randZ)) else raids(monster) end end local function cleanRaid() local mostersraid= Game.getSpectators(config.position[3], false, false, 13, 13, 11, 11) for i = 1, #mostersraid do if mostersraid[i]:isMonster() then mostersraid[i]:remove() end end end function onUse(cid, item, fromPosition, itemEx, toPosition) local player = Player(cid) local max,time,monster = 0,0,"" if item.itemid ~= config.item then return true end local spectators,hasPlayer,hasMonsters = Game.getSpectators(config.position[3], false, false, 13, 13, 11, 11),false,false for i = 1, #spectators do if spectators[i]:isPlayer() then if spectators[i]:getName() == player:getName() then hasPlayer = true end elseif spectators[i]:isMonster() then hasMonsters = true end end if not hasPlayer then player:sendCancelMessage('Use on Silencer Plateau is located in the south-eastern part of Roshamuul') return true end if hasMonsters then player:sendCancelMessage('You need kill all monsters') return true end if Game.getStorageValue(config.storage) <= 0 then if math.random(0,10000) < 7000 then player:say("PRRRR...*crackle*", TALKTYPE_MONSTER_SAY) item:remove(1) return true else player:say("PRRRROOOOOAAAAAHHHH!!!", TALKTYPE_MONSTER_SAY) end local raid = config.raid for y, x in pairs(raid) do local i = 1 while i <= #x do print(x[i]) print(x[i+1]) time = time + config.timeBetweenraid for j = 1, x[i+1] do Game.setStorageValue(config.storage,x[i+1]) addEvent(raids,time,x[i]) end i = i + 2 end end addEvent(Game.setStorageValue, config.globalEventTime, config.storage, 0) if config.cleanraid then addEvent(cleanRaid, config.globalEventTime) end item:remove(1) else player:sendCancelMessage('You need to wait') end end data/actions/actions.xml <action itemid="22535" script=ResonanceChamber.lua"/> ________________________________________________ Créditos: Omin