kevinloko 10 Postado Outubro 15, 2011 Share Postado Outubro 15, 2011 (editado) Tipo do script: Action Protocolo (versão do Tibia): 8.50 Servidor utilizado: Não sei nome decorado Nível de experiência: Médio Adicionais/Informações: Bom eu queria uma action que conforme você clicasse no baú você ganhasse 20 leveis, a função usada seria essa aqui: doPlayerAddLevel(cid, 20), creio que não tenha um tópico explicando isso, se tiver me desculpem, sou um scripter fraco ainda e tentei fazer mais deu uns erros então optei por pedir aqui no xtibia Obrigado desde já Editado Outubro 15, 2011 por Lolboss Link para o comentário Compartilhar em outros sites More sharing options...
angeldoido 37 Postado Outubro 15, 2011 Share Postado Outubro 15, 2011 (editado) é tao facil que vo fase aki pra vc... function onUse(cid, item, frompos, item2, topos) local config = { storage = 14433, -- change to your own storage value item = Id se kiser, --se kiser coloca pra da item---se n kiser so n coloca nada } if getPlayerStorageValue(cid, config.storage) == -1 then setPlayerStorageValue(cid, config.storage, 1) doPlayerAddLevel(cid,20) doPlayerSendTextMessage(cid,25,"You have 20 level.") key = doPlayerAddItem(cid, config.item, 1) else doPlayerSendTextMessage(cid,25,"The pile of bones is empty.") end return TRUE end caso naum funcione.... function onUse(cid, item, frompos, item2, topos) local config = { storage = 14433, -- change to your own storage value } if getPlayerStorageValue(cid, config.storage) == -1 then setPlayerStorageValue(cid, config.storage, 1) doPlayerAddLevel(cid,20) doPlayerSendTextMessage(cid,25,"You have 20 Level.") key = doPlayerAddItem(cid, config.item, 1) else doPlayerSendTextMessage(cid,25,"The pile of bones is empty.") end return TRUE end N tinha nada pra fase e fis outro jeito kkkk function onUse(cid, item, frompos, item2, topos) local config = { storage = 14433, -- change to your own storage value level = 20 } if getPlayerStorageValue(cid, config.storage) == -1 then setPlayerStorageValue(cid, config.storage, 1) doPlayerAddLevel(cid, config.level) doPlayerSendTextMessage(cid,25,"You have 20 level!.") else doPlayerSendTextMessage(cid,25,"The pile of bones is empty.") end return TRUE end Caso naum funcione dinovo report no mesmo topico.... caso funcione me da +rep Editado Outubro 15, 2011 por Snokiuthu Link para o comentário Compartilhar em outros sites More sharing options...
141831 16 Postado Outubro 15, 2011 Share Postado Outubro 15, 2011 (editado) function onUse(cid, item, frompos, item2, topos) local config = { storage = 14433, -- change to your own storage value level = 20 } if getPlayerStorageValue(cid, config.storage) == -1 then setPlayerStorageValue(cid, config.storage, 1) doPlayerAddLevel(cid, config.level) doPlayerSendTextMessage(cid,25,"You have 20 level!.") else doPlayerSendTextMessage(cid,25,"The pile of bones is empty.") end return TRUE end Acho que nao precisaria ter tanto espaco ! Ficaria assim : function onUse(cid, item, frompos, item2, topos) local config = { storage = 14433, -- change to your own storage value level = 20 } if getPlayerStorageValue(cid, config.storage) == -1 then setPlayerStorageValue(cid, config.storage, 1) doPlayerAddLevel(cid, config.level) doPlayerSendTextMessage(cid,25,"You have 20 level!.") else doPlayerSendTextMessage(cid,25,"The pile of bones is empty.") end return TRUE end Mas isso nao muda nada .. Editado Outubro 15, 2011 por StremeMakky Link para o comentário Compartilhar em outros sites More sharing options...
angeldoido 37 Postado Outubro 16, 2011 Share Postado Outubro 16, 2011 é mais facil a leitura com espaço '- Link para o comentário Compartilhar em outros sites More sharing options...
141831 16 Postado Outubro 16, 2011 Share Postado Outubro 16, 2011 Okk . :smile_positivo: Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados