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

Lua Mod Quest storage

Akkz

New Member
Joined
Apr 22, 2012
Messages
172
Reaction score
0
Hey all!

I added Achivement pack to my website earlier today, and I trying to modify so when you do a "Killing in the name of" - mission, then you are supposed to get an achievement. Is there anyone who know where I should put this script, so it's linked to a queststorage or if you put it in the script or something... I don't know, hope you do!

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_HEAD).uid) then
		return false
	end
 
        if getPlayerStorageValue(cid,21013) == 200 then
        doPlayerSendTextMessage(cid,22,"Congratulations! You earned the achievement \"Rotworms\".")
        doPlayerAddAchievement(cid, 1)
        end
 
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
   	setPlayerStorageValue(cid, 21013, getCreatureStorage(cid, 21013) + 1)
	return true
end

Is it possible to change
Code:
        if getPlayerStorageValue(cid,21013) == 200 then
to QuestStorageValue? and where should it be then? Creaturescript?
 
Back
Top