ell Posted February 1, 2009 Author Share Posted February 1, 2009 Hello everyone, I am often asking things about scripting and I'm sure posting a load of topics is annoying so I am creating one topic and just puting all my questions in here! (hope thats allowed?) Thanks in advance ell.Q1\. I am trying to make a skill system but i'm not entirely sure how to sue PutVar and GetVar. so heres what i'v got so far.``` Dim Fishing Fishing = GetVar("accounts\CharacterSkills\" & GetPlayerName(Index) & "_skills.ini", "SKILLS", Fishing) Call PlayerMsg(Index, "Your fishing skill is " & Fishing & ".", MAGENTA)```I have a file called TheLifeGiver.ini which contains…```[SKILLS]Agility=1Combat=1Construction=1Cooking=1Crafting=1Farming=1Firemaking=1Fishing=4Fletching=1Herblore=1Hunting=1Magic=1Mining=1Prayer=1Ranged=1Spellbinding=1Slaying=1Smithing=1```And is located inServer\Accounts\CharacterSkillsAlso do I have to use Dim everytime I want to declare a variable?The message wont show up, why not? thanks in advance ell.Q2\. Is there a way to stop an npc from respawning for an individual player, so all the other players can see it unless they have already talked to it once? Thanks in advance ell.Q3\. Can someone explain why alot of subs and functions and whatever use "Index" what does it mean or represent?Q4\. How would I go about making a delay? (as is it waits a certain amount of time then goes onto the next comand)Q5\. Can someone explain how to make a random number from 1-100? Link to comment Share on other sites More sharing options...
balliztik1 Posted February 1, 2009 Share Posted February 1, 2009 1\. Assuming the player's name is "TheLifeGiver", that script would be searching for "TheLifeGiver_skills.ini", not "TheLifeGiver.ini". And, no, you don't have to dim. At all. It's good practice for if you want to start using VB, but it has no real use in Eclipse.2\. No, there's not. That'd take some source editing.3\. Index refers to a specific player logged into the game. The first player logged on gets index 1, the second gets 2, etc. Index calls back to them, so if they trigger a script, thescript uses index to make that event happen relative to them.4\. You can't use a "delay", per se, but you can use a timer, then run a second script. It can get a bit lengthy and segmented, especially if there's multiple delays, but it's the only way right now.5\. There's a Rand() function. I believe it's Rand(100, 1) to make a number between 1 and 100, but it might be Rand(1, 100). Try either of those. Link to comment Share on other sites More sharing options...
ell Posted February 3, 2009 Author Share Posted February 3, 2009 Thank you very much! I hope you will eb able to answer future questions! (if there are any, which there probably will) 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