I release my /addon1 "playername and /addon2 "playername talkactions here only. Please do not post it anywhere else but link to this forum.
First goto /Data/talkactions/talkactions.xml
put this in it:
Then goto /Data/talkactions/scripts/
and create a new .lua files called addons.lua.
Put this is addons.lua:
Posted by Colandus:
Found some tiny errors in my version of the script, fixed them:
In global.lua (IF IT DOESN'T EXIST ALREADY)
You could change the 25 and 21 (line 38, 39) to the variables in global.lua, that'd be better
Would be good if someone could test it
First goto /Data/talkactions/talkactions.xml
put this in it:
Code:
<talkaction words="/addon1" script="addons.lua" />
<talkaction words="/addon2" script="addons.lua" />
Then goto /Data/talkactions/scripts/
and create a new .lua files called addons.lua.
Put this is addons.lua:
Posted by Colandus:
Found some tiny errors in my version of the script, fixed them:
PHP:
--[[
OTLAND.NET / CREDITS
CREATED BY:
master-m
EDITED BY:
Lithium: Shorten.
Velik: Missing parts. Tested code.
Colandus: Missing end. Works for both TFS and Evolutions. Added more "checks". Shorten alot.
]]
-- >>CONFIG<< --
accessToUse = 4 -- What access, or "group id", do you need to use this/these "commands" ?
-- >>CONFIG<< --
function onSay(cid, words, param)
local addonTypes = {
["/addon1"] = {1, "first"},
["/addon2"] = {2, "second"}
}
local addonType = addonTypes[words]
if (addonType ~= nil) then
local playerAccess = (getPlayerGroupId and getPlayerGroupId(cid)) or getPlayerAccess(cid)
if (playerAccess >= accessToUse) then
local getPlayer = getPlayerByName(param)
if (getPlayer > 0) then
sexAddons = {
{[136]=142, [147]=150, [155]=158, [252]=252},
{[128]=134, [143]=146, [151]=154, [251]=251}
}
local addons = sexAddons[getPlayerSex(getPlayer)+1]
if (addons ~= nil) then
for k, v in pairs(addons) do
for i=k, v do
doPlayerAddOutfit(getPlayer, i, addonType[1])
end
end
doPlayerSendTextMessage(getPlayer, 25, "You have got the " .. addonType[2] .. " addon!")
doPlayerSendTextMessage(cid, 21, "You just gave " .. getPlayerName(getPlayer) .. " his " .. addonType[2] .. " addon!")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Invalid sex of player " .. getPlayerName(getPlayer) .. "!")
end
else
doPlayerSendCancel(cid, "Player is not online.")
end
end
end
end
In global.lua (IF IT DOESN'T EXIST ALREADY)
PHP:
MESSAGE_STATUS_WARNING = 18
Would be good if someone could test it
Last edited: