PVP Maps (Babs + RMX-OS)

Started by Futendra, January 13, 2011, 05:01:25 pm

Previous topic - Next topic

Futendra

So, is it possible to make a PVP map or zone, because I want players to go to an arena where they can fight, so they arent in danger everywhere...

If possible I would also want a thing that drops an amount of money (maybe directly to player) when you lose in a pvp fight

Wizered67

I've looked at the Blizz-ABS controller before to see how PvP works, but I'm not sure how to make it only have PvP on some maps. Trust me, if I ever figure it out, I'll tell you.

nathmatt

try this i am not sure if it will work i can't test no working server just add the maps you want to be pvp to the PVPMaps array
btw place under the controller
Spoiler: ShowHide
module BlizzABS::Alignments
 
  PVPMaps = []
 
  alias pvp_maps negative
  def self.negative(id)
    result = pvp_maps
    case id
    when ONLINE_GROUP
      result = GROUPS.clone
      result.delete(id)
      result.delete(ACTOR_GROUP) if !PVPMaps.include?($game_map.map_id)
    end
    return result
  end
 
end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Futendra

Quote from: nathmatt on January 13, 2011, 06:59:20 pm
try this i am not sure if it will work i can't test no working server just add the maps you want to be pvp to the PVPMaps array
btw place under the controller
Spoiler: ShowHide
module BlizzABS::Alignments
 
  PVPMaps = []
 
  alias pvp_maps negative
  def self.negative(id)
    result = pvp_maps
    case id
    when ONLINE_GROUP
      result = GROUPS.clone
      result.delete(id)
      result.delete(ACTOR_GROUP) if !PVPMaps.include?($game_map.map_id)
    end
    return result
  end
 
end

If Im back from school Ill test it out, I will post if it works or not, also do you know how to make it that the guy who kills you gets money??

nathmatt

id have to look into what happens when a player is killed see if any thing is processed if so adding money shouldn't be something a small add_on to the sever can't fix   
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Futendra

January 14, 2011, 12:59:15 pm #5 Last Edit: January 14, 2011, 01:03:19 pm by Futendra
Quote from: nathmatt on January 14, 2011, 10:18:46 am
id have to look into what happens when a player is killed see if any thing is processed if so adding money shouldn't be something a small add_on to the sever can't fix   


Nope, the script isn't working,  it gives an error!:

Script PvP line 3: NameError occured.
Uninitialized constant BlizzABS::Alignments::Arena

Got it fixed now, but now I get this error:

Script PvP line 5: NameError occured.
undefined method 'negative' for module BlizzABS::Alignments

nathmatt

sorry about that forgot how you alias modules try this there are no errors just need to know whether prevents pvp fights on any map but the ones listed

Spoiler: ShowHide
module BlizzABS
module Alignments
 
  PVPMaps = []
 
  class << Alignments
      alias pvp_maps negative
    end
   
  def self.negative(id)
    result = pvp_maps
    case id
    when ONLINE_GROUP
      result = GROUPS.clone
      result.delete(id)
      result.delete(ACTOR_GROUP) if !PVPMaps.include?($game_map.map_id)
    end
    return result
  end
 
end
end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Futendra

Quote from: nathmatt on January 14, 2011, 01:34:39 pm
sorry about that forgot how you alias modules try this there are no errors just need to know whether prevents pvp fights on any map but the ones listed

Spoiler: ShowHide
module BlizzABS
module Alignments
 
  PVPMaps = []
 
  class << Alignments
      alias pvp_maps negative
    end
   
  def self.negative(id)
    result = pvp_maps
    case id
    when ONLINE_GROUP
      result = GROUPS.clone
      result.delete(id)
      result.delete(ACTOR_GROUP) if !PVPMaps.include?($game_map.map_id)
    end
    return result
  end
 
end
end


Doesn't work, gives this error:
Script 'PvP' line 4:NameError occured.
unintialized constant BlizzAbs::Allignment::PvP

Wizered67

I tried putting it in and I don't get an error....

Futendra

January 14, 2011, 01:48:02 pm #9 Last Edit: January 17, 2011, 02:43:31 am by Blizzard
Quote from: Wizered67 on January 14, 2011, 01:45:24 pm
I tried putting it in and I don't get an error....


I got it fixed, oversaw the '' I putted it like this XD: [PvP'']

the '' are two ' So it isnt a "

EDIT:

Quote from: nathmatt on January 14, 2011, 01:34:39 pm
sorry about that forgot how you alias modules try this there are no errors just need to know whether prevents pvp fights on any map but the ones listed

Spoiler: ShowHide
module BlizzABS
module Alignments
 
 PVPMaps = []
 
 class << Alignments
     alias pvp_maps negative
   end
   
 def self.negative(id)
   result = pvp_maps
   case id
   when ONLINE_GROUP
     result = GROUPS.clone
     result.delete(id)
     result.delete(ACTOR_GROUP) if !PVPMaps.include?($game_map.map_id)
   end
   return result
 end
 
end
end



It's great, but how do I make it so the winner gets money?

by Blizz: JESUS CHRIST! Will you stop double posting already?!