Postado Janeiro 11, 2015 10 anos Tenho nao Não testei ... local bless = {1, 2, 3, 4, 5} local itemid = xxxx -- ID diamonds local count = xx -- Quantidade de diamonds function onSay(cid, words, param) for i = 1, table.maxn(bless) do if getPlayerBlessing(cid, bless[i]) then return doPlayerSendCancel(cid, "You are full bless.") end end if doPlayerRemoveItem(cid, itemid, count) == true then for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless[i]) end doCreatureSay(cid, "You are now blessed by the Server!" ,19) doSendMagicEffect(cid, 49) else return doPlayerSendCancel(cid, "You no have diamonds") end return true end Editado Janeiro 11, 2015 10 anos por Summ (veja o histórico de edições)
Postado Janeiro 11, 2015 10 anos Vou testar Vlw Não testei ... local bless = {1, 2, 3, 4, 5} local itemid = xxxx -- ID diamonds local count = xx -- Quantidade de diamonds function onSay(cid, words, param) for i = 1, table.maxn(bless) do if getPlayerBlessing(cid, bless[i]) then return doPlayerSendCancel(cid, "You are full bless.") end end if doPlayerRemoveItem(cid, itemid, count) == true then for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless[i]) end doCreatureSay(cid, "You are now blessed by the Server!" ,19) doSendMagicEffect(cid, 49) else return doPlayerSendCancel(cid, "You no have diamonds") end return true end Funcionou, mas aconteceu esse erro quando falo o comando [11/01/2015 19:06:02] [Error - TalkAction Interface] [11/01/2015 19:06:02] data/talkactions/scripts/!bless.lua:onSay [11/01/2015 19:06:02] Description: [11/01/2015 19:06:02] attempt to index a number value [11/01/2015 19:06:02] stack traceback: [11/01/2015 19:06:02] [C]: in function 'doSendMagicEffect' [11/01/2015 19:06:02] data/talkactions/scripts/!bless.lua:19: in function <data/talkactions/scripts/!bless.lua:5>
Postado Janeiro 11, 2015 10 anos Pronto local bless = {1, 2, 3, 4, 5} local itemid = xxxx -- ID diamonds local count = xx -- Quantidade de diamonds function onSay(cid, words, param) for i = 1, table.maxn(bless) do if getPlayerBlessing(cid, bless[i]) then return doPlayerSendCancel(cid, "You are full bless.") end end if doPlayerRemoveItem(cid, itemid, count) == true then for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless[i]) end doCreatureSay(cid, "You are now blessed by the Server!" ,19) doSendMagicEffect(getPlayerPosition(cid), 49) else return doPlayerSendCancel(cid, "You no have diamonds") end return true end Editado Janeiro 11, 2015 10 anos por Summ (veja o histórico de edições)
Postado Janeiro 11, 2015 10 anos Agora sim Vlw +rep, aonde eu mudo o efeito? qual melhor efeito vc acha ? Editado Janeiro 11, 2015 10 anos por CarlosHenrique7457 (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.