DeathKnight
-
Posts
49 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Calendar
Posts posted by DeathKnight
-
-
*bump* just wondering if anyone had any opinions on this.
-
To start off, I want to create add onto the item drops so that an NPC drops a random item from an array, i.e. we have array that stores 8 items, instead of creating a multiitem system that supports that many items, I just select this array on the NPC editor and there is a chance to drop any of the items from that array.
My question would be what would the best method to do this be?
The only ways I've thought of doing this have been:
1:Add in the random generator 1-max used items and loop it until it hits one of the items in the array (seems inefficient).
2:Create a Multi-Dimensional array and save it to a file that is loaded on item use. With this though, when an item is deleted, I would have to loop it to move all the value's up and redim it
3:Multi-dimensional array, same as above, but instead of looping and rediming the array, set the value in that spot to -1, then when I'm saving a new item to the array, I can search for -1 and change that to the current item number. I could also have it redim if it's the last item in the array that is -1, so I'm not ending up with uselessly long arrays if I'm adding and removing items from them.
What are everyones thoughts on doing this? -
Player Vital's is stored as an array, so the array is named vital, and HP and MP are stored seperately in the array. I may be wrong on this part, but I believe the HP is stored in spot 1 of the array and MP is stored in 2, and 0 is unused.
```
' Vitals used by Players, Npcs and Classes
Public Enum Vitals
HP = 1
mp
' Make sure Vital_Count is below everything else
Vital_Count
End Enum
``` -
Just looking over this code I caught one small thing this line
```
If itemamount = 0 Or itemamount < .costvalue Or itemamount2 = 0 Or itemamount < .CostValue2 Then
```
should be this```
If itemamount = 0 Or itemamount < .costvalue Or itemamount2 = 0 Or itemamount2 < .CostValue2 Then
```
otherwise it's compairing item amount 1 to item cost 2 -
You will definately need to edit where the map actually draws. Check the modgraphics (or modDirectDraw7) depending on your version. I.e. in EO 2.0.1 you have this sub
```
Public Sub BltMapTile
```
with this bit of code in it
```
For i = MapLayer.Ground To MapLayer.Mask2
```
That would need to be changed to draw mask3 -
No, he is surprised that instead of taking what you've been told and trying, you expect people to find it for you. Try searching for "Sub TryPlayerAttackPlayer" or something like this. This sub controls what happens when a player trys to attack another player. You just need to add a check somewhere in there BEFORE it calls the actual attack sub.
-
I think he was trying to say that for EA you actually have to use transparency, it doesn't automatically look at the first pixel.
-
I absolutely love how he actually gave you an answer of where to look, and then you try to rip him apart because he suggested going to ask the custom versions owner on his forums, and that you should use a better engine…
-
I'm sure if someone had a 52" monitor, that an eclipse game would be the last thing they're playing ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) .
Besides, if you are going to make a game, you need to learn to code eventually, and you could probably rip the feature from dragon eclipse -
if it is saving it as a whole number, just change it to
(Spell(SpellNum).Multiplier)/10) saving it as a double should work, since it allows decimals, but at the same time it eats more memory (a double is 8 bytes, if you aren't going to go over a multiplier of 25.5, just use a byte and its only, well, a byte). -
Looking at the above, I would have to guess he gets it when he clicks the create character button.
Did you make sure to add a malequip and femalequip into the text file for your current classes? -
> Posted 12 October 2006 - 12:45 PM
I think this could be why the pics aren't showing… -
About the MapBlock, it was already being redimmed, however the call was being made after an update mapblock. No need to add in a redim, just need to in sub SpawnMapNpcs move
```
CacheMapBlocks mapNum
```
to above
```
For i = 1 To MAX_MAP_NPCS
Call SpawnNpc(i, mapNum)
Next
``` -
Or you could just edit the attack function to check if member is in the same guild, and exit function if they are, so they don't kill each other.
Then you just add in a check if they are on a PVP map if you want them to be able to fight. -
Someone in a different thread said something about it having something to do with the spell packets. Maybe it was just the version I was using that this worked in. Anyways, it was said in the suggestions that they are looking into this.
-
-
One small thing I noticed, when you are editing a map and have an NPC on it, if you change the map size too high (i.e. 50, 50) the server will crash on sub updatemapblock
I narrowed it down to the updatemapblock in the Sub SpawnNpc -
One thing I noticed also, if you skip 23, make 24, then go make 23 it doesn't break.
Actually I tried deleting 22-28 after I tried this and the bug didn't repeat. Looks like it is just the first time around that it does it. -
This has it already in it, so you can download it and rip it. I don't think I've seen a tutorial on it yet.
[http://www.touchofdeathforums.com/community/index.php?/topic/129648-eclipse-instancing-mappacks-style/page__hl__instanced](http://www.touchofdeathforums.com/community/index.php?/topic/129648-eclipse-instancing-mappacks-style/page__hl__instanced) -
It wouldn't be too hard to code, just look into
```
Sub CheckResource
```
and find where it says " ' cut it down! "
From there you can do whatever you want, i.e.
```
if rnd() > .25 then
```
Don't forget the end if. That would just put it at roughly a 75% chance of success. I don't think I've seen any tutorials about this, unless they are buried. But this should show you were to code everything in. -
3740013083
-
For the 2nd part, when the player dies, it should be fairly easy to edit. Server side just look for
```
Sub OnDeath
```
And add whatever code you need to be run when the player dies there. The other one could be done a few different ways, but it would depend when you want something to happen. If you want something to happen when the players health drops below a certain point after an NPC hit him, just find
```
Sub NpcAttackPlayer
```
and add a check in there after the damage is taken. -
That being said, it would be really easy to edit a stat to add defense. If you search
```
Public Sub TryNpcAttackPlayer
```
You just have to set a stat to affect damage. i.e. you can change this code
```
' if the player blocks, take away the block amount
blockAmount = CanPlayerBlock(index)
Damage = Damage - blockAmount
```
to something like this
```
' if the player blocks, take away the block amount
blockAmount = CanPlayerBlock(index)
Damage = Damage - blockAmount - (GetPlayerStat(index, Endurance) / 2)
```
Although I don't suggest doing it like that, because then anyone with ungodly endurance wouldn't take any damage
(also, this is just the example for NPC attacks, you would still cause just as much damage on them)
BTW, if you don't want to do it yourself, here is a link to the tutorial he was refering to, I believe.
[http://www.touchofdeathforums.com/community/index.php?/topic/120075-eo-adding-real-defence-server-only/](http://www.touchofdeathforums.com/community/index.php?/topic/120075-eo-adding-real-defence-server-only/)
Dynamic Arrays(?) and creating a random item system
in Q & A
Posted
The current loot system is that you have your NPC Editor which you have to select the item, and amount of items, per drop.
Instead of having like 8 items to select in the NPC editor, I want there just to have a drop down box where I select the item table that it drops from.
I want to add a variable to the item adding it to, say, a set of items. So I can have monster 1 drop items from set 1\. I just select the set when I'm saving the Item.