Postado Novembro 5, 2014 10 anos Eae galera do TibiaKing ! Boa tarde ! estou com um problema muito complicado. Eu e Meu Socio, criamos um mapa Infinity-Sky.. e estamos terminando ;] O Error do Vip System é isso aqui.. *Não dá Vocation VIP para todas as contas criadas que usou a VIP, aí só 1 player fica com a Vocation VIP, mais as outras não, mais pode entrar na area vip.. e quando ela acaba perde o acesso, mais fica com a vocation VIP e com Tutor..., E Não dá 50% de hp e 50% a mais pra quem usou a vip Irei postar o script.. function onUse(cid, item, frompos, item2, topos) function nome() novo = getPlayerName(cid) id = getPlayerGUID(cid) doRemoveCreature(cid) db.executeQuery("UPDATE players SET name='[VIP] "..novo.."' WHERE id='"..id.."'") end function free() if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then level = getPlayerLevel(cid) hp = math.floor(level*30) mana = math.floor(level*15) setCreatureMaxHealth(cid, hp) setCreatureMaxMana(cid, mana) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) end if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then level = getPlayerLevel(cid) hp = math.floor(level*20) mana = math.floor(level*25) setCreatureMaxHealth(cid, hp) setCreatureMaxMana(cid, mana) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) end if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then level = getPlayerLevel(cid) hp = math.floor(level*15) mana = math.floor(level*30) setCreatureMaxHealth(cid, hp) setCreatureMaxMana(cid, mana) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) end end if item.itemid == 12328 and vip.hasVip(cid) == TRUE then id = tonumber(2) or 1 vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(id)) doPlayerSendTextMessage(cid,25,"Você recebeu "..tonumber(id).." dias de vip.") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doSendAnimatedText(topos,'VIP!',180) doPlayerSendTextMessage(cid,21,"Seu nome já esta como [VIP].") elseif item.itemid == 12328 and vip.hasVip(cid) == FALSE then id = tonumber(2) or 1 vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(id)) doPlayerSendTextMessage(cid,25,"Você recebeu "..tonumber(id).." dias de vip.") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doSendAnimatedText(topos,'VIP!',180) doPlayerSetPromotionLevel(cid, 1) doPlayerSetGroupId(cid, 2) addEvent(free, 300) addEvent(vocation, 500) addEvent(nome, 1000) end if item.itemid == 10314 and vip.hasVip(cid) == TRUE then id = tonumber(15) or 1 vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(id)) doPlayerSendTextMessage(cid,25,"Você recebeu "..tonumber(id).." dias de vip.") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doSendAnimatedText(topos,'VIP!',180) doPlayerSendTextMessage(cid,21,"Seu nome já esta como [VIP].") elseif item.itemid == 10314 and vip.hasVip(cid) == FALSE then id = tonumber(15) or 1 vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(id)) doPlayerSendTextMessage(cid,25,"Você recebeu "..tonumber(id).." dias de vip.") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doSendAnimatedText(topos,'VIP!',180) doPlayerSetPromotionLevel(cid, 1) doPlayerSetGroupId(cid, 2) addEvent(free, 300) addEvent(vocation, 500) addEvent(nome, 1000) end if item.itemid == 10312 and vip.hasVip(cid) == TRUE then id = tonumber(30) or 1 vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(id)) doPlayerSendTextMessage(cid,25,"Você recebeu "..tonumber(id).." dias de vip.") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doSendAnimatedText(topos,'VIP!',180) doPlayerSendTextMessage(cid,21,"Seu nome já esta como [VIP].") elseif item.itemid == 10312 and vip.hasVip(cid) == FALSE then id = tonumber(30) or 1 vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(id)) doPlayerSendTextMessage(cid,25,"Você recebeu "..tonumber(id).." dias de vip.") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doSendAnimatedText(topos,'VIP!',180) doPlayerSetPromotionLevel(cid, 1) doPlayerSetGroupId(cid, 2) addEvent(free, 300) addEvent(vocation, 500) addEvent(nome, 1000) end if item.itemid == 10311 and vip.hasVip(cid) == TRUE then id = tonumber(60) or 1 vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(id)) doPlayerSendTextMessage(cid,25,"Você recebeu "..tonumber(id).." dias de vip.") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doSendAnimatedText(topos,'VIP!',180) doPlayerSendTextMessage(cid,21,"Seu nome já esta como [VIP].") elseif item.itemid == 10311 and vip.hasVip(cid) == FALSE then id = tonumber(60) or 1 vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(id)) doPlayerSendTextMessage(cid,25,"Você recebeu "..tonumber(id).." dias de vip.") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doSendAnimatedText(topos,'VIP!',180) doPlayerSetPromotionLevel(cid, 1) doPlayerSetGroupId(cid, 2) addEvent(free, 300) addEvent(vocation, 500) addEvent(nome, 1000) end if item.itemid == 10310 and vip.hasVip(cid) == TRUE then id = tonumber(90) or 1 vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(id)) doPlayerSendTextMessage(cid,25,"Você recebeu "..tonumber(id).." dias de vip.") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doSendAnimatedText(topos,'VIP!',180) doPlayerSendTextMessage(cid,21,"Seu nome já esta como [VIP].") elseif item.itemid == 10310 and vip.hasVip(cid) == FALSE then id = tonumber(90) or 1 vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(id)) doPlayerSendTextMessage(cid,25,"Você recebeu "..tonumber(id).." dias de vip.") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doSendAnimatedText(topos,'VIP!',180) doPlayerSetPromotionLevel(cid, 1) doPlayerSetGroupId(cid, 2) addEvent(free, 300) addEvent(vocation, 500) addEvent(nome, 1000) end if item.itemid == 10309 and vip.hasVip(cid) == TRUE then id = tonumber(760) or 1 vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(id)) doPlayerSendTextMessage(cid,25,"Você recebeu "..tonumber(id).." dias de vip.") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doSendAnimatedText(topos,'VIP!',180) doPlayerSendTextMessage(cid,21,"Seu nome já esta como [VIP].") elseif item.itemid == 10309 and vip.hasVip(cid) == FALSE then id = tonumber(760) or 1 vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(id)) doPlayerSendTextMessage(cid,25,"Você recebeu "..tonumber(id).." dias de vip.") doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doSendAnimatedText(topos,'VIP!',180) doPlayerSetPromotionLevel(cid, 1) doPlayerSetGroupId(cid, 2) addEvent(free, 300) addEvent(vocation, 500) addEvent(nome, 1000) end end Editado Novembro 5, 2014 10 anos por Slim Shady (veja o histórico de edições) | TFS 0.4 DEV |
Postado Novembro 5, 2014 10 anos em caso de perder se tem que ir no creatureScript achar o arquivo VipEnd ou oq estiver para tirar a vip e mandar ele tb.. ai da para ver oq fazer. Meus topicos.[Gesior]Layout pokemon vrs1.0[854]OtServer Digimon Vrs.1.1 Spoiler http://free.timeanddate.com/countdown/i48ub0vi/n213/cf11/cm0/cu4/ct0/cs0/ca0/cr0/ss0/cac009/cpc000/pcf90/tcfff/fs100/szw448/szh189/tatTempo%20Para%20Resetar/tac000/tptDigimon%20World%20Cerberus%20Online/tpc000/matDigimon%20World%20Cerberus%20Online/mac000/mptEstá%20Online%20à/mpc000/iso2014-07-19T00:01:00/bas3/bat8/bac00f/pa3 Meu Servidor Digimon World Cerberus OnlineDigimon World Cerberus Online Agradecer sempre a todos que ajudaram, o server a ficar pronto deis de Sprites que não conheço,scripts, etc....como o jogo esta na internet e para todos usarem vlw a todos bjus...
Postado Novembro 5, 2014 10 anos Autor em caso de perder se tem que ir no creatureScript achar o arquivo VipEnd ou oq estiver para tirar a vip e mandar ele tb.. ai da para ver oq fazer. a VIP acaba certinho, e perde o name [VIP] o problema que o jogador fica com a vocation VIP, e fica com tutor.. Editado Novembro 5, 2014 10 anos por Slim Shady (veja o histórico de edições) | TFS 0.4 DEV |
Postado Novembro 5, 2014 10 anos a VIP acaba certinho, o problema que o jogador fica com a vocation VIP, e fica com tutor.. entao o problema e na vip xD.. tem esse arquivo EndVip ou algum nome que remove os status da vip quando o player fica sem ta faltando por para remover oq ta faltando (tutor,vocation,name etc.) tipo olha esse e 1 script para remover a vip ao terminar o seu tem que adicionar mais coisas. function onLogin(cid) function Vodka(cid) if isPlayer(cid) then db.executeQuery("UPDATE `players` SET `name` = '"..string.sub(getCreatureName(cid), 7).."' WHERE `id` = "..getPlayerGUID(cid)..";") doRemoveCreature(cid) end end if not isPremium(cid) and getPlayerStorageValue(cid, 9898) == 1 then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerPopupFYI(cid, "Sua vip Account acabou.") setPlayerStorageValue(cid, 9898, -1) setPlayerStorageValue(cid, 13500, -1) if string.find(tostring(getCreatureName(cid)),"[[VIP]]") then addEvent(Vodka, 3*1000, cid) end end return TRUE end Editado Novembro 5, 2014 10 anos por kbpaulo (veja o histórico de edições) Meus topicos.[Gesior]Layout pokemon vrs1.0[854]OtServer Digimon Vrs.1.1 Spoiler http://free.timeanddate.com/countdown/i48ub0vi/n213/cf11/cm0/cu4/ct0/cs0/ca0/cr0/ss0/cac009/cpc000/pcf90/tcfff/fs100/szw448/szh189/tatTempo%20Para%20Resetar/tac000/tptDigimon%20World%20Cerberus%20Online/tpc000/matDigimon%20World%20Cerberus%20Online/mac000/mptEstá%20Online%20à/mpc000/iso2014-07-19T00:01:00/bas3/bat8/bac00f/pa3 Meu Servidor Digimon World Cerberus OnlineDigimon World Cerberus Online Agradecer sempre a todos que ajudaram, o server a ficar pronto deis de Sprites que não conheço,scripts, etc....como o jogo esta na internet e para todos usarem vlw a todos bjus...
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.