• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Does anyone know how to script a pocket item?

Syndac123

New Member
Joined
Apr 22, 2014
Messages
14
Reaction score
0
Hey im in need of a pocket item script that gives 10% more mana and hp if anyone could give me this script id really appreciate it.

i was trying to use this but i dont want this kind of script i think a pocket item type of script would be way better.

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level, storage, health, mana = 30000, 23956, 150000, 150000
if(getPlayerLevel(cid) < level) then
doPlayerSendCancel(cid, "You must be atleast level " .. level .. " to use this.")
elseif(getPlayerStorageValue(cid, storage) == 1) then
doPlayerSendCancel(cid, "You have already used this before.")
else
setCreatureMaxMana(cid, getCreatureMaxMana(cid) + mana)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + health)
setPlayerStorageValue(cid, storage, 1)
doCreatureSay(cid, "You have received " .. health .." extra points and also" .. mana .. " extra points.", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
end
return true
end
 
You can just add attributes to items.xml then add it in movements.xml with slot ammo.


Okay but what would i add in the item.xml sorry still new to this what attribute would i need to add in the item for it to work?
i know movements :P thats easy ^.^
 
You need to post your server version for that. Without this kind of information people can usually only give explanations/information without direct solutions/codes.
 
Back
Top