Hello everyone...
If you guys can help me.. Thank you very much!
I would like to have this 2 talkaction.
1: Teleport Back.
What's teleport back?. When we are GM's or in my case i usually summon players to where i'm to serve them.
The problem is, that in i took them from the caves or wherever they were, and now they have to go walking back...
The teleport back, is a cmd that teleport they to where they was before they got summoned... Is that possible?
2: Add Outfit Talkaction.
This one is much easier.. (i think XD) and is more like a question...
I tried to make a CMD that add's an X outfit to a player... I use it like reward of a event.. for example the Outfit of a Demon, or elf.. etc...
Here is the code i made: (Or well.. this is taked from the /newtype, i only change the "doCreatureChangeOutfit" to a "doPlayerAddOutfit".
The problem i got is just.. It dont give the outfit!, i don't know why, but the player doesn't get the outfit... I try to put the looktype in the "outfit.xml" in enable = 0 to see if it works, and i don't.
So, someone may please help me to fix it?, or tell me if that is possible?
These two talkactions are the ones who i would love to have...!
Thank you very much in advance for read and for help me...! xD
If you guys can help me.. Thank you very much!
I would like to have this 2 talkaction.
1: Teleport Back.
What's teleport back?. When we are GM's or in my case i usually summon players to where i'm to serve them.
The problem is, that in i took them from the caves or wherever they were, and now they have to go walking back...
The teleport back, is a cmd that teleport they to where they was before they got summoned... Is that possible?
2: Add Outfit Talkaction.
This one is much easier.. (i think XD) and is more like a question...
I tried to make a CMD that add's an X outfit to a player... I use it like reward of a event.. for example the Outfit of a Demon, or elf.. etc...
Here is the code i made: (Or well.. this is taked from the /newtype, i only change the "doCreatureChangeOutfit" to a "doPlayerAddOutfit".
Code:
function onSay(cid, words, param)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return TRUE
end
local t = string.explode(param, ",")
t[1] = tonumber(t[1])
if(not t[1]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
return TRUE
end
if(t[2]) then
cid = getPlayerByNameWildcard(t[2])
if(cid == 0 or (isPlayerGhost(pid) == TRUE and getPlayerAccess(pid) > getPlayerAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
return TRUE
end
end
if(t[1] < 0 or t[1] == 1 or t[1] == 135 or (t[1] > 160 and t[1] < 192) or t[1] > 326) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such outfit does not exist.")
return TRUE
end
local tmp = getCreatureOutfit(cid)
tmp.lookType = t[1]
doPlayerAddOutfit(cid, tmp, 3)
return TRUE
end
The problem i got is just.. It dont give the outfit!, i don't know why, but the player doesn't get the outfit... I try to put the looktype in the "outfit.xml" in enable = 0 to see if it works, and i don't.
Code:
<outfit type="1" looktype="159" enabled="0" name="Elf" premium="1"/>
So, someone may please help me to fix it?, or tell me if that is possible?
These two talkactions are the ones who i would love to have...!
Thank you very much in advance for read and for help me...! xD