• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Custom Server

  • Thread starter Thread starter varhlak
  • Start date Start date
V

varhlak

Guest
Hey, i wanted to make a totally custom server, and I'm just wondering..

Is there a way to make a weapon hit SPECIFIC ?

Lets say, 1700 - 1900 WITHOUT making a specific script for this weapon?
I know about 90% about scripting, but haven't really moved to 8.6 that much.
So, is there a way to set up a weapons damage to specific amount, without making a script for it (I know it works for staffs, not sure about meele and distance) ... ?

Thanks.

(asking only because I'd have to make around 45 scripts in total ... )
 
LUA:
 <distance id="2389" level="8" range="6" min="2000" max="2100" unproperly="1" event="buffer"><![CDATA[doTargetCombatHealth(cid, var.number, COMBAT_PHYSICALDAMAGE, CONST_ANI_SPEAR, -1700, -1900, CONST_ME_DRAWBLOOD)end]]>

I tried that, does nothing. Doesn't even attack. And the distro has a
LUA:
 [string "LuaInterface::loadBuffer"]:6: '<eof>' expected near 'end'

And repeats over and over when the 'attack time' comes..

EDIT : Fixed the distro debug, still can't figure out how to do that flying spear thought ...
 
Last edited by a moderator:
Hmm, I guess you could try this?

Code:
<distance id="7407" level="30" unproperly="1" event="buffer"><![CDATA[
	if(var.type == 1) then
		_result = doTargetCombatHealth(cid, var.number, COMBAT_PHYSICALDAMAGE, -1700, -1900, CONST_ME_DRAWBLOOD)
		doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(getCreatureTarget(cid)), 1)
	end
]]></distance>
 
The original form of this:
Code:
doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(getCreatureTarget(cid)), 1)
is:
Code:
doSendDistanceShoot(fromPosition, toPosition, effectID)

Where effectID (I put it 1) , is the desired projectile effect. But try it out and tell what happens.
 
Back
Top