Witam. Mam TFS 0.3.6
chciałem wprowadzić do siebie na server 2 komendy !aol i !bless żeby nie latać do npc ![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
talkaction
aol.lua
bless.lua
Może ktoś mi pomoc z tym ?? wpisuje !aol i bless i nie działa w grze...![Confused :confused: :confused:](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
![Confused :confused: :confused:](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
talkaction
Code:
<talkaction words="!bless" scripts="bless.lua"/>
<talkaction words="!aol" scripts="aol.lua"/>
aol.lua
Code:
local cost = 10000
local item = 2173
local quantity = 1
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, cost) == TRUE then
doPlayerAddItem(cid, item, quantity)
else
doPlayerSendCancel(cid, "You haven\'t enough gold.")
end
return TRUE
end
bless.lua
Code:
local bless = {1, 2, 3, 4, 5}
local cost = 50000
function onSay(cid, words, param)
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless[i])) then
doPlayerSendCancel(cid, "You have already all blessings.")
return TRUE
end
end
if(doPlayerRemoveMoney(cid, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
doCreatureSay(cid, "You are now blessed!" ,19)
doSendMagicEffect(getPlayerPosition(cid), 49)
else
doPlayerSendCancel(cid, "You don\'t have enough money.")
end
return TRUE
end
Może ktoś mi pomoc z tym ?? wpisuje !aol i bless i nie działa w grze...