collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: Hp/Mp De/Regeneration  (Gelesen 845 mal)

Offline Moonchaos

  • Ralph
  • *
  • Beiträge: 5
Hp/Mp De/Regeneration
« am: Mai 16, 2011, 23:05:30 »
Hi Community, ich hab mal das script hier geschrieben weils davon nur wenige einfache gibt.
Bin nur zu faul das jetzt nochma extra in deutsch zu schreiben  :tongue:

Script description:

If you call the script "drainGroupMP" or "restoreGroupHP" inside a event the script activates.
You can use it for battle is you want to gain a ammount of Hp/Mp regenerated or degenerated, but you need
to add the condition for the script to activate. (like if you defend or attack with a special weapon/skill)
But this you need to add to the script yourself.

My script is more used for map de/regeneration and special about it for only some of your partymember if you want.

Example: (just like the script is unchanged now)
All partymembers will regenerate 3% hp and + 1 hp (minimum) everytime the script is active
but only partymember 2-4 will lose - 1 mp everytime the script is active

Of course you can change that if you need, the ammounts of hp/mp and the actors wich will be targeted.
The script will deactivate if the charakter is in incap/dead state. (If state id is 1, otherwise change script)

Set it up to the map with a step count:

Thats probably the most wanted function for the script.
# I use the german patched game maker vx so dont worry about the commands, you can change all the variable names.

This time it is every 10 steps activated

Screenshots:

 

Thats it already, change it just like you need it.

Installation:

Just copy the script and add it under "Material" in the Scripteditor (F11)
# the script only activate after you call it on page 3 RGSS "Script"

Script:
#-------------------------------------------------
#Mp degeneration
#-------------------------------------------------
def drainGroupMP    # rename if you want
  1.upto($game_party.members.length - 1) do    # from Party ID 1 (2. Member) downwards
    |i|
    @actor = $game_party.members[i]
    if @actor != nil
      if @actor.state?(1) # if charakter is Status id (1) (Incapacitate/Dead) the hp is disabled
      else     
      @actor.mp -= 1    # -1 Mp
      end 
    end
  end
end
#-------------------------------------------------
#Hp regeneration
#-------------------------------------------------
def restoreGroupHP    # rename if you want
  0.upto($game_party.members.length - 1) do    # from Party ID 0 (Hero) downwards
    |i|
    @actor = $game_party.members[i]
  if @actor != nil 
    if @actor.state?(1)    # if charakter is Status id (1) (Incapacitate/Dead) the hp is disabled
    else
    @actor.hp += (@actor.maxhp * 3 / 100) + 1    # +3% hp + 1 hp
# If the regenerated hp are under 0,44 he would return 0 but with +1 he will add min. 1 hp
      end   
    end
  end
end

Credits:

If you want to thank me it is ok, but you dont need to.

Re: Hp/Mp De/Regeneration

Offline Domin0e

  • Leaf in the Wind
  • Mr. MACK-Tile
  • ***
  • Beiträge: 237
    • Mein kleiner Blog~
Re: Hp/Mp De/Regeneration
« Antwort #1 am: Mai 17, 2011, 12:01:31 »
Also, das Skript löst jedes Mal alle in ihm eingestellten Aktionen aus, wenn es aufgerufen wird, ja?
Oder kann ich z.B. 2 oder 3 verschiedene "Einstellungen" vornehmen, um z.B. einmal die Party zu heilen, einmal die Gegner zu heilen und den Gegnern in der dritten Einstellung HP zu entziehen?
Weiterhin wäre es toll, wenn du deine Screens bei einem anderen Anbieter hochladen könntest, der den du nutzt öffnet bei mir Pop-ups mit pornographischen Inhalten und es gibt auch Mitglieder hier im forum die erst 12/13 sind.
"Twelve highlanders and a bagpipe make a rebellion." - Scottish Proverb

Mein kleiner Blog

Re: Hp/Mp De/Regeneration

Offline Moonchaos

  • Ralph
  • *
  • Beiträge: 5
Re: Hp/Mp De/Regeneration
« Antwort #2 am: Mai 17, 2011, 17:05:52 »
Ich muss sagen durch add block hab ich nie pornografische bilder gesehen aber danke das du mich drauf hinweißt.
Ja jedes mal wenn das script ausgefürt wird, zu welchen bedingungen auch immer werden die hp/mp re/degeneriert.
Man muss nur jeweils die formeln ändern um das ganze ins +,- oder % zu verändern.
Wenn man es für käpfe nutzen möchte müsste man das nochn bissle genauer umbauen weil dann wichtiger ist welcher charakter genau betroffen wird.
Auf monster wirkt das script nicht, dazu müsste man es auf enemy IDs umschreiben.

 


 Bild des Monats

rooftop party

Views: 3581
By: papilion

 Umfrage

  • Wer soll das BdM gewinnen?
  • Dot Kandidat 1
  • 3 (25%)
  • Dot Kandidat 2
  • 1 (8%)
  • Dot Kandidat 3
  • 2 (16%)
  • Dot Kandidat 4
  • 0 (0%)
  • Dot Kandidat 5
  • 6 (50%)
  • Stimmen insgesamt: 12
  • View Topic

 Schnellsuche





SimplePortal 2.3.3 © 2008-2010, SimplePortal