Fechado
Postado em julho 17, 2015
Fechado
Tópico movido para a seção correta.
tag:
<talkaction words="/entregar" access="5" event="script" value="createpokeballplayer.lua"/>
cria um arquivo em \data\talkactions\scripts\createpokeballplayer.lua
e coloca:
local typess = { --alterado v2.9 \/ TUDO!!
[1] = "normal",
[2] = "great",
[3] = "super",
[4] = "ultra",
[5] = "saffari",
}
function onSay(cid, words, param)
if param == "" or param == " " then
doPlayerSendCancel(cid, 'Command needs parameters, function structure: "/entregar [Pokemon Name], [boost], [Gender], [ball type], [nome player]".')
return false
end
local t = string.explode(param, ",")
--
local player = getPlayerByNameWildcard(tostring(t[5]))
if(not isPlayer(player)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player nao existe ou nao se encontra online.")
return true
end
local name = ""
local btype = (tostring(t[4]) and pokeballs[t[4]]) and t[4] or typess[math.random(1, #typess)]
local gender = (t[3] and tonumber(t[3])) and tonumber(t[3]) or t[3] and t[3] or nil
if tostring(t[1]) then
name = doCorrectString(t[1])
if not pokes[name] then
doPlayerSendCancel(cid, "Sorry, a pokemon with the name "..name.." doesn't exists.")
return true
end
print(""..name.." ball has been created by "..getPlayerName(cid)..".")
end
addPokeToPlayer(player, name, (t[2] and tonumber(t[2]) or 0), gender, btype)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Pokemon foi entregue comsucesso.")
doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "Seu pokemon foi entregue.")
return true
end
pra usar é só colocar:
/entregar [Pokemon Name], [boost], [Gender], [ball type], [nome player]
Exemplo:
/entregar Charizard, 0, 0, normal, carlos fabian
Nd
O tópico foi fechado e movido para lixeira por estar inativo a mais de 10 dias. Caso seja preciso reabrir o mesmo, favor entrar em contato com a equipe.