Alright, Another script made intensely out of Boredom. This script is completely pointless and milked to have semi lots of features. Enjoy! xD
Explanation:
First off, You can allow players to check or not to check how many depot items you have in your main town Depo. You can Turn it ON or OFF for players to see or not. A normal player cannot check a GM's depot count, But a GM can check another GM's including there own depot count and the player that your checking must be online. (Oh! And different message depending on sex! lol)
checkdepot.lua
depot.lua
Explanation:
First off, You can allow players to check or not to check how many depot items you have in your main town Depo. You can Turn it ON or OFF for players to see or not. A normal player cannot check a GM's depot count, But a GM can check another GM's including there own depot count and the player that your checking must be online. (Oh! And different message depending on sex! lol)
Code:
<talkaction words="/checkdepot" access="0" event="script" value="checkdepot.lua"/>
<talkaction words="/depot" access="0" event="script" value="depot.lua"/>
checkdepot.lua
Lua:
function onSay(cid, words, param, channel)
local storage = 2000
local target = getPlayerByNameWildcard(param)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires a players name.")
return TRUE
end
if(getPlayerGroupId(cid) >=2) then
elseif(getPlayerGroupId(target) >=2) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot check a Staff memebers depot count.")
return TRUE
end
if(not target) then
target = getCreatureByName(param)
if(not target) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player is not online.")
return TRUE
end
end
if(getPlayerSex(target) == PLAYERSEX_FEMALE) and (getPlayerStorageValue(cid,storage) == 2) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Number of Items in "..getCreatureName(target).."'s Depot in her homeTown "..getTownName(getPlayerTown(target))..": ~"..getPlayerDepotItems(target, getPlayerTown(target)).."~")
elseif(getPlayerSex(target) == PLAYERSEX_MALE) and (getPlayerStorageValue(cid,storage) == 2) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Number of Items in "..getCreatureName(target).."'s Depot in his homeTown "..getTownName(getPlayerTown(target))..": ~"..getPlayerDepotItems(target, getPlayerTown(target)).."~")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, ""..getCreatureName(target).." does not have it enabled so you can see his depot item count.")
end
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_SLEEP)
return TRUE
end
depot.lua
Lua:
function onSay(cid, words, param, channel)
local storage = 2000
if(param == "on") and (getPlayerStorageValue(cid,storage) <= 1) then
setPlayerStorageValue(cid,storage,2)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are now allowing people to check your ammount of Depot Items.")
elseif(param == "off") and (getPlayerStorageValue(cid,storage) == 2) then
setPlayerStorageValue(cid,storage,1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "People are no longer allowed to check your depot count.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You already have the command enabled.")
end
return TRUE
end
Code:
/checkdepot Chris
Code:
/depot on