Jump to content
Returning Members: Password Reset Required ×

Recommended Posts

Posted
I've been searching from other forums on how to add map effects, but sadly there isn't a forum that I could find that helpful. I knew Spirited did have a wiki about map effect, but yet I'm confused. Map effect, I mean by putting Balloons on the floor, or any other effects. I tried putting in same code as item drop effect, but it did not respond to the codes. I would be much appreciating if someone could guide me through on this. I'm also new to coding or not a coder, I just learn it from the source and that I am trying to study from it.
Posted

Oh, some of that stuff isn't effects. You can spawn terrain NPCs that act as those entities. Conquer Online usually uses terrain NPCs when they don't want players to be able to walk through the effect / entity. I haven't heard of the balloon effect, so it might be a floor effect? But you can also try terrain NPCs. I haven't added the packet yet to the wiki (I'll try doing that tonight if I remember). Here's the structure though:

Offset 0: Length (UInt16)

Offset 2: Packet Type (UInt16) = 1109

Offset 4: EntityID (UInt32)

Offset 8: Max Health (Uint32) - optional

Offset 12: Heath (UInt32) - optional

Offset 16: X (UInt16)

Offset 18: Y (UInt16)

Offset 20: Mesh (UInt16)

Offset 22: Flags (UInt16)

Offset 26: Num Strings (Byte) = 1

Offset 27: String Length (Byte)

Offset 28: Name (String)

Which source are you using? It might already have the packet in it that you can call into. Same with effects, those should be MsgName (packet 1015). I haven't documented that either... but in the entity ID space, you'd instead put the X and Y coordinates as two individual UInt16s. And then I think the subtype for the packet is 9 for a map effect. A player effect spawned on the character is type 10. Feel free to post any questions you have about any of this. I know it's a lot for someone starting out. I'd be happy to clarify anything. Good luck and have fun!

Edit: Also, if you need a beginner's guide, I set something up here:

I'd appreciate your feedback on it if you have time - like what was helpful and what additional clarifications you need. Thanks!

Posted
Hi, thanks for the replied. I'm using Shannara 5165 source. I believe it is floor effect like you mentioned, balloons, portals, squamas, etc. What I'm trying to do is to make it as an effect, and which it can be step on. Hopefully, this make sense. I will try on what you mention on top and see where I end up at. Again thank you!
  • 7 months later...
Posted

Hello. I am using Shannara source. I have a problem with my drop effect. I tried to create a trap for the +1 items but everybody can see it when someone finds a +1 item. How can i make it to see it only the character who finds the item?

ushort X = 0;

ushort X = 0;

ushort Y = 0;

X = DI2.Loc.X;

Y = DI2.Loc.Y;

var DI = new Game.MapEffect();

DI.DropTime = DateTime.Now;

DI.LastDrop = DateTime.Now;

DI.Loc = new Game.Location();

DI.Loc.Map = Char.Loc.Map;

DI.Info = new Game.MEffect();

DI.Info.ID = 17;

DI.UID = (uint)Program.Rnd.Next(900000, 999999);

DI.Info.UID = DI.UID;

DI.Loc.X = X;

DI.Loc.Y = Y;

DI.Drop();

DropsEffects.Add(DI.UID, DI);

Thank you!

Posted

Hello. I am using Shannara source. I have a problem with my drop effect. I tried to create a trap for the +1 items but everybody can see it when someone finds a +1 item. How can i make it to see it only the character who finds the item?

ushort X = 0;

ushort X = 0;

ushort Y = 0;

X = DI2.Loc.X;

Y = DI2.Loc.Y;

var DI = new Game.MapEffect();

DI.DropTime = DateTime.Now;

DI.LastDrop = DateTime.Now;

DI.Loc = new Game.Location();

DI.Loc.Map = Char.Loc.Map;

DI.Info = new Game.MEffect();

DI.Info.ID = 17;

DI.UID = (uint)Program.Rnd.Next(900000, 999999);

DI.Info.UID = DI.UID;

DI.Loc.X = X;

DI.Loc.Y = Y;

DI.Drop();

DropsEffects.Add(DI.UID, DI);

Thank you!

You'd specifically have to program a new collection on the map that can be instanced per character. I don't know the source you're referring to, but I only assume it doesn't have that functionality if you're posting this.

  • 1 year later...
Posted

Hi, i am working on developing a server for version 5017, and i tried to implement the same, i successfully layed the trap and showed it to only players who should see it, my main problem is that the trap does not disappear when the item is picked up or expires, i sent the flag 12 and tried id ranges for magic trap and system trap, sent the location X, Y of the trap , tried to lay the tap using flags 10/11 but no luck at all.

i am using the Canyon Suit Code: https://staging.cooldown.dev/topic/145-canyon-suite-a-comet-project-for-6192 as a reference for me in developing,

also checking the implementation from the COPS-V6 for packet differences.

every thing works fine as expected except for hiding the trap, it only disappears if i go off screen.

any suggestions or help about this?

Thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...