Ertzel Posted November 14, 2010 Share Posted November 14, 2010 Ya, its not working that way for me… Its only letting me set them as 0 or 1 and if I do anything thats like 2.0 or something it changes it to 0.... So its either an item drops 100% of the time or 0% of the time....the code for entering shit into txtChange is this...```Private Sub txtChance_Change() On Error GoTo chanceErr Dim DropIndex As Long If Not IsNumeric(txtChance.text) And Not Right$(txtChance.text, 1) = "%" And Not InStr(1, txtChance.text, "/") > 0 And Not InStr(1, txtChance.text, ".") Then txtChance.text = "0" Npc(EditorIndex).DropChance(DropIndex) = 0 Exit Sub End If If Right$(txtChance.text, 1) = "%" Then txtChance.text = left(txtChance.text, Len(txtChance.text) - 1) / 100 ElseIf InStr(1, txtChance.text, "/") > 0 Then Dim i() As String i = Split(txtChance.text, "/") txtChance.text = Int(i(0) / i(1) * 1000) / 1000 End If If txtChance.text > 1 Or txtChance.text < 0 Then Err.Description = "Value must be between 0 and 1!" GoTo chanceErr End If Npc(EditorIndex).DropChance(DropIndex) = txtChance.text Exit SubchanceErr: MsgBox "Invalid entry for chance! " & Err.Description txtChance.text = "0" Npc(EditorIndex).DropChance(DropIndex) = 0End Sub```Thats what it is in the attached frm_Editor_NPC and that only lets it be 0 or 1… Link to comment Share on other sites More sharing options...
viciousdead Posted November 14, 2010 Share Posted November 14, 2010 @Ertzel:> Ya, its not working that way for me… Its only letting me set them as 0 or 1 and if I do anything thats like 2.0 or something it changes it to 0.... So its either an item drops 100% of the time or 0% of the time....> > the code for entering shit into txtChange is this...> ```> Private Sub txtChance_Change()> On Error GoTo chanceErr> Dim DropIndex As Long> > If Not IsNumeric(txtChance.text) And Not Right$(txtChance.text, 1) = "%" And Not InStr(1, txtChance.text, "/") > 0 And Not InStr(1, txtChance.text, ".") Then> txtChance.text = "0"> Npc(EditorIndex).DropChance(DropIndex) = 0> Exit Sub> End If> > If Right$(txtChance.text, 1) = "%" Then> txtChance.text = left(txtChance.text, Len(txtChance.text) - 1) / 100> ElseIf InStr(1, txtChance.text, "/") > 0 Then> Dim I() As String> I = Split(txtChance.text, "/")> txtChance.text = Int(I(0) / I(1) * 1000) / 1000> End If> > If txtChance.text > 1 Or txtChance.text < 0 Then> Err.Description = "Value must be between 0 and 1!"> GoTo chanceErr> End If> > Npc(EditorIndex).DropChance(DropIndex) = txtChance.text> Exit Sub> > chanceErr:> MsgBox "Invalid entry for chance! " & Err.Description> txtChance.text = "0"> Npc(EditorIndex).DropChance(DropIndex) = 0> End Sub> ```> Thats what it is in the attached frm_Editor_NPC and that only lets it be 0 or 1…No, you don't understand, you cannot go above or bellow 0 & 1 everything between 0 & 1 you can pick, Example: 0.001, 0.00002499429, 0.12894718742047990127490, 0.5 = 1/2… Link to comment Share on other sites More sharing options...
Ertzel Posted November 14, 2010 Share Posted November 14, 2010 Thats the problem… if something is set to like 1/2 (so it goes to 0.5) it wont save as 0.5, it will only save as either 0 or 1..... Link to comment Share on other sites More sharing options...
viciousdead Posted November 14, 2010 Share Posted November 14, 2010 @Ertzel:> Thats the problem… if something is set to like 1/2 (so it goes to 0.5) it wont save as 0.5, it will only save as either 0 or 1.....Oh, then redo the tut, that's what I have had to do in the past, it shouldn't take you long. Link to comment Share on other sites More sharing options...
Ertzel Posted November 14, 2010 Share Posted November 14, 2010 I have, it keeps giving me the same prob…. Link to comment Share on other sites More sharing options...
Bafoon Posted November 19, 2010 Share Posted November 19, 2010 I got the error, cant assign to array, my friend had the same problem. on line,```Npc(EditorIndex).DropItem = scrlNum.Value```and .DropItem was highlighted. Link to comment Share on other sites More sharing options...
iSKweek Posted February 13, 2011 Share Posted February 13, 2011 Would it be possible for you to update this for the latest version of EO please? I have tried sorting out the differences and problems but I am not quite good enough at this just yet :P Link to comment Share on other sites More sharing options...
dream1204 Posted February 15, 2011 Share Posted February 15, 2011 Same as above….. I am using EO1.50\. And I can't find "'drop the goods if......" in GameLogic and ModPlayer files...... plz help me with this. Teach me how to do multi-item drop in EO 1.50 :) Link to comment Share on other sites More sharing options...
iSKweek Posted February 16, 2011 Share Posted February 16, 2011 Re-do the tutorial. I found out it was just a mistake I made personally. This tutorial works fine. Link to comment Share on other sites More sharing options...
dream1204 Posted February 16, 2011 Share Posted February 16, 2011 redo this 4 times. I make it works! Great! Thanks a lot.However, I got a little problem that in my chance value in editor, there will be a huge number in it… Everytime I want to change the chance, I have to delete it, then type in.Just like pic in my attachment....Thank you very much! Link to comment Share on other sites More sharing options...
JessicaLecroix Posted February 17, 2011 Share Posted February 17, 2011 I don't mean to be a bother, but is there a way to get this to work in EO 1.5? The way NPC drops are handled seems to have changed completely, as the line```' Drop the goods if they get it```is completely missing, as is the 1.0/1.1 code for how NPC drops are handled. Link to comment Share on other sites More sharing options...
iSKweek Posted February 17, 2011 Share Posted February 17, 2011 Works perfectly fine in 1.5\. That line is still in the source. Pretty sure it is just in modCombat.Ctrl + F is your friend. Link to comment Share on other sites More sharing options...
JessicaLecroix Posted February 18, 2011 Share Posted February 18, 2011 Er, I think I might be a bit of a moron then… This is the code I'm trying to replace, right?``` ' Drop the goods if they get it n = Int(Rnd * Npc(vNpcNum).DropChance) + 1 If n = 1 Then Call SpawnItem(Npc(vNpcNum).DropItem, Npc(vNpcNum).DropItemValue, MapNum, MapNpc(MapNum).Npc(Victim).x, MapNpc(MapNum).Npc(Victim).y) End If```If so, it isn't present anywhere in any server module. If not… Well, then I'm probably just too thick to get this to work. Link to comment Share on other sites More sharing options...
iSKweek Posted February 18, 2011 Share Posted February 18, 2011 Just search through the playerattacknpc sub for it. It is there. If it isn't then redownload EO. Link to comment Share on other sites More sharing options...
Joyce Posted February 19, 2011 Share Posted February 19, 2011 It's still here, things just changed locations and some minor tweaks to the remarks.. But all the code is still there if you know where to look. :) And you can't blatantly copy/paste shit anymore, as the editors have changed as well.. Which is good :PEDIT : This actually requires more work to get it functional with the new Beta then I had anticipated.. It's worth the effort though. :) Link to comment Share on other sites More sharing options...
JessicaLecroix Posted February 20, 2011 Share Posted February 20, 2011 Er, I don't think there's a way to re-download EO 1.5 now that the new beta's out. It's definitely not there. I must have gotten rid of it by accident, and I don't know enough yet to get this working in 2.0, but thank you for your help.–-------EDIT: Nevermind, found a way to get the older version. Thanks again for your help. Link to comment Share on other sites More sharing options...
EclipseCommunity Posted March 17, 2011 Share Posted March 17, 2011 For those trying to find **' Drop the goods if they get it**, trying finding **'Drop the goods if they get it** instead. ;) Link to comment Share on other sites More sharing options...
sigridundset Posted April 13, 2011 Share Posted April 13, 2011 Sorry, I'm new at Eclipse, but try as I might, I cannot find the line : ''Drop the goods if they get it'' in the modGameLogic section or the modPlayer section. I don't know if this makes a difference, but I'm using the v.2 Beta. Please Help Link to comment Share on other sites More sharing options...
Robin Posted April 13, 2011 Share Posted April 13, 2011 This was made a year ago for an older version of the engine. The combat functions have since been moved to modCombat. Link to comment Share on other sites More sharing options...
erkro1 Posted April 23, 2011 Share Posted April 23, 2011 For the people that having trouble with 'Drop the goods if they get it part, try this code (works for me) :```'Drop the goods if they get it For y = 1 To MAX_NPC_DROPS If NPC(npcNum).DropItem(y) = 0 Then Exit For If Rnd <= NPC(npcNum).DropChance(y) Then Call SpawnItem(NPC(npcNum).DropItem(y), NPC(npcNum).DropItemValue(y), mapNum, MapNpc(mapNum).NPC(mapNpcNum).x, MapNpc(mapNum).NPC(mapNpcNum).y) End If Next``` Link to comment Share on other sites More sharing options...
Rithy58 Posted May 8, 2011 Share Posted May 8, 2011 So I'm guessing this doesn't work with EO 2.0 without some modification?Sincerely,Rithy Link to comment Share on other sites More sharing options...
erkro1 Posted May 8, 2011 Share Posted May 8, 2011 Yes Link to comment Share on other sites More sharing options...
NexCarcer Posted May 8, 2011 Share Posted May 8, 2011 I clicked on start with full compile, but I got an error and it said:Compile Error: Method of data member not foundAnd pointed to this line, highlighting the ".sound" part:```soundName = Trim$(Npc(entityNum).Sound)```Any fixes? Link to comment Share on other sites More sharing options...
Yxxe Posted May 8, 2011 Share Posted May 8, 2011 @NexCarcer:> I clicked on start with full compile, but I got an error and it said:> > Compile Error: Method of data member not found> > And pointed to this line, highlighting the ".sound" part:> > ```> soundName = Trim$(Npc(entityNum).Sound)> ```> Any fixes?Load up your server-side code and then go to modTypes. Does your NpcRec look like this?```Private Type NpcRec Name As String * NAME_LENGTH AttackSay As String * 100 Sound As String * NAME_LENGTH Sprite As Long SpawnSecs As Long Behaviour As Byte Range As Byte DropChance(1 To 10) As Double DropItem(1 To 10) As Long DropItemValue(1 To 10) As Long Stat(1 To Stats.Stat_Count - 1) As Byte HP As Long Exp As Long Animation As Long Damage As Long Level As LongEnd Type```You may have the "Sound As String *NAME_LENGTH" missing. Link to comment Share on other sites More sharing options...
NexCarcer Posted May 8, 2011 Share Posted May 8, 2011 Forget it, I'll wait for the next release. I already have a system in place. I have no idea what I'm doing, and I don't think it'll work unless I have someone go on teamviewer with me to fix it. 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