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

[REQUEST] Npc that gives exp for items

Silentsniper

New Member
Joined
Sep 20, 2009
Messages
81
Reaction score
0
Hello =] can someone make me an npc that takes your items and gives you a certain amount of exp for that item, and can you also make it configurable.
Also, how to i get an item to add like 2 k max mana/hp to you?
Thanks alot! =]
 
Last edited:
About the increase max hp/mana, do you mean like this one?

(Can only be used once)
Click on an item and the players max health/mana will be increased.

Lua:
function onUse(cid, item, frompos, itemEx, topos)
local config = {
			storage=5000,
			addmana=2000,
			addhealth=1000,
			levelReq=80
		}
		
    if getPlayerStorageValue(cid, config.storage) == -1 then
		if getPlayerLevel(cid) >= config.levelReq then
			setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+config.addhealth)
			setCreatureMaxMana(cid, getCreatureMaxMana(cid)+config.addmana)
			doPlayerSendTextMessage(cid, 22, "Your max health has been increased by "..config.addhealth.." and your max mana by "..config.addmana.."!")
			setPlayerStorageValue(cid, config.storage, 1)
		else
			doPlayerSendCancel(cid, "You need level "..config.levelReq.." to use this item.")
		end
	else
		doPlayerSendCancel(cid, "You have already used this item.")
	end
return TRUE
end
 
Back
Top Bottom