roriscrave 21 Postado Julho 28, 2012 Share Postado Julho 28, 2012 creaturescript: local autoAOLStorage = 57928 function onLogin(cid) local templePosition = getTownTemplePosition(getPlayerTown(cid)) local playerPosition = getThingPosition(cid) local fyi = {} local msg = {} if(getDistanceBetween(templePosition, playerPosition) <= 2) then if(getCreatureStorage(cid, autoAOLStorage) == 1 and getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 0) then if(doPlayerRemoveMoney(cid,10000)) then doPlayerAddItem(cid,2173,1) doCreatureSay(cid,'AOL',TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPosition(cid),CONST_ME_BATS) table.insert(msg, 'You have bought Amulet of Loss!') else table.insert(fyi, 'You got no money for Amulet of Loss! It cost 1 crystal coin!') end end end if(#fyi > 0) then doPlayerPopupFYI(cid, table.concat(fyi, '\n')) end if(#msg > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, table.concat(msg, '\n')) end if(#msg > 0 or #fyi > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You can turn off auto buyer by commands: !aol off') end return true end Erro que aparece: [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/autobuyer.lua) [19/07/2012 04:02:06] data/creaturescripts/scripts/autobuyer.lua:8: ')' expected near '&' Link para o comentário https://xtibia.com/forum/topic/190743-script-auto-buyer-aol-com-bug/ Compartilhar em outros sites More sharing options...
0 Tchubaka 36 Postado Julho 28, 2012 Share Postado Julho 28, 2012 local autoBlessStorage = 57927 local autoAOLStorage = 57928 function onLogin(cid) local templePosition = getTownTemplePosition(getPlayerTown(cid)) local playerPosition = getThingPosition(cid) local fyi = {} local msg = {} if(getDistanceBetween(templePosition, playerPosition) <= 2) then if(getCreatureStorage(cid, autoAOLStorage) == 1 and getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 0) then if(doPlayerRemoveMoney(cid,10000)) then doPlayerAddItem(cid,2173,1) doCreatureSay(cid,'AOL',TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPosition(cid),CONST_ME_BATS) table.insert(msg, 'You have bought Amulet of Loss!') else table.insert(fyi, 'You got no money for Amulet of Loss! It cost 1 crystal coin!') end end if(getCreatureStorage(cid, autoBlessStorage) == 1 and not getPlayerBlessing(cid,1)) then if(doPlayerRemoveMoney(cid,50000)) then for b=1,5 do doPlayerAddBlessing(cid,b) end doCreatureSay(cid,'BLESS',TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPosition(cid),CONST_ME_HOLYDAMAGE) table.insert(msg, 'You have been blessed by the gods!') else table.insert(fyi, 'You got no money for Bless! It cost 5 crystal coin!') end end end if(#fyi > 0) then doPlayerPopupFYI(cid, table.concat(fyi, '\n')) end if(#msg > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, table.concat(msg, '\n')) end if(#msg > 0 or #fyi > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You can turn off auto buyer by commands:\n!aol off\n!bless off') end return true end <event type="login" name="AutoBuyerAfterDeath" event="script" value="autobuyer.lua"/> Script adiciona AoL/bless depois do player morre. comando /bless compra 5 bless por 50k comando /bless on player morre quando volta compra a bless sozinho comando /bless off desativa o auto script apenas pra !aol (custa 10k). Link para o comentário https://xtibia.com/forum/topic/190743-script-auto-buyer-aol-com-bug/#findComment-1303681 Compartilhar em outros sites More sharing options...
0 roriscrave 21 Postado Julho 28, 2012 Autor Share Postado Julho 28, 2012 Isso ai poe no creaturescript? porque eu pus igualzinho, não da erro no console. E se eu falar !aol on, nao da nada Link para o comentário https://xtibia.com/forum/topic/190743-script-auto-buyer-aol-com-bug/#findComment-1303723 Compartilhar em outros sites More sharing options...
0 Tchubaka 36 Postado Julho 28, 2012 Share Postado Julho 28, 2012 sim sim. que erro? salve o primeiro arquivo com nome autobuyer.lua Link para o comentário https://xtibia.com/forum/topic/190743-script-auto-buyer-aol-com-bug/#findComment-1303728 Compartilhar em outros sites More sharing options...
0 roriscrave 21 Postado Julho 28, 2012 Autor Share Postado Julho 28, 2012 Tipo meu server tem talkaction de !aol e !bless. Dai se eu botar seu script e falar: !bless on (ele nao usa seu script e sim o que tem no meu otserv de talkaction). Mas se eu falar !aol on (ele da certo) Link para o comentário https://xtibia.com/forum/topic/190743-script-auto-buyer-aol-com-bug/#findComment-1303744 Compartilhar em outros sites More sharing options...
0 Tchubaka 36 Postado Julho 29, 2012 Share Postado Julho 29, 2012 faz assim. vai na tua talkactions.xml aperta CTRL+F e coloca !bless ai vc muda . !bless por !blessing ve se da certo' Link para o comentário https://xtibia.com/forum/topic/190743-script-auto-buyer-aol-com-bug/#findComment-1303944 Compartilhar em outros sites More sharing options...
Pergunta
roriscrave 21
creaturescript:
Erro que aparece:
Link para o comentário
https://xtibia.com/forum/topic/190743-script-auto-buyer-aol-com-bug/Compartilhar em outros sites
5 respostass a esta questão
Posts Recomendados