Albanon
New Member
- Joined
- Mar 5, 2011
- Messages
- 93
- Reaction score
- 1
I have a spell called utevoresmort it's a talk action that summons a creature to your target
so it's utevoresmort Bob
and bob gets a creature spawned beside him
what I'd like to do is make it so the talk action can take two parameters, one being the creature summoned
so utevoresmort bob dragon
and a dragon will appear next to bob
but you can change dragon to any creature
how do I do that?
Here's my script so far.
also, can anyone explain what isplayerghost does?
so it's utevoresmort Bob
and bob gets a creature spawned beside him
what I'd like to do is make it so the talk action can take two parameters, one being the creature summoned
so utevoresmort bob dragon
and a dragon will appear next to bob
but you can change dragon to any creature
how do I do that?
Here's my script so far.
Code:
function onSay(cid, words, param, channel)
local playerVoc = getPlayerVocation(cid)
local pid = cid
-- if ( playerVoc ~= 9 )then
-- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you are the wrong vocation.")
-- return
--end
if (param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you must target someone for the spell to work.")
return true
end
if(param ~= '' ) then
pid = getPlayerByNameWildcard(param)
local position = getCreaturePosition(pid)
doChallengeCreature(pid, doCreateMonster("dragon", position))
if(not pid or (isPlayerGhost(pid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " is not currently online.")
return true
end
end
return true
end
also, can anyone explain what isplayerghost does?