Fruitpunch Posted February 6, 2009 Author Share Posted February 6, 2009 This part goes under the NewChars sub.```Call PutVar("Fight.ini", "CHARS", GetPlayerName(index), 0)```Replace the stuff in your OnAttack sub with this```Sub OnAttack(Index, Damage) Dim Target If Int(Damage) > 0 Then If Int(GetPlayerTarget(Index)) > 0 Then Target = GetPlayerTarget(Index) Call DamagePlayer(Index, Target, Damage) Call Buildup(Index) Else Target = GetPlayerTargetNPC(Index) Call DamageNPC(Index, Target, Damage) Call Buildup(Index) End IfEnd Sub```This part goes at the bottom of your main.txt```'My Own SubSub Buildup(Index)'Part of Fruitpunch's alternative combat system If GetVar("Fight.ini", "CHARS", GetPlayerName(index)) < 5 Call PutVar("Fight.ini", "CHARS", GetPlayerName(index), GetVar("Fight.ini", "CHARS", GetPlayerName(index)) + 1)```And this last part goes under Scripted Spells```Case 1 If Int(GetPlayerTarget(Index)) > 0 Then Target = GetPlayerTarget(Index) Call DamagePlayer(Index, Target, 50) Call Putvar("Fight.ini", "CHARS", GetPlayerName(index), 0) Else Target = GetPlayerTargetNPC(Index) Call DamageNPC(Index, Target, 50) Call Putvar("Fight.ini", "CHARS", GetPlayerName(index), 0) End If Exit Sub```EDIT: Also you need to create an .ini named Fight. This is all you need to put in the .ini```[CHARS]```Anyone want to tell me what is wrong with it? Link to comment Share on other sites More sharing options...
Dark_Marine_123 Posted February 7, 2009 Share Posted February 7, 2009 "GetPictures of Chilidogame(index)" You want the var to be called that?Otherwise the quotes arent supposed to be there Link to comment Share on other sites More sharing options...
Fruitpunch Posted February 7, 2009 Author Share Posted February 7, 2009 @Riney:> "GetPictures of Chilidogame(index)" You want the var to be called that?> > Otherwise the quotes arent supposed to be thereNo its a forum bug I think. The Get Player Name(index) function turns into that or atleast did. I can fix that right now. Link to comment Share on other sites More sharing options...
Fruitpunch Posted February 7, 2009 Author Share Posted February 7, 2009 I think the problem lies within the buildup sub, but I could be wrong Link to comment Share on other sites More sharing options...
kris_hole Posted February 8, 2009 Share Posted February 8, 2009 you missed off the End Sub in the build up sub. Link to comment Share on other sites More sharing options...
Fruitpunch Posted February 8, 2009 Author Share Posted February 8, 2009 @kris_hole:> you missed off the End Sub in the build up sub.ahh that I did. I'll put that in and test it later I guess. Link to comment Share on other sites More sharing options...
kris_hole Posted February 9, 2009 Share Posted February 9, 2009 and the end if :P Link to comment Share on other sites More sharing options...
Fruitpunch Posted February 9, 2009 Author Share Posted February 9, 2009 uggh still isnt working Link to comment Share on other sites More sharing options...
dg1423 Posted February 10, 2009 Share Posted February 10, 2009 c'mon, FP, you can figure it out! xDD Link to comment Share on other sites More sharing options...
kris_hole Posted February 10, 2009 Share Posted February 10, 2009 ```Call PutVar("Fight.ini", "CHARS", GetPlayerName(index), 0)```instead of that use…```Call PutVar("Fight.ini", "CHARS", GetPlayerName(index) & "", "0")```then fix the rest like taht Link to comment Share on other sites More sharing options...
Fruitpunch Posted February 10, 2009 Author Share Posted February 10, 2009 still not workinghere is what I haveIn NewChars```Call PutVar("Fight.ini", "CHARS", GetPlayerName(index) & "", "0")```In OnAttack```Dim Target If Int(Damage) > 0 Then If Int(GetPlayerTarget(Index)) > 0 Then Target = GetPlayerTarget(Index) Call DamagePlayer(Index, Target, Damage) Call Buildup(Index) Else Target = GetPlayerTargetNPC(Index) Call DamageNPC(Index, Target, Damage) Call Buildup(Index) End If End IfEnd Sub```In Scripted Spells```Dim Target If Int(Damage) > 0 Then If Int(GetPlayerTarget(Index)) > 0 Then Target = GetPlayerTarget(Index) Call DamagePlayer(Index, Target, 50) Call PutVar("Fight.ini", "CHARS", GetPlayerName(index) & "", "0") Else Target = GetPlayerTargetNPC(Index) Call DamageNPC(Index, Target, 50) Call PutVar("Fight.ini", "CHARS", GetPlayerName(index) & "", "0") End If Exit Sub```In Buildup```Sub Buildup(Index)'Part of Fruitpunch's alternative combat system If GetVar("Fight.ini", "CHARS", GetPlayerName(index)) < 5 Call PutVar("Fight.ini", "CHARS", GetPlayerName(index) & "", "GetVar("Fight.ini", "CHARS", GetPlayerName(index) & "") + 1") Else Call PlayerMsg(index, "You may use a finisher", 4) End IfEnd Sub```Thanks for the help everyone I appreciate it. Link to comment Share on other sites More sharing options...
dg1423 Posted February 11, 2009 Share Posted February 11, 2009 getting closer, but there are still a few problems! xDD Link to comment Share on other sites More sharing options...
kris_hole Posted February 11, 2009 Share Posted February 11, 2009 you could always help light :Pand exactly in detail what do yo want the script to do? Link to comment Share on other sites More sharing options...
dg1423 Posted February 11, 2009 Share Posted February 11, 2009 But if I do it for him, he won't learn anything. I guess I should at least be a little more specific though.There's a syntax error in Sub Buildup, and you're gonna have to re-write your spell, cuz the way you have it, it won't do anything right now. Link to comment Share on other sites More sharing options...
Fruitpunch Posted February 11, 2009 Author Share Posted February 11, 2009 let me take a guess and tell me if I am right```Dim Target If Int(Damage) > 0 Then If Int(GetPlayerTarget(Index)) > 0 Then Target = GetPlayerTarget(Index) Call DamagePlayer(Index, Target, Damage) Else Target = GetPlayerTargetNPC(Index) Call DamageNPC(Index, Target, Damage) End If End If Call Buildup(index)End Sub[code]And then the same for the spell[/code]``` Link to comment Share on other sites More sharing options...
dg1423 Posted February 12, 2009 Share Posted February 12, 2009 Nope, that still won't really do anything you want it to. Link to comment Share on other sites More sharing options...
Warconn Posted February 12, 2009 Share Posted February 12, 2009 shouldnt this be```Call PutVar("\Fight.ini", "CHARS", GetPlayerName(index) & "", "0")```not sure, just looking through it…. Link to comment Share on other sites More sharing options...
Fruitpunch Posted February 12, 2009 Author Share Posted February 12, 2009 taking another whiff at it. If this isn't right could you please direct me to a tutorial that will tell me what I need to do```Sub Buildup(Index)'Part of Fruitpunch's alternative combat system If GetVar("Fight.ini", "CHARS", GetPlayerName(index)) < 5 Call PutVar("Fight.ini", "CHARS", GetPlayerName(index) & "", "GetVar("Fight.ini", "CHARS", GetPlayerName(index) & "") + 1") Exit Sub Else Call PlayerMsg(index, "You may use a finisher", 4) End IfEnd Sub``` Link to comment Share on other sites More sharing options...
dg1423 Posted February 13, 2009 Share Posted February 13, 2009 no, Warconn, FP has his vars right. And you can do it FP!! Just think about it! a couple notes:1) Take a look at the first 'if' in Sub Buildup, is there something missing?2) Make sure that if you use a function by itself in a place that requires a string (i.e. get/putvar, playermsg) you use quotes in front. f.e. :GetVar("Fight.ini", "CHARS", "" & GetPlayerName(index))And you're gonna need to rethink the spell still. xD Link to comment Share on other sites More sharing options...
Fruitpunch Posted February 13, 2009 Author Share Posted February 13, 2009 OMFG LOL I AM RETARDED!!```Sub Buildup(Index)'Part of Fruitpunch's alternative combat system If GetVar("Fight.ini", "CHARS", "" & GetPlayerName(index)) < 5 Then Call PutVar("Fight.ini", "CHARS", "" & GetPlayerName(index), GetVar("Fight.ini", "CHARS", "" & GetPlayerName(index)) + 1) Else Call PlayerMsg(index, "You may use a finisher", 4) End IfEnd Sub```And I will get to the spell tomorrow, right now I am addicted to Dawn of War II Link to comment Share on other sites More sharing options...
Fruitpunch Posted February 14, 2009 Author Share Posted February 14, 2009 ```Case 1 If GetPlayerTarget(index) <> 0 Then Call DamagePlayer(Index, GetPlayerTarget(index) & "", 50) Call Putvar("Fight.ini", "CHARS", GetPlayerName(index), 0) Elseif GetPlayerTargetNPC(index) <> 0 Then Call DamageNPC(Index, GetPlayerTargetNPC(index), 50) Call Putvar("Fight.ini", "CHARS", GetPlayerName(index), 0) Else Call PlayerMsg(index, "You need a target to use that", 4) End If Exit Sub```Would that work for the spell? Link to comment Share on other sites More sharing options...
kris_hole Posted February 21, 2009 Share Posted February 21, 2009 no however this would…```Case 1 If GetPlayerTarget(index) <> 0 Then Call DamagePlayer(Index, GetPlayerTarget(index) & "", 50) Call Putvar("Fight.ini", "CHARS", GetPlayerName(index) & "", "0") Else If GetPlayerTargetNPC(index) <> 0 Then Call DamageNPC(Index, GetPlayerTargetNPC(index), 50) Call Putvar("Fight.ini", "CHARS", GetPlayerName(index) & "", "0") Else Call PlayerMsg(index, "You need a target to use that", 4) End If End If Exit Sub```but it would only run the first If statement, it woould only go to the else if the value was not less that or more than 0\. so meh. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now