tatu hunter
Insane Mind~
I've made a script to players summon Monk Treiners...
I want the player cant summon other treiner until the first die...
Look what I have for now =S.
and this part... I dont know if it is correct:
How to remove the creature the player summoned?...
The command to summon is !summon.
Can someone help me here?
I want the player cant summon other treiner until the first die...
Look what I have for now =S.
Code:
local vocations = {1,2,5,6}
local monsterStorage = 34165
function onSay(cid, words, param)
if getPlayerStorageValue(cid,monsterStorage) == 1 then
doRemoveCreature('Treiner Inicial')
setPlayerStorageValue(cid, monsterStorage, -1)
elseif getPlayerStorageValue(cid,monsterStorage) == 2 then
doRemoveCreature('Treiner Intermedio')
setPlayerStorageValue(cid, monsterStorage, -2)
elseif getPlayerStorageValue(cid,monsterStorage) == 3 then
doRemoveCreature('Treiner Avancado')
setPlayerStorageValue(cid, monsterStorage, -3)
elseif getPlayerStorageValue(cid,monsterStorage) == 4 then
doRemoveCreature('Treiner Superior')
setPlayerStorageValue(cid, monsterStorage, -4)
elseif getPlayerStorageValue(cid,monsterStorage) == 5 then
doRemoveCreature('Treiner Supremo')
setPlayerStorageValue(cid, monsterStorage, -5)
else
if isInArray(vocations, getPlayerVocation(cid)) then
if getPlayerLevel(cid) > 20 and getPlayerLevel(cid) < 40 then
local treiner = doSummonCreature("Treiner Inicial", getPlayerPosition(cid))
doConvinceCreature(cid, treiner)
setPlayerStorageValue(cid,monsterStorage,1)
elseif getPlayerLevel(cid) > 40 and getPlayerLevel(cid) < 60 then
local treiner = doSummonCreature("Treiner Intermedio", getPlayerPosition(cid))
doConvinceCreature(cid, treiner)
setPlayerStorageValue(cid,monsterStorage,2)
elseif getPlayerLevel(cid) > 60 and getPlayerLevel(cid) < 80 then
local treiner = doSummonCreature("Treiner Avancado", getPlayerPosition(cid))
doConvinceCreature(cid, treiner)
setPlayerStorageValue(cid,monsterStorage,3)
elseif getPlayerLevel(cid) > 80 and getPlayerLevel(cid) < 100 then
local treiner = doSummonCreature("Treiner Superior", getPlayerPosition(cid))
doConvinceCreature(cid, treiner)
setPlayerStorageValue(cid,monsterStorage,4)
elseif getPlayerLevel(cid) > 100 then
local treiner = doSummonCreature("Treiner Supremo", getPlayerPosition(cid))
doConvinceCreature(cid, treiner)
setPlayerStorageValue(cid,monsterStorage,5)
end
end
end
end
Code:
if isInArray(vocations, getPlayerVocation(cid)) then
The command to summon is !summon.
Can someone help me here?