-
Total de itens
3406 -
Registro em
-
Última visita
-
Dias Ganhos
113
Tudo que Vodkart postou
-
ta na mao http://www.xtibia.com/forum/topic/161056-exp-por-hit/
-
eles vendiam direto esse sistema velho eu lembro que eu tinha em servidor meu,agr deve estar de graça fala com os cara q ele tem
- 12 respostas
-
- [pedido] capture the flag
- otserv
- (e 2 mais)
-
exp por hit é isso? pq os cara ja ganha exp qndo mata o monstro zé
-
1° local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 function Sweet(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end for i = 1, table.maxn(parameters.items) do if getPlayerItemCount(cid, parameters.items[i]) <= 0 then npcHandler:say('You don\'t have these items!', cid) return true end end for i = 1, table.maxn(parameters.items) do doPlayerRemoveItem(cid,parameters.items[i], 1) end npcHandler:say('Here is your item!', cid) doPlayerAddItem(cid, parameters.reward,1) return true end local node1 = keywordHandler:addKeyword({'nome do item'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Você quer trocar dois itens por este item?'}) node1:addChildKeyword({'yes'}, Sweet, {items = {8262,8263},reward = 8266}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true}) npcHandler:addModule(FocusModule:new()) explicando keywordHandler:addKeyword({'nome do item'} -- aki vc coloca o nome do item q ele vai troca pelos 2 items items = {8262,8263} -- itens que serão removidos,se quiser adicionar mais só colocar uma virgula e o id do item,ex: items = {8262,8263,8264} reward = 8266 -- item q ele receba em troca!
-
já existe esse script CTF TEM VÁRIOS SERVIDORES QUE USAM ELE.
- 12 respostas
-
- [pedido] capture the flag
- otserv
- (e 2 mais)
-
NOME DO SEU SCRIPT.lua function onCombat(cid, target) local monstName = "Rat" -- nome do monstro if (isPlayer(cid) and isMonster(target)) then if string.lower(getCreatureName(target)) == string.lower(monstName) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE) return FALSE else return TRUE end end return TRUE end login.lua adc registerCreatureEvent(cid, "MobNoAttack") creaturescript.xml <event type="combat" name="MobNoAttack" event="script" value="NOME DO SEU SCRIPT.lua"/>
-
dei uma revisada,estarei fazendo mais update
-
talkaction [ Talkaction ]Comando !party
tópico respondeu ao Vodkart de Vodkart em Actions e Talkactions
arrumei as tags -
obrigado quem tiver alguma duvida ou sugestão favor postar
-
q debug da
-
Matar Monstro Abrir Tp, Remover Parede, Ganhar Storage
tópico respondeu ao Vodkart de Vodkart em Globalevents e Spells
tag arrumadas -
ta faltando um end function creatureSayCallback(cid, type, msg) -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself. if(not npcHandler:isFocused(cid)) then return false end end
-
tem uns tutoriais bom aqui para iniciantes no xtibia só ir lá vendo e o bom é ir aprendendo na porrada mesmo vai criando script e testando ele,se errou nao faz mal errando que se aprende a nao errar mais... abraços
-
function onStepIn(cid, item, position, fromPosition) if getPlayerStorageValue(cid, 9030) <= 0 then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'vc n pode passar.') doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return TRUE end return TRUE end set / get get -- para checar set -- para alterar e tinha mais end no seu script... vc abriu uma "function onStepIn" blz ai tem q fechar ela,ja sabe q tem um end... function onStepIn(cid, item, position, fromPosition) end pq tinha 2 end na seu script? soh se tivesse um if,for,while ou qualquer outra coisa... por exemplo function onStepIn(cid, item, position, fromPosition) if bloco then -- abri um if tem q fecha com end continuidade end end
-
não vai funcionar continua errado...
-
Door Que Só Vip Passa Ou Só Se For Level 150+
tópico respondeu ao EduardoDantas de Vodkart em Lixeira Pública
if getPlayerLevel(cid) < 150 and vip.getVip(cid) <= 0 then -
Não. Vou dar uma leve explicação... Ele vai logar e vai checar se é premium,se for mesmo premium vai adicionar uma key. ai se acabar a premium vai checar se tem essa key,se tiver a key e não for mais premium vai manda ele pro templo. não tem aquele bug de todos que nao forem premium ficarem indo pro templo,rlx.
-
adiciona isso em login.lua antes do return TRUE if isPremium(cid) then setPlayerStorageValue(cid, 9899, 1) elseif getPlayerStorageValue(cid, 9899) >= 1 and isPremium(cid) == FALSE then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerPopupFYI(cid, "Sua Premium Account acabou.") setPlayerStorageValue(cid, 9899, -1) end
-
Door Que Só Vip Passa Ou Só Se For Level 150+
tópico respondeu ao EduardoDantas de Vodkart em Lixeira Pública
function onUse(cid, item, frompos, item2, topos) if getPlayerLevel(cid) < 150 or vip.getVip(cid) <= 0 then return doPlayerSendCancel(cid, "Você não possui Vip Account.") else doTransformItem(item.uid, item.itemid + 1) playerpos = getPlayerPosition(cid) doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253} if playerpos.y == doorpos.y + 1 and playerpos.x == doorpos.x then doMoveCreature(cid, 0) elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y then doMoveCreature(cid, 1) elseif playerpos.y == doorpos.y - 1 and playerpos.x == doorpos.x then doMoveCreature(cid, 2) elseif playerpos.y == doorpos.y and playerpos.x == doorpos.x + 1 then doMoveCreature(cid, 3) elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y - 1 then doMoveCreature(cid, 4) elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y - 1 then doMoveCreature(cid, 5) elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y + 1 then doMoveCreature(cid, 6) elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y + 1 then doMoveCreature(cid, 7) end end return TRUE end -
blz tenta ali usar o npc agr modifiquei e vc coloco td na lib neh?
-
realmente mto útil essas suas funções criei vários npcs e com a ajuda delas ficou mais fácil mto veri gódi tio
-
calma ae tenta assim: nome do seu npc.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Nome do seu npc" script="nome do seu script.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="133" head="114" body="119" legs="132" feet="114"/> </npc> nome do seu script.lua dofile("data/npc/lib/npc-func.lua") local focuses = {} -- do not change function onCreatureSay(cid, type, msg) local falas = { [1] = { -- druid hi = 'Hello, mage of the skies. blablabla {yes} ?', yes = 'ok mage! kkkkk', no = 'ok then mage', bye = 'Good bye '.. getCreatureName(cid) ..'.' }, [2] = { -- sorc hi = 'Hello my forest enchanter blablabla {yes} ?', yes = 'ok forest enchanter! kkkkk', no = 'ok then forest gamp', bye = 'Good bye '.. getCreatureName(cid) ..'.' }, [3] = { -- paladin hi = 'Hey! Super shooter blablabla {yes} ?', yes = 'ok Super shooter! kkkkk', no = 'ok then super shooter', bye = 'Good bye '.. getCreatureName(cid) ..'.' }, [4] = { -- knight hi = 'Aye, guardian blablabla {yes} ?', yes = 'ok guardian! kkkkk', no = 'ok then gaydian', bye = 'Good bye '.. getCreatureName(cid) ..'.' } } local cid_Say = msg:lower() if ((cid_Say == "hi") and not (isFocused(cid, focuses))) then if not falas[getPlayerVocation(cid)] then selfSay('desculpe,não falo com você!', cid) removeFocus(cid, focuses) else selfSay(falas[getPlayerVocation(cid)].hi, cid) addFocus(cid, focuses) selfFocus(cid) talk_step = 1 end elseif ((cid_Say == "yes") and (talk_step == 1)) then selfSay(falas[getPlayerVocation(cid)].yes, cid) talk_step = 2 elseif ((cid_Say == "no") and (isInArray({1,2}, talk_step))) then selfSay(falas[getPlayerVocation(cid)].no, cid) removeFocus(cid, focuses) elseif (cid_Say == "bye") then selfSay(falas[getPlayerVocation(cid)].bye, cid) removeFocus(cid, focuses) end end function onThink() for _, focus in pairs(focuses) do if not isCreature(focus) then removeFocus(focus, focuses) talk_step = 0 else local distance = getDistanceTo(focus) or 5 if distance > 4 then selfSay("Hmpf!", focus) removeFocus(focus, focuses) talk_step = 0 end end end setFocus(focuses) end crie um arquivo chamado "npc-func.lua" em "data/npc/lib" e poe isso local focuses = {} function isFocused(cid, t) for i, v in pairs(t) do if(v == cid) then return true end end return false end function addFocus(cid, t) if(not isFocused(cid, t)) then table.insert(t, cid) end end function setFocus(t) for i, v in pairs(t) do if(isPlayer(v)) then doNpcSetCreatureFocus(v) return end end doNpcSetCreatureFocus(0) end function removeFocus(cid, t) for i, v in pairs(t) do if(v == cid) then table.remove(t, i) setFocus(focuses) break end end end function onCreatureDisappear(cid) if isFocused(cid, focuses) then removeFocus(cid, focuses) if isPlayer(cid) then closeShopWindow(cid) end end end lembrando q tirei essa base de script do LsM tenta ae
-
n precisa nem tenta n vai funcionar primeira vez q vejo isso: setPlayerStorageValue(cid) = xxxx
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.