Hey Everyone I came To my final problem. Lol. basicly what I want is a reward mount system.. So basicly people I choose to i can give a mount to. i figured i can either do this 2 ways. have an npc on gm island that trades mounts for certain items. that i can create. OR what i prefer is say something like /addmount player, 12 or something I tried to make the script this is what i tried.
my talk aciotns.xml is this
<?xml version="1.0" encoding="UTF-8"?>
<talkactions>
<!-- player talkactions -->
<talkaction words="!buypremium" script="buyprem.lua"/>
<talkaction words="!leavehouse" script="leavehouse.lua"/>
<talkaction words="!save" script="save.lua"/>
<talkaction words="!changesex" script="changesex.lua"/>
<talkaction words="!uptime" script="uptime.lua"/>
<talkaction words="!deathlist" script="deathlist.lua"/>
<!-- test talkactions -->
<talkaction words="!z" script="magiceffect.lua"/>
<talkaction words="!x" script="animationeffect.lua"/>
<talkaction log="no" words="/mount" access="5" event="script" value="mount.lua"/>
</talkactions>
my mount.lua is this
function onSay(cid, words, param, channel)
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
local pid = cid
if(t[2]) then
pid = getPlayerByNameWildcard(t[2])
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
return true
end
end
doPlayerAddMount(pid, t[1])
doSendMagicEffect(getThingPosition(pid), CONST_ME_MAGIC_BLUE)
return true
end
and my mount.xml is this
<?xml version="1.0" encoding="UTF-8"?>
<mounts>
<mount id="1" clientid="368" name="Widow Queen" speed="10" />
<mount id="2" clientid="369" name="Racing Bird" speed="20" />
<mount id="3" clientid="370" name="War Bear" speed="10" />
<mount id="4" clientid="371" name="Black Sheep" speed="10" />
<mount id="5" clientid="372" name="Midnight Panther" speed="15" />
<mount id="6" clientid="373" name="Draptor" speed="20" />
<mount id="7" clientid="374" name="Titanica" speed="15" />
<mount id="8" clientid="375" name="Tin Lizzard" speed="15" />
<mount id="9" clientid="376" name="Blazebringer" speed="20" />
<mount id="10" clientid="377" name="Rapid Boar" speed="10" />
<mount id="11" clientid="378" name="Stampor" speed="20" />
<mount id="12" clientid="379" name="Undead Cavebear" speed="20" />
</mounts>
when i try and say /mount.. or what ever it just pops up as a talk message in default.
Also just curious for later on is it possible to reward a mount to a whole guild for X amount of hours. so like guild does a quest they win X amount for X hours.
my talk aciotns.xml is this
<?xml version="1.0" encoding="UTF-8"?>
<talkactions>
<!-- player talkactions -->
<talkaction words="!buypremium" script="buyprem.lua"/>
<talkaction words="!leavehouse" script="leavehouse.lua"/>
<talkaction words="!save" script="save.lua"/>
<talkaction words="!changesex" script="changesex.lua"/>
<talkaction words="!uptime" script="uptime.lua"/>
<talkaction words="!deathlist" script="deathlist.lua"/>
<!-- test talkactions -->
<talkaction words="!z" script="magiceffect.lua"/>
<talkaction words="!x" script="animationeffect.lua"/>
<talkaction log="no" words="/mount" access="5" event="script" value="mount.lua"/>
</talkactions>
my mount.lua is this
function onSay(cid, words, param, channel)
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
local pid = cid
if(t[2]) then
pid = getPlayerByNameWildcard(t[2])
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
return true
end
end
doPlayerAddMount(pid, t[1])
doSendMagicEffect(getThingPosition(pid), CONST_ME_MAGIC_BLUE)
return true
end
and my mount.xml is this
<?xml version="1.0" encoding="UTF-8"?>
<mounts>
<mount id="1" clientid="368" name="Widow Queen" speed="10" />
<mount id="2" clientid="369" name="Racing Bird" speed="20" />
<mount id="3" clientid="370" name="War Bear" speed="10" />
<mount id="4" clientid="371" name="Black Sheep" speed="10" />
<mount id="5" clientid="372" name="Midnight Panther" speed="15" />
<mount id="6" clientid="373" name="Draptor" speed="20" />
<mount id="7" clientid="374" name="Titanica" speed="15" />
<mount id="8" clientid="375" name="Tin Lizzard" speed="15" />
<mount id="9" clientid="376" name="Blazebringer" speed="20" />
<mount id="10" clientid="377" name="Rapid Boar" speed="10" />
<mount id="11" clientid="378" name="Stampor" speed="20" />
<mount id="12" clientid="379" name="Undead Cavebear" speed="20" />
</mounts>
when i try and say /mount.. or what ever it just pops up as a talk message in default.
Also just curious for later on is it possible to reward a mount to a whole guild for X amount of hours. so like guild does a quest they win X amount for X hours.