Kite Posted April 27, 2009 Author Share Posted April 27, 2009 Ok,so I have this script but it has a problem.I need it to be clicked,and equiped it,and then make it where you can not click it again to get the stats over,and over again.Case 3 If GetPlayerShieldSlot(Index) Then Call SetPlayerShieldSlot(Index, 3) call setplayerspell(index, 12, 49) call setplayerSTR(Index, GetPlayerSTR(Index) + 5) call setplayerMAGI(Index, GetPlayerMAGI(Index) + 10) call setplayerDEF(Index, GetPlayerDEF(Index) + 5) Call PlayerMsg(Index, "The twilight bracelet is shining", WHITE) Else If GetPlayerShieldSlot(Index) = 3 Then Call PlayerMsg(Index, "You allready have the bracelet on", WHITE) End If End If Exit SubSo,what could be the problem here?Thanks in advanced.Tsukasa,The Chosen one Link to comment Share on other sites More sharing options...
damian666 Posted April 27, 2009 Share Posted April 27, 2009 this is very weird man…i cant seem to find anything wrong except the different index and Index.not that it matters as far as i know.i even used a up-to-date scripiteditor, no errors detected at all O.oDamian666 Link to comment Share on other sites More sharing options...
Rithy58 Posted April 27, 2009 Share Posted April 27, 2009 This is one mistake.```If GetPlayerShieldSlot(Index) Then```it need to be use like this.```If GetPlayerShieldSlot(Index) = 10 Then```or```If GetPlayerShieldSlot(Index) > 10 Then```10 would be the number item you are checking if the player have that items in the Shield Slot.Sincerely,Rithy Link to comment Share on other sites More sharing options...
damian666 Posted April 27, 2009 Share Posted April 27, 2009 damn XDeven the script error looked over it ^^well, we learn everyday :)Damian666 Link to comment Share on other sites More sharing options...
Rithy58 Posted April 27, 2009 Share Posted April 27, 2009 Well if you were making a Scripted Item. Here is the correct one.```Case 3 If GetPlayerShieldSlot(Index) > 0 Then 'Check if the player have any shield on Call PlayerMsg(Index, "Please remove your current shield first", WHITE) 'If they do, tell them to remove it and exit Exit Sub Else Call SetPlayerShieldSlot(Index, 3) 'Set the player's shield to Item Number 3 Call SetPlayerSpell(Index, 12, 49) 'Set the player's spell slot number 12 to spell number 49 Call SetPlayerSTR(Index, GetPlayerSTR(Index) + 5) 'Increase player's STR by 5 Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 10) 'Increase player's MAGI by 10 Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 5) 'Increase player's DEF by 5 Call PlayerMsg(Index, "The twilight bracelet is shining", WHITE) 'Tell them that they are wearing the item ElseIf GetPlayerShieldSlot(Index) = 3 Then 'If they already have the item, tell them they already have it on Call PlayerMsg(Index, "You already have the bracelet on", WHITE) End If End If Exit Sub```I am not sure if this will work perfectly but there are some problem.1\. It will not take away the item but instead, you'll have one in the Shield Slot and one your inventory.2\. The Item will permanently increased the user stats, which mean, they can use the items multiple time to increase their stats.3\. There might be a problem if the user already have a spell on their spell slot number 12.4\. The item will be Scripted Item. I don't know if it can be used like an Equipment Items. You probably can.Sincerely,RithyPS : For problem number 1, you can use the For i = 1 to 24(or w.e) to find which slot the item located then tell the script to remove it when the item is double clicked. If I have time, I'll do it for you if you want. Link to comment Share on other sites More sharing options...
Kite Posted April 28, 2009 Author Share Posted April 28, 2009 Thanks for the offer,but I like to do all stuff myself.I will keep trying,thanks for the comments. Link to comment Share on other sites More sharing options...
Rithy58 Posted April 28, 2009 Share Posted April 28, 2009 lol I didn't offer to help you script your item but instead, I was trying to teach you with the scripting.It's better if you know how to script because then you won't have to ask questions every time you try to script a simple item.That is why I put comments next to each line of code to explain what each of them does.Sincerely,Rithy Link to comment Share on other sites More sharing options...
Kite Posted April 28, 2009 Author Share Posted April 28, 2009 Oh,okay I read that wrong I was tired when I saw it.I would love for you to teach me :cheesy: Link to comment Share on other sites More sharing options...
dg1423 Posted April 29, 2009 Share Posted April 29, 2009 /facepalm @ everyone@Tsukasa: Meet me in aim, I'll fix this up for ya. Link to comment Share on other sites More sharing options...
Kite Posted April 29, 2009 Author Share Posted April 29, 2009 Ok,I will add you on Aim. Link to comment Share on other sites More sharing options...
Squiddle Posted April 29, 2009 Share Posted April 29, 2009 Um, I'm not exactly sure what you're trying to do, but rings can be made to give stats only when equipped in the item editor? Link to comment Share on other sites More sharing options...
dg1423 Posted April 29, 2009 Share Posted April 29, 2009 He wants a spell to be enabled when you equip it. I want to talk to him to see exactly what he's trying to accomplish because every method posted so far is done incorrectly and fails tremendously. Link to comment Share on other sites More sharing options...
Kite Posted May 1, 2009 Author Share Posted May 1, 2009 Well dg told me what I needed todo so yeah.I am locking this up,as I do with most my topics,to prevent necros :P 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