Dastyruck Posted May 19, 2009 Author Share Posted May 19, 2009 So, I was putting in some scripted spells and when I finally got it working, scripted items dont work at all…Here is the scripted item sub.```'********************************Sub ScriptedItem(Index, Script)'********************************Dim levelDim needsDim number Dim numbersDim slotDim has Dim valueDim munDim need Select Case Script Case 0 needs = 6 number = 14 numbers = 2 value = 1 slot=1 has = 0 need = 1 level = GetPlayerMAGI(Index) If level < needs Then Call PlayerMsg(Index, "Your magic is too low to use this.", WHITE) Else Do While slot. 0 < 25 If Int(getplayerinvitemnum(index,slot))=Int(number) Then If Int(value) <= Int(getplayerinvitemvalue(index,slot)) Then has = 1 mun = Int(getplayerinvitemvalue(index,slot) ) slot=25 End If End If slot=slot+1 Loop slot=1 If Int(has) <> Int(need) Then Else Call quest_Take_Item(index, number, value) Do While slot < 25 If Getplayerinvitemnum( index, Int( slot ) ) = 0 Then Call SetPlayerInvItemNum(index, Int( slot ), Int( numbers ) ) Call SetPlayerInvItemValue(index, Int( slot ), Int(1) ) Call SendInventoryUpdate(index, Int(slot) ) slot = 25 End If slot = slot + 1 Loop End If End If Exit Sub Case Else Call PlayerMsg(Index, "No item script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End SelectEnd Sub``` Link to comment Share on other sites More sharing options...
Admiral Refuge Posted May 19, 2009 Share Posted May 19, 2009 I haven't looked though the whole thing, but you just have "Do While slot." on line27; that may effect something Link to comment Share on other sites More sharing options...
Dastyruck Posted May 19, 2009 Author Share Posted May 19, 2009 Wow… crazy typo there... But, thanks it works now! XD 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