• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Get cid from position

current code

Hi again. I will try to make it easier for you to answer by giving you some code to get an idea for what I am trying to accomplish.

Keep in mind that this is just some code that I am messing around with. Not even near the final product.

Code:
pos = { x = 233, y = 566, z = 7}
creature = getTopCreature(pos)
addEvent(doCreatureAddHealth, time, creature.cid, -10000)
addEvent(doCreatureAddHealth, time, creature.uid, -10000)
addEvent(doCreatureAddHealth, time, creature, -10000)
I get errors saying that it could not find that creature. Where am i fucking this up?

As you see I am trying to figure out how the data is returned... I cannot find any good documentation on that... If you know of such a thing, please point me to that as well. I am kind of used to well documented stuff from my previous projects.

The script runs on The Forgotten server 0.3 Alpha 4 without any modification to the source-code before being compiled on a Linux server with gcc.

Thanks
 
Back
Top