MA

Sistema De Novos Items

Por MatheusGlad, 08 de jun. de 2011 em Mods, funções e outros

script
5.0 (1)
49
15.2k
HatakeeKakashiH
05 de novembro de 2012 às 15:31

PESSOAL Q DEU +REP FOI PELO POST OU PQ TESTOU E FUNCIONO??? POR MIN DAVA SO +REP QUANDO FUNCIONA SE NAO EU POSTO AKI QUALQUER BESTEIRA Q NAO FUNCIONA PRA GANHAR REP NUM ACHA????

BOM FOI MAL REVIVER O TOPICO MAIS PRESISO Q FUNCIONO PRA CRIAR O ITEM....

QM POSTO NAO ENTRA MAIS NO XTIBIA NAO?? OU TBM N SABE FAZE O ITEM KKKK PQ PREISO MT DESTE SCRIPT E SEI Q VAI AJUDAR MT GENTE VE AE PESSOAL AJUDAAAAAA

2 semanas depois...
JasonLucasJ
16 de novembro de 2012 às 18:23

Pro pessoal que quer criar o item com god faz assim

 

Cria um arquivo em talkactions > scripts assim createediteditem.lua e coloca isso

function onSay(cid, words, param, channel)
if(param == '') then
 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
 return true
end
local t = string.explode(param, ",")
local ret = RETURNVALUE_NOERROR
local pos = getCreaturePosition(cid)
local id = tonumber(t[1])
if(not id) then
 errors(false)
 id = getItemIdByName(t[1])
 errors(true)
 if(not id) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.")
  return true
 end
end
local amount = 100
if(t[2]) then
 amount = t[2]
end
local item = doCreateEditedItem(id, amount)
if(t[3] and getBooleanFromString(t[3])) then
 if(t[4] and getBooleanFromString(t[4])) then
  pos = getCreatureLookPosition(cid)
 end
 ret = doTileAddEditedItem(pos, item)
else
 ret = doPlayerAddEditedItem(cid, item, true)
end
if(ret ~= RETURNVALUE_NOERROR) then
 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Couldn't add item: " .. t[1])
 return true
end
doDecayItem(item)
if(not isPlayerGhost(cid)) then
 doSendMagicEffect(pos, CONST_ME_MAGIC_RED)
end
return true
end

 

Depois vai em talkactions.xml e adiciona isso

<talkaction log="yes" words="/ie" access="4" event="script" value="createediteditem.lua"/>

 

Ai vai ficar assim os comandos

/i = itens não editados

/ie = itens editados

 

Eu não sei se vai funcionar não testei aqui, se alguém conseguir usar avisa e se quiserem me dar REP mdr.gif

EarthofSkyE
17 de novembro de 2012 às 14:01

13:59 Command param required.

se falar só /ie, mas se falar tipo assim: /ie magic edited sword, ou qualquer outra coisa depois do /ie ele vira uma fala e não um comando, tradução aqui n funfo :x mas vlw por tentar ai ^^ + rep iniciativa kk

5 meses depois...
07 de abril de 2013 às 04:31

Desculpa reviver, mas tem como colocar em quest? Se sim como?

 

Pro pessoal que quer criar o item com god faz assim

 

Cria um arquivo em talkactions > scripts assim createediteditem.lua e coloca isso

function onSay(cid, words, param, channel)
if(param == '') then
 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
 return true
end
local t = string.explode(param, ",")
local ret = RETURNVALUE_NOERROR
local pos = getCreaturePosition(cid)
local id = tonumber(t[1])
if(not id) then
 errors(false)
 id = getItemIdByName(t[1])
 errors(true)
 if(not id) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.")
  return true
 end
end
local amount = 100
if(t[2]) then
 amount = t[2]
end
local item = doCreateEditedItem(id, amount)
if(t[3] and getBooleanFromString(t[3])) then
 if(t[4] and getBooleanFromString(t[4])) then
  pos = getCreatureLookPosition(cid)
 end
 ret = doTileAddEditedItem(pos, item)
else
 ret = doPlayerAddEditedItem(cid, item, true)
end
if(ret ~= RETURNVALUE_NOERROR) then
 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Couldn't add item: " .. t[1])
 return true
end
doDecayItem(item)
if(not isPlayerGhost(cid)) then
 doSendMagicEffect(pos, CONST_ME_MAGIC_RED)
end
return true
end

 

Depois vai em talkactions.xml e adiciona isso

<talkaction log="yes" words="/ie" access="4" event="script" value="createediteditem.lua"/>

 

Ai vai ficar assim os comandos

/i = itens não editados

/ie = itens editados

 

Eu não sei se vai funcionar não testei aqui, se alguém conseguir usar avisa e se quiserem me dar REP mdr.gif

 

 

E a talkaction não esta funcionando

Editado Abril 7 por tiagoduuarte