Ir para conteúdo

Featured Replies

  • Respostas 10
  • Visualizações 2.8k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • 3 weeks later...
Postado

Bom renato estava testando o seu script para colocar em meu server, pore aparece este erro dps q eu editei na parte dos monstros e tals.

Loading monsterskill.xml...

[09/12/2011 02:30:21] [Error - CreatureScript Interface]

[09/12/2011 02:30:21] buffer

[09/12/2011 02:30:21] Description:

[09/12/2011 02:30:21] (luaGetCreatureStorage) Creature not found

[09/12/2011 02:30:21] [Error - CreatureScript Interface]

[09/12/2011 02:30:21] buffer

[09/12/2011 02:30:21] Description:

[09/12/2011 02:30:21] (luaGetCreatureStorage) Creature not found

[09/12/2011 02:30:21] [Error - TalkAction Interface]

[09/12/2011 02:30:21] buffer

[09/12/2011 02:30:21] Description:

[09/12/2011 02:30:21] (luaGetCreatureStorage) Creature not found

[09/12/2011 02:30:21] done.

abaixo vou deixar disponivel o jeito em que eu colokei o script.


<?xml version="1.0" encoding="UTF-8"?>

<mod name="Monsters Kill Count and Awards" version="2.0" author="Renato Ribeiro" enabled="yes">

<config name="config-monsterskill"><![CDATA[

local monters = {

['Chunnin'] = { id = 1, qtKill = 10, itemId = 2152, qtItem = 1 },

}

storage = 1647

killedMonsters = getPlayerStorageValue(cid, storage)

]]></config>

<event type="look" name="monsterLook" event="script"><![CDATA[

domodlib("config-monsterskill")

function onLook(cid, thing, position, lookDistance)

if(isPlayer(thing.uid)) then

doPlayerSetSpecialDescription(thing.uid, "\n Killed Monsters: " .. killedMonsters)

end

return TRUE

end

]]></event>

<event type="kill" name="monsterKill" event="script"><![CDATA[

domodlib("config-monsterskill")

function onKill(cid, target)

if (isMonster(target)) then

setPlayerStorageValue(cid, storage, math.max(1, getPlayerStorageValue(cid, storage) + 1))

end

if (monsters[string.lower(getCreatureName(target))]) then

mName = getCreatureName(target)

mId = monsters[string.lower(mName)].id

mqtKill = monsters[string.lower(mName)].qtKill

mItemId = monsters[string.lower(mName)].itemId

mqtItem = monsters[string.lower(mName)].qtItem

getMStorage = getPlayerStorageValue(cid, storage + mId)


setPlayerStorageValue(cid, storage + mId, math.max(0, getMStorage + 1))


if (getMStorage == mqtKill) then

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You earned " .. mqtItem .. " " .. getItemNameById(mItemId) .. ".")

adding = doPlayerAddItem(cid, mItemId, mqtItem)

doSetItemSpecialDescription(adding, "\n Reward to " .. getPlayerName(cid) .. " to kill " .. qtKill .. " " .. mName .. "s")

end


end

return TRUE

end

]]></event>

<event type="login" name="monsterLogin" event="script"><![CDATA[

function onLogin(cid)

registerCreatureEvent(cid, "monsterLook")

registerCreatureEvent(cid, "monsterKill")

return TRUE

end

]]></event>

<talkaction words="!monsters" event="script"><![CDATA[

domodlib("config-monsterskill")

function onSay(cid, words, param, channel)

if (monsters[string.lower(param)] or monsters[param]) then

killedMonstersX = getPlayerStorageValue(cid, storage + monsters[string.lower(param)] and monsters[string.lower(param)] or monsters[param])

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have killed " .. killedMonstersX .. " " .. param .. "s at the moment.")

elseif (param) then

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Do not have a " .. param .. " task.")

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have killed " .. killedMonsters .. " monsters at the moment")

end

return TRUE

end

]]></talkaction>

</mod>


Agradeço.

Editado por roriscrave (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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo