Metin2 Hungarian Forum

Metin2 => Segítség => Szerver készítés => Privát szerverek => Archívum => A témát indította: Rodriguez Dátum 2013-11-17, 14:46:14

Cím: Pet bónusz(k)
Írta: Rodriguez Dátum 2013-11-17, 14:46:14
Sziasztok!
Van egy questem, ami meg adja az adott petnek a bónuszt.. erről lenne szó:
Idézquest pet1 begin
   state start begin
      when 53001.use begin
         if pet.is_summon() then
          affect.add_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
          affect.add_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
          affect.add_collect(apply.ATT_MAX_HP, 150, 60*60*8)
        pet.unsummon()
          affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
          affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
          affect.remove_collect(apply.ATT_MAX_HP, 150, 60*60*8)
      when logout begin
      if pet.is_summon() then
      pet.unsummon()
      affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
        affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
        affect.remove_collect(apply.ATT_MAX_HP, 150, 60*60*8)
     else   
        local your_horse_name = horse.get_name()         
        local your_horse_level = horse.get_level()
        pc.setqf("horse_level_save", your_horse_level)
        pc.setqf("horse_name_save", your_horse_name)
        horse.set_name(pc.get_name().." Tűz Főnixe")       
        horse.set_level("25")
            pet.summon()
            local horse_settings = pc.getqf("horse_level_save")
            local horse_sett = pc.getqf("horse_name_save")
            horse.set_level(horse_settings)
            horse.set_name(horse_sett)               
               end
            end
         end
      end
   end
end
Nos még is syntax errort ír.. de konkrét kép itt van:
(https://board.ddmt2.net/proxy.php?request=http%3A%2F%2Fkepfeltoltes.hu%2Fthumb%2F131117%2FIMG_17112013_143132_www.kepfeltoltes.hu_.png&hash=d9d29e8b8fde168cb0921d33e9e87c1b9a53148d) (http://kepfeltoltes.hu/view/131117/IMG_17112013_143132_www.kepfeltoltes.hu_.png)
A képet a Képfeltöltés.hu tárolja. http://www.kepfeltoltes.hu (http://www.kepfeltoltes.hu)

Kérlek segítsetek mi lehet a hiba.. Előre is köszi!
Cím: Re:Pet bónusz
Írta: BakeRolls Dátum 2013-11-17, 15:41:06
Szia!

Ezt nézd át!

Ha valamit félre értettem bocsi.

http://metin2hungary.net/index.php/topic,174587.msg922284.html#msg922284 (http://metin2hungary.net/index.php/topic,174587.msg922284.html#msg922284)
Cím: Re:Pet bónusz
Írta: Rodriguez Dátum 2013-11-17, 16:28:59
Szia!
Köszi, de nem ez a hiba, hanem a pet nem adja meg a bónuszt :/
Várom a további segítségeket!
Cím: Re:Pet bónusz
Írta: DrG Dátum 2013-11-18, 22:28:17
Tessék :)
Javítottam a hibákat, illetve szépen taboltam, hogy átláthatóbb legyen.


quest pet1 begin
state start begin
when 53001.use begin
if pet.is_summon() then
affect.add_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.ATT_MAX_HP, 150, 60*60*8)
pet.unsummon()
affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.ATT_MAX_HP, 150, 60*60*8)
end
end
when logout begin
if pet.is_summon() then
pet.unsummon()
affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.ATT_MAX_HP, 150, 60*60*8)
else   
local your_horse_name = horse.get_name()         
local your_horse_level = horse.get_level()
pc.setqf("horse_level_save", your_horse_level)
pc.setqf("horse_name_save", your_horse_name)
horse.set_name(pc.get_name().." Tűz Főnixe")       
horse.set_level("25")
pet.summon()
local horse_settings = pc.getqf("horse_level_save")
local horse_sett = pc.getqf("horse_name_save")
horse.set_level(horse_settings)
horse.set_name(horse_sett)               
end
end
end
end
Cím: Re:Pet bónusz
Írta: Rodriguez Dátum 2013-11-18, 22:53:20
Köszönöm szépen!
A quest le fut,de viszont a bónuszt sajnos nem adja meg :/
Cím: Re:Pet bónusz
Írta: DrG Dátum 2013-11-18, 23:48:09
Megtaláltam a hibát.:)
Ahogy hívta a petet megadta a bónuszt, de mivel egyből elküldte ezért el is vette..:S
Tessék a javított verzió:

quest pet1 begin
state start begin
when 53001.use begin
if pet.is_summon() then
pet.unsummon()
affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.ATT_MAX_HP, 150, 60*60*8)
else
pet.summon()
affect.add_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.add_collect(apply.ATT_MAX_HP, 150, 60*60*8)
end
end
when logout begin
if pet.is_summon() then
pet.unsummon()
affect.remove_collect(apply.ATT_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.DEF_GRADE_BONUS, 100, 60*60*8)
affect.remove_collect(apply.ATT_MAX_HP, 150, 60*60*8)             
end
end
end
end
Cím: Re:Pet bónusz
Írta: Rodriguez Dátum 2013-11-19, 20:14:18
Köszönöm szépen!
Meg adja meg minden!
Azt meg tudnád nekem mondani h miért mpt ad ha HP van ott?
Ha MP-t írok oda akkor HPt fog adni? mert így alapból MP-t ad >.<
EhPortal 1.39 © 2025, WebDev