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

Storage Value of Named Target

Cadyan

Well-Known Member
Joined
Mar 30, 2008
Messages
844
Reaction score
63
1. I know you can check your own storage value with = getPlayerStorageValue(cid, storage)
2. Or you can check your selected target's storage value with = getPlayerStorageValue(getCreatureTarget(cid), storage)

But how can I check the storage value of a player when I need to use his name to cast the spell and while he is NOT targeted? Example: exura sio "druid
I just want to check the storage value of a player when I cast exura sio on them.


+rep for whoever can help me


EDIT:
3. I have figured out a way to get this to work with TALKACTIONS. Can somone figure out a way for spells?


if(param ~= "") then
getPlayerStorageValue(getPlayerByName(param), storage)
 
Last edited:
LUA:
function onSay(cid, words, param)
	local t = string.explode(param, ",")
	local tid = getPlayerByNameWildcard(t[1])
	getPlayerStorageValue(tid, t[2] or storage, t[3] or 1)
 
I am using Mystic Spirit 0.2.14
getPlayerByNameWildcard is not a function
Also, I need this for spells. I already figured out the talkactions.
 
Back
Top