Cellino Posted August 30, 2008 Author Share Posted August 30, 2008 Anyways, I was thinking of making a party quest script but I don't know if there's any commands that checks for how many players you have in a party, or if there's an easier way. But I want it so that only three or more people can go in at a time. Would this script work? ( I'm just doing it as if there's only one person cause I'm not sure how to go about doing it for a whole party )```Sub OnScriptedTile(Index, Script)Case 3If GetPlayerX(index) = 1 and GetPlayerY(index) = 1 and GetVar(" partyquests / PQ.ini ", " Mining Cave ", "Empty ") ThenCall SetPlayerMap(index, 2) and ' To put them into the Party QuestCall Putvar(" partyquests / PQ.ini ", " Mining Cave ", " Full " )ElseIf GetVar(" Partyquests / PQ.ini ", " Mining Cave ", " Full ")Then Call PlayerMsg(Index, " There is already another party attempting this quest! Please come back later! " 4 )End IfCase 4If GetPlayerX(Index) = 2 And GetPlayerY(Index) = 2 ThenCall SetPlayerMap(Index, 3) ' To get them away from the Party Quest Entrance to Avoid hoggingAnd Call Putvar(" partyquests / PQ.ini ", " Mining Cave ", " Empty " )And Call SetPlayerEXP(Index, GetPlayerEXP(index) + 3000 ) and Call PlayerMSG(Index, " Congratulations on finishing the party quest! You have been awarded 3000 experience and will be teleported back to town! " 10 )SendPlayerData(index)End If```And for Shape shifting when they shapeshift I want their items to become unequippable, and I want to change their items, but when they change back they lose the items they had when they were shape shifted, and gain back their old ones same idea with spells. I was thinking they could equip a helmet or something to shape shift or use a spell. I know the scripts would basically look the same but just in different subs.Ex. Player A has a dagger and leather coat, when he shapeshifts into a fuzzy kitty, his weapon becomes claws, and his armor becomes thin hide.```Case 1Dim ShapeShiftedDim GetOldSpriteDim GetOldWeaponDim GetOldArmorDim GetOldShieldDim GetOldHelmetDim GetOldSpell1Dim GetOldSpell2Dim GetOldSpell3Dim GetOldSpell4GetOldSprite = GetVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Sprite " ) GetOldWeapon = GetVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Weapon " ) GetOldArmor = GetVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Armor ", ) GetOldShield = GetVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Shield ", ) GetOldHelmet = GetVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Helmet ", )GetOldSpell1 = GetVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Spell1 ", )GetOldSpell2 = GetVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Spell2 ", )GetOldSpell3 = GetVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Spell3 ", )GetOldSpell4 = GetVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Spell4 ", )ShapeShifted = GetVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) &", " Shifted ")If ShapeShifted = " False " ThenCall PutVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) &", " Shifted ", True)Call PutVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Sprite ", GetPlayerSprite(index)) Call PutVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Weapon ", GetPlayerWeaponSlot(index)) Call PutVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Armor ", GetPlayerArmorSlot(index)) Call PutVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Spell 1 ", GetPlayerSpellSlot(index, 1)) Call PutVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Spell 2 ", GetPlayerSpellSlot(index, 2)) Call PutVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Spell 3 ", GetPlayerSpellSlot(index, 3))Call PutVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Spell 4 ", GetPlayerSpellSlot(index, 4))Call PutVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Helmet ", GetPlayerHelmetSlot(index))Call PutVar( " Shapeshifter / " & GetPlayerAccount(index) & ".ini", " & GetPlayerName(Index) & ", " Shield ", GetPlayerShieldSlot(index))Call SetPlayerStr(Index, GetPlayerSTR(Index) + 5 ) Call SetPlayerDef(Index, GetPlayerDEF(Index) - 15 ) Call SetPlayerSpd(Index, GetPlayerSPD(Index) + 20 ) Call SetPlayerMaxHP(Index, GetPlayerMaxHP(Index) / 2 ) Call SetPlayerMaxMP(Index, GetPlayerMaxMP(Index) / 2 ) Call SetPlayerHP(Index, GetPlayerHP(Index) / 2 ) Call SetPlayerMP(Index, GetPlayerMP(Index) / 2 ) Call SetPlayerSprite(Index, 110) Call SetPlayerSpellSlot(Index, 1, 1) Call SetPlayerSpellSlot(Index, 2, 2) Call SetPlayerSpellSlot(Index, 3, 3)Call SetPlayerSpellSlot(Index, 4, 4)Call SetPlayerWeaponSlot(Index, 10)Call SetPlayerArmorSlot(Index, 11)Call SetPlayerShieldSlot(Index, 12)Call SetPlayerHelmetSlot(Index, 13)Call PlayerMsg(Index, " you are now a tiger! ", 10)Call SendPlayerData(index)SendStats(index)SendHP(Index)SendMP(index)End IfExit SubElseIf ShapeShifted = " True " ThenCall SetPlayerStr(Index, GetPlayerSTR(Index) - 5 ) Call SetPlayerDef(Index, GetPlayerDEF(Index) + 15 ) Call SetPlayerSpd(Index, GetPlayerSPD(Index) - 20 ) Call SetPlayerMaxHP(Index, GetPlayerMaxHP(Index) * 2 ) Call SetPlayerMaxMP(Index, GetPlayerMaxMP(Index) * 2 ) Call SetPlayerHP(Index, GetPlayerHP(Index) * 2 ) Call SetPlayerMP(Index, GetPlayerMP(Index) * 2 ) Call SetPlayerSprite(Index, GetOldSprite) Call SetPlayerSpellSlot(Index, 1, GetOldSpell1) Call SetPlayerSpellSlot(Index, 2, GetOldSpell2) Call SetPlayerSpellSlot(Index, 3, GetOldSpell3)Call SetPlayerSpellSlot(Index, 4, GetOldSpell4)Call SetPlayerWeaponSlot(Index, GetOldWeapon)Call SetPlayerArmorSlot(Index, GetOldArmor)Call SetPlayerShieldSlot(Index, GetOldShield)Call SetPlayerHelmetSlot(Index, GetOldHelmet)Call PlayerMsg(Index, " You have successfully shifted back to human form! " 10)Call SendPlayerData(index)SendStats(index)SendHP(Index)SendMP(index)End If``` Link to comment Share on other sites More sharing options...
Cellino Posted September 1, 2008 Author Share Posted September 1, 2008 bump, sorry for double post but I really really need this to work. Link to comment Share on other sites More sharing options...
balliztik1 Posted September 1, 2008 Share Posted September 1, 2008 You're putting a lot of spaces in your quotation marks. Those will all fail in the script, since the .ini locations wouldn't have those same spaces in them.I've included a VBScript editor that DemonX posted a while back. There's quite a few errors. This will show you how to clean it up. Link to comment Share on other sites More sharing options...
Cellino Posted September 1, 2008 Author Share Posted September 1, 2008 Okay, I did that and everything works now except the putvar =\ It doesn't create the file. Should it? I'm using EE 2.7. Link to comment Share on other sites More sharing options...
Firon3 Posted September 1, 2008 Share Posted September 1, 2008 > If GetPlayerX(index) = 1 and GetPlayerY(index) = 1 and GetVar("partyquests/PQ.ini", "Mining Cave") = "Empty" Thencorrect structure always makes it easyer… as previously said - removing useless spacing will resur in better things, you may end up with manny errors since [HEADER] is different from [HEADER ]There are easyer way to do a shapeshift… but that's not the point... Point is that in your headers, lines and values, you put too much useless spacing wich may result in doing the wrong thing... PutVar looks for the following dirrectory:"%20Shapeshifter%20/%20" while the correct directory is "Shapeshifter/" now this makes a big difference... you may want to correct that... Link to comment Share on other sites More sharing options...
Cellino Posted September 1, 2008 Author Share Posted September 1, 2008 ```Case 1Dim ShapeShiftedDim GetOldSpriteDim GetOldWeaponDim GetOldArmorDim GetOldShieldDim GetOldHelmetDim GetOldSpell1Dim GetOldSpell2Dim GetOldSpell3Dim GetOldSpell4GetOldSprite = GetVar("Shapeshifter/"& GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) & ", " Sprite ")GetOldWeapon = GetVar("Shapeshifter/"& GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) & ", " Weapon ")GetOldArmor = GetVar("Shapeshifter/"& GetPlayerLogin(index) &".ini", " & GetPlayerName(Index) & ", " Armor ")GetOldShield = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", " & GetPlayerName(Index) & ", " Shield ")GetOldHelmet = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", " & GetPlayerName(Index) & ", " Helmet ")GetOldSpell1 = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", " & GetPlayerName(Index) & ", " Spell1 ")GetOldSpell2 = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", " & GetPlayerName(Index) & ", " Spell2 ")GetOldSpell3 = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", " & GetPlayerName(Index) & ", " Spell3 ")GetOldSpell4 = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", " & GetPlayerName(Index) & ", " Spell4 ")ShapeShifted = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", " & GetPlayerName(Index) &", " Shifted ")If ShapeShifted = "1" ThenCall PutVar("Shapeshifter/"& GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Shifted", 2)Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Sprite ", GetPlayerSprite(index))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Weapon ", GetPlayerWeaponSlot(index))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Armor ", GetPlayerArmorSlot(index))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Spell 1 ", GetPlayerSpellSlot(index, 1))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Spell 2 ", GetPlayerSpellSlot(index, 2))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Spell 3 ", GetPlayerSpellSlot(index, 3))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Spell 4 ", GetPlayerSpellSlot(index, 4))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Helmet ", GetPlayerHelmetSlot(index))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Shield ", GetPlayerShieldSlot(index))Call SetPlayerStr(Index, GetPlayerSTR(Index) + 5 )Call SetPlayerDef(Index, GetPlayerDEF(Index) - 15 )Call SetPlayerSpd(Index, GetPlayerSPD(Index) + 20 )Call SetPlayerMaxHP(Index, GetPlayerMaxHP(Index) / 2 ) Call SetPlayerMaxMP(Index, GetPlayerMaxMP(Index) / 2 )Call SetPlayerHP(Index, GetPlayerHP(Index) / 2 ) Call SetPlayerMP(Index, GetPlayerMP(Index) / 2 )Call SetPlayerSprite(Index, 110)Call SetPlayerSpellSlot(Index, 1, 1)Call SetPlayerSpellSlot(Index, 2, 2)Call SetPlayerSpellSlot(Index, 3, 3)Call SetPlayerSpellSlot(Index, 4, 4)Call SetPlayerWeaponSlot(Index, 10)Call SetPlayerArmorSlot(Index, 11)Call SetPlayerShieldSlot(Index, 12)Call SetPlayerHelmetSlot(Index, 13)Call PlayerMsg(Index, " you are now a tiger! ", 10)Call SendPlayerData(index)SendStats(index)SendHP(Index)SendMP(index)End IfIf ShapeShifted = "2" ThenCall PutVar("Shapeshifter/"& GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Shifted", 1)Call SetPlayerStr(Index, GetPlayerSTR(Index) - 5 )Call SetPlayerDef(Index, GetPlayerDEF(Index) + 15 )Call SetPlayerSpd(Index, GetPlayerSPD(Index) - 20 )Call SetPlayerMaxHP(Index, GetPlayerMaxHP(Index) * 2 ) Call SetPlayerMaxMP(Index, GetPlayerMaxMP(Index) * 2 )Call SetPlayerHP(Index, GetPlayerHP(Index) * 2 ) Call SetPlayerMP(Index, GetPlayerMP(Index) * 2 )Call SetPlayerSprite(Index, GetOldSprite)Call SetPlayerSpellSlot(Index, 1, GetOldSpell1)Call SetPlayerSpellSlot(Index, 2, GetOldSpell2)Call SetPlayerSpellSlot(Index, 3, GetOldSpell3)Call SetPlayerSpellSlot(Index, 4, GetOldSpell4)Call SetPlayerWeaponSlot(Index, GetOldWeapon)Call SetPlayerArmorSlot(Index, GetOldArmor)Call SetPlayerShieldSlot(Index, GetOldShield)Call SetPlayerHelmetSlot(Index, GetOldHelmet)Call PlayerMsg(Index, " You have successfully shifted back to human form! ", 10 )Call SendPlayerData(index)SendStats(index)SendHP(Index)SendMP(index)End IfEnd Select```Still nothing. Nothing is being made. Link to comment Share on other sites More sharing options...
Firon3 Posted September 5, 2008 Share Posted September 5, 2008 ```Case 1Dim ShapeShiftedDim GetOldSpriteDim GetOldWeaponDim GetOldArmorDim GetOldShieldDim GetOldHelmetDim GetOldSpell1Dim GetOldSpell2Dim GetOldSpell3Dim GetOldSpell4GetOldSprite = GetVar("Shapeshifter/"& GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) & ", " Sprite ")GetOldWeapon = GetVar("Shapeshifter/"& GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) & ", " Weapon ")GetOldArmor = GetVar("Shapeshifter/"& GetPlayerLogin(index) &".ini", " & GetPlayerName(Index) & ", " Armor ")GetOldShield = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", " & GetPlayerName(Index) & ", " Shield ")GetOldHelmet = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", " & GetPlayerName(Index) & ", " Helmet ")GetOldSpell1 = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", " & GetPlayerName(Index) & ", " Spell1 ")GetOldSpell2 = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", " & GetPlayerName(Index) & ", " Spell2 ")GetOldSpell3 = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", " & GetPlayerName(Index) & ", " Spell3 ")GetOldSpell4 = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", " & GetPlayerName(Index) & ", " Spell4 ")ShapeShifted = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", " & GetPlayerName(Index) &", " Shifted ")If ShapeShifted = "" ThenCall PutVar("Shapeshifter/"& GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Shifted", "2")Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Sprite ", GetPlayerSprite(index))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Weapon ", GetPlayerWeaponSlot(index))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Armor ", GetPlayerArmorSlot(index))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Spell 1 ", GetPlayerSpellSlot(index, 1))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Spell 2 ", GetPlayerSpellSlot(index, 2))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Spell 3 ", GetPlayerSpellSlot(index, 3))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Spell 4 ", GetPlayerSpellSlot(index, 4))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Helmet ", GetPlayerHelmetSlot(index))Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Shield ", GetPlayerShieldSlot(index))Call SetPlayerStr(Index, GetPlayerSTR(Index) + 5 )Call SetPlayerDef(Index, GetPlayerDEF(Index) - 15 )Call SetPlayerSpd(Index, GetPlayerSPD(Index) + 20 )Call SetPlayerMaxHP(Index, GetPlayerMaxHP(Index) / 2 ) Call SetPlayerMaxMP(Index, GetPlayerMaxMP(Index) / 2 )Call SetPlayerHP(Index, GetPlayerHP(Index) / 2 ) Call SetPlayerMP(Index, GetPlayerMP(Index) / 2 )Call SetPlayerSprite(Index, 110)Call SetPlayerSpellSlot(Index, 1, 1)Call SetPlayerSpellSlot(Index, 2, 2)Call SetPlayerSpellSlot(Index, 3, 3)Call SetPlayerSpellSlot(Index, 4, 4)Call SetPlayerWeaponSlot(Index, 10)Call SetPlayerArmorSlot(Index, 11)Call SetPlayerShieldSlot(Index, 12)Call SetPlayerHelmetSlot(Index, 13)Call PlayerMsg(Index, " you are now a tiger! ", 10)Call SendPlayerData(index)SendStats(index)SendHP(Index)SendMP(index)End IfIf ShapeShifted = "2" ThenCall PutVar("Shapeshifter/"& GetPlayerLogin(index) &".ini", "& GetPlayerName(Index) &", "Shifted", "")Call SetPlayerStr(Index, GetPlayerSTR(Index) - 5 )Call SetPlayerDef(Index, GetPlayerDEF(Index) + 15 )Call SetPlayerSpd(Index, GetPlayerSPD(Index) - 20 )Call SetPlayerMaxHP(Index, GetPlayerMaxHP(Index) * 2 ) Call SetPlayerMaxMP(Index, GetPlayerMaxMP(Index) * 2 )Call SetPlayerHP(Index, GetPlayerHP(Index) * 2 ) Call SetPlayerMP(Index, GetPlayerMP(Index) * 2 )Call SetPlayerSprite(Index, GetOldSprite)Call SetPlayerSpellSlot(Index, 1, GetOldSpell1)Call SetPlayerSpellSlot(Index, 2, GetOldSpell2)Call SetPlayerSpellSlot(Index, 3, GetOldSpell3)Call SetPlayerSpellSlot(Index, 4, GetOldSpell4)Call SetPlayerWeaponSlot(Index, GetOldWeapon)Call SetPlayerArmorSlot(Index, GetOldArmor)Call SetPlayerShieldSlot(Index, GetOldShield)Call SetPlayerHelmetSlot(Index, GetOldHelmet)Call PlayerMsg(Index, " You have successfully shifted back to human form! ", 10 )Call SendPlayerData(index)SendStats(index)SendHP(Index)SendMP(index)End IfEnd Select```You hafta check your conditions, in what you had, it looked for an unexisting inin wich reffers to inexisting var ( wich is "" ) so I changed your conditions and putvars to make it check correctly… you need to know something else, your old 1 and 2 should have been written "1" and "2"... that is because it will look for a variable named 2 or cause an error... that is for put/getvar's since its using variable as text... Link to comment Share on other sites More sharing options...
Cellino Posted September 6, 2008 Author Share Posted September 6, 2008 So, Basically my whole problem wasIf ShapeShifted = "1" andCall Putvar( Blah Blah Blah, 2 )?=DAnyways, there's a couple problems,1\. There's a crazy huge lag on it2\. Doesn't read that your char changed.3\. Stats never go back up.4. Variable reads as> [& GetPlayerName(Index) &]> Shifted=2> Sprite=10> Weapon=0> Armor=05\. Text that's supposed to show up doesn't.6\. Sprite doesn't changeAnd that's all the errors =\ Link to comment Share on other sites More sharing options...
Firon3 Posted September 8, 2008 Share Posted September 8, 2008 I havn't properly looked at it… I'll debug it right away:```Case 1 Dim ShapeShifted Dim GetOldSprite Dim GetOldWeapon Dim GetOldArmor Dim GetOldShield Dim GetOldHelmet Dim GetOldSpell1 Dim GetOldSpell2 Dim GetOldSpell3 Dim GetOldSpell4GetOldSprite = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", GetPlayerName(Index), " Sprite ")GetOldWeapon = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", GetPlayerName(Index), "Weapon ")GetOldArmor = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", GetPlayerName(Index), "Armor ")GetOldShield = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", GetPlayerName(Index), " Shield ")GetOldHelmet = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", GetPlayerName(Index), " Helmet ")GetOldSpell1 = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", GetPlayerName(Index), " Spell1 ")GetOldSpell2 = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", GetPlayerName(Index), " Spell2 ")GetOldSpell3 = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", GetPlayerName(Index), " Spell3 ")GetOldSpell4 = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", GetPlayerName(Index), " Spell4 ")ShapeShifted = GetVar("Shapeshifter/"& GetPlayerLogin(index) & ".ini", GetPlayerName(Index), " Shifted ")If ShapeShifted = "" Then Call PutVar("Shapeshifter/"& GetPlayerLogin(index) &".ini", GetPlayerName(Index), "Shifted", "2") Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", GetPlayerName(Index), "Sprite ", GetPlayerSprite(index)) Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", GetPlayerName(Index), "Weapon ", GetPlayerWeaponSlot(index)) Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", GetPlayerName(Index), "Armor ", GetPlayerArmorSlot(index)) Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", GetPlayerName(Index), "Spell 1 ", GetPlayerSpellSlot(index, 1)) Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", GetPlayerName(Index), "Spell 2 ", GetPlayerSpellSlot(index, 2)) Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", GetPlayerName(Index), "Spell 3 ", GetPlayerSpellSlot(index, 3)) Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", GetPlayerName(Index), "Spell 4 ", GetPlayerSpellSlot(index, 4)) Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", GetPlayerName(Index), "Helmet ", GetPlayerHelmetSlot(index)) Call PutVar("Shapeshifter/" & GetPlayerLogin(index) &".ini", GetPlayerName(Index), "Shield ", GetPlayerShieldSlot(index)) Call SetPlayerStr(Index, GetPlayerSTR(Index) + 5 ) Call SetPlayerDef(Index, GetPlayerDEF(Index) - 15 ) Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 20 ) 'Call SetPlayerMaxHP(Index, GetPlayerMaxHP(Index) / 2 ) 'Call SetPlayerMaxMP(Index, GetPlayerMaxMP(Index) / 2 ) 'Call SetPlayerHP(Index, GetPlayerHP(Index) / 2 ) 'Call SetPlayerMP(Index, GetPlayerMP(Index) / 2 ) Call SetPlayerSprite(Index, 110) Call SetPlayerSpellSlot(Index, 1, 1) Call SetPlayerSpellSlot(Index, 2, 2) Call SetPlayerSpellSlot(Index, 3, 3) Call SetPlayerSpellSlot(Index, 4, 4) Call SetPlayerWeaponSlot(Index, 10) Call SetPlayerArmorSlot(Index, 11) Call SetPlayerShieldSlot(Index, 12) Call SetPlayerHelmetSlot(Index, 13) Call PlayerMsg(Index, "You are now a tiger!", 10) Call SendPlayerData(index) Call SendStats(index) Call SendHP(Index) Call SendMP(index)End IfIf ShapeShifted = "2" Then Call PutVar("Shapeshifter/"& GetPlayerLogin(index) &".ini", GetPlayerName(Index), "Shifted", "") Call SetPlayerStr(Index, GetPlayerSTR(Index) - 5 ) Call SetPlayerDef(Index, GetPlayerDEF(Index) + 15 ) Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) - 20 ) 'Call SetPlayerMaxHP(Index, GetPlayerMaxHP(Index) * 2 ) 'Call SetPlayerMaxMP(Index, GetPlayerMaxMP(Index) * 2 ) 'Call SetPlayerHP(Index, GetPlayerHP(Index) * 2 ) 'Call SetPlayerMP(Index, GetPlayerMP(Index) * 2 ) Call SetPlayerSprite(Index, GetOldSprite) Call SetPlayerSpellSlot(Index, 1, GetOldSpell1) Call SetPlayerSpellSlot(Index, 2, GetOldSpell2) Call SetPlayerSpellSlot(Index, 3, GetOldSpell3) Call SetPlayerSpellSlot(Index, 4, GetOldSpell4) Call SetPlayerWeaponSlot(Index, GetOldWeapon) Call SetPlayerArmorSlot(Index, GetOldArmor) Call SetPlayerShieldSlot(Index, GetOldShield) Call SetPlayerHelmetSlot(Index, GetOldHelmet) Call PlayerMsg(Index, "You have successfully shifted back to human form! ", 10 ) Call SendPlayerData(index) Call SendStats(index) Call SendHP(Index) Call SendMP(index)End IfEnd Select```Notes:* I removed all errors concerning the PutVar and GetVar 's errors* I also commented instances of buggy things (moslty thinking about SetPlayerMaxHP)* Fixed SetPlayerSPD for SetPlayerSPEED* Changed structure to make it easyer to re-read* Added "Call" before missing statements (Call SendHP(index) and others)I believe it should work fine by now… Link to comment Share on other sites More sharing options...
Cellino Posted September 9, 2008 Author Share Posted September 9, 2008 Still no good, nothing changes. ( except stats, but they don't change back ) Whatever, I'll make it so that it only changes 3 spells, and sprite. Unless you guys can think of an easier way of doing it. Link to comment Share on other sites More sharing options...
DrNova Posted September 10, 2008 Share Posted September 10, 2008 The thing about the items, if they dont have the item in the same slot as when the .ini was created, that will cause issues.There isnt really a foolproof way to script re-equipping something.If I were you, take out all the extra .ini's and vars.Make it set their slot automatically to 0, likesetplayersheildslot(index, 0)repeatThey will have to re equip their items by themselves, but its a small task.Trying to script re-equipping of an item they had before a "shift" would require many checks to see if the item was in their inv, finding the items new slot if its changed, ect.I advise against scripting "equipping", only un-equipping Link to comment Share on other sites More sharing options...
Cellino Posted September 10, 2008 Author Share Posted September 10, 2008 Well, what I was originally trying to do was make it so that when they shifted they got the weapon,Sharp Claws, and thin hide for armor. Then they're spells would change to something like Prowl, Pounce, Fury Swipes, and Human Form. Link to comment Share on other sites More sharing options...
DrNova Posted September 10, 2008 Share Posted September 10, 2008 Well, have the player .ini actually save the numbers of the item they have in weapon slot, sheild slot, ect, and THEN set slots to 0 and TAKE the item away."Then when you change em back, you can take away the beast items, and script giving them the item's numbered in the .ini. Link to comment Share on other sites More sharing options...
Cellino Posted September 11, 2008 Author Share Posted September 11, 2008 Well, Let's just say I scratch the idea of the weapons and stuff, that'd make it a whole lot easier right? or just change their weapon and armor instead of everything else. So just to change their armor, weapon, and 3 spells there'd be like half as much code. right? Link to comment Share on other sites More sharing options...
DrNova Posted September 11, 2008 Share Posted September 11, 2008 set their inv slots to 0, so they have nothing equipped, then do a sprite change and class change to a were wolf sprite(or whatever it is) change their stats to the new class stats.Then can change class sprite and stats back afterwords. Wouldnt be hard Link to comment Share on other sites More sharing options...
Cellino Posted September 12, 2008 Author Share Posted September 12, 2008 The problem isn't the items though, my stats aren't changing back to what they originally are. =\ Link to comment Share on other sites More sharing options...
DrNova Posted September 12, 2008 Share Posted September 12, 2008 Here is a snippet of code I use.My stats change between the players actual stats, and stats saved in a .ini for each ship type.Look it over and see if maybe you can see what you can do to fix yours(sorry, I'm to tired to comb through your script right now.)Maybe it will help, maybe not> Sub ScriptedTile(Index, Script)> Dim sname> Dim map> Dim xloc> Dim yloc> Dim sprite> Dim repair> Dim combat> Dim engine> Dim sheild> Dim hull> Dim ship> Dim cmap> Dim cxloc> Dim cyloc> Dim psprite> Dim loc> Dim mcost> Dim power> Dim pmath> Dim sdata> > Select Case Script> Case 0> sname=getvar("/player/" & getplayername(index) & ".ini", "ship", "name")> map=getvar("/loc/exit/" & Getplayermap(index) & ".ini", "data", "map")> xloc=getvar("/loc/exit/" & Getplayermap(index) & ".ini", "data", "x")> yloc=getvar("/loc/exit/" & Getplayermap(index) & ".ini", "data", "y")> sprite=getvar("/ship/" & TRIM(sname) & ".ini", "data", "sprite")> repair=getvar("/player/" & Getplayername(index) & ".ini", "ship", "repair")> combat=getvar("/ship/" & TRIM(sname) & ".ini", "data", "combat")> engine=getvar("/ship/" & TRIM(sname) & ".ini", "data", "engine")> sheild=getvar("/ship/" & TRIM(sname) & ".ini", "data", "sheild")> hull=getvar("/ship/" & TRIM(sname) & ".ini", "data", "hull")> ship=getvar("/ship/" & TRIM(sname) & ".ini", "data", "class")> > If repair=1 Then> call setplayersprite(index, 1)> Call setplayerstr(index, 50)> call setplayerspeed(index, 300)> call setplayerdef(index, 0)> call setplayerhp(index, 300)> call setplayermagi(index, 100)> call setplayermp(index, 100)> Call SetPlayerArmorSlot(Index, 0)> Call SetPlayerWeaponSlot(Index, 0)> Call SetPlayerHelmetSlot(Index, 0)> Call SetPlayerShieldSlot(Index, 0)> Call SetPlayerNecklaceSlot(Index, 0)> Call SetPlayerRingSlot(Index, 0)> Call SetPlayerLegsSlot(Index, 0)> Call setplayerclass(index, 10)> Call sendstats(index)> call playerwarp(index, INT(map), INT(xloc), INT(yloc))> call putvar("/player/" & getplayername(index) & ".ini", "data", "mode", 1)> Call battlemsg(index, "Your ship needs repair, Temporary JumpPod issued", RED, 1)> > Else> Call setplayersprite(index, INT(sprite))> Call setplayerstr(index, INT(combat))> call setplayerspeed(index, INT(hull))> call setplayerdef(index, INT(sheild))> call setplayerhp(index, INT(hull))> call setplayermagi(index, INT(engine))> call setplayermp(index, INT(engine))> Call SetPlayerArmorSlot(Index, 0)> Call SetPlayerWeaponSlot(Index, 0)> Call SetPlayerHelmetSlot(Index, 0)> Call SetPlayerShieldSlot(Index, 0)> Call SetPlayerNecklaceSlot(Index, 0)> Call SetPlayerRingSlot(Index, 0)> Call SetPlayerLegsSlot(Index, 0)> Call setplayerclass(index, INT(ship))> Call sendstats(index)> call playerwarp(index, INT(map), INT(xloc), INT(yloc))> call putvar("/player/" & getplayername(index) & ".ini", "data", "mode", 1)> End If> Exit Sub> > Case 1> cmap=getvar("/loc/city/" & Getplayermap(index) & ".ini", "data", "map")> cxloc=getvar("/loc/city/" & Getplayermap(index) & ".ini", "data", "x")> cyloc=getvar("/loc/city/" & Getplayermap(index) & ".ini", "data", "y")> psprite=getvar("/player/" & getplayername(index) & ".ini", "player", "sprite")> > Call setplayersprite(index, INT(psprite))> Call setplayerclass(index, 1)> Call SetPlayerArmorSlot(Index, 0)> Call SetPlayerWeaponSlot(Index, 0)> Call SetPlayerHelmetSlot(Index, 0)> Call SetPlayerShieldSlot(Index, 0)> Call SetPlayerNecklaceSlot(Index, 0)> Call SetPlayerRingSlot(Index, 0)> Call SetPlayerLegsSlot(Index, 0)> Call setplayerstr(index, 10)> call setplayerspeed(index, 50)> call setplayerdef(index, 0)> call setplayerhp(index, 50)> call setplayermagi(index, 0)> call setplayermp(index, 0)> Call sendstats(index)> call putvar("/player/" & getplayername(index) & ".ini", "data", "mode", 0)> call playerwarp(index, INT(cmap), INT(cxloc), INT(cyloc))> Exit Sub Link to comment Share on other sites More sharing options...
Cellino Posted September 12, 2008 Author Share Posted September 12, 2008 > ```> call setplayerspeed(index, INT(hull))> call setplayerdef(index, INT(sheild))> call setplayerhp(index, INT(hull))> ```[ off topic ] Wouldn't speed actually be engine? ;) [/off topic]Anyways I like the way you made that. I think I'll manipulate that script and use it ( with your permission of course. ;) ) Link to comment Share on other sites More sharing options...
DrNova Posted September 13, 2008 Share Posted September 13, 2008 No, see, SP is worthless(imo)I dislike the running anyways, as the zipping around looks cheesy.and the "energy" either runs out to fast, or lasts to long, I just dont like the system.So I modified my stats.ini to make SP be hull strength, or "hp"Seperates the combat stat from the HP stat, and makes use of what is to me, an otherwise usless stat. 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