• 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!

spell / action request

Betoo

Centurion OT Chaos Era
Joined
Jul 24, 2007
Messages
128
Reaction score
1
Location
Mexico
im here to request a simple action spell..
well it works like this:

you click on a weapon(lets say fire sword) so when you click on it the weapon will shoot fire fields. but in a certain order
0 0 0 0 0 3 0 0 0 0 0
0 0 0 0 0 3 0 0 0 0 0
0 0 0 0 0 3 0 0 0 0 0
0 0 0 0 0 3 0 0 0 0 0
1 1 1 1 1 P 2 2 2 2 2
0 0 0 0 0 4 0 0 0 0 0
0 0 0 0 0 4 0 0 0 0 0
0 0 0 0 0 4 0 0 0 0 0
0 0 0 0 0 4 0 0 0 0 0
0 0 0 0 0 4 0 0 0 0 0

were the player is standing and lookig at.. a firefield sprite will travel until it travels 5 sqms. when the sprite hits a player it will stop traveling, but if at the end of the 5 sqms the sprite wont encounter a player it will simply disappear...

im also looking for you to add some configs:
like what type of spirte should it shoot, and how many sqms it will travel

thanks in advance...
YOURS BETOO
 
You mean the distance shoot effect that looks like fire, not the actual fire field? :p

Also you can't just click on a weapon. You must use it on something. :S
 
It can be done with weapons too,
tongue_smile.gif
but player will have to click twice always (or set the weapon on hotkey). Your choice
tongue_smile.gif
tongue_smile.gif
 
Hmm... like this?
Lua:
local t = {
	type = COMBAT_FIREDAMAGE,
	effect = CONST_ANI_FIRE,
	hitEffect = CONST_ME_FIREATTACK,
	dist = 5,
	damage = {-50, -75}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local dir, cur = getCreatureLookDir(cid)
	for i = 1, t.dist do
		cur = getPosByDir(getThingPos(cid), dir, i)
		cur.stackpos = 0
		if hasProperty(getTileThingByPos(cur).uid, CONST_PROP_BLOCKSOLID) then
			cur = getPosByDir(getThingPos(cid), dir, i - 1)
			break
		end
		local v = getTopCreature(cur).uid
		if isCreature(v) then
			doTargetCombatHealth(cid, v, t.type, t.damage[1], t.damage[2], t.hitEffect)
			break
		end
	end
	return doSendDistanceShoot(getThingPos(cid), cur, t.effect)
end
If you only want it to affect players, change isCreature to isPlayer
 
alright i will test it, and could you tell me if theres a way to make the spell act as a exevo mort hur.?
ohh and i forgot, the damage could it be like depending on the weapon you are using?

edit:
btw REP++
 
Last edited:
Okay, remove the old script completely, and replace your data/actions/scripts/other/destroy.lua with this:
Lua:
local t = {
	type = COMBAT_FIREDAMAGE,
	effect = CONST_ANI_FIRE,
	hitEffect = CONST_ME_FIREATTACK,
	dist = 5,
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local ret = destroyItem(cid, itemEx, toPosition)
	if not ret then
		local dir, cur = getCreatureLookDir(cid)
		for i = 1, t.dist do
			cur = getPosByDir(getThingPos(cid), dir, i)
			cur.stackpos = 0
			if hasProperty(getTileThingByPos(cur).uid, CONST_PROP_BLOCKSOLID) then
				cur = getPosByDir(getThingPos(cid), dir, i - 1)
				break
			end
			local v = getTopCreature(cur).uid
			if isCreature(v) then
				local damage = (getItemAttribute(item.uid, 'attack') or getItemInfo(item.itemid).attack or 0) + (getItemAttribute(item.uid, 'elementDamage') or getItemInfo(item.itemid).elementDamage or 0)
				doTargetCombatHealth(cid, v, t.type, -damage, -damage, t.hitEffect)
				break
			end
		end
		return doSendDistanceShoot(getThingPos(cid), cur, t.effect)
	end
	return ret
end
If nothing happens when you use a weapon, fix your actions.xml:
Code:
	<action [B][COLOR="red"]item[/COLOR][/B]id="2321;2376-2388;2390-2398;2400-2404;2406-2409;2411-2417;2419;2421-2441;2443-2454;3961-3964;3966;4846;6101;6528;6553;7379-7392;7402-7437;7449;7451-7456;7744-7758;7763-7777;7854-7883;7958;8601-8602;8924-8932;10293" event="script" value="other/destroy.lua"/>
 
thanks it worked, i didnt understood why i had to replace destroy.lua, i used my own script shoot.lua and worked.. i may be editing this script even more to make it look really cool...

ohh btw did you figuired it out how to make it to shoot like a exevo mort hur? like

0000111
1111111
0000111

i know its somewere over here, but i dont know really were

Lua:
for i = 1, t.dist do
			cur = getPosByDir(getThingPos(cid), dir, i)
			cur.stackpos = 0
			if hasProperty(getTileThingByPos(cur).uid, CONST_PROP_BLOCKSOLID) then
				cur = getPosByDir(getThingPos(cid), dir, i - 1)
				break
			end
			local v = getTopCreature(cur).uid
			if isCreature(v) then
				local damage = (getItemAttribute(item.uid, 'attack') or getItemInfo(item.itemid).attack or 0) + (getItemAttribute(item.uid, 'elementDamage') or getItemInfo(item.itemid).elementDamage or 0)
				doTargetCombatHealth(cid, v, t.type, -damage, -damage, t.hitEffect)
				break
			end
		end
 
uh, what? what should I do with that area?
confused_smile.gif

I still don't understand how should it work.
confused_smile.gif
You need to be more specific
 
alright, current action shoots in a line right?. i want to change it so that it shoots like an exevo mort hur, or that area...

CURENTLY SHOOTING
0 0 0 0 0 3 0 0 0 0 0
0 0 0 0 0 3 0 0 0 0 0
0 0 0 0 0 3 0 0 0 0 0
0 0 0 0 0 3 0 0 0 0 0
1 1 1 1 1 P 2 2 2 2 2
0 0 0 0 0 4 0 0 0 0 0
0 0 0 0 0 4 0 0 0 0 0
0 0 0 0 0 4 0 0 0 0 0
0 0 0 0 0 4 0 0 0 0 0
0 0 0 0 0 4 0 0 0 0 0

NEW SHOOTING
0 0 0 3 3 3 3 3 0 0 0
0 0 0 3 3 3 3 3 0 0 0
1 1 0 0 3 3 3 0 0 2 2
1 1 1 0 0 3 0 0 2 2 2
1 1 1 1 1 P 2 2 2 2 2
1 1 1 0 0 4 0 0 2 2 2
0 0 0 0 0 4 0 0 0 0 0
0 0 0 0 4 4 4 0 0 0 0
0 0 0 4 4 4 4 4 0 0 0
0 0 0 4 4 4 4 4 0 0 0

i dont know if you understand me, if you want i can post a screanshot
 
Back
Top