Drugs Plugin
#1
Drugs Plugin for Cuberite that allows effects to be applied to player's within a radius of a tossed item (i.e. E_ITEM_WHEAT tossed into E_BLOCK_FIRE) and entity effects would be applied to the players.

Yes, I know it's an odd one.... I used to host a bukkit server that relied heavily on a Plugin I once found; I've never seen the Bukkit drug plugin used anywhere else other than my server....

The way it worked was: You could setup all the drug types and effects [in a config file] you would get from tossing the item into fire.... I've been working on reproducing this plugin for cuberite; but I feel as though somebody else could do it in far less time and effort than I could... Although, I might just be able to get it working before the day is through.
"Full Canvas!! Let's set sail on the cyber sea of coding adventure!! Ya'harg!" ~ Cpt_Redbeard

-Arctic Blue 32 (Official Website)
http://aeo.x10host.com/


Reply
Thanks given by:
#2
Interesting idea. It also shouldn't be too hard to implement. If the OnKilling hook also works on pickups you can use that. Otherwise you have to check manually if an entity is in a fire. If OnKilling works check if the TakeDamageInfo's damagetype is set to dtBurning.

Then you simply use cWorld:ForEachEntityInBox to give an entity effect to all entities around the burning item.
Reply
Thanks given by:
#3
OnKilling will not work for pickups, but OnTakeDamage should work, and since any damage kills a pickup, it should be safe to put the executive code into this path.

I'm more worried about the drug effects, the last time I checked Cuberite didn't implement all of the entity effects.
Reply
Thanks given by:
#4
(02-15-2016, 06:59 AM)xoft Wrote: I'm more worried about the drug effects, the last time I checked Cuberite didn't implement all of the entity effects.

Thanks for the tips and concerns.... I'm really only needing to use the [Nausea, Hunger, and Regen] Effects, is there a way to control the level and time span of the effects? ATM I'm coding a emergency detox item (a COOKIE "munchies") that will remove all entity effects upon consumption kind of like milk.

Is there any specific problems with the entity effects (that I plan on using (listed above)) that I should know about???
Also could I request that this topic be moved to the plugin discussions section? Because this is kind-of no-longer a request. Thanks again Xoft, and NiLSPACE.

Now, eventually I'd like to add custom items (with custom graphics and icons) would I be able to accomplish this through the plugin api or through directly altering the cuberite source???? I've been programming C++ since I was 8 and was entirely self-taught; so some source editing is not a problem for me. In fact I find frame-work development far more satisfying to me than extension development. My biggest thing is AT LEAST IT'S NOT JAVA. lol
"Full Canvas!! Let's set sail on the cyber sea of coding adventure!! Ya'harg!" ~ Cpt_Redbeard

-Arctic Blue 32 (Official Website)
http://aeo.x10host.com/


Reply
Thanks given by:
#5
Firstly: custom items are possible, but only the ones the client can handle. That means block variants and a server resource pack.

Secondly: plugins are written in lua, not c++.

Thirdly: if you think of implementing the Forge api and re-writing those mods, you are welcome
Reply
Thanks given by:
#6
(02-17-2016, 04:00 PM)Schwertspize Wrote: Firstly: custom items are possible, but only the ones the client can handle. That means block variants and a server resource pack.

Secondly: plugins are written in lua, not c++.

Thirdly: if you think of implementing the Forge api and re-writing those mods, you are welcome.
Firstly: Custom items require a block variant(s) and a Resource Pack to be obtained from the server by the client.  -[This is helpful information; thanks. Cool ]

Secondly: *facedesk* *facedesk* *facedesk* -[THE CPT'S REPLY: Dodgy Dodgy  Obviously.... I made one already (https://forum.cuberite.org/thread-2372.html)] I'm talking about directly altering the CUBERITE SOURCE CODE; you know that thing they refer to as "OPEN-SOURCE", yeah. The LUA is !!NOTHING!! without the C++ Framework (called "Cuberite"). Sorry if I seem blunt about this but I KNOW my stuff, and any attempt to prove my facts as otherwise (without proper research provided) really irritates me.

Thirdly: -[I despise FORGE; that's why I'm using Cuberite... In other words: NO.Tongue ]
"Full Canvas!! Let's set sail on the cyber sea of coding adventure!! Ya'harg!" ~ Cpt_Redbeard

-Arctic Blue 32 (Official Website)
http://aeo.x10host.com/


Reply
Thanks given by: Schwertspize




Users browsing this thread: 1 Guest(s)