Thread: [508]Mini-Game Help

Results 1 to 4 of 4
  1. #1 [508]Mini-Game Help 
    Registered Member konvict's Avatar
    Join Date
    Jun 2009
    Posts
    63
    Thanks given
    1
    Thanks received
    3
    Rep Power
    1
    First of all, is there any mini-game tutorials, I tried to find one but I failed to, anyway here's my problem.

    1) Can you make it so if they're wearing a certain Item, (red team, red phats, can't attack red phats) you can't attack them?


    Also, how do I make a PvP Zone and NOT have items lost, like if I want the zone to only be in certain coordinates.
    (I may need more help on this mini-game, it's my first and I'm not very experienced yet so an MSN address for further help would be much appreciated)

    Thanks for reading,
    Konvict
    [Only registered and activated users can see links. ]
    Pulse 718 ~ Live!
    Reply With Quote  
     

  2. #2  
    Registered Member
    §ympath„'s Avatar
    Join Date
    Nov 2009
    Posts
    79
    Thanks given
    0
    Thanks received
    1
    Rep Power
    255
    I don't know any mini-game tutorials, but for your second question, about the phats, yes you can.

    e.g with espeon:
    in PlayerCombat.java, under
    Code:
    public void attackPlayer() {
    you can add
    Code:
    	if (opp.equipment[0] == 1048) {
    		p.getActionSender().sendMessage(p, "You cannot attack players with White Partyhats!");
    		p.resetAttack();
    		return;
    	}
    So you can't attack someone with a white partyhats.
    Reply With Quote  
     

  3. #3  
    XJCX
    Guest
    Quote Originally Posted by §ympath„ View Post
    I don't know any mini-game tutorials, but for your second question, about the phats, yes you can.

    e.g with espeon:
    in PlayerCombat.java, under
    Code:
    public void attackPlayer() {
    you can add
    Code:
    	if (opp.equipment[0] == 1048) {
    		p.getActionSender().sendMessage(p, "You cannot attack players with White Partyhats!");
    		p.resetAttack();
    		return;
    	}
    So you can't attack someone with a white partyhats.
    Wrong, This is the real way.

    First you find the minigame name like here some stuff i made up

    Code:
    Public void TestGame(Player p) {
    if (p == null || p.steam == null) {
    }
    }
    Then for the game team capes do this

    Code:
    if (p.TestGame(p) && p.itemId == "ID" || p2.TestGame(p) && p2.itemId == "ID") {
    p.message(p, "You cannot attack your team mate!");
    p.resetAttack();
    p2.resetAttack();
    }
    Done. Sept my code i made you will not work for you, it was only a quick noobie example lol.
    Reply With Quote  
     

  4. #4  
    Registered Member
    AndyJay's Avatar
    Join Date
    Jun 2008
    Posts
    1,285
    Thanks given
    38
    Thanks received
    48
    Rep Power
    84
    Yeah red what XJCK said. But it would be best to use something like team1 and team2 instead of testgame if your having two or more teams.

    Code:
    if (p.isInGame()) {
    	if((p.team1 && p2.team1) || (p.team2 && p2.team2)) {
    		p.message(p, "You cannot attack your team mate!");
    		p.resetAttack();
    		p2.resetAttack();
    	}
    }
    [Only registered and activated users can see links. ]

    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •