Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] Multiple Item Drops and Percentile Chances


balliztik1
 Share

Recommended Posts

Im having the same problem where it points to .sound… but i just need to compile it...it doesnt require me to compile something in the source first to compile the client do i?
ALSO if anyone knows how to fix this... somewhere along the line when i was adding equipment slots and a few other things i dont think mod anything around the spell system fuction(client side) i now have a problem where it doesnt show the spell number select in the item editor... i dont know if i removed that fuction all together or just messed it up... im thinking that it gave me an error pointing to it and not paying attention i just deleted a few or all lines of that function... anyone know how to set in that whole fuction all together again?
Link to comment
Share on other sites

  • Replies 109
  • Created
  • Last Reply

Top Posters In This Topic

I have a compile error. I know that it won't be compatible with the new origins but i tried it. I get an error saying "Compile error: Can't assign to array" and highlights ".Droptem". Is there anyway i could fix this.

EDIT: I fixed the error above. Now i have the .cmb sound error and i do have the Sound As String * Name_Length part
Link to comment
Share on other sites

Hmmm I'm getting a Compile Error: Variable not defined at

Private Sub scrlDrop_Change()
  "HERE" DropIndex "HERE" = scrlDrop.Value
    fraDrop.Caption = "Drop - " & DropIndex
    txtChance.text = NPC(EditorIndex).DropChance(DropIndex)
    scrlNum.Value = NPC(EditorIndex).DropItem(DropIndex)
    scrlValue.Value = NPC(EditorIndex).DropItemValue(DropIndex)
End Sub

I've retried the tut about 10 times… any ideas? ^^

Figured it out I downloaded the frm for npc edt but was adding the custom scroll drop etc to my all ready custom NPC editor and realised i needed

Private DropIndex As Byte
under
Option Explicit
Link to comment
Share on other sites

@☻Valon☻:

> Wait also just mentioning that this error was from that frmEditor_NPC (the one that he gave as an attachment) and I didn't touch it at all. Did anyone get the same error? :O
>
> EDIT: It works now ;D Nvm!

If you've fixed the problem perhaps you could post the solution for those still experience this problem? :)
Link to comment
Share on other sites

  • 1 month later...
Anyone know the fix for this

Private Sub scrlDrop_Change()
  "HERE" DropIndex "HERE" = scrlDrop.Value
    fraDrop.Caption = "Drop - " & DropIndex
    txtChance.text = NPC(EditorIndex).DropChance(DropIndex)
    scrlNum.Value = NPC(EditorIndex).DropItem(DropIndex)
    scrlValue.Value = NPC(EditorIndex).DropItemValue(DropIndex)
End Sub

I tried what pinkbun said and it didnt solve it
Link to comment
Share on other sites

finally i got this working, however, i had to rewrite the majority of the code to make it work. thanks for this tutorial it was a great stepping stone for me to code this.
Cheers mate

Btw i would post the fixes for the less experienced coders, however, i cant remember which parts needed changed, all i know is it works.
Link to comment
Share on other sites

  • 2 weeks later...
Thanks for telling me but I'm getting this error at server:
![](http://i56.tinypic.com/2vto1zm.png)

And this one at client:
![](http://i51.tinypic.com/11rur8p.png)

(I'm using modifications(S) 2.6 nova btw.)
Link to comment
Share on other sites

> (I'm using modifications(S) 2.6 nova btw.)

That's your problem right there. -_-

You replaced the npc UDT completely thus wiping out any modifications done in Richy's edit. Tutorials aren't a copy & paste affair, I'm afraid to say. They all require basic brain power.

You removed the 'damage' variable completely and didn't change the scrollbar code as it was laid out for you.
Link to comment
Share on other sites

Allright no compile errors this time, however when I do 0.2 or 1/2 for example, go to drop 2 and back it's 0 again.
Also when I kill an NPC I get "Subscript out of range", (server side)
when I log back in when this happends I get: -1717986918 at spawn rate in seconds.
Link to comment
Share on other sites

These udt's are these "dim … as ..."  right?

I looked to the code and the things I added were:
Dim DropIndex as long (client) , Added this one under "Dim i As Long" at NpcEditorInit() like DJMaxus said. And everywhere I recieved an error from DropIndex.

Server side I added:
        Dim vNpcNum As Long
        Dim Victim As Long

Under 'Drop the goods if they get it I added:
        Dim vNpcNum As Long
        Dim Victim As Long
(after the code from the starting post)
(I saw these ones somewhere else under "'Old EO version coding. Lightning's Edit." also as long, so I though it would be ok)

Thanks a lot for helping :D

---

What's bueller btw? xD
Link to comment
Share on other sites

seems like UDT's are pieces of codes. My bad

I tried to run it from VB6, it gave an error when I tried to change "chance" (doesn't matter what number, even if I hit the box just 1 time and then click at somewhere else it gives an error)
I clicked debug to see wich line gives an error

all down at Down at Private Sub txtChance_Validate(Cancel As Boolean)

chanceErr:
    MsgBox "Invalid entry for chance! " & Err.Description
    txtChance.text = "0"
**    Npc(EditorIndex).DropChance(DropIndex) = 0**

Anyone could help me some more please? :embarrassed:
Link to comment
Share on other sites

It's late now so I'll search for some more tutorials about this udt thing tomorrow after school. I hope I could fix it then, still if anyone likes to give me a fix for this (or at least give me a tip/good tutorial website ^_^) I would really appreciate it.

Thanks
Link to comment
Share on other sites

I just finished implement NPC Multiple Drop, from scratch but use this as reference.
It's basically the same as this, except it work on EO 2.0 and I added 2 things :

* Randomized before Rnd. Another method would be to use RAND, included in EO.
* Added a quest item check. If the item is a quest item, check to see if the player have the quest. If not, don't drop it.

Some notes on how to use this on EO 2.0 :

* Only use this as a reference and code it from scratch. It's not that much work. Download the files, open the form and read it/compare with EO 2.0 form. Add/change only the necessary stuff.
* All you have to do are: add/change some UDT in NPCRec, drop each item in a loop in modCombat(PlayervsNPC), add new scroll bar to frmNPC, then finally debug it and make some small changes.

Sincerely,
Rithy
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...