Postado Julho 5, 2014 10 anos Autor eu tenho 1 item id: 16107 (na verdade é vip por storage) nada +.. com esse storage eu consegui um script para os pisos.. portanto so quem dar use nesse item consegue passa pelo piso... ((oq eu queria mesmo seria so uma permissao para os players vips (com esse storage) utilizarem armas vips... e os players normais n usarem... tipo armor por lv vc so pode usar c vc tiver level... tendeu ? rep+ por vc estar interessado em me ajudar... function onUse(cid, item, fromPosition, itemEx, toPosition) local config={ removeOnUse = "yes" -- remover quando usar ("yes" or "no") } local days = 30 -- dias que serão adicionados local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 445566) local timenow = os.time() if getPlayerStorageValue(cid, 445566) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 445566, time) local quantity = math.floor((getPlayerStorageValue(cid, 445566) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") if (config.removeOnUse == "yes") then doRemoveItem(item.uid, 1) end return TRUE end edit 2 @AnaPaula nesse cogido qualquer um q for usar vai ser a vocação q tiver ali.. ?? ex se eu colocar 9 (kina vip) e se eu for um paladin eu vou ficar como kina vip ??? (obs: eu usei esse codigo + da erro na distro...) edit 3 as vocações funcionaram.... porem so preciso saber agora como os players iram adquiri-las quando derem use no item de vip... @uppp Editado Julho 5, 2014 10 anos por maper007 (veja o histórico de edições)
Postado Julho 6, 2014 10 anos Aqui, fiz um script para quando o player logar se ele tiver o Storage da tua VIP, ele automaticamente vai ganhar a vocação VIP. data/creaturescripts/scripts copie e cole algum arquivo lua e renomeie para: vipvocation e adicione isso dentro: function onLogin(cid) if getPlayerVocation(cid) == 1 and getPlayerStorageValue(cid, 445566) >= 1 then doPlayerSetVocation(cid, 12) elseif getPlayerVocation(cid) == 2 and getPlayerStorageValue(cid, 445566) >= 1 then doPlayerSetVocation(cid, 11) elseif getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 445566) >= 1 then doPlayerSetVocation(cid, 10) elseif getPlayerVocation(cid) == 4 and getPlayerStorageValue(cid, 445566) >= 1 then doPlayerSetVocation(cid, 9) else doPlayerSendCancel(cid, "Torne-se VIP e ganhe uma vocação especial") end return TRUE end Dentro do arquivo login.lua adicione: registerCreatureEvent(cid, "vipvocation") E por último, adicione esta tag no creaturescripts.xml <event type="login" name="vipvocation" event="script" value="vipvocation.lua"/> Ajudei? De nada \o/ Att Rusherzin
Postado Julho 6, 2014 10 anos Não testei, mais aqui vai um script que quando o loga e não tiver mais VIP ele volta pro templo data\creaturescripts\creaturescripts.xml <event type="login" name="FimVip" event="script" value="fimvip.lua"/> data\creaturescripts\fimvip.lua function onLogin(cid) local temple = { x =655, y = 1014, z = 7} getPlayerStorageValue(cid, 445566) >= 0 if getPlayerStorageValue(cid,55555) ~= 1 then setPlayerStorageValue(cid,55555,1) end else if getPlayerStorageValue(cid,55555) == 1 then doTeleportThing(cid, temple) doPlayerSendTextMessage(cid, 22, "Your VIP Time over!") setPlayerPromotionLevel(cid, 1) setPlayerStorageValue(cid, 55555, 0) end end return true end Actions; Vip door Systema By Mock Movements; Piso que TELEPORTA apenas players PREMIUM
Postado Julho 7, 2014 10 anos Autor Não testei, mais aqui vai um script que quando o loga e não tiver mais VIP ele volta pro templo data\creaturescripts\creaturescripts.xml <event type="login" name="FimVip" event="script" value="fimvip.lua"/> data\creaturescripts\fimvip.lua function onLogin(cid) local temple = { x =655, y = 1014, z = 7} getPlayerStorageValue(cid, 445566) >= 0 if getPlayerStorageValue(cid,55555) ~= 1 then setPlayerStorageValue(cid,55555,1) end else if getPlayerStorageValue(cid,55555) == 1 then doTeleportThing(cid, temple) doPlayerSendTextMessage(cid, 22, "Your VIP Time over!") setPlayerPromotionLevel(cid, 1) setPlayerStorageValue(cid, 55555, 0) end end return true end Aqui, fiz um script para quando o player logar se ele tiver o Storage da tua VIP, ele automaticamente vai ganhar a vocação VIP. data/creaturescripts/scripts copie e cole algum arquivo lua e renomeie para: vipvocation e adicione isso dentro: function onLogin(cid) if getPlayerVocation(cid) == 1 and getPlayerStorageValue(cid, 445566) >= 1 then doPlayerSetVocation(cid, 12) elseif getPlayerVocation(cid) == 2 and getPlayerStorageValue(cid, 445566) >= 1 then doPlayerSetVocation(cid, 11) elseif getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 445566) >= 1 then doPlayerSetVocation(cid, 10) elseif getPlayerVocation(cid) == 4 and getPlayerStorageValue(cid, 445566) >= 1 then doPlayerSetVocation(cid, 9) else doPlayerSendCancel(cid, "Torne-se VIP e ganhe uma vocação especial") end return TRUE end Dentro do arquivo login.lua adicione: registerCreatureEvent(cid, "vipvocation") E por último, adicione esta tag no creaturescripts.xml <event type="login" name="vipvocation" event="script" value="vipvocation.lua"/> tanks... rep+... so queria + 1 coisa só como eu faço pra saber quanto tempo eu tenho de vip ??? e como remover com o god... so falta isso e meu server fica pronto.. xDDD
Postado Julho 8, 2014 10 anos Vou tentar criar para você, um momento ! Editado Julho 8, 2014 10 anos por AlekysRocha. (veja o histórico de edições) Actions; Vip door Systema By Mock Movements; Piso que TELEPORTA apenas players PREMIUM
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.