Czar prowokacji
Aktualny czas: 06-09-26, 02:27 Witaj! Przejdź do zakładki Logowanie lub Rejestracja

To była dobra przygoda. Dziękujemy!
Po wielu wspólnych latach Ultima Forum przechodzi w tryb archiwalny.
Zostawiamy je tutaj takim, jakie stworzyliśmy je razem,
z tysiącami postów, projektów, porad, skryptów i wspomnień.
Dziękujemy każdemu, kto był częścią Ultimy.


Wątek zamknięty 
[XP] Czar prowokacji
Yoroiookami Offline
*


Liczba postów: 985
Dołączył: 01-05-13

Pomógł: 137



Post: #4
RE: Czar prowokacji

http://forum.chaos-project.com/index.php?topic=11614.0
Proszę, tutaj zrobili coś takiego. smiles

Sam skrypt
#===============================================================================​
# Taunt States
# Version 1.0
# Author game_guy
#-------------------------------------------------------------------------------
# Intro:
# When Taunting an enemy, the taunter has a higher chance of being attacked
# by all enemies. This script, rather than using skills, it uses states to
# control the taunt levels.
#
# Features:
# Customizable Taunt States
# Can Even Be Used to Avoid Attacks
#
# Instructions:
# Hop down to the CONFIGURE STATES area and you'll add your state and taunt
# configurations there. Taunt can be reversed to also Avoid attacks. To do
# this, simply set the taunt level to a negative number. The number you assign
# to the state, is the number of times it'll add/remove the member to the
# roullette when being attacked by enemies.
#
# Now to have an actor "taunt" the enemies, all you need to do is give him a
# taunt state, which can easily be done through skills or items.
#
# Credits:
# game_guy ~ Creation of this fine script.
# GrimTrigger ~ For requesting it.
#===============================================================================​
module TauntStates
  STATES = {
  #=========================
  # CONFIGURE STATES
  # -Add new lines.
  # state_id => taunt_level,
  #=========================
    17 => 1,
    18 => 2,
    19 => 4,
    20 => -4,
  }
end

class Game_Actor < Game_Battler
  def calculate_taunt
    taunt = 0
    TauntStates::STATES.each {|key, value|
      taunt += value if @states.include(key)}
    return taunt
  end
end

class Game_Party
  def random_target_actor(hp0 = false)
    roulette = []
    for actor in @actors
      if (not hp0 and actor.exist?) or (hp0 and actor.hp0?)
        position = $data_classes[actor.class_id].position
        n = [4 - position + actor.calculate_taunt, 1].max
        n.times do
          roulette.push(actor)
        end
      end
    end
    if roulette.size == 0
      return nil
    end
    return roulette[rand(roulette.size)]
  end
end

[Obrazek: mt4dzY7.png]
[Obrazek: k5KQGOe.png]
14-10-16 20:07
Znajdź wszystkie posty użytkownika
"Pomógł" przyznał(a): Dakla
Wątek zamknięty 


Wiadomości w tym wątku
Czar prowokacji - Dakla - 09-10-16, 22:51
RE: Czar prowokacji - Mateusz SSJ8 - 14-10-16, 17:24
RE: Czar prowokacji - AlmostNoRuby - 14-10-16, 19:59
RE: Czar prowokacji - Yoroiookami - 14-10-16 20:07
RE: Czar prowokacji - AlmostNoRuby - 15-10-16, 10:01
RE: Czar prowokacji - Dakla - 15-10-16, 21:36
RE: Czar prowokacji - AlmostNoRuby - 15-10-16, 22:23

Skocz do:


Użytkownicy przeglądający ten wątek: 1 gości

Kontakt | Ultima Forum | Wróć do góry | Wróć do forów | Wersja bez grafiki | RSS
Powered By MyBB. © 2013 MyBB Group. All Rights Reserved.
Skórka by Ayene.