Ogłoszenie 

Uwaga! To forum jest w trybie offline.
Wszelką pomoc uzyskasz pod adresem
forum.ultimateam.pl


Administracja Forum


Poprzedni temat «» Następny temat
Przesunięty przez: Nhadala
Czw 08 Lip, 2010 11:17
Skrypt na skille na 100lv+
Autor Wiadomość
metin2ziolo 



Preferowany:
RPG Maker XP

Pomógł: 2 razy
Dołączył: 03 Cze 2010
Posty: 35
Wysłany: Pią 04 Cze, 2010 14:28
Skrypt na skille na 100lv+
Potrzebuje skryptu, żeby można było ustawić jakiś skill na wyższy poziom niż 99 bo na rpg makerze max 99 da się wpisać.
 
 
Malian 




Preferowany:
RPG Maker XP

Pomógł: 3 razy
Dołączył: 22 Gru 2009
Posty: 262
Skąd: Warszawa
Wysłany: Pią 04 Cze, 2010 15:37
Odsyłam do tego tematu: Przekroczenie limitu poziomów [XP]
________________________
 
 
 
 
metin2ziolo 



Preferowany:
RPG Maker XP

Pomógł: 2 razy
Dołączył: 03 Cze 2010
Posty: 35
Wysłany: Pią 04 Cze, 2010 17:16
No ale w tym skrypcie nie ma nic o ustawieniu na jaki lvl ma być skill tylko jaki ma być max lvl siła itp.
 
 
Malian 




Preferowany:
RPG Maker XP

Pomógł: 3 razy
Dołączył: 22 Gru 2009
Posty: 262
Skąd: Warszawa
Wysłany: Pią 04 Cze, 2010 17:28
To już napisz tam, zresztą nie powinieneś zakładać tego tematu, tylko od razu tam napisać.
________________________
 
 
 
 
Ayene 




Ranga RM:
4 gry

Pomogła: 232 razy
Dołączyła: 18 Wrz 2007
Posty: 2424
Wysłany: Pią 04 Cze, 2010 17:40
metin2ziolo, jest w skrypcie linijka:

Kod:
BASE_FINAL_LEVEL = 9999   # Maksymalny limit (domyślny dla wszystkich, jeśli chcesz go dostosować dla konkretnej postaci przejdź niżej)
________________________


 
 
 
metin2ziolo 



Preferowany:
RPG Maker XP

Pomógł: 2 razy
Dołączył: 03 Cze 2010
Posty: 35
Wysłany: Sob 05 Cze, 2010 11:41
Omg ja chce poprostu taki skrypt żeby można było ustawić skill np.Ognista Kula na 160Lv.
 
 
Ayene 




Ranga RM:
4 gry

Pomogła: 232 razy
Dołączyła: 18 Wrz 2007
Posty: 2424
Wysłany: Nie 06 Cze, 2010 14:23
metin2ziolo, przerobiłam skrypt:
Spoiler:

Kod:
# -------------------------------------------------------
# Przekroczenie limitu poziomów [XP]
# Autor: momomomo
# Tłumaczenie: Ayene
# Umieść skrypt nad Main
# -------------------------------------------------------
# KONFIGURACJA
  BASE_FINAL_LEVEL = 9999   # Maksymalny limit (domyślny dla wszystkich, jeśli
  # chcesz go dostosować dla konkretnej postaci przejdź niżej)
  MAXHP_LIMIT = 99999999    # Limit HP
  MAXSP_LIMIT = 99999999    # Limit SP
  STR_LIMIT   = 999999      # Limit STR (Siła)
  DEX_LIMIT   = 999999      # Limit DEX (Zręczność / Sprawność)
  AGI_LIMIT   = 999999      # Limit AGI (Szybkość / Zwinność)
  INT_LIMIT   = 999999      # Limit INT (Inteligencja)
 
  SKILLE_POWYŻEJ = {# id bohatera => [[lv, skill], [lv, skill], itd.]
  1 => [[110,5], [140,6]],
  2 => [[110,8], [155,10], [195,6]],
  3 => [[120,12]],
  4 => [[120,11], [145,12], [185,13], [205,14]],
  } 
 
# -------------------------------------------------------

class Game_Actor < Game_Battler
  alias ayene_setup setup
 
  def setup(actor_id)
    ayene_setup(actor_id)   
    if SKILLE_POWYŻEJ.include?(self.id)
      for i in 0..SKILLE_POWYŻEJ[self.id].size-1 
        if SKILLE_POWYŻEJ[self.id][i][0] == self.level
          learn_skill(SKILLE_POWYŻEJ[self.id][i][1])
        end     
      end   
    end
  end
 
  def new_final_level
    lv = BASE_FINAL_LEVEL
    # określenie limitu poziomu dla poszczególnych bohaterów
    # 1, 2 i 8 z poniższego przykładu to ID bohaterów
    # Przykład:
      # case self.id
      # when 1
      #  lv = 255
      # when 2
      #  lv = 999
      # when 8
      #  lv = 15600
      # end
    # Czyli dla bohatera z ID 1 maksymalny poziom to 255, dla bohatera 2 to 999,
    # zaś dla 8 - 15600
    return lv
  end
  def make_exp_list
    actor = $data_actors[@actor_id]
    @exp_list = Array.new(new_final_level + 2)
    @exp_list[1] = 0
    pow_i = 2.4 + actor.exp_inflation / 100.0
    for i in 2..new_final_level + 1
      if i > new_final_level
        @exp_list[i] = 0
      else
        n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
        @exp_list[i] = @exp_list[i-1] + Integer(n)
      end
    end
  end
  def maxhp
    n = [[base_maxhp + @maxhp_plus, 1].max, MAXHP_LIMIT].min
    for i in @states
      n *= $data_states[i].maxhp_rate / 100.0
    end
    n = [[Integer(n), 1].max, MAXHP_LIMIT].min
    return n
  end
  def base_maxhp
    n = $data_actors[@actor_id].parameters[0, 1]
    n += $data_actors[@actor_id].parameters[0, 2] * @level
    return n
  end
  def base_maxsp
    n = $data_actors[@actor_id].parameters[1, 1]
    n += $data_actors[@actor_id].parameters[1, 2] * @level
    return n
  end
  def base_str
    n = $data_actors[@actor_id].parameters[2, 1]
    n += $data_actors[@actor_id].parameters[2, 2] * @level
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.str_plus : 0
    n += armor1 != nil ? armor1.str_plus : 0
    n += armor2 != nil ? armor2.str_plus : 0
    n += armor3 != nil ? armor3.str_plus : 0
    n += armor4 != nil ? armor4.str_plus : 0
    return [[n, 1].max, STR_LIMIT].min
  end
  def base_dex
    n = $data_actors[@actor_id].parameters[3, 1]
    n += $data_actors[@actor_id].parameters[3, 2] * @level
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.dex_plus : 0
    n += armor1 != nil ? armor1.dex_plus : 0
    n += armor2 != nil ? armor2.dex_plus : 0
    n += armor3 != nil ? armor3.dex_plus : 0
    n += armor4 != nil ? armor4.dex_plus : 0
    return [[n, 1].max, DEX_LIMIT].min
  end
  def base_agi
    n = $data_actors[@actor_id].parameters[4, 1]
    n += $data_actors[@actor_id].parameters[4, 2] * @level
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.agi_plus : 0
    n += armor1 != nil ? armor1.agi_plus : 0
    n += armor2 != nil ? armor2.agi_plus : 0
    n += armor3 != nil ? armor3.agi_plus : 0
    n += armor4 != nil ? armor4.agi_plus : 0
    return [[n, 1].max, AGI_LIMIT].min
  end
  def base_int
    n = $data_actors[@actor_id].parameters[5, 1]
    n += $data_actors[@actor_id].parameters[5, 2] * @level
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.int_plus : 0
    n += armor1 != nil ? armor1.int_plus : 0
    n += armor2 != nil ? armor2.int_plus : 0
    n += armor3 != nil ? armor3.int_plus : 0
    n += armor4 != nil ? armor4.int_plus : 0
    return [[n, 1].max, INT_LIMIT].min
  end
  def exp=(exp)   
    @exp = [exp, 0].max   
    while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
      @level += 1     
      for j in $data_classes[@class_id].learnings
        if j.level == @level
          learn_skill(j.skill_id)
        end
      end
      if SKILLE_POWYŻEJ.include?(self.id)
        for i in 0..SKILLE_POWYŻEJ[self.id].size-1
          if SKILLE_POWYŻEJ[self.id][i][0] == self.level
            learn_skill(SKILLE_POWYŻEJ[self.id][i][1])
          end
        end
      end
    end   
    while @exp < @exp_list[@level]
      @level -= 1
    end   
    @hp = [@hp, self.maxhp].min
    @sp = [@sp, self.maxsp].min
  end
  def level=(level)
    level = [[level, new_final_level].min, 1].max
    self.exp = @exp_list[level]
  end
end
 
 
class Game_Battler
  def maxsp
    n = [[base_maxsp + @maxsp_plus, 0].max, MAXSP_LIMIT].min
    for i in @states
      n *= $data_states[i].maxsp_rate / 100.0
    end
    n = [[Integer(n), 0].max, MAXSP_LIMIT].min
    return n
  end
  def str
    n = [[base_str + @str_plus, 1].max, STR_LIMIT].min
    for i in @states
      n *= $data_states[i].str_rate / 100.0
    end
    n = [[Integer(n), 1].max, STR_LIMIT].min
    return n
  end
  def dex
    n = [[base_dex + @dex_plus, 1].max, DEX_LIMIT].min
    for i in @states
      n *= $data_states[i].dex_rate / 100.0
    end
    n = [[Integer(n), 1].max, DEX_LIMIT].min
    return n
  end
  def agi
    n = [[base_agi + @agi_plus, 1].max, AGI_LIMIT].min
    for i in @states
      n *= $data_states[i].agi_rate / 100.0
    end
    n = [[Integer(n), 1].max, AGI_LIMIT].min
    return n
  end
  def int
    n = [[base_int + @int_plus, 1].max, INT_LIMIT].min
    for i in @states
      n *= $data_states[i].int_rate / 100.0
    end
    n = [[Integer(n), 1].max, INT_LIMIT].min
    return n
  end
  def maxhp=(maxhp)
    @maxhp_plus += maxhp - self.maxhp
    @maxhp_plus = [[@maxhp_plus, -MAXHP_LIMIT].max, MAXHP_LIMIT].min
    @hp = [@hp, self.maxhp].min
  end
  def maxsp=(maxsp)
    @maxsp_plus += maxsp - self.maxsp
    @maxsp_plus = [[@maxsp_plus, -MAXSP_LIMIT].max, MAXSP_LIMIT].min
    @sp = [@sp, self.maxsp].min
  end
  def str=(str)
    @str_plus += str - self.str
    @str_plus = [[@str_plus, -STR_LIMIT].max, STR_LIMIT].min
  end
  def dex=(dex)
    @dex_plus += dex - self.dex
    @dex_plus = [[@dex_plus, -DEX_LIMIT].max, DEX_LIMIT].min
  end
  def agi=(agi)
    @agi_plus += agi - self.agi
    @agi_plus = [[@agi_plus, -AGI_LIMIT].max, AGI_LIMIT].min
  end
  def int=(int)
    @int_plus += int - self.int
    @int_plus = [[@int_plus, -INT_LIMIT].max, INT_LIMIT].min
  end
end


Konfiguracja:
Kod:
  SKILLE_POWYŻEJ = {# id bohatera => [[lv, skill], [lv, skill], itd.]
  1 => [[110,5], [140,6]],
  2 => [[110,8], [155,10], [195,6]],
  3 => [[120,12]],
  4 => [[120,11], [145,12], [185,13], [205,14]],
  }

Jeśli konfiguracja nie jest zrozumiała, to wytłumaczę. Możliwe, że mogła być łatwiejsza, ale nie miałam za bardzo czasu na analizę ;-)
________________________


 
 
 
metin2ziolo 



Preferowany:
RPG Maker XP

Pomógł: 2 razy
Dołączył: 03 Cze 2010
Posty: 35
Wysłany: Nie 06 Cze, 2010 15:14
Jupi! Wielkie Dzięki ;-) właśnie o to mi chodziło :-PP
 
 
Wyświetl posty z ostatnich:   
Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Nie możesz załączać plików na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Powered by phpBB modified by Przemo © 2003 phpBB Group | Template Klam by Ayene