• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

MoveEvent Problems With Demonhunter script

simonarstam

New Member
Joined
May 22, 2009
Messages
5
Reaction score
0
Hey, I would like to ask you guys for some help. I would like you to take a look on this script. The script should give you both demonhunter addons and the outfit when you walk on a specific tile. Is this a correct movements script? I can't see what I did wrong with this script, thanks in advance.

Code:
function onStepIn(cid, item, position, fromPosition)
	if action.id == 10503 and (getPlayerStorageValue(cid, 8764) then
		doPlayerAddOutfit(cid, 288, 3)
		doPlayerAddOutfit(cid, 289, 3)
		setPlayerStorageValue(cid, 8764, 1)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREDAMAGE)
  		doPlayerSendTextMessage(cid,22,"Congratulations, you have received demonhunter addon!")
                doRemoveItem(item.uid, 1)
	else
		doPlayerSendCancel(cid,"You have already received this addon!.")
	end
end
 
change action.id to: item.actionid or item.aid and (getPlayerStorageValue(cid, 8764) < 1 then
 
So like this?
Code:
function onStepIn(cid, item, position, fromPosition)
	if item.actionid == 10503 and (getPlayerStorageValue(cid, 8764) < 1 then
		doPlayerAddOutfit(cid, 288, 3)
		doPlayerAddOutfit(cid, 289, 3)
		setPlayerStorageValue(cid, 8764, 1)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)
  		doPlayerSendTextMessage(cid,22,"Congratulations, you have received demonhunter addon!")
	else
		doPlayerSendCancel(cid,"You have already received this addon!.")
	end
end

btw I couldnt load it
 
U should download notepad++ :D


script:


Lua:
function onStepIn(cid, item, position, fromPosition)
	if item.actionid == 10503 and getPlayerStorageValue(cid, 8764) < 1 then
		doPlayerAddOutfit(cid, 288, 3)
		doPlayerAddOutfit(cid, 289, 3)
		setPlayerStorageValue(cid, 8764, 1)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)
  		doPlayerSendTextMessage(cid,22,"Congratulations, you have received demonhunter addon!")
	else
		doPlayerSendCancel(cid,"You have already received this addon!.")
	end
end
 
Back
Top