| 02-07-2006, 06:08 AM | #1 |
Ok here is what I'm trying to do. I'm making a party/raid system for my RPG that allows players you group for quests and dungeons. I have tried many different ways but get stuck and just can't get it to work. I need it to allow me to use it with a custom made exp gain system, allowing me to divide exp among party members. The commands for this system would be as followed: -invite (player name you're inviting) -remove (player name you're removing) -leave -disband -raid <converts from party to raid> A party allows up to 5 players to group. Raid is a max of 10 players. Here is my last attempt of an invite command: Code:
Invite
Events
Player - Player 1 (Red) types a chat message containing -invite as A substring
Conditions
(Substring((Entered chat string), 1, 8)) Equal to -invite
Actions
-------- player doing invite --------
Player Group - Pick every player in (All players matching ((Name of (Triggering player)) Equal to (Name of (Triggering player)))) and do (Actions)
Loop - Actions
Set Invite_Player = (Picked player)
-------- player invited --------
Player Group - Pick every player in (All players matching ((Name of (Picked player)) Equal to (Substring((Entered chat string), 9, (Length of (Entered chat string)))))) and do (Actions)
Loop - Actions
Set Invite_Player2 = (Picked player)
For each (Integer A) from 1 to 5, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Invite_Player is in Party[(Integer A)]) Equal to True
Then - Actions
Set Invite_InParty = True
Else - Actions
Set Invite_InParty = False
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Invite_Player2 is in Party[(Integer A)]) Equal to True
Then - Actions
Set Invite_InParty2 = True
Else - Actions
Set Invite_InParty2 = False
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Invite_Player is in Raid[(Integer A)]) Equal to True
Then - Actions
Set Invite_InRaid = True
Else - Actions
Set Invite_InRaid = False
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Invite_Player2 is in Raid[(Integer A)]) Equal to True
Then - Actions
Set Invite_InRaid2 = True
Else - Actions
Set Invite_InRaid2 = False
-------- invite process --------
-------- party --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Invite_InParty2 Equal to False
Invite_InRaid2 Equal to False
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Invite_InParty Equal to False
Then - Actions
Else - Actions
Else - Actions
Game - Display to (Player group((Triggering player))) the text: ((Name of Invite_Player2) + is already in a group.)P.S. I know I should use the trigger tags but I can't find them on the toolbar. |
| 02-07-2006, 06:54 AM | #2 |
OOT Whining: Why oh WHY noone ever uses [ jass ] and [ trigger ] tags? Its always only [ code ]! Makes it sooo hard to read :/. Ah just noticed the P.S. Well, you just write these tags manually! [ trigger ] at start of trigger text and [ /trigger ] at end of trigger text. Remove spaces between brackets and text ofc. Anyway this trigger contains no actions whatsoever to be done when player is in eligible for invite. So what is the question? |
| 02-07-2006, 07:34 AM | #3 |
I said I've tried several times to make it and every time its failed, That code i posted is what i had when i noticed it won't work that way. I have ran out of ideas that might work. And I'm getting tired of trying, spending a few days only to find it doesn't work. I want some help on getting this to work. |
| 02-07-2006, 01:51 PM | #5 |
I didn't finish it cause i noticed it won't work that way so i stopped. What this system will do, is work like party/raid system from games like WoW and EQ. It will use a multiboard displayed only to members of that group in order to show who is in the party and their hp, mp and level. |
| 02-07-2006, 04:47 PM | #6 |
Okay i got what's the problem here. Please reread your own posts and answer a simple question. How many question marks do you see? How are we supposed to give you an answer and help, if you don't even give a question! Now, for any sort of invite trigger, you need: -invite <color> command or -invite <playername> command whichever suits your fancy. Both should identify the number of player giving the command, and the number of command's target player, and pass it on to inviting routine. From there on in, i would go with a 12x12 boolean matrix implementation, which would allow you to store information on which player is the current player partied with. Alternatively, you can create, say, a player group array. And then store party status by adding player to one of player arrays, depending on which party/raid they are in. Another option is to create two booleans and an integer for every player, indicating if a player is in raid, is in party, and what party/raid id they are in. And then base your system on manipulating these. This would be the most effective option and you even started writing a trigger for it, but you are saying it won't work for some reason, so your call. I wouldn't worry about multiboards until you get the basic system sorted out. For testing purposes just use text printouts. |
| 02-07-2006, 04:57 PM | #7 | |
Quote:
|
| 02-07-2006, 05:01 PM | #8 |
suits your fancy can also be used :P I simply dislike using groups for anything in WC3, unless i ABSOLUTELY need it, or need to do something real simple only once in the whole game. This is mostly due to absolutely horrible group iteration methods made by blizzard. And i also have a soft spot for 2D arrays :P |
| 02-08-2006, 07:22 AM | #10 |
You know people would use the jass and trigger tags more often if they were actually in the interface. There are no jass and trigger tag buttons so most people new to the site don't think to just write out the commands. |
| 02-08-2006, 11:01 AM | #11 |
Okay, first problem i spotted right away is: Trigger: ![]() Player Group - Pick every player in (All players matching ((Name of (Triggering player)) Equal to (Name of (Triggering player)))) and do (Actions)![]() Loop - Actions![]() Set Invite_Player = (Picked player)Look closely at your condition for player to pick: Name of Triggerring Player = Name of Triggerring Player I believe it should be: Name of Triggerring Player = Name of Matching Player. Don't have time to look in more detail, but i definitely will so don't worry ^^ |
| 02-08-2006, 06:05 PM | #12 |
I don't see any error in that. |
