SkyLigh
Lorde-
Total de itens
2183 -
Registro em
-
Última visita
-
Dias Ganhos
23
Tudo que SkyLigh postou
-
Vip local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -12.5, -130, -12.3, -130) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -12.5, -130, -12.5, -130) arr1 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } arr2 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) setCombatArea(combat1, area1) setCombatArea(combat2, area2) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2 } addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 100, parameters) end function onCastSpell(cid, var) if getPlayerStorageValue(cid,22459) >= 1 then return doCombat(cid, acombat, var) else doPlayerSendCancel(cid, "Desculpe,Só jogadores Vips usam está magia.") end return TRUE end Reset. local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -12.5, -130, -12.3, -130) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -12.5, -130, -12.5, -130) arr1 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } arr2 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) setCombatArea(combat1, area1) setCombatArea(combat2, area2) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2 } addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 100, parameters) end local reset_storage = 2310 -- coloque o storage do seu sistema de reset local quant_reset = 3 -- quantidade de resets para poder passar if getPlayerStorageValue(cid, reset_storage) == quant_reset then return true end Os Dois Juntos. local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -12.5, -130, -12.3, -130) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -12.5, -130, -12.5, -130) arr1 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } arr2 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) setCombatArea(combat1, area1) setCombatArea(combat2, area2) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2 } addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 100, parameters) end local reset_storage = 2310 -- coloque o storage do seu sistema de reset local quant_reset = 3 -- quantidade de resets para poder passar if getPlayerStorageValue(cid, reset_storage) == quant_reset then return true end function onCastSpell(cid, var) if getPlayerStorageValue(cid,22459) >= 1 then return doCombat(cid, acombat, var) else doPlayerSendCancel(cid, "Desculpe,Só jogadores Vips usam está magia.") end return TRUE end
-
duvida sanada reportado
-
va em data / creaturescripts / scripts / firstitems.lua ai voce configura
-
kra isso e o mesmo ip so mudar a port pra 7172
-
sim e so você libera a port 7172
-
pedido [Npc] Dando Um Errozinho Do Then , Facil De Arrumar
pergunta respondeu ao tonynamoral de SkyLigh em Scripts
pronto. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 --------------------------------- --------------------------------- local time = 5 --------------------------------- npcHandler:setMessage(MESSAGE_GREET, "Hello |PLAYERNAME|, I can {create} wings or {information} about wings.") -- muda a frase só yes q não muda function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end --------------------------------- local function Sucesso(cid,id) if isPlayer(cid) then doPlayerAddItem(cid,id,1) doPlayerSendTextMessage(cid, 27, "Success -> You created an ".. getItemNameById(id).."") end end --------------------------------- local function Falha(cid, id) if isPlayer(cid) then doPlayerSendTextMessage(cid, 27, "Failed -> Trying to create your ".. getItemNameById(id).." failed.") end end --------------------------------- local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid --------------------------------- if(msgcontains(msg, 'create')) then selfSay("Well .. I can only create three types of wings. {angelic wings}, {dragon wings} and {fairy wings}.", cid) talkState[talkUser] = 1 return true elseif(msgcontains(msg, 'information')) then selfSay("Well .. I can show you informations about three wings, these wings are {angelic wings}, {dragon wings} and {fairy wings}.", cid) talkState[talkUser] = 2 return true elseif msgcontains(msg, 'angelic wings') and talkState[talkUser] then doShowTextDialog(cid,2407,"####--> Informations <--####\n\nName: Angelic Wigns\nVocation: Mage\nLevel: 40\nPrice NPC: $40.000,00\nWeighs: 40.00 oz\n ") return true elseif msgcontains(msg, 'dragon wings') and talkState[talkUser] == 2 then doShowTextDialog(cid,2417,"####--> Informations <--####\n\nName: Dragon Wings\nVocation: Warrior\nLevel: 40\nPrice NPC: $40.000,00\nWeighs: 40.00 oz\n ") return true elseif msgcontains(msg, 'fairy wings') and talkState[talkUser] == 2 then doShowTextDialog(cid,2412,"####--> Informations <--####\n\nName: Fairy Wings\nVocation: Elf\nLevel: 40\nPrice NPC: $40.000,00\nWeighs: 40.00 oz\n ") return true elseif msgcontains(msg, 'angelical wings') and talkState[talkUser] == 1 then selfSay("Ok .. You to create an angelic wing, 1kk you need, and you will have 35% chance of success, yet you want to create your wing?", cid) talkState[TalkUser] = 3 return true elseif msgcontains(msg, 'dragon wings') and talkState[talkUser] == 1 then selfSay("Ok .. You to create an dragon wings, 1kk you need, and you will have 35% chance of success, yet you want to create your wing?", cid) talkState[TalkUser] = 4 return true elseif msgcontains(msg, 'fairy wings') and talkState[talkUser] == 1 then selfSay("Ok .. You to create an fairy wings, 1kk you need, and you will have 35% chance of success, yet you want to create your wing?", cid) talkState[TalkUser] = 5 return true ------------------------------------------------------------ elseif msgcontains(msg, 'yes') and talkState[talkUser] == 3 then if math.random(1,100) <= 35 and getPlayerItemCount(cid,2160) >= 100 then doPlayerRemoveItem(cid,2160,100) addEvent(Sucesso, time*1000, cid, 2407) talkState[talkUser] = 0 return true elseif math.random(1,100) > 35 and getPlayerItemCount(cid,2160) >= 100 then doPlayerRemoveItem(cid,2160,100) addEvent(Falha, time*1000, cid, 2407) talkState[talkUser] = 0 return true elseif getPlayerItemCount(cid,2160) < 100 then selfSay("Você não tem dinheiro suficiente!", cid) return true ------------------------------------------------------------- elseif(msgcontains(msg, 'yes')) and talkState[talkUser] == 4 then if math.random(1,100) <= 35 and getPlayerItemCount(cid,2160) >= 100 then doPlayerRemoveItem(cid,2160,100) addEvent(Sucesso, time*1000, cid, 2417) talkState[talkUser] = 0 return true elseif math.random(1,100) > 35 and getPlayerItemCount(cid,2160) >= 100 then doPlayerRemoveItem(cid,2160,100) addEvent(Falha, time*1000, cid, 2417) talkState[talkUser] = 0 return true elseif getPlayerItemCount(cid,2160) < 100 then selfSay("Você não tem dinheiro suficiente!", cid) return true ------------------------------------------------------------- elseif(msgcontains(msg, 'yes')) and talkState[talkUser] == 5 then if math.random(1,100) <= 35 and getPlayerItemCount(cid,2160) >= 100 then doPlayerRemoveItem(cid,2160,100) addEvent(Sucesso, time*1000, cid, 2412) talkState[talkUser] = 0 return true elseif math.random(1,100) > 35 and getPlayerItemCount(cid,2160) >= 100 then doPlayerRemoveItem(cid,2160,100) addEvent(Falha, time*1000, cid, 2412) talkState[talkUser] = 0 return true elseif getPlayerItemCount(cid,2160) < 100 then selfSay("Você não tem dinheiro suficiente!", cid) return true end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) -
veja este http://www.xtibia.com/forum/topic/138026-talk-action-advanced-reset-system/
-
Local incorreto reportado para ser movido claro que tem so você utilizar em um servidor a prot 7171 e no outro 7172 Tutorial http://www.xtibia.com/forum/topic/128606-desbloqueando-as-portas-7171-e-7172-no-windows-7/
-
o 1 script ja existe ! basta ir em pasta do ot / config.lua e procure por loginMessage = e escreva entre aspas a msg o 2 nao entendi o 3 http://www.xtibia.com/forum/topic/73866-premium-tile/ o 4 http://www.xtibia.com/forum/topic/140258-tile-de-level/
-
veja http://www.xtibia.com/forum/topic/149970-alguem-sabe-adicionar-novos-pokemons-no-poketibia/
-
@Hadamo refiz o meu testei aki e foi que no meu eu tinha colocado função que ainda nao existe no 8.60 function onSay(cid, words, param) if getPlayerSex(cid) == 0 then doPlayerSetSex(cid, 1) else doPlayerSetSex(cid, 0) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabens voce troco de sexo.") return true end if doPlayerRemoveMoney(cid, 1000) == TRUE then end return true end duvida sanada reportado
- 9 respostas
-
- !change sex
- resolvido
-
(e 1 mais)
Tags:
-
Cogames creio que nao era preciso postar com o meu acima mais parabéns pelo tutorial !
- 9 respostas
-
- !change sex
- resolvido
-
(e 1 mais)
Tags:
-
@Frenesy acho que você nao leu direito ! ele quer que custe 10k n que remova premium aki esta . function onSay(cid, words, param) local money = 1000 if getPlayerMoney(cid,money) == TRUE then if doPlayerRemoveMoney(cid,money) == TRUE then if getPlayerSex(cid) == 0 then doPlayerSetSex(cid, 1) else doPlayerSetSex(cid, 0) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabens voce troco de sexo.") else doPlayerSendCancel(cid, "Desculpe voce nao tem dinheiro suficiente.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end end e em talkactions.xml <talkaction words="!changesex" script="changesex.lua"/>
- 9 respostas
-
- !change sex
- resolvido
-
(e 1 mais)
Tags:
-
Utilize este programa http://www.xtibia.com/forum/topic/128676-mindrages-spellmaker-068b/ eu uso ele para spell la tem como você criar com os 5 efeitos ! e também rápido e fácil Ensinando : Quando você for abrir o programa Vai Number Of Phases ai se vai ate colocar quanto efeitos voce quiser ! e clicka em Begin ai voce segue os dados em type coloke Direction And Targent dps segue os dados ate que quando você ir na chage Área voce clicka aonde vai sair o efeito da magia dps em combat properties se faz o efeito o attack e dps disso você clicka em next que ficara no seu lado esquerdo que ira para a próxima magia ! Espero que isso lhe ajude
-
veja este http://www.xtibia.com/forum/topic/192064-up-event-ganhe-item-ao-upar/
-
Nao testei aki fiz so pelo debug me diz se foi ou não Utilize a talkaction desse jeito \/ function onSay(cid, item, position) local days = 30 -- dias que serão adicionados local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 20191) local timenow = os.time() if getPlayerStorageValue(cid, 20191) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end if getPlayerStorageValue(cid,22450) >= 1 then return doPlayerSendCancel(cid,"Você Já é um player Epic") end doPlayerRemoveItem(cid,2137,1) setPlayerStorageValue(cid, 22450, time) local quantity = math.floor((getPlayerStorageValue(cid, 22450) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid,22,"Parabens ! Agorá Você é um Player Epic") doSendMagicEffect(getPlayerPosition(cid),CONST_ME_POFF) return TRUE end
-
[Lua] Mega Tutorial De Oop [Avançado]
tópico respondeu ao SkyDangerous de SkyLigh em Tutoriais de Scripting
Parabéns Sky Otimo Tutorial -
Título irregular reportado para ser trocado Irei ver se acho uma function para seu script
-
tente fazer assim fale com o player !buyvip se for me avisa que este e de buyvip eu so editei dps eu configuro para se por addvip
-
da qual erro no console?
-
Não então faza assim -- Script SYtem vip 1.0 -- function onSay(cid, words, param) if(words == "!buyvip") then local price = 1000000 if doPlayerRemoveMoney(cid, 1000000) == TRUE then local days = 7 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13545) local timenow = os.time() if getPlayerStorageValue(cid, 13545) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end local name = getCreatureName(cid) local nome = getPlayerGUID(cid) if getPlayerStorageValue(cid, 29000) - os.time() >= 0 then if string.sub(name, 1,6) == "[VIP] " then return true else db.executeQuery("UPDATE `players` SET `name` = '[VIP] "..name.."' WHERE `id`= " .. nome .. ";") doPlayerSendTextMessage(cid,19,"You go kicked in 10 seconds for update you name.") addEvent(doRemoveCreature,10000,cid) end else if string.sub(name, 1,6) == "[VIP] " then db.executeQuery("UPDATE `players` SET `name` = '"..pegarNome(getCreatureName(cid)).."' WHERE `id`= " .. nome .. ";") doPlayerSendTextMessage(cid,19,"You go kicked in 10 seconds for update you name.") addEvent(doRemoveCreature,10000,cid) end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 13545, time) local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de "..price.." gp's para colocar vip.") end elseif(words == "!vipdays") then local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no seu character.") elseif(words == "/checkvip") then if getPlayerAccess(cid) == 5 then if not param then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(param) local pid = getPlayerByNameWildcard(param) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(player, 13545) - timenow)/(24 * 60 * 60)) doPlayerPopupFYI(cid, "O jogador tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no character.") return TRUE end elseif(words == "/addvip") then if getPlayerAccess(cid) == 5 then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(t[1]) local days = t[2] local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end local daysvalue = days*3600*24 local storageplayer = getPlayerStorageValue(player, 13545) local timenow = os.time() local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados "..days.." dias de VIP no seu character.") setPlayerStorageValue(player, 13545, time) local quantity = math.floor((getPlayerStorageValue(player,13545) - timenow)/(3600*24)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem "..quantity.." dias de VIP restantes.") end elseif(words == "/delvip") then if getPlayerAccess(cid) == 5 then local dec = MESSAGE_INFO_DESCR if(param == "") then return TRUE,doPlayerSendTextMessage(cid,18,"Command param required.")end local C,t = {},string.explode(param, ",") C.pos = getPlayerPosition(cid) C.uid = getCreatureByName(t[1]) C.time = ((tonumber(t[2]) == nil) and 1 or tonumber(t[2]))*3600*24 --Tempo da vip por dia. C.days = (tonumber(t[2]) == nil) and 1 or tonumber(t[2]) --Dias de vip. local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end if(getPlayerStorageValue(C.uid,13545) < C.time)then doPlayerSendTextMessage(cid,dec,'O jogador '..t[1]..' não possui '..C.days..' dias de vip.') else doPlayerSendTextMessage(cid,dec,'Você removeu '..C.days..' dias de vip do player '..t[1]..'.') setPlayerStorageValue(C.uid,13545,getPlayerStorageValue(C.uid,13545)-C.time) end doSendMagicEffect(C.pos, math.random(28,30)) end end return TRUE end
-
editei uma talkaction para você va em data / talkactions / scripts / e o arquivo que ta o script que compra a vip e troque por isto -- Script SYtem vip 1.0 -- function onSay(cid, words, param) if(words == "!buyvip") then local price = 1000000 if doPlayerRemoveMoney(cid, 1000000) == TRUE then local days = 7 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13545) local timenow = os.time() if getPlayerStorageValue(cid, 13545) - 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.") db.executeQuery("UPDATE `players` SET `name` = '[Vip] "..name.."' WHERE `id` = "..getPlayerGUID(cid)..";") addEvent(doRemoveCreature, 5*1000, cid, true) setPlayerStorageValue(cid, 13545, time) local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de "..price.." gp's para colocar vip.") end elseif(words == "!vipdays") then local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no seu character.") elseif(words == "/checkvip") then if getPlayerAccess(cid) == 5 then if not param then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(param) local pid = getPlayerByNameWildcard(param) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(player, 13545) - timenow)/(24 * 60 * 60)) doPlayerPopupFYI(cid, "O jogador tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no character.") return TRUE end elseif(words == "/addvip") then if getPlayerAccess(cid) == 5 then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(t[1]) local days = t[2] local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end local daysvalue = days*3600*24 local storageplayer = getPlayerStorageValue(player, 13545) local timenow = os.time() local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados "..days.." dias de VIP no seu character.") setPlayerStorageValue(player, 13545, time) local quantity = math.floor((getPlayerStorageValue(player,13545) - timenow)/(3600*24)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem "..quantity.." dias de VIP restantes.") end elseif(words == "/delvip") then if getPlayerAccess(cid) == 5 then local dec = MESSAGE_INFO_DESCR if(param == "") then return TRUE,doPlayerSendTextMessage(cid,18,"Command param required.")end local C,t = {},string.explode(param, ",") C.pos = getPlayerPosition(cid) C.uid = getCreatureByName(t[1]) C.time = ((tonumber(t[2]) == nil) and 1 or tonumber(t[2]))*3600*24 --Tempo da vip por dia. C.days = (tonumber(t[2]) == nil) and 1 or tonumber(t[2]) --Dias de vip. local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end if(getPlayerStorageValue(C.uid,13545) < C.time)then doPlayerSendTextMessage(cid,dec,'O jogador '..t[1]..' não possui '..C.days..' dias de vip.') else doPlayerSendTextMessage(cid,dec,'Você removeu '..C.days..' dias de vip do player '..t[1]..'.') setPlayerStorageValue(C.uid,13545,getPlayerStorageValue(C.uid,13545)-C.time) end doSendMagicEffect(C.pos, math.random(28,30)) end end return TRUE end
-
tente assim function onStepIn(cid, item, position, ThingPos) local leave = {x=32312, y=31134, z=6} if InitArenaScript == 0 then InitArenaScript = 1 -- make arena rooms free for i = 0,9 do setGlobalStorageValue(42300+i, 0) setGlobalStorageValue(42400+i, 0) end checkArenaRooms({}) end local arena_room = item.actionid local player_arena = getPlayerStorageValue(cid, 42355) if getPlayerStorageValue(cid, arena_room+getPlayerStorageValue(cid, 42355)*10-1) == 1 or arena_room+getPlayerStorageValue(cid, 42355)*10-1 == 42299 then if getGlobalStorageValue(cid, arena_room) == 0 then local monster_uid = getGlobalStorageValue(arena_room+100) if monster_uid > 0 then if isCreature(monster_uid) == TRUE then doRemoveCreature(monster_uid) end end local spawn_pos = getThingPos(arena_room) local monster = doCreateMonster(arena_monsters[arena_room and getPlayerStorageValue(cid, 42355)*10], {x=spawn_pos.x-1,y=spawn_pos.y-1,z=spawn_pos.z}) setGlobalStorageValue(arena_room+100, monster) doTeleportThing(cid, spawn_pos, TRUE) setGlobalStorageValue(arena_room, cid) setGlobalStorageValue(arena_room-1, 0) setPlayerStorageValue(cid, 42350, os.time()+arena_room_max_time) else doTeleportThing(cid, fromPosition, TRUE) doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(getGlobalStorageValue(cid, arena_room))..' is now in next room. Wait a moment and try again.') end else doTeleportThing(cid, fromPosition, TRUE) doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,'First kill monster!') end if arena_room == 42300 then setPlayerStorageValue(cid, 42351, 0) setPlayerStorageValue(cid, 42352, 1) end return TRUE end function checkArenaRooms(param) addEvent(checkArenaRooms, 1000, {}) for i = 42300, 42309 do local player = getGlobalStorageValue(i) if isPlayer(player) == TRUE then local player_storage = getPlayerStorageValue(player, 42350) if player_storage <= os.time() then doTeleportThing(player, leave, TRUE) setPlayerStorageValue(player, 42350, 0) setGlobalStorageValue(i, 0) doPlayerSendTextMessage(player,MESSAGE_STATUS_CONSOLE_ORANGE,'You have been kicked from arena! You have only ' .. arena_room_max_time .. ' seconds for one room.') elseif player_storage - 10 <= os.time() then doPlayerSendTextMessage(player,MESSAGE_EVENT_DEFAULT,'Masz ' .. player_storage - os.time() .. ' sekund, zeby przejsc do kolejnego pokoju!') end else setGlobalStorageValue(i, 0) end end end se nao for n sei pq
-
Testado em 8.60
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
