Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Synectics

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

Synectics's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. @Anna: > I've always found it funny as the Internet has allowed me to communicate with people from around the world, that people outside of English-primary-speaking countries, they will apologize for "their English," but will have better spelling and grammar than the average English-speaker. > > I have to give props to those people, I would hate to have to learn English as a second language, it's really convoluted. LMAO. I've noticed that, as well. Most native English speakers will "spek horible wordz that maek no sens" and if you call them on it, you'll get, "STFU nub i'll rap ur face!" But most people who are new to English as a second language will repeatedly apologize because they haven't quite grasped little stuff that doesn't even stop their point from getting across (the game is much funny).
  2. Thanks for the fast reply. :) And fortunately, so far, I'd done most, if not all, of my checks like so: ``` If GetVar("Scripts\Charextras\" & GetPlayerTargetNPC(index) & " " & GetPlayerMap(index) & ".ini", "STATUS", "DeityMark") = "" Then Else DeityMarkMod = CInt(GetVar("Scripts\Charextras\" & GetPlayerTargetNPC(index) & " " & GetPlayerMap(index) & ".ini", "STATUS", "DeityMark")) ``` So I won't have to go back and do a TON of recoding. I'll just have to add CInt() to where I'm calling a number with GetVar.
  3. As I've recently learned (thanks Balliztik!), GetVar ALWAYS returns Strings. Glancing through some tutorials, I noticed CLng(). Its purpose is to convert strings to integers. So with that in mind, would this return an integer? ``` CLng(GetVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "AwesomePoints", "Amount")) ``` Further, could I do this? ``` Epic = CLng(GetVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "AwesomePoints", "Amount")) + 20 ``` Or… ``` If CLng(GetVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "AwesomePoints", "Amount")) >= 99 Then ```
  4. Oh for the love of gawd, it's finally ing working now. I can finally move on to bigger and better things!!!! Thank you very much for that brief explanation, too. It's so frustrating to know what I want and need to do, but not understand the HOW part. /tip of the hat @ all who helped!
  5. Aight, about to try this. And don't worry, that Battlemsg isn't meant for the player – it was meant for my debugging purposes, to make sure the NPC I was killing really was, indeed, number 5\. XD
  6. Even with the exact code you just gave, it's still not working. Using your version, the Battlemsg gets called, but again, if IvoryQuest is 1 and NateIssely isn't, IvoryQuest's effect doesn't get called. I even tried placing a BattleMsg at the end of the code – outside of the If NPCNum = 5 -- and it won't get called if both If's above aren't true... and it SHOULD. If you kill NPC 5, and neither quest code is true, it should keep on going to the bottom of the Sub and call the Battlemsg. And again, if BOTH quest conditions are true, BOTH get called. Out of the few hundred lines of code I've placed, including a LOT of custom menu code and LOTS of If Then statements one after the other, such as in the Sub MenuScripts, I've never had anything like this happen. Definitely the most frustrating thing I've ever had happen with code.
  7. Yeah. It's still broken. Now I've tried: ``` If NPCNum = 5 Then If GetVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "QuestNateIssley", "Part1") = 1 Then Call PlayerMsg(index, "Quest complete: Nate's Trainee. Return to Nate Issley.", BrightGreen) Call PutVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "QuestNateIssley", "DummyHit", 1) End If If GetVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "QuestIvory", "Part1") = 1 Then Call PlayerMsg(index, "Quest complete: Ivory's Trainee. Return to Ivory.", BrightGreen) Call PutVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "QuestIvory", "DummyHit", 1) End If End If Call BattleMsg(Index, "You killed a " & NPCNum & ".", BRIGHTRED, 0) ```And get this: the BattleMsg will **only** get called if: a) The NPC is NOT 5 b) The two If Then statements inside of If NPCNum = 5 are both true WTF.
  8. ``` Sub OnNPCDeath(Index, Map, NPCNum, NPCIndex) If NPCNum = 5 Then Call BattleMsg(Index, "You killed a " & NPCNum & ".", BRIGHTRED, 0) If GetVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "QuestNateIssley", "Part1") = 1 Then Call PlayerMsg(index, "Quest complete: Nate's Trainee. Return to Nate Issley.", BrightGreen) Call PutVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "QuestNateIssley", "DummyHit", 1) End If If GetVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "QuestIvory", "Part1") = 1 Then Call PlayerMsg(index, "Quest complete: Ivory's Trainee. Return to Ivory.", BrightGreen) Call PutVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "QuestIvory", "DummyHit", 1) End If End If End Sub ``` Been working on slimming down the code from what it was. This is what I have at the moment, copied over. When GetVar…QuestIvory = 1, nothing happens. But if both GetVar...QuestNateIssley and GetVar...QuestIvory = 1, then it will run both, one after the other. EDIT: In fact, I just moved the BattleMsg down below the GetVar If's, but before the last End If, like so: ``` Sub OnNPCDeath(Index, Map, NPCNum, NPCIndex) 'Call BattleMsg(Index, "You killed a " & NPCNum & ".", BRIGHTRED, 0) If NPCNum = 5 Then If GetVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "QuestNateIssley", "Part1") = 1 Then Call PlayerMsg(index, "Quest complete: Nate's Trainee. Return to Nate Issley.", BrightGreen) Call PutVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "QuestNateIssley", "DummyHit", 1) End If If GetVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "QuestIvory", "Part1") = 1 Then Call PlayerMsg(index, "Quest complete: Ivory's Trainee. Return to Ivory.", BrightGreen) Call PutVar("Scripts\Charextras\" & GetPlayerName(index) & ".ini", "QuestIvory", "DummyHit", 1) End If Call BattleMsg(Index, "You killed a " & NPCNum & ".", BRIGHTRED, 0) End If End Sub ``` Therefore, if it were going all the way down the list despite the conditions not being met, the BattleMsg should still be called. Problem is, it's not getting called at all. Even though the If statements above it don't get run, it should still get called, amirite?
  9. Small update. Tried the following: ``` If NPC = 5 Then If Condition1 = True Then Effect1 ElseIf Condition2 = True Then Effect2 ElseIf Condition3 = True Then Effect 3 End If End If ``` But also to no avail. And adding End If seems like it'd close the If altogether, meaning ElseIf wouldn't work. But then, I would think If Then statements following one another should work…. >.> Trying it now.
  10. Bleh, double-post, but needed to add: In the above example, if Condition3 is met, Effect3 still won't happen until BOTH Condition1 and Condition2 are met.
  11. Back already. /sigh /shakefist@computer So, here's the code simplified: ``` If NPC = 5 AND Condition1 = True Then Effect1 ElseIf NPC = 5 AND Condition2 = True Then Effect2 ElseIf NPC = 5 AND Condition3 = True Then Effect3 End If ``` And once more, the same sort of deal. Effect2 is only happening if NPC = 5 AND Condition1 = True AND Condition2 = True, as opposed to what I obviously would like it to be doing. If I start off with just NPC = 5 and Condition2 = True, then Effect2 never happens. But as soon as I enable Condition1, Effect 1 happens, followed by Effect2.
  12. I was curious as to if ElseIf statements worked in EE's scripting, but hadn't had the patience to test it with anything I already had working. Thanks for confirming that for me. XD Nonetheless, that's epic annoying for my brain, because according to my logic, it should just keep running down the list of If Then's. But then, it's been forever since I've touched code this much. DAMMIT COMPUTER, I GAVE YOU A CHECKLIST, NOW RUN THROUGH IT WITHOUT QUESTIONING ME! AND I SWEAR IF YOU DON'T DOUBLE-CHECK EACH AND EVERYONE I'M NEVER GOING TO PUT IN THAT NEW STICK OF RAM I'VE BEEN PROMISING FOR YEARS.
  13. ``` If ConditionA = 1 AND ConditionB = 1 Then Effect1 End If If ConditionC = 2 AND ConditionD = 2 Then Effect2 End If ``` The above isn't working, and I'm beyond frustrated with it. For some reason, if the first If Then statement doesn't get run, the scripting language decides to skip **EVERYTHING** AFTER IT. >_< In this example (and it is purely an example, as I didn't want to post all my GetVar codes to make it even more confusing), if ConditionA and ConditionB aren't met, but ConditionC and ConditionD ARE met… Effect2 still does not happen. And this isn't a case of a syntax error -- though C and D were met, Effect2 still wasn't happening. So I met the conditions for A and B, and suddenly both Effect1 **AND** Effect2 happened. Is this really working as intended? Is there something I'm missing? Please tell me I don't have to do a few hundred nested If Then statements just to get my desired effect. x.x
  14. Yes, and that is my first check. But I'd like to go even further than that. Basically, I'm making a contextual menu to graphically show spells you have learned. This means that the first thing the menu does is draw the icon for the spell in your first spell slot. This means that the menu title will remain the same everytime you call it, as will the picture's index. However, the icon it shows will change depending on what the player has in each spell slot. I'd like the player to be able to click the icon, and have another menu show a description of the spell – based on what icon is showing. With the way I have things set up, I suppose I can create a work-around for this, and in fact, as I'm typing this I'm seeing the code in my head (anyone else love when that happens? ^_^), but I was curious as to if there was a method for what I've already mentioned above.
  15. I leaped away, only to get sucked back with another question. XD I was wondering if there was a method to check what picture a player clicked. HOLD ON! HOLD ON! I'm not speaking of the Clicked_Index… but to check the actual file name of the picture. Meaning, when the player clicks on a picture, first we check the Clicked_Index, and then, check what picture the Clicked_Index is actually showing. If it is "icon01.bmp", we do ____. If it is "crazyawesome.bmp", we do ____.
×
×
  • Create New...