Ir para conteúdo
DESCRIÇÃO
Anuncie aqui neste countdown e dê maior visibilidade ao seu lançamento | Full Global • Custom Quests • Custom Outfits • Lottery System • Version 15x
Inicia em: --
Participar

rollback

Membro
  • Registro em

  • Última visita

Tudo que rollback postou

  1. @up tenho fé que ainda alguem vai responder kkk
  2. comentem ae galera se curtirem não esqueça do rep + :]
  3. claro que não fiquei o dia todo criando aprendendendo faze isso ae pq comecei a pouco tempo , mais blz se ja existe igual . procurei aque e so tem de arrow e shield wand nunca vi , ainda mais explicando detalhe por detalhe , vc q ja e profissional parece ser algo idiota mais pra qm ta começando e algo bem legal.
  4. Não é a hailstorm rod é uma wand que tem 2 sprites iguais ae quando você da use nela ela transforma em wand que atk com death e se dar use denovo ela volta a atk de holy , use o ID que ta ai você vai axa bem legal mais se quise pode mudar pra outras wand tbm
  5. Eae galera do TK vim aque trazer um script simples mais bem legal , desculpe se já existe , mais procurei e não axei ! Oque ele faz é uma wand que se transforma em outro. Primerio vamos criar a wand. Vá em data/items/item.xml e adicione isso. <item id="12279" article="the" name="supreme holy wand"> <attribute key="description" value="This holy wand of light is the best." /> <attribute key="weight" value="1730" /> <attribute key="weaponType" value="wand" /> <attribute key="shootType" value="holy" /> <attribute key="range" value="6" /> </item> <item id="12288" article="the" name="supreme death wand"> <attribute key="description" value="This death wand of dark is the best." /> <attribute key="weight" value="1730" /> <attribute key="weaponType" value="wand" /> <attribute key="shootType" value="death" /> <attribute key="range" value="6" /> </item> enceguida vá em data/weapons/weapons.xml e adicione isso. <wand id="12279" mana="13" min="280" max="350" type="holy" event="function" value="default"> <!-- Holy Wand --> <vocation id="1"/> <vocation id="2"/> </wand> <wand id="12288" mana="13" min="280" max="350" type="death" event="function" value="default"> <!-- Death Wand --> <vocation id="1"/> <vocation id="2"/> </wand> Pronto agora vamos criar um action para poder transformar uma wand na outra ao dar use. Primeiro vá em data/action/action.xml e adicione isso. <action fromid="12279" toid="12288" event="script" value="two_wand.lua"/> depois vá na pasta data/action/scripts e crie um arquivo.xml com o nome de two_wand e adicione isso dentro. -- multiplas wands local ITEM_IDS = { [12279] = 12288, [12288] = 12279, } function onUse(cid, item, fromPosition, itemEx, toPosition) if(not ITEM_IDS[item.itemid]) then return false end doTransformItem(item.uid, ITEM_IDS[item.itemid]) doDecayItem(item.uid) return true end Pronto agora só curtir sua nova wand se gostou não custa nada dar um rep+
  6. Axo que é porque você apago o nome do seu ot la e colou outro ou recrio com mesmo nome ae demora um pouco pra atualiza a otservlist relax que jája volta ao norma. Pelo que me lenbro leva uns 30 minutos por ae pra atualiza ae fica normal, Se te ajudei REP+
  7. Primeiro crie um arquivo.xml na pasta NPC com o nome de Capitao coruja depois coloque isso dentro. <npc name="Capitao Coruja" script="data/npc/scripts/coruja.lua" walkinterval="0" floorchange="0" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="129" head="114" body="119" legs="114" feet="114" corpse="2212"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. ! Eu posso te levar para {Dorion}, {yalahar}, {alfon}, {venonh}, {anknor}, {smallville} e {goroma}.. Onde deseja ir?" /> <parameter key="message_decline" value="Vai custar |TOTALCOST| gold coins. Vai viajar? Voce pode ir em outras cidades indo ao tapete do meu primo!"/> </parameters> </npc> enceguida abra a pasta NPC/SCRIPTS crie um arquivo coruja.xml e coloque isso dentro. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) -- OTServ event handling functions start function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end -- OTServ event handling functions end -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'yalahar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para Yalahar por 210 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 210, destination = {x=1555, y=2576, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Eu posso te levar para {dorion}, {Yalahar}, {Alfon}, {venonh} e {Anknor} por um pequeno custo.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'dorion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para Dorion por 110 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 110, destination = {x=31, y=79, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'dorion\' for just a small fee.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'alfon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para alfon por 115 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 115, destination = {x=114, y=282, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'Alfon\' for just a small fee.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'venonh'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para venonh por 100 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 100, destination = {x=238, y=370, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'venohn\' for just a small fee.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'anknor'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para anknor por 175 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 175, destination = {x=487, y=261, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'Anknor\' for just a small fee.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'anknor'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para anknor por 100 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 100, destination = {x=487, y=261, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'anknor\' for just a small fee.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'smallville'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para smallville por 190 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 190, destination = {x=1995, y=2394, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'smallville\' for just a small fee.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'goroma'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para Goroma por 55 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 55, destination = {x=1367, y=195, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'goroma\' for just a small fee.'}) -- Makes sure the npc reacts when you say hi, bye etc. npcHandler:addModule(FocusModule:new()) Agora editando o script local travelNode = keywordHandler:addKeyword({'yalahar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para Yalahar por 210 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 210, destination = {x=1555, y=2576, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Eu posso te levar para {dorion}, {Yalahar}, {Alfon}, {venonh} e {Anknor} por um pequeno custo.'}) Vermelho é a menssagem que ele vai perguntar para o player Amarelo premium = true aque é se pode viajar so premmy ou free tbm pra por free coloca premium = false já pra so premmy premium = true Verde level = 2 se precisar de level vc edita pra o lvl que quiser cost = 210 , é o preço da viagem. destination = {x=1555, y=2576, z=6 voce edita pra onde o player vai ser levado e assim é a mesma coisa em todos. Já para editar a menssagem do npc você muda em capitao coruja.xml Eu posso te levar para {Dorion}, {yalahar}, {alfon}, {venonh}, {anknor}, {smallville} e {goroma}.. Onde deseja ir? Te ajudei? REP+
  8. rollback postou uma resposta no tópico em Suporte Tibia OTServer
    ja tentou ver no config.lua na parte battle
  9. deu error :S [15/09/2012 14:45:05] [Error - Action Interface] [15/09/2012 14:45:05] data/actions/scripts/shopsystem.lua:onUse [15/09/2012 14:45:05] Description: [15/09/2012 14:45:05] data/actions/scripts/shopsystem.lua:35: attempt to index field '?' (a nil value) [15/09/2012 14:45:05] stack traceback: [15/09/2012 14:45:05] data/actions/scripts/shopsystem.lua:35: in function <data/actions/scripts/shopsystem.lua:34> [15/09/2012 14:45:05] [Error - Action Interface] [15/09/2012 14:45:05] data/actions/scripts/shopsystem.lua:onUse [15/09/2012 14:45:05] Description: [15/09/2012 14:45:05] data/actions/scripts/shopsystem.lua:35: attempt to index field '?' (a nil value) [15/09/2012 14:45:05] stack traceback: [15/09/2012 14:45:05] data/actions/scripts/shopsystem.lua:35: in function <data/actions/scripts/shopsystem.lua:34>
  10. Axei esse topico ve se ajuda.
  11. tenta pegar o items.otb de outro server que fica dentro da pasta data/items/items.otb !! axo que é isso se te ajudei rep+
  12. [14/09/2012 01:25:57] [Error - Action Interface] [14/09/2012 01:25:57] In a timer event called from: [14/09/2012 01:25:57] data/actions/scripts/snakesys.lua:onUse [14/09/2012 01:25:57] Description: [14/09/2012 01:25:57] (luaDoRemoveItem) Item not found alguem poderia me explicar porque quase todos scripts que coloco da esse error. coloquei sistema de futebol , snake , casino os 3 deram o mesmo error. URGENTE !!!
  13. se for oque entendi ! é so você ver o id desse item que ja tem a spr no mapa editor na pasta data/world. depois que ver o ID do item ae vai na pasta data/items/items.xml e adiciona isso caso seja weapon você precisa por tambem na wepons data/weapons/wepons.xml tambem não pode esquecer de adiciona no movevents. data/movements/movements.xml DEPOIS FALE PRA MIN QUAL É O TIPO DE ITEM TENTO TE AJUDAR SE FOR O QUE FALEI!
  14. rollback postou uma resposta no tópico em Suporte Tibia OTServer
    alguem disposto a me ajudar?
  15. rollback postou uma resposta no tópico em Suporte Tibia OTServer
    ninguem ajuda :S
  16. Axo que esse aque funciona. function getItemCap(itemid, quant) -- function by MatheusMkalo return getItemInfo(itemid).weight*(quant or 1) end function onUse(cid, item, fromPosition, itemEx, toPosition) local configs = { [45690] = {itemid = 7620, quantperslot = 100, cost = 5000, backpackid = 2002}, [45691] = {itemid = 2268, quantperslot = 50, cost = 2, backpackid = 2003}, } local coinid = 9971 -- Use o id da gold coin (2148) se voce quizer usar o sistema de dinheiro mesmo. (Caso o itemid for 2148 o cost sera de gps ou seja 30 = 30 gps) if configs[item.actionid] then if getPlayerFreeCap(cid) >= math.ceil((getItemCap(configs[item.actionid].itemid, configs[item.actionid].quantperslot)*1)+getItemCap(configs[item.actionid].backpackid)) then if coinid ~= 2148 and getPlayerItemCount(cid, coinid) >= configs[item.actionid].cost or doPlayerRemoveMoney(cid, configs[item.actionid].cost) then local backpack = doPlayerAddItem(cid, configs[item.actionid].backpackid) for i = 1, 1 do doAddContainerItem(backpack, configs[item.actionid].itemid, configs[item.actionid].quantperslot) end doPlayerRemoveItem(cid, coinid == 2148 and 0000 or coinid, configs[item.actionid].cost) else return doPlayerSendCancel(cid, ("You need " .. configs[item.actionid].cost) .. (coinid == 2148 and " gold coins" or (" " .. getItemPluralNameById(coinid):lower())) .. " to buy this item.") end else return doPlayerSendCancel(cid, "You need " .. math.ceil((getItemCap(configs[item.actionid].itemid, configs[item.actionid].quantperslot)*1)+getItemCap(configs[item.actionid].backpackid)) .. " cap for buy that.") end end return TRUE end <action actionid="45690-45691" event="script" value="testing.lua"/> vem 100 dentro da bp não consegui tirar pra vim sem a bp , mais a bp vem de graça =] então não muda em nada pra quem comprar. aque você edita [45690] = {itemid = 7620, quantperslot = 100, cost = 5000, backpackid = 2002}, [45691] = {itemid = 2268, quantperslot = 50, cost = 2, backpackid = 2003}, 45690 é o actionid 7620 é o id da pot ou rune , quantperslot é quanto vai vim em 1 slot , 5000 é o preço das 100 mp backpackid é o id da bp q vai vir junto. vc pode aumentar os tipo de potion pra cada alavanca lenbraquando q cada alavanca vc vai te q por o actionid [45690] = {itemid = 7620, quantperslot = 100, cost = 5000, backpackid = 2002}, [45691] = {itemid = 7619, quantperslot = 100, cost = 20000, backpackid = 2002}, [45692] = {itemid = 7618, quantperslot = 100, cost = 3000, backpackid = 2002}, [45693] = {itemid = 7617, quantperslot = 100, cost = 2500, backpackid = 2002},
  17. ve se esse funciona ----- Config ----- local config = { cost = 500, -- Price item_id = 7620, -- Rune/Potion backpack_id = 2001 -- Backpack } local name = getItemNameById(7620) -- Same as item_id above ----- End Config ----- function onUse(cid, item, fromPosition, itemEx, toPosition) if doPlayerRemoveMoney(cid, config.cost) == TRUE then local bp = doPlayerAddItem(cid, config.backpack_id, 1) doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS) doSendAnimatedText(fromPosition, "Comprado", TEXTCOLOR_RED) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "VOcê comprou uma backpack de ".. name .."s por ".. config.cost .." gold.") for i=1,20 do doAddContainerItem(bp, config.item_id, 1) -- You can edit this number, it will give shots per rune. end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa de ".. config.cost .." gold para comprar uma backpack de ".. name .."s.") end return TRUE end
  18. Veja se dentro da pasta data/world tem la nomedoseuot-spawn se tiver e mesmo assim não tiver aparecendo os respawn vá no mapa do seu ot ,Map - properties , veja se em External Spawnfile tá com mesmo nome do seu spawn da pasta da pasta world , se não tiver mude para o mesmo nome , isso no remeres mapa edtior. Agora se não for isso não sei oque é se ajudei rep+.
  19. Veja se dentro da pasta data/world tem la nomedoseuot-spawn se tiver e mesmo assim não tiver aparecendo os respawn vá no mapa do seu ot ,Map - properties , veja se em External Spawnfile tá com mesmo nome do seu spawn da pasta da pasta world , se não tiver mude para o mesmo nome , isso no remeres mapa edtior. Agora se não for isso não sei oque é se ajudei rep+.
  20. rollback postou uma resposta no tópico em Suporte Tibia OTServer
    o error ta na hora q puxa a alavanca e dexa ela para sozinha
  21. rollback postou uma resposta no tópico em Suporte Tibia OTServer
    blz to esperando
  22. nem funciona esse script mandei meu rl usa mage bomb no meu ot com o script ele nao funciona
  23. rollback postou uma resposta no tópico em Suporte Tibia OTServer
    Depois que o cara joga e as fruta para sozinho da esse erro , são 3 frutas. O action é esse --[[ Advanced Slot Machine by EddyHavoc For TibiaKing ]]-- --REQUIRED MONEY(gp) TO PLAY SLOT MACHINE --[[ Advanced Slot Machine by EddyHavoc For TibiaKing ]]-- --REQUIRED MONEY(gp) TO PLAY SLOT MACHINE local money = 1000 --MILISECONDS TO CHANGE FRUITS local time = 200 --ITERATOR TIME TO STOP CHANGING FRUIT IF PLAYER DOESN'T (30 is like 7 seconds) local limit = 3 --FRUITS THAT WILL RANDOMLY APPEAR AND SWITCH local fruits = {2674,2675,2676,2679,2680,2682,2683,5097,8841} --PRIZES TABLES local win = { -- [{FRUIT.1,FRUIT.2,FRUIT.3} = {PRIZE,#PRIZE}] --MIXED COMBOS [{2679,2683,2679}] = {2160,2}, -- cherry-pumpkin-cherry [{8841,2682,8841}] = {2160,1}, -- lemon-melon-lemon --TRIPLE COMBOS [{2680,2680,2680}] = {2152,80}, -- triple strawberry [{5097,5097,5097}] = {2152,60}, -- triple mango [{2683,2683,2683}] = {2152,80}, -- triple pumpkin [{2682,2682,2682}] = {2152,50}, -- triple melon [{2676,2676,2676}] = {2152,40}, -- triple banana [{8841,8841,8841}] = {2152,25}, -- triple lemon [{2679,2679,2679}] = {2152,20}, -- triple cherry [{2675,2675,2675}] = {2152,30}, -- triple orange [{2674,2674,2674}] = {2152,10}, -- triple apple --ANY COMBOS [{ANY,2683,2683}] = {2152,5}, -- double pumpkin right [{2683,2683,ANY}] = {2152,5}, -- double pumpkin left [{2683,ANY,2683}] = {2152,10}, -- pumpkin sides combo [{ANY,2679,2679}] = {2152,4}, -- double cherry right [{2679,2679,ANY}] = {2152,4}, -- double cherry left [{2679,ANY,2679}] = {2152,8}, -- cherry sides combo [{ANY,8841,8841}] = {2152,5}, -- double lemon right [{8841,8841,ANY}] = {2152,5}, -- double lemon left [{8841,ANY,8841}] = {2152,5}, -- lemon sides combo } --MESSAGES THAT RANDOMLY APPEAR WHEN PLAYER WINS local messages = {'Bingo!','Lucky!','Jackpot!','Win!'} --FRUITS ROWS local p = { --[LEVER.UNIQUEID] [6297] = {},[6298] = {},[6299] = {},[6300] = {}, --[6301] = {}, } --JUST PUT THE INITIAL ROW POS FROM LEFT, SECOND & THIRD WILL BE AUTOM. GENERATED for i = 1,3 do --p, UNIQUEID.LEVER, {POS FROM TILE OF LEFT} table.insert(p[6297],i,{x=92+(i-1),y=63,z=6,stackpos=1}) table.insert(p[6298],i,{x=101+(i-1),y=63,z=6,stackpos=1}) table.insert(p[6299],i,{x=92+(i-1),y=72,z=6,stackpos=1}) table.insert(p[6300],i,{x=101+(i-1),y=72,z=6,stackpos=1}) -- table.insert(p[6301],i,{x=19+(i-1),y=145,z=7,stackpos=1}) end function verifyRow(cid, array, pos) local result, prize = false, '' for a, b in pairs(win) do if getTileItemById(pos[1],a[1]).uid > 1 or a[1] == ANY then if getTileItemById(pos[2],a[2]).uid > 1 or a[2] == ANY then if getTileItemById(pos[3],a[3]).uid > 1 or a[3] == ANY then doPlayerAddItem(cid, b[1], b[2] or 1, true) doSendAnimatedText(getThingPos(cid), messages[math.random(#messages)], math.random(255)) result, prize, amount = true, b[1], b[2] end end end end if prize ~= '' then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'Congratulations!! You won '..amount..' '..getItemPluralNameById(prize)..'!') end for i = 1,3 do doSendMagicEffect(pos[i], result and CONST_ME_GIFT_WRAPS or CONST_ME_EXPLOSIONHIT) doRemoveItem(getTileThingByPos(pos[i]).uid) end return not result and doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'You have lost in the Slot Machine Try again') end function onUse(cid, item, fromPosition, itemEx, toPosition) local function doFruit(pos,cid,id,limit) if not isPlayer(cid) then return doItemEraseAttribute(item.uid, 'aid'), getTileThingByPos(pos).uid > 0 and doRemoveItem(getTileThingByPos(pos).uid) end if getTileThingByPos(pos).itemid < 1 then doSendMagicEffect(pos, CONST_ME_POFF) doCreateItem(fruits[math.random(#fruits)], 1, pos) else doTransformItem(getTileThingByPos(pos).uid,fruits[math.random(#fruits)],1) end if limit <= 0 then doSendMagicEffect(pos,math.random(28,30)) doTransformItem(getTileThingByPos(pos).uid,fruits[math.random(#fruits)],1) doItemSetAttribute(getTileThingByPos(fromPosition) .uid, 'aid', getTileThingByPos(fromPosition).actionid+1) doTransformItem(getTileThingByPos(fromPosition).ui , getTileThingByPos(fromPosition).itemid == 9826 and 9825 or 9826) elseif getTileThingByPos(fromPosition).actionid > id then doSendMagicEffect(pos,math.random(28,30)) doTransformItem(getTileThingByPos(pos).uid,fruits[math.random(#fruits)],1) else addEvent(doFruit,time,pos,cid,id,limit-1) end end if item.actionid == 0 then if not doPlayerRemoveMoney(cid, money) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'You need '..money..' gps to play Slot Machine.') end doItemSetAttribute(item.uid, 'aid', 1) doCreatureSetNoMove(cid, true) doTransformItem(item.uid, item.itemid == 9826 and 9825 or 9826) doSendAnimatedText(getThingPos(cid), '-$'..money,COLOR_RED) for i = 1,3 do doFruit(p[item.uid][i],cid,i,i*limit) end elseif isInArray({1,2,3},item.actionid) then doItemSetAttribute(item.uid, 'aid', item.actionid+1) doTransformItem(item.uid, item.itemid == 9826 and 9825 or 9826) elseif item.actionid == 4 then doCreatureSetNoMove(cid, false) doItemEraseAttribute(item.uid, 'aid') doTransformItem(item.uid, item.itemid == 9826 and 9825 or 9826) verifyRow(cid, win, p[item.uid]) end return true end [/code]

Informação Importante

Confirmação de Termo