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

Help With This AttackSpeed Script

Garndalf

New Member
Joined
Jul 31, 2008
Messages
89
Reaction score
0
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray({, 7735, 7405, 8927, 7453, 7958, 8929, 8925}, itemEx.itemid) then
doItemSetAttribute(itemEx.uid, "description", " x2.5 Attack Speed It belongs to ".. getCreatureName(cid) .. ".")
doItemSetAttribute(itemEx.uid, "attackspeed", 1200)
doPlayerSendTextMessage(cid, 19, "You changed the attack speed of your weapon. Good luck then.")
doRemoveItem(item.uid)
else
doPlayerSendCancel(cid, "Sorry, not possible.")
end

return true
end


The Script Works Perfect !! Woot But..

When You Use It With Paladin Weapons As Arbalest,Bow,etc.

It Doesnt Change The Attackspeed Can Anyone Help Me
 
Perhaps your server doesn't have the correct functions to make this work, but feel free to try this:

Lua:
local id = {7735, 7405, 7453, 8925, 8927, 8929}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not isInArray(id, itemEx.itemid) then
		return false
	end
	
	doItemSetAttribute(itemEx.uid, "desc", getCreatureName(cid) .. " owns this weapon. It attacks 2x faster.")
	doItemSetAttribute(itemEx.uid, "attackspeed", getItemAttackSpeed(itemEx.uid) * 0.5)
	doCreatureSay(cid, "Your weapon is now more fierce!", TALKTYPE_ORANGE_1)
	doRemoveItem(item.uid, 1)
	return true
end

If you're using the latest revision's, change:

Code:
TALKTYPE_ORANGE_1

to

Code:
TALKTYPE_MONSTER_SAY
 
Back
Top