Iaae galera como vão? Hoje venho trazer para vocês um sistema de Invasão criado por mim.
Ele funciona da seguinte maneira:
/invasao Monster, Amount, Position
Exemplo:
/invasao Dragon, 3, 1000, 1000, 7
O nome do monstro e depois da vírgula a quantidade, legal né?
Vamos instalar?
Entre na pasta data/talkactions/scripts, crie um arquivo chamado newraid.lua e adicione dentro:
function onSay(cid, words, param) local t = string.explode(param, ",") if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires a amount to raid.") return true end if not tonumber(t[2]) or not tonumber(t[3]) or not tonumber(t[4]) or not tonumber(t[5]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Check if placed correctly the amount and location.") return true end if not tostring(t[1]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The first parameter is the name of the monster, place it correctly.") return true end for i = 1, t[2] do doCreateMonster(t[1], {x = t[3], y = t[4], z = t[5]}) end doBroadcastMessage("A new invasion began, run to kill the "..t[2].." "..t[1].."'s!") return true end
Nesta parte:
Muito bem, agora siga para o arquivo talkactions.xml e adicione a tag:
<talkaction log="yes" words="/invasao" event="script" value="newraid.lua"/>

Façam um bom proveito e uso
Atualizado 14/04/2013 - Adiconada position no comando!