jedboy10 Posted November 12, 2009 Author Share Posted November 12, 2009 i was wondering if there was a way to make a script kind of like the heaven/hell script on the forums. ecept when the player reaches a certain level he turns into either a good or evil class such a going from wizard to mage/necromancer. anyone know if this is possible? Link to comment Share on other sites More sharing options...
evilbunnie Posted November 12, 2009 Share Posted November 12, 2009 PM me ill do it :P Link to comment Share on other sites More sharing options...
evilbunnie Posted November 12, 2009 Share Posted November 12, 2009 Put this in playerLevelup sub```If GetPlayerLevel(Index) = LEVELHERE ThenCall SetPlayerClass(Index, ClassnumberHere)Call PlayerMsg(Index, "You are now CLASSNAME", 9)End if``` Link to comment Share on other sites More sharing options...
jedboy10 Posted November 16, 2009 Author Share Posted November 16, 2009 cool thx but what i need is to somehow be able to put it into the heaven/hell script to where when the player reaches the level (s)he can turn into one of 2 classes depending on there reputation is that possible? Link to comment Share on other sites More sharing options...
balliztik1 Posted November 16, 2009 Share Posted November 16, 2009 First you'd have to have a reputation system in place. Start there. With that in place, it's just a matter of a simple check, much like Evilbunnie has posted. Link to comment Share on other sites More sharing options...
jedboy10 Posted November 16, 2009 Author Share Posted November 16, 2009 so instead of putting the heaven/hell script in death sub i would put in the lvl up sub? Link to comment Share on other sites More sharing options...
balliztik1 Posted November 16, 2009 Share Posted November 16, 2009 No. What I'm saying is that you need a reputation system in place. If you have that, whoever scripted it should be able to accommodate the needed checks upon leveling. It's just a matter of checking a variable, but the variable needs to exist.For the sake of clarity, which script are you even referencing? I'll write something up for you if I know what you need. Link to comment Share on other sites More sharing options...
jedboy10 Posted November 21, 2009 Author Share Posted November 21, 2009 the script im refrencing is this[http://www.touchofdeathforums.com/smf/index.php/topic,23246.0.html](http://www.touchofdeathforums.com/smf/index.php/topic,23246.0.html)if you could help me with this it would be great Link to comment Share on other sites More sharing options...
balliztik1 Posted November 22, 2009 Share Posted November 22, 2009 ```If GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Reputation") >= SOME_NUMBER Then Call SetPlayerClass(Index, ClassnumberHere) Call PlayerMsg(Index, "You are now CLASSNAME", 9)End if```A quick swap of the rep variable with what Evil did gives you this. It's pretty straightforward. Mess around with it. Link to comment Share on other sites More sharing options...
Ruins of Hell Posted November 22, 2009 Share Posted November 22, 2009 ```PlayerRep = GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Reputation")If PlayerRep <> "" ThenIf CInt(PlayerRep) >= SOME_NUMBER Then Call SetPlayerClass(Index, ClassnumberHere) Call PlayerMsg(Index, "You are now CLASSNAME", 9)End IfElseCall PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Reputation", 0)End If```Add PutVar if the player didn't have the rep variable at all to prevent errors. 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